Rodin::Solid::ConstitutivePoint class

Central data bundle for constitutive evaluation at a quadrature point.

A ConstitutivePoint composes a Geometry::Point (geometric context) with a KinematicState (deformation measures) and extensible typed auxiliary data. Constitutive laws receive a ConstitutivePoint and may inspect any subset of the data they need.

Geometric context (reference/physical coordinates, region id) is accessed through getPoint(), which returns an optional reference to the underlying Geometry::Point.

Usage (with geometric context, typical in integrators)

Geometry::Point pt(polytope, rc);
KinematicState state(d);
state.setDisplacementGradient(H);

ConstitutivePoint cp(pt, state);
cp.set<Tags::FiberDirection>(fiberDir);

law.setCache(cache, cp);
law.getFirstPiolaKirchhoffStress(P, cache, cp);

Usage (without geometry, for unit testing)

KinematicState state(2);
state.setDisplacementGradient(H);
ConstitutivePoint cp(state);

Constructors, destructors, conversion operators

ConstitutivePoint(const Geometry::Point& point, const KinematicState& state) explicit
Constructs a constitutive point from a geometric point and kinematic state.
ConstitutivePoint(const KinematicState& state) explicit
Constructs a constitutive point from a kinematic state only.

Public functions

auto getKinematicState() const -> const KinematicState&
Gets the kinematic state.
auto getPoint() const -> const Optional<std::reference_wrapper<const Geometry::Point>>&
Gets the underlying Geometry::Point, if available.
template<class Tag>
auto set(const typename Tag::Type& value) -> ConstitutivePoint&
Stores typed auxiliary data (e.g., fiber direction, activation).
template<class Tag>
auto get() const -> const Tag::Type&
Retrieves typed auxiliary data by tag.
template<class Tag>
auto has() const -> bool
Checks whether auxiliary data with the given tag exists.

Function documentation

Rodin::Solid::ConstitutivePoint::ConstitutivePoint(const Geometry::Point& point, const KinematicState& state) explicit

Constructs a constitutive point from a geometric point and kinematic state.

Parameters
point The geometric evaluation point
state The kinematic state at this quadrature point

This is the primary constructor used by integrators. The Geometry::Point provides reference/physical coordinates and the polytope (from which the region id can be queried).

Rodin::Solid::ConstitutivePoint::ConstitutivePoint(const KinematicState& state) explicit

Constructs a constitutive point from a kinematic state only.

Parameters
state The kinematic state

Use this constructor for unit tests or contexts where geometric context is not needed. getPoint() will return an empty optional.

const Optional<std::reference_wrapper<const Geometry::Point>>& Rodin::Solid::ConstitutivePoint::getPoint() const

Gets the underlying Geometry::Point, if available.

Returns An optional reference to the Geometry::Point, or empty if constructed without geometric context.

template<class Tag>
ConstitutivePoint& Rodin::Solid::ConstitutivePoint::set(const typename Tag::Type& value)

Stores typed auxiliary data (e.g., fiber direction, activation).

Template parameters
Tag A type tag with a nested Type alias
Parameters
value The auxiliary data value
Returns Reference to this for chaining

The value type is deduced from the tag's Type alias.

cp.set<Tags::FiberDirection>(fiberVec);
cp.set<Tags::Activation>(0.5);

template<class Tag>
const Tag::Type& Rodin::Solid::ConstitutivePoint::get() const

Retrieves typed auxiliary data by tag.

Template parameters
Tag The type tag used when storing the data
Returns Const reference to the stored value

The return type is deduced from the tag's Type alias.

const auto& fiber = cp.get<Tags::FiberDirection>();
Real activation = cp.get<Tags::Activation>();

template<class Tag>
bool Rodin::Solid::ConstitutivePoint::has() const

Checks whether auxiliary data with the given tag exists.

Template parameters
Tag The type tag to check
Returns True if auxiliary data with this tag has been set