BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
belfem::fem::ElementMapper Class Reference

Inverse element map: given physical coordinates aX inside an element, solves x(xi) = aX for the natural coordinates xi. More...

#include <cl_IF_ElementMapper.hpp>

Public Member Functions

 ElementMapper ()
 constructor; allocates the interpolation-function factory owned by this mapper
 ~ElementMapper ()
 destructor; releases cached interpolation functions and the factory
 ElementMapper (const ElementMapper &)=delete
 non-copyable: the class owns raw pointers (mFactory, cached InterpolationFunction*); copying would double-delete on destruction
ElementMapperoperator= (const ElementMapper &)=delete
void link (mesh::Element *aElement)
 binds the mapper to an element.
bool evaluate (const Vector< real > &aX, Vector< real > &aXi)
 solves x(xi) = aX for xi.
void set_dimension (const uint aDim)
 sets the spatial dimension of the physical coordinates.
void weights (const Vector< real > &aXi, Vector< real > &aWeights)
 computes the weights by evaluating the shape function

Detailed Description

Inverse element map: given physical coordinates aX inside an element, solves x(xi) = aX for the natural coordinates xi.

Uses closed-form inverses for TRI3 / QUAD4 / TET4 and Newton iteration (seeded by the linear / bilinear inverse where available) for higher-order or curved elements.

Constructor & Destructor Documentation

◆ ElementMapper() [1/2]

belfem::fem::ElementMapper::ElementMapper ( )

constructor; allocates the interpolation-function factory owned by this mapper

◆ ~ElementMapper()

belfem::fem::ElementMapper::~ElementMapper ( )

destructor; releases cached interpolation functions and the factory

◆ ElementMapper() [2/2]

belfem::fem::ElementMapper::ElementMapper ( const ElementMapper & )
delete

non-copyable: the class owns raw pointers (mFactory, cached InterpolationFunction*); copying would double-delete on destruction

Member Function Documentation

◆ evaluate()

bool belfem::fem::ElementMapper::evaluate ( const Vector< real > & aX,
Vector< real > & aXi )

solves x(xi) = aX for xi.

Parameters
[in]aXphysical coordinate ( <spatial dim> x 1 )
[out]aXinatural coordinate ( <natural dim> x 1 )
Returns
true if aXi lies inside the element's reference domain (within BELFEM_MESH_EPSILON), false otherwise. The Newton path aborts with BELFEM_ERROR after 100 iterations without convergence; it does not return false.

◆ link()

void belfem::fem::ElementMapper::link ( mesh::Element * aElement)

binds the mapper to an element.

Caches its node coordinates, pre-computes the bilinear coefficient matrix mA for quads, and selects the evaluator / guess / inside dispatch for the element type.

Parameters
[in]aElementelement to map (non-owning pointer)

◆ operator=()

ElementMapper & belfem::fem::ElementMapper::operator= ( const ElementMapper & )
delete

◆ set_dimension()

void belfem::fem::ElementMapper::set_dimension ( const uint aDim)

sets the spatial dimension of the physical coordinates.

Call this before link() to override; if left at 0 (default), the dimension is auto-detected from the first linked element.

◆ weights()

void belfem::fem::ElementMapper::weights ( const Vector< real > & aXi,
Vector< real > & aWeights )

computes the weights by evaluating the shape function

Parameters
aXi
aWeights

The documentation for this class was generated from the following files: