|
| | PreparedOperator (EquationT equation, const RowBinding &row, const DisplacementBinding &displacement, const ::mfem::GridFunction &compactification, const mapping::DomainMapper &mapper, discretization::quadrature::Policy policy=discretization::quadrature::Policy{{}}, const ContractionMode contraction_mode=ContractionMode::automatic) |
| | Borrow discretization and mapping objects; no numerical state is prepared yet.
|
| |
| | PreparedOperator (const PreparedOperator &)=delete |
| |
| PreparedOperator & | operator= (const PreparedOperator &)=delete |
| |
| | PreparedOperator (PreparedOperator &&)=delete |
| |
| PreparedOperator & | operator= (PreparedOperator &&)=delete |
| |
| template<typename StateT> |
| std::expected< void, PreparationRejection > | try_prepare (const StateT &state, const ::mfem::Vector &displacement, Workspace &workspace, const PreparationMode mode=PreparationMode::rebuild) |
| | Try to prepare the operator with the given state and displacement.
|
| |
| template<typename StateT> |
| void | prepare (const StateT &state, const ::mfem::Vector &displacement, Workspace &workspace, const PreparationMode mode=PreparationMode::rebuild) |
| | Prepare or report the numerical rejection as a caller-visible exception.
|
| |
| void | invalidate () noexcept |
| | Discard the frozen numerical data before accepting a new base state.
|
| |
| bool | is_prepared () const noexcept |
| | Report whether a complete preparation has been published.
|
| |
| std::size_t | preparation_count () const noexcept |
| | Count successful preparations.
|
| |
| const PreparationReport & | preparation_report () const noexcept |
| | Report work performed by the most recent successful preparation.
|
| |
| std::size_t | tensor_element_count () const |
| | Count prepared contribution-elements whose test, operands or geometry use tensor contractions.
|
| |
| int | height () const noexcept |
| | Return the supported residual size.
|
| |
| int | width () const |
| | Return the packed input size: unique term coefficients followed by displacement.
|
| |
| int | integration_order (int element) const |
| | Return the quadrature order for a prepared supported element.
|
| |
| void | residual (Workspace &workspace, ::mfem::Vector &result) const |
| | Assemble element residuals from the frozen preparation.
|
| |
| template<typename StateT> |
| void | apply_jacobian (const StateT &direction, const ::mfem::Vector &displacement_direction, Workspace &workspace, ::mfem::Vector &result) const |
| | Apply the frozen linearization to a bound or packed coefficient direction.
|
| |
| void | apply_jacobian (const ::mfem::Vector &direction, Workspace &workspace, ::mfem::Vector &result) const |
| | Apply the frozen linearization to a bound or packed coefficient direction.
|
| |
| void | apply_jacobian_transpose (const ::mfem::Vector &residual_dual, Workspace &workspace, ::mfem::Vector &result) const |
| | Return the full coordinate transpose in the same packed order as the forward action.
|
| |
|
| const VolumeData & | prepared_data () const |
| | Read the sole accepted numerical state; the dependency module owns its lifetime and publication.
|
| |
| template<typename StateT> |
| std::expected< VolumeData, PreparationRejection > | prepare_volume (const Update &changes, const BasisBindings< Plan::column_count > &bindings, const CoefficientView< DisplacementBinding > &displacement, const StateT &state, Workspace &workspace) |
| | Rebuild only the numerical pieces affected by declared source changes.
|
| |
| void | validate_prepared () const |
| | Reject missing preparation and changes to borrowed discretization objects.
|
| |
| void | apply_action (const std::array< const ::mfem::Vector *, Plan::column_count > &directions, const ::mfem::Vector &displacement_direction, Workspace &workspace, ::mfem::Vector &result) const |
| | Validate directions, evaluate element Jacobian actions, and assemble them.
|
| |
| void | add_element_result (int element, Workspace &workspace, utils::CompensatedSum &global_sum) const |
| | Global integrals reduce into one entry; compensate cancellation across elements too.
|
| |
template<VolumeEquation EquationT, discretization::domain::schema::IsSchema SchemaT>
template<typename StateT>
Try to prepare the operator with the given state and displacement.
Prepare a frozen state; optional reuse refreshes only changed coefficients, geometry and contributions. A rejection or programming error leaves the operator unprepared, even when old caches exist.
- Template Parameters
-
| StateT | The type of the state to prepare. |
- Parameters
-
| state | The state to prepare. |
| displacement | The displacement vector to use for preparation. |
| workspace | The workspace to use for preparation. |
| mode | The preparation mode to use. |
- Returns
- A std::expected indicating success or a PreparationRejection on failure.
- Todo
- The try-catch logic should be replaced with value based error handling to avoid stack unwinding.