Snapshot optimized solver and audit diagnostics before numerical experiments
This commit is contained in:
@@ -147,6 +147,16 @@ export namespace mean_field::operators {
|
||||
|
||||
void BuildResidual(mfem::Vector &residual) const;
|
||||
|
||||
// Lazy, local-dual row assembly. Invalidated only by density/geometry.
|
||||
// Returns false when this discretization uses the general fallback.
|
||||
[[nodiscard]] bool PrepareJacobianRows() const;
|
||||
[[nodiscard]] std::uint64_t GetJacobianRowPreparationCount() const noexcept;
|
||||
void ApplyCompleteJacobianActionReference(
|
||||
const mfem::Vector &densityVariation,
|
||||
const mfem::Vector &displacementVariation,
|
||||
mfem::Vector &action
|
||||
) const;
|
||||
|
||||
void ApplyDensityJacobianAction(
|
||||
const mfem::Vector &densityVariation,
|
||||
mfem::Vector &action
|
||||
@@ -230,6 +240,9 @@ export namespace mean_field::operators {
|
||||
|
||||
[[nodiscard]] double EvaluateDisplacementActionLocal(const mfem::Vector &displacementVariation) const;
|
||||
|
||||
[[nodiscard]] double EvaluateDensityActionLocalReference(const mfem::Vector &densityVariation) const;
|
||||
[[nodiscard]] double EvaluateDisplacementActionLocalReference(const mfem::Vector &displacementVariation) const;
|
||||
|
||||
void AssembleDensityTransposeAction(
|
||||
double residualDual,
|
||||
mfem::Vector &densityDual
|
||||
@@ -250,8 +263,16 @@ export namespace mean_field::operators {
|
||||
MassNormalizationDependencies m_preparedDependencies;
|
||||
mfem::Vector m_cachedResidual;
|
||||
|
||||
mutable mfem::Vector m_densityJacobianLocal;
|
||||
mutable mfem::Vector m_displacementJacobianLocal;
|
||||
mutable bool m_jacobianRowsReady{false};
|
||||
mutable bool m_jacobianRowsSupported{false};
|
||||
mutable std::uint64_t m_jacobianRowPreparationCount{0};
|
||||
|
||||
mutable mfem::Vector m_densityVariationTrue;
|
||||
mutable mfem::Vector m_displacementVariationTrue;
|
||||
mutable mfem::Vector m_densityVariationLocal;
|
||||
mutable mfem::Vector m_displacementVariationLocal;
|
||||
|
||||
double m_currentMass{0.0};
|
||||
double m_targetMass{0.0};
|
||||
|
||||
Reference in New Issue
Block a user