Andreas,
> You are right that one could just leave the mapping as a simple 2D and change
> the weak formulation. However I think that it is possible to solve an
> axisymmetric problem without touching the weak formulation.
You can, in principle, but it requires some tricks. If you want to use an
axisymmetric formulation, then in essence you formulate your shape functions as
phi_i(r,phi,z)
so that they are only defined on a r/z mesh, with no dependence on phi -- but
nevertheless defined in 3d. The point is that you have to have a 2d mesh for
the cross section in 3d. It's not a convenient set up. It's easier to recall
that if you have
\int_\Omega F(r(x,y,z),z) dx dy dz
(i.e., with an integrand that formally depends on x,y,z, but in reality only
on r,z) can be expressed as
\int_a^b \int_0^{2pi} \int_0^R F(r,z) r dr dphi dz
= 2pi \int_a^b \int_0^R F(r,z) r dr dz
In other words, the only change to the bilinear form is the addition of a
factor of 2*pi*r to all integrals that might appear in the formulation -- not
a bothersome task.
> I have been
> working for quite some time with GetDP, and there that is the standard way.
I'm curious how that works there.
> For axisymmetric problems one just needs to change the "Jacobian" which in
> GetDP stands for the mapping between real cells and the reference/unit cell.
So maybe the only difference there is the factor of 2*pi*r to |det J| (which
is part of the JxW factor that appears in every deal.II integral).
> I
> think the two approaches in the end boil down in the same equations and system
> assembly. In one case the coordinate transform scaling factors are considered
> as a part of the PDE and need to be explicitly inserted in the weak form,
> while in the other they are considered as part of the cell mapping and would
> appear implicitly in the jacobian of the transfrom (the JxW factors in the
> Deal.II framework).
Yes, that seems reasonable.
> From a programming point of view, I think that the latter approach would
> produce more generic and reusable code, that is why I first tried to pursue
> it. I thought that this could be done in Deal.II, similarly to GetDP, by using
> an appropriate Mapping object. I guess such a Mapping class is not implemented
> though. In case I am wrong and it is (maybe a MappingManifold associated with
> a CylindricalManifold), would it be possible to help on how to implement it?
You're correct -- the mapping classes don't do that. I also think that they
shouldn't: They have a different purpose and at least at the moment I don't
quite see how that could be put into what the mappings are supposed to do. The
place to do it might be where the FEValues class combines quadrature weights
with the determinant of the Jacobian -- though I might still think that it's
not so cumbersome to just keep everything in user code -- it'll be at most a
dozen lines of code for most applications.
> In general, how can I associate a MappingManifold object with a certain
> Manifold object? In the documentation, such an association is mentioned
> several times, but it is not specified how it can be implemented.
Every piece of a triangulation (cell, face, edge) has a manifold associated
with it. MappingManifold will simply use whatever it finds on a given object
-- you don't need to explicitly associate anything.
Can you point out where the places you mention about the documentation are?
Maybe we can clarify the text there. (In fact: If you wanted to, that would
make for a nice pull request to get used to contributing to the library! ;-) )