Joshua, > Is there a way to delete cells from a triangulation, such that no > degrees of freedom are distributed to them by the DoFHandler?
I don't think there is a simple way to achieve this right now. > I have > a selectively refined mesh (with hanging nodes), but only need to > solve a boundary value problem on a subregion of the whole domain. > One option would be to constrain the unnecessary degrees of freedom, > but I would end up constraining about 50% of the degrees of freedom. That is at least one way to do it. Constraints are not terribly expensive, so that could work. > I also thought of creating a new triangulation based on the vertex and > cell information for the desired cells, but this does not seem to be > feasible if the triangulation has hanging nodes, because neighborship > information is lost along the way. Yes, that wouldn't work easily. > Instead, is there a simple way I can mark certain cells as inactive? > It seems that the usual definition of an inactive cell is a cell that > has refined children, but this would not be the case for my > situation. Ideally, it would be nice if one could pass a > FilteredIterator to the DoFHandler, so that degrees of freedom would > be assigned to the requested subset of cells, rather than to the > active set. Would it be difficult to add this additional > functionality (in a modular way), or is the degree of freedom handling > too tightly linked to the definition of the active set? At least right now this seems like too big a change. Now, here's something I've thought about for a few years already for situations like yours: we have the hp::DoFhandler class that allows to use different finite elements on different cells. One class that doesn't currently exist but that would be rather trivial to implement (all its functions are empty, and it just makes sure it calls the base class's constructor correctly) is something I've mentally always called FENothing -- a finite element that simply doesn't have any degrees of freedom at all and so can only express the zero function. Assuming such a class existed, you could set the active_fe_index of each cell where you want to compute something to the FE you are currently using, and on the inactive cells you would set it to use the FENothing. The hp::DoFHandler would then assign degrees of freedom on each cell according to the finite element that lives there -- which means no dofs on the cells in your inactive region. The hp::DoFHandler is quite happy to produce discontinuous function spaces, which is what is going to happen when you use FENothing, so you will somehow have to describe boundary conditions at the active-inactive interface, but I suppose you have to do that anyhow. If you're interested in going down this road and try your hand implementing the FENothing let us know and we'll give you pointers where to start. Best W. -- ------------------------------------------------------------------------- Wolfgang Bangerth email: [email protected] www: http://www.math.tamu.edu/~bangerth/ _______________________________________________ dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii
