This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Function Space Compatibility

0 votes

Dear all,

I don't understand if what I do is ok, or will lead to problems in the future.

We have several UFLs that all make use of the very same definitions as these:

cell     = tetrahedron
elementS = FiniteElement("DG", cell, 0)
elementV = VectorElement("Lagrange", cell, 2)
elementT = TensorElement("Discontinuous Lagrange", cell, 0)

Now, every UFL gets compiled and produces a header file, let's take for instance a simple elastic/elastoplastic example:

// Vector space
V.reset(new elasticity::Form_a::TestSpace(mesh.object));

This line initializes a new function space V in the elasticity class. The elastoplastic class does not reinitialize V, and yet, it works.

Can I safely assume that function spaces in different UFLs, as long as they are the consistent as in this example (same type and cell, same mesh), are all compatible?

Can I export them in a "common header"?

Thanks!

asked Sep 6, 2016 by senseiwa FEniCS User (2,620 points)
...