Hi Dan,
I have a similar problem, in which I want to delete irregular regions
from a mesh. I can think of two approaches---a simple one and a more
general one.
(1) If you just need a uniformly refined rectangular domain, and the
deleted regions within this domain remain fixed throughout the
computation, you should take a look at the various implementations of
GridGenerator::subdivided_hyper_rectangle. One of them takes a cell
mask as an argument, to delete certain cells. This is simple path,
but obviously limits the types of geometries you can construct.
(2) For more general cases, Wolfgang and I have been working on
implementing a "FENothing" element that is useful in this context.
See
http://www.dealii.org/developer/doxygen/deal.II/classFE__Nothing.html
This element has no degrees of freedom. The basic idea is to use a
HP dof_handler, and assign normal finite elements to cells that you
want to retain in the computation, and assign FENothing elements to
those that you want to (implicitly) delete. When the distibute_dofs
call is made, no degrees of freedom are then assigned to the desired
cells.
There are several simple example problems of how this works in the
test suite. Right now the implementation seems to work well for FE_Q
elements on scalar problems, and for certain cases where FE_Q
elements are combined into an FE_System. I can construct plenty of
test cases that fail, however, because of the complex interactions
that take place when building hanging node constraints. So,
depending on your problem and the FE spaces you need to use, this
approach may work right away, or may not!
I have been meaning to improve the robustness of the implementation,
but have been distracted by other projects. Hopefully I can back
around to it sometime in the next few weeks. If this seems like a
good route for you, I am happy to give additional pointers. Just let
me know.
Hope that helps,
Josh
At 5:34 PM -0500 11/4/09, [email protected] wrote:
Hi,
I am soon going to be turning from the idealized problem I have been
working with for the last 2 years to one with more realistic geometry and
parameters, and it might call parts of the domain to be "masked out" -
based on some criterion certain dofs (possibly large regions of them) will
be taken out of the FE solve and the relevant quantities will be solved
for by more locally-defined relations.
If I still want to use a rectangular grid (and I think I do, rather than
creating a custom mesh), one of the ways I can think of to handle this is
to use a ConstraintMatrix - basically set the DoF values to zero in those
masked regions. (I haven't completely thought out how I will do it yet.)
But this seems like an awkward way to do this, if the number of entries in
the ConstraintMatrix is on the order of the number of DoFs, right?
Is there some cell-wise property in the triangulation that can be used so
that the above step isn't necessary - so that, when distribute_dofs() is
called, it knows that certain dofs on certain cells will not be part of
the calculation, and so the distribution, number, and ordering of dofs is
calculated accordingly?
Thanks very much
Dan
_______________________________________________
dealii mailing list http://*poisson.dealii.org/mailman/listinfo/dealii
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii