Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

Cartesian product finite element spaces

More
2 years 10 months ago #3802 by walker_tr9
I would like to create a vector valued finite element space. I know you can do VectorH1, but what if the number of components is not equal to the spatial dimension?

For example, suppose I want an H1 vector-valued function (defined on a 3-D mesh), with 5 components. How should I do it? I guess I could do this:

V = H1(mesh,order=k, dirichlet="whatever")
X = FESpace([V,V,V,V,V])

Would that work?

Also, is there a tensor-valued finite element space option? Say for symmetric matrices? That are trace-free?
More
2 years 10 months ago #3803 by Guosheng Fu
That one shall work, but you need to then build your own differential operators.

The "MatrixValued" option can do tensors, which includes full tensor, symmetric, or deviatoric tensor. I guess the symmetric deviatoric tensor might be the one you are looking for.

e.g.,
Sigma = MatrixValued(H1(mesh, order=2), mesh.dim, symmetric=True, deviatoric=True)
More
2 years 10 months ago #3804 by walker_tr9
Thanks for this. But there isn't a way to set the number of components in VectorH1? That should be an option.
More
2 years 10 months ago #3805 by mneunteufel
You can set the dimensions explicitly by
Code:
fes = H1(mesh, order=k, dim=5)
or using a product space with the syntax
Code:
fes = H1(mesh, order=k)**5

Best,
Michael
Time to create page: 0.131 seconds