Hi all,
I am solving a elastodynamics (vector valued wave) equation using FEniCS.
I create the 2D mesh in Gmsh discretised into triangular elements of second order. Therefore, it is my understanding that the element is similar to what one would obtain by using (in FEniCS):
FiniteElement('P', 'triangle', 2) ,i.e., a triangle with six nodes
Q.1: The dof for a simple scalar problem is equal to the no. of nodes on the mesh. Therefore, the dof for my problem should be equal to twice the no. of nodes on the mesh right? This is because each node can only experience displacement in 'x' or 'y' direction as a result of wave propagation. Is this correct?
Q.2: Each triangular element on the mesh will have 12 dof. Right?
Q.3: I implement layers with different properties and therefore define the function space as follows:
V = VectorFunctionSpace(mesh, "CG", 2) #Continuous Galerkin for the displacement field
V0 = FunctionSpace(mesh, 'DG', 0) #Discontinuous Galerkin for the material property fields
So how do I explain this in simple terms? Can I say that I am using the second order Lagrange (also called Continuous Galerkin) family of basis function to approximate my solution 'u' and I am using the Discontinuous Galerkin basis function to define my different properties in different domains?
Q.4 I am aware that DG is a version of classical FEM which allows its basis functions to be discontinuous across elements. So are the basis function being used by FEniCS in DG functionspace called something else or are they popularly known as DG basis functions only?
Q.5 I am not quite able to understand how a CG and DG method are being used in the same code to solve the same problem. The input is defined in a different function space and the output in defined in a different function space? Is there a difference between Vectorfunctionspace and functionspace?
Thanks a lot for your help!