Repository navigation
Mapped element - #109
Mapped element#109jacobmerson wants to merge 12 commits into
Conversation
To support non-isoparametic elements, we split the evaluation of the nodal coefficients and the multiplication with the shape functions
MappedElement composes a field element with a geometry element over the coordinate field (see SCOREC#100)
In the case of affine (straight sided) and isoparametric elements we will want to take compile-time optimized code paths so the performance of a MappedElement is similar to a base FieldElement
|
@cwsmith can you please take a look at this PR sometime this week? There are a number of ongoing activities that need this support for non-isoparametric elements. |
There was a problem hiding this comment.
should unit tests be added for this?
|
|
||
|
|
||
| template <int dim, typename Element, typename CoordinateMap> | ||
| struct InterpolateElementFunctor |
There was a problem hiding this comment.
this doesn't appear to be used anymore - can it be removed?
|
|
||
| /** | ||
| * @brief | ||
| * contract an element's coefficients with the basis at a parametric |
There was a problem hiding this comment.
I think we should add 'contract' to the nomenclature (and, if so, other related tensor algebra terms), or replace its use with a verbose description.
|
|
||
| /** @brief the geometry map is affine, so the Jacobian is constant over | ||
| * each element */ | ||
| static constexpr bool IsAffine = decltype(GeomElem::shapeFn)::Order == 1; |
There was a problem hiding this comment.
a bilinear quad and trilinear hex will be Order = 1 but their Jacobians are not constant (disclosure: claude tipped me off to this when checking the changes against docs/addingShapeFunctionsForOmegah.md) - it looks like this can be caught by also checking for simplicies via getTopology()
There was a problem hiding this comment.
Right...the xi*eta term.
| MeshField::Real dvFromGrad = 0; | ||
| for (size_t j = 0; j < dim; ++j) | ||
| dvFromGrad += (posP[j] - posM[j]) / (2 * h) * g[j]; | ||
| if (!(Kokkos::fabs(dvFromGrad - dv) <= 1e-7)) |
There was a problem hiding this comment.
can we use MeshField::Epsilon (1e-12) instead of 1e-7 here? If not, should we define a looser constant in MeshFields_Defines.hpp or would a smaller value of h help?
This PR is an alternative strategy to handle non isoparametric geometry. The mapping policies should be extensible to handle the Bell elements from M3DC1 and when we get to it, vector elements.
See discussion in #100. This is an alternative strategy to what @Sichao25 implemented in #99.
Note: this PR is based on changes in #108. If you merge that PR rather than rebase it, it'll make merging this PR much simpler.