Manuel,
> I need to solve a system of many PDEs (currently 18). The actual number
> changes since the PDEs are defined by a truncated infinite sum and some
> recursive equations. Anyway, the first two equations are defined on a 2D or 3D
> domain (call it Omega) and the rest is only defined on the boundary of Omega.
> My first idea was to create a FESystem object and attach to it 2 FE spaces
> defined on Omega and 16 FE spaces defined on the boundary. That is, I tried
> these options
>
> * FESystem<1, 2> fe(FE_Q<2, 2>(degree), 2, FE_Q<1, 2>(degree), 16)
> * FESystem<2, 2> fe(FE_Q<2, 2>(degree), 2, FE_Q<1, 2>(degree), 16)
>
> However, that produced compilation errors. What I understand is that the
> FESystem must be created by either FE spaces defined in Omega or FE spaces
> defined in the manifold, but not a combination.
Yes, that is correct -- because FESystem<dim,spacedim> is derived from
FiniteElement<dim,spacedim>, the elements that form the system must have a
unique 'dim' parameter.
> As a way around I tried (a
> very ugly hack) where I defined all FE spaces in Omega and then add
> constraints to all DoFs associated with the internal nodes for the variables
> that are defined on the manifold. This sounds like a tremendous waste of
> resources since most of the equations in my system live in the manifold, so I
> end up constraining most of the DoFs. And even worse, it produced a matrix
> that seems to be sometimes singular and sometimes non-singular. That is, I can
> solve the system and get accurate results (I have the exact solution) for some
> grids but in other grids the matrix is singular so I get NaNs. I suspect this
> problem is a consequence of constraining most of my DoFs. FYI, the solver that
> I am using is the MUMPS implementation in PETSc.
I don't know about the origins of the illposedness, but this is a valid
approach. ASPECT, for example, does this kind of thing when implementing a
free boundary. You could take a look here
https://github.com/geodynamics/aspect/blob/master/include/aspect/mesh_deformation/free_surface.h
https://github.com/geodynamics/aspect/blob/master/source/mesh_deformation/free_surface.cc
In particular, ASPECT just doesn't do anything at all with the interior
degrees of freedom in the solve phase:
https://github.com/geodynamics/aspect/blob/master/source/mesh_deformation/free_surface.cc#L345-L352
In other words, we happily solve a linear system with a matrix with a lot of
zero rows and columns. I've got questions about this here:
https://github.com/geodynamics/aspect/issues/3110
But it seems to work.
> I wonder if there is a proper or standard way to construct systems that are
> defined by some equations in a domain and some in a manifold of the domain. I
> definitely don't think constraining most of my DoFs is the way to go.
The "proper" way to deal with this would probably be to have two DoFHandler
objects with dim and dim-1, and then to build a coupled linear system. I
believe that we have most of the building blocks for this already in place
(take, for example, a look at step-60 and step-70) but there is no concrete
example of coupling bulk and surface problems. It has been on my TODO list for
quite a while already to write a tutorial program for this and see what it
would take to make that work properly.
Out of curiosity, what is the problem you are trying to solve?
Best
W>
--
------------------------------------------------------------------------
Wolfgang Bangerth email:
bang...@colostate.edu
www:
http://www.math.colostate.edu/~bangerth/