Snapshot optimized solver and audit diagnostics before numerical experiments
This commit is contained in:
@@ -116,6 +116,20 @@ export namespace mean_field::operators {
|
||||
const context::pressure_force::PressureForceDependencies &dependencies
|
||||
);
|
||||
|
||||
// Original quadrature-by-quadrature matrix assembly for validation.
|
||||
PreparedPressureForceReport PrepareReference(
|
||||
const context::pressure_force::PressureForceStateView &state,
|
||||
const context::pressure_force::PressureForceDependencies &dependencies
|
||||
);
|
||||
|
||||
// Previous blocked matrix preparation and pointwise field evaluation.
|
||||
PreparedPressureForceReport PrepareCachedReference(
|
||||
const context::pressure_force::PressureForceStateView &state,
|
||||
const context::pressure_force::PressureForceDependencies &dependencies);
|
||||
void ApplyDisplacementJacobianActionCachedReference(
|
||||
const mfem::Vector &displacementVariation, mfem::Vector &action) const;
|
||||
[[nodiscard]] int GetTensorElementCount() const noexcept;
|
||||
|
||||
void BuildResidual(mfem::Vector &residual) const;
|
||||
|
||||
void ApplyEnthalpyJacobianAction(
|
||||
@@ -128,6 +142,10 @@ export namespace mean_field::operators {
|
||||
mfem::Vector &action
|
||||
) const;
|
||||
|
||||
void ApplyDisplacementJacobianActionReference(
|
||||
const mfem::Vector &displacementVariation, mfem::Vector &action
|
||||
) const;
|
||||
|
||||
void ApplyCompleteJacobianAction(
|
||||
const mfem::Vector &enthalpyVariation,
|
||||
const mfem::Vector &displacementVariation,
|
||||
@@ -178,6 +196,8 @@ export namespace mean_field::operators {
|
||||
}
|
||||
|
||||
private:
|
||||
void ApplyDisplacementJacobianActionImpl(const mfem::Vector &displacementVariation,
|
||||
mfem::Vector &action, bool useFastPath, bool useTensorPath = true) const;
|
||||
struct ConstructionData;
|
||||
|
||||
[[nodiscard]]
|
||||
@@ -237,8 +257,14 @@ export namespace mean_field::operators {
|
||||
};
|
||||
|
||||
void PrepareStaticPlan();
|
||||
[[nodiscard]] std::optional<PressureForcePreparationRejection> PrepareGeometry();
|
||||
[[nodiscard]] std::optional<PressureForcePreparationRejection> PrepareMaterialState();
|
||||
[[nodiscard]] std::optional<PressureForcePreparationRejection> PrepareGeometry(bool useTensorPreparation);
|
||||
[[nodiscard]] std::optional<PressureForcePreparationRejection> PrepareMaterialState(bool useFastPreparation, bool useTensorPreparation);
|
||||
[[nodiscard]] std::expected<PreparedPressureForceReport, PressureForcePreparationRejection>
|
||||
TryPrepareImpl(
|
||||
const context::pressure_force::PressureForceStateView &state,
|
||||
const context::pressure_force::PressureForceDependencies &dependencies,
|
||||
bool useFastPreparation, bool useTensorPreparation = true
|
||||
);
|
||||
|
||||
void FinalizeDisplacementJacobianPreparation();
|
||||
|
||||
@@ -291,6 +317,10 @@ export namespace mean_field::operators {
|
||||
|
||||
mutable PreparedPressureForceCompleteJacobianStatistics m_completeJacobianStatistics;
|
||||
|
||||
mutable mfem::DenseMatrix m_tensorSamples, m_tensorDuals, m_tensorElement;
|
||||
mutable mfem::Vector m_tensorWorkspace;
|
||||
bool m_preparedWithTensorPreparation{true};
|
||||
bool m_preparedWithFastMaterialAssembly{true};
|
||||
bool m_isPrepared{false};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user