Convert a simple (scalar) local basis into a global basis. More...
#include <LocalToGlobalAdapter.hpp>
Public Types | |
using | Cache = BasisCache |
using | Traits = LocalToGlobalBasisAdapterTraits< typename LocalBasis::Traits, Geometry::coorddimension > |
Public Member Functions | |
LocalToGlobalBasisAdapter (Cache const &cache, Geometry const &geometry) | |
Construct a LocalToGlobalBasisAdapter. More... | |
std::size_t | size () const |
Return the number of local basis functions. | |
std::size_t | order () const |
Return maximum polynomial order of the base function. More... | |
void | evaluateFunction (typename Traits::DomainLocal const &x, std::vector< typename Traits::Range > &out) const |
Evaluate the local basis functions in the local coordinate x | |
auto const & | valuesAt (typename Traits::DomainLocal const &x) const |
void | evaluateGradient (typename Traits::DomainLocal const &x, std::vector< typename Traits::GradientRange > &out) const |
auto const & | gradientsAt (typename Traits::DomainLocal const &x) const |
void | evaluatePartial (typename Traits::DomainLocal const &x, std::size_t comp, std::vector< typename Traits::PartialRange > &out) const |
auto const & | partialsAt (typename Traits::DomainLocal const &x, std::size_t comp) const |
Convert a simple (scalar) local basis into a global basis.
The local basis must be scalar, i.e. LocalBasis::Traits::dimRange must be 1 It's values are not transformed.
For scalar function \(f\), the gradient is equivalent to the transposed Jacobian \(\nabla f|_x = J_f^T(x)\). The Jacobian is thus transformed using
\[ \nabla f|_{\mu(\hat x)} = \hat J_\mu^{-T}(\hat x) \cdot \hat\nabla\hat f|_{\hat x} \]
Here the hat \(\hat{\phantom x}\) denotes local quantities and \(\mu\) denotes the local-to-global map of the geometry.
BasisCache | Type of the local-basis cache containing local basis evaluations to adopt. |
Geometry | Type of the local-to-global transformation. |
NOTE: The adapter implements a caching of local basis evaluations at coordinates.
|
inline |
Construct a LocalToGlobalBasisAdapter.
node | The basis node in the typetree containing the local basis to adopt. |
geometry | The geometry object to use for adaption. |
|
inline |
Return the full (global) gradient of the local basis functions in the local coordinate x
Referenced by LocalToGlobalBasisAdapter< BasisCache, Geometry >::gradientsAt().
|
inline |
Return the (global) partial derivative in direction comp
of the local basis functions in the local coordinate x
Referenced by LocalToGlobalBasisAdapter< BasisCache, Geometry >::partialsAt().
|
inline |
Return the full (global) gradient of the local basis functions in the local coordinate x
and return the result using a reference to a thread_local (or static) vector.
References LocalToGlobalBasisAdapter< BasisCache, Geometry >::evaluateGradient().
|
inline |
Return maximum polynomial order of the base function.
This is to determine the required quadrature order. For an affine geometry this is the same order as for the local basis. For other geometries this returns the order of the local basis plus the global dimension minus 1. The assumption for non-affine geometries is that they are still multi-linear.
|
inline |
Return the (global) partial derivative in direction comp
of the local basis functions in the local coordinate x
and return the result using a reference to a thread_local (or static) vector.
References LocalToGlobalBasisAdapter< BasisCache, Geometry >::evaluatePartial().
|
inline |
Evaluate the local basis functions in the local coordinate x
and return the result using a reference to a thread_local (or static) vector.