- Thank you received: 0
Generating Finite Element Space with FESpace
- elizabethmonte
- Topic Author
- Offline
- New Member
Less
More
4 years 3 weeks ago #3263
by elizabethmonte
Generating Finite Element Space with FESpace was created by elizabethmonte
Hello,
I'm trying to use FESpace to construct finite element spaces. However, for certain types of elements I get an error of the sort NgException: undefined fespace 'H1'. I've attached a script with a basic test and I only seem to be able to use FESpace for VectorH1 and VectorL2 elements.
Are certain types of finite element space only available from the generator functions directly?
I'm trying to use FESpace to construct finite element spaces. However, for certain types of elements I get an error of the sort NgException: undefined fespace 'H1'. I've attached a script with a basic test and I only seem to be able to use FESpace for VectorH1 and VectorL2 elements.
Are certain types of finite element space only available from the generator functions directly?
Attachments:
4 years 3 weeks ago #3265
by joachim
Replied by joachim on topic Generating Finite Element Space with FESpace
Hi Elizabeth,
the old, internal name of the fespaces (as used ngs.FESpace(fes_type, ..)) is not the same as the Python class name.
You can figure out the typename as follows:
It gives you 'h1ho'.
Alternatively, you can create an object of the python class given as string via
Joachim
the old, internal name of the fespaces (as used ngs.FESpace(fes_type, ..)) is not the same as the Python class name.
You can figure out the typename as follows:
Code:
fes = ngs.H1(mesh, order=3)
print (fes.type)
Alternatively, you can create an object of the python class given as string via
Code:
fes = getattr(ngs, fes_type) (mesh, order=3)
Joachim
- elizabethmonte
- Topic Author
- Offline
- New Member
Less
More
- Thank you received: 0
4 years 3 weeks ago #3266
by elizabethmonte
Replied by elizabethmonte on topic Generating Finite Element Space with FESpace
I see, thank you! That works perfectly.
Time to create page: 0.106 seconds