-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Towards ALE with simplex elements #609
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a good step towards using simplex in ALE, more complex applications requiring higher-order meshes and coarse mappings on an application level. Getting away from inheritance in this case in mandatory due toMappingQCache
; I support this change! #610 addresses the first point in your list already, and the second one will follow within this PR, right?
f660a6f
to
407eb93
Compare
@richardschu In commit 407eb93, I finally adapted the interfaces of Background info: The idea is that in @bergbauer The changes of this PR might affect other test cases we had in the past with a "static" mapping of type |
407eb93
to
c9f40b5
Compare
The proposed design fits my intended applications - in fact, I think I have a case at hand, where we might be able to improve the quality of the mappings on the coarser levels, just by allowing them to be read from a file rather then interpolated from the fine grid. Regarding the vector of ALE solvers, we will have to see how the impact is, but that is definitely an interesting topic for the future! ATM, my focus is on getting valid static mappings for more complex geometries that undergo strong maps from some undeformed piecewise linear grid, but I think this is anyways strongly connected to the coarse grid mappings in the dynamic (ALE) case. |
@@ -50,19 +50,20 @@ namespace ExaDG | |||
* member functions of dealii::MappingQCache in dealii, rendering this class superfluous in ExaDG. | |||
*/ | |||
template<int dim, typename Number> | |||
class MappingDoFVector : public dealii::MappingQCache<dim> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the fundamental change of this PR.
This PR redesigns the class
MappingDoFVector
in order to allow the use of simplex elements for ALE problems.Previously, the class
MappingDoFVector
was derived fromdealii::MappingQCache
(so that ALE mappings have always been of typedealii::Mapping
), while the present PR suggests to change the design from inheritance to composition, in order to allow both hypercube and simplex elements. In consequence, the classMappingDoFVector
has now a member functionget_mapping()
returning adealii::Mapping
.What makes this PR a somewhat bigger effort is the fact that we have used dynamic casts to
dealii::MappingQCache
in the multigrid preconditioner, triggering certain function calls (i.e. initialization of coarse mappings) if this dynamic cast is successful. Since dynamic casting is no longer possible with the composition-design suggested above, we need to make the multigrid algorithm explicitly aware of a mapping of typeMappingDoFVector
, e.g. via additional parameters passed to the multigrid preconditioner.I created a new class
MultigridMappings
to be initialized on theApplication
orDriver
level. This will require changes in interfaces and will require to touch many many files. I did not do this so far in order to first discuss the basic design. A straightforward extension of existing interfaces would be to extendApplication::setup(grid, mapping)
(seeConvDiff
module with PR Move grid and mapping to driver for ConvDiff module #596, other modules have not been changed accordingly so far ... @richardschu maybe let's discuss how / when we want to do this change for other modules) toApplication::setup(grid, mapping, multigrid_mappings)
with similar changes for
Operator::setup()
andMultigridPreconditioner::initialize()
.Please note that ALE is not the only use case of
MappingDoFVector
. There are applications where we want to prescribe the static mapping as aMappingDoFVector
, and there might be applications where we cannot construct the mappings for coarse multigrid levels via "standard"MultigridTransfer
utilities, but need to create the mapping explicitly for every coarse triangulation (via an application-specific implementation).@kronbichler @richardschu @peterrum It would be great if you could share your ideas on this PR / topic before I run through all the files to be changed.