Skip to content

Commit

Permalink
Add FiniteElementCollection::GetTraceFE
Browse files Browse the repository at this point in the history
This is a variable-order version of TraceFiniteElementForGeometry, analogous to
FiniteElementCollection::GetFE, which is a variable-order version of
FiniteElementForGeometry.
  • Loading branch information
pazner committed May 1, 2024
1 parent 9aba232 commit c768c5f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions fem/fe_coll.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,17 @@ class FiniteElementCollection
return var_orders[p]->FiniteElementForGeometry(geom);
}

/// Variable order version of TraceFiniteElementForGeometry().
/** The order parameter @a p represents the order of the highest-dimensional
FiniteElement%s the fixed-order collection we want to query. In general,
this order is different from the order of the returned FiniteElement. */
const FiniteElement *GetTraceFE(Geometry::Type geom, int p) const
{
if (p == base_p) { return TraceFiniteElementForGeometry(geom); }
if (p >= var_orders.Size() || !var_orders[p]) { InitVarOrder(p); }
return var_orders[p]->TraceFiniteElementForGeometry(geom);
}

/// Variable order version of DofForGeometry().
/** The order parameter @a p represents the order of the highest-dimensional
FiniteElement%s the fixed-order collection we want to query. In general,
Expand Down

0 comments on commit c768c5f

Please sign in to comment.