Skip to content

Commit c59fe12

Browse files
notes on adding shape functions
Co-authored-by: Joshua-Kloepfer <[email protected]>
1 parent 4a20f6c commit c59fe12

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

docs/addingShapeFunctions.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
In order to add shape function, you must create a struct in
2+
https://github.com/SCOREC/meshFields/blob/main/src/MeshField_Shape.hpp.
3+
4+
You must define numNodes, meshEntDim, and Order as const variables as well as the functions
5+
getValues and getLocalGradients. You then need to define a mapping from how you store the
6+
nodes to the ordering of the shape function defined earlier. The Omegah mappings are in
7+
https://github.com/SCOREC/meshFields/blob/main/src/MeshField.hpp#L63. In the Jacobian
8+
tests we also an identity mapping defined as another example:
9+
https://github.com/SCOREC/meshFields/blob/main/test/testElementJacobian2d.cpp#L12.
10+
11+
In order to use integration with the added shape function it must be added here:
12+
https://github.com/SCOREC/meshFields/blob/main/src/MeshField_Integrate.hpp#L44.
13+
14+
Finally, when trying to compute an integral using the shape function, a class derived from the
15+
class Integrator (defined here:
16+
https://github.com/SCOREC/meshFields/blob/main/src/MeshField_Integrate.hpp#L204) must be
17+
declared and should implement the atPoints function. An example of this can be found here:
18+
https://github.com/SCOREC/meshFields/blob/main/test/testCountIntegrator.cpp#L41.

0 commit comments

Comments
 (0)