feat(newton): first newton solver implementation
This commit is contained in:
@@ -2,6 +2,7 @@ module;
|
||||
|
||||
#include <compare>
|
||||
#include <cstdint>
|
||||
#include <expected>
|
||||
#include <vector>
|
||||
|
||||
#include <mfem.hpp>
|
||||
@@ -11,6 +12,7 @@ export module mean_field:operators.prepared_gravity_displacement_force;
|
||||
export import :fem;
|
||||
export import :mapping.domain_mapper;
|
||||
export import :operators.context.gravity_field;
|
||||
export import :operators.kernels.gravity_displacement_force;
|
||||
export import :utils.blocks;
|
||||
|
||||
export namespace mean_field::operators {
|
||||
@@ -57,6 +59,11 @@ export namespace mean_field::operators {
|
||||
*/
|
||||
PreparedGravityDisplacementForceReport Prepare();
|
||||
|
||||
[[nodiscard]] std::expected<
|
||||
PreparedGravityDisplacementForceReport,
|
||||
kernels::GravityDisplacementForceRejection>
|
||||
TryPrepare();
|
||||
|
||||
void BuildResidual(mfem::Vector &residual) const;
|
||||
|
||||
void ApplyDensityJacobianAction(
|
||||
@@ -106,7 +113,10 @@ export namespace mean_field::operators {
|
||||
|
||||
private:
|
||||
void VerifyPrepared() const;
|
||||
void PrepareElementData();
|
||||
[[nodiscard]] std::expected<
|
||||
void,
|
||||
kernels::GravityDisplacementForceRejection>
|
||||
TryPrepareElementData();
|
||||
void ApplyPreparedCompleteJacobianActionTrue(
|
||||
const mfem::Vector &densityVariationTrue,
|
||||
const mfem::Vector &displacementVariationTrue,
|
||||
|
||||
Reference in New Issue
Block a user