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);

Public static variables

static size_t ReservedTags constexpr
Auxiliary tag capacity reserved on construction.

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.
ConstitutivePoint(const ConstitutivePoint&) defaulted
Copy constructor.
ConstitutivePoint(ConstitutivePoint&&) defaulted
Move constructor.

Public functions

auto operator=(const ConstitutivePoint&) -> ConstitutivePoint& defaulted
Copy assignment operator.
auto operator=(ConstitutivePoint&&) -> ConstitutivePoint& defaulted
Move assignment operator.
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

Variable documentation

static size_t Rodin::Solid::ConstitutivePoint::ReservedTags constexpr

Auxiliary tag capacity reserved on construction.

A ConstitutivePoint is built at every quadrature point, so the tag storage is reserved once up front rather than grown one set() at a time.

This is a capacity hint, not a limit: the tag set is open, and setting more tags than this simply reallocates. It is sized well above the tags declared in Tags so that user-defined tags also fit without reallocating.

The cost is ReservedTags * 40 bytes per point, but a point is a stack-local built and destroyed per quadrature point, so at most one is live per thread, and reserved-but-unset slots are never constructed or touched. Raising this from 13 to 64 was measured to cost nothing, serial or threaded.