Is it possible to add two materials to a finite element space?
I have three materials and I want a fes defined on two of them. mesh.GetMaterials() contains [“metal”, “outer_rock”, “outer_air”] and I want one fes to contain only rock and air.
I tried with this without success:
fes = HCurl(mesh, definedon=mesh.Materials("outer_.*"))
the lowest order HCurl assignes one dof for each edge, even if it is only locally defined. So the number of dofs will not be reduced. The active dofs are marked in the FreeDofs BitArray:
print ("active dofs ", fes.FreeDofs().NumSet(), " out of ", len(fes.FreeDofs()))
To reduce the space to the used dofs, do
fes = Compress(HCurl(mesh, ...) )
If this does not solve the problem, send a MWE.
Joachim
1 Like