That key point relates to the constraint equation algorithm, though... but I guess that's the only hard part?I think that the first thing I'd upgrade for dirichlet nodes and edges would be the API (very straightforward "add_foo(ForwardDeclaredFoo&)" declarations); next the data structures (no modifications necessary if we go the "use boundary ids corresponding to nodes and edges" route), finally the algorithms (not too hard once the data structures are done). No, scratch that. The very first thing I'd do is add "boundary ids that apply to edges" support. As to the algorithm... cross your fingers, but I suspect that with the current refactoring all you'd have to do is upgrade the "do_this_side", "is_boundary_node[n]" and "is_boundary_edge[e]" calculations in ConstrainDirichlet::apply_dirichlet_impl and you'll be done.
Well, that was easy! The attached patch works for me for adding nodal Dirichlet BCs.
I'll look at adding support for edge Dirichlet BCs next. David
>From f9ff2a35a9c8bec3991a7bd793f705f759ebb0a9 Mon Sep 17 00:00:00 2001 From: David Knezevic <dkneze...@seas.harvard.edu> Date: Thu, 10 Oct 2013 15:03:16 -0400 Subject: [PATCH 1/2] Updated Dirichlet constraints to handle nodes --- src/base/dof_map_constraints.C | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/base/dof_map_constraints.C b/src/base/dof_map_constraints.C index f1f6091..841096a 100644 --- a/src/base/dof_map_constraints.C +++ b/src/base/dof_map_constraints.C @@ -374,6 +374,18 @@ using namespace libMesh; is_boundary_edge[e] = true; } + // We can also impose Dirichlet boundary conditions on nodes, so we should + // also independently check whether the nodes have been requested + for (unsigned int n=0; n != elem->n_nodes(); ++n) + { + const std::vector<boundary_id_type>& bc_ids = + boundary_info.boundary_ids (elem->get_node(n)); + + for (std::size_t i=0; i != bc_ids.size(); ++i) + if (b.count(bc_ids[i])) + is_boundary_node[n] = true; + } + // Update the DOF indices for this element based on // the current mesh dof_map.dof_indices (elem, dof_indices, var); -- 1.8.3.2
------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________ Libmesh-devel mailing list Libmesh-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-devel