On Wed, 5 Oct 2016, Giacomo Rosilho de Souza wrote: > I'm using a mesh which has, suppose, three levels of refinement. In my > algorithm I can't use the > heterogeneously_constrain_element_matrix_and_vector method in the usual > way, but at some point I need to impose the constraints conditions on > the hanging nodes. I saw that there's this enforce_constraints_exactly > function which can surely do the job (didn't tried yet). I imagine that > this will impose constraints on the whole set of hanging nodes. I was > wondering if it is possible to impose these constraints only on a subset > of these, for example only on the hanging nodes at the interface between > the first and second level of refinement, and do not touch those at > interface between second and third level of refinement.
In enforce_constraints_exactly, the constraints only exist as constraint equations; the data structure does not record whether those equations were generated via hanging node constraints of level N, periodic constraints, Dirichlet constraints, user-supplied constraints, etc. So there's definitely no easy way to enforce a subset of constraint equations based on where they come from. You could save data on which constraints would be generated via which mechanism yourself, at the user level... but the trouble here is that we pre-expand constraint equations, so the final equations can be a complete mixture: it's entirely possible for the equation "a = .5*b + .25*c + 5" to be the a combination of the level-3 hanging node constraint "a = .5*d + .5*e", the level-2 hanging node constraint "e = .5*c + .5*f", the periodic boundary constraint "c = b", and the Dirichlet boundary constraint "f = 20". I can't imagine how you'd hope to disentangle all that. I'm also having trouble imagining why you'd want to. I've never looked at an intermediate solution and thought "Darn, that solution is conforming? I was hoping it would be conforming to some constraints but broken at others." If you're worried about efficiency, then you could keep track of constrained dofs you care about as you loop over a subset of elements, then loop over those dofs and apply only their constraints. --- Roy ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Libmesh-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-users
