Output.h file
Extensible extraction mechanism for constitutive evaluation.
An Output is the dual of Input: where an Input populates a ConstitutivePoint with auxiliary data before the constitutive law is evaluated, an Output reads the resulting cache at each quadrature point afterwards. This is the extraction site for quantities derived from the evaluation – committed internal variables, recovered stresses, strain energy, diagnostics – without hard-coding them into the integrator or the constitutive law, and without recomputing the kinematics at the call site.
The cache type is the law's, so an Output is written against a specific law. The ConstitutivePoint carries Tags::CellIndex and Tags::QuadraturePointIndex, so an Output and an Input driven by the same pass address the same quadrature point.
Usage with CRTP
struct MyOutput : Solid::Output<MyOutput> { void extract(const Solid::ConstitutivePoint& cp, const Cache& cache) const { // e.g., commit an internal variable state[cp.get<Solid::Tags::CellIndex>()] [cp.get<Solid::Tags::QuadraturePointIndex>()] = cache.activeExtension; } }; ivw.setOutput(MyOutput{});
Usage with lambda / std::function
ivw.setOutput([&](const Solid::ConstitutivePoint& cp, const auto& cache) { energy += cache.strain; }); ivw.commit();
Namespaces
- namespace Rodin
- The Rodin library for finite element methods and shape optimization.
- namespace Rodin::Solid
- Hyperelastic solid mechanics module for large-deformation problems.
Classes
-
template<class Derived>class Rodin::Solid::Output
- CRTP base class for outputs.