feat(newton): first newton solver implementation
This commit is contained in:
@@ -108,12 +108,12 @@ namespace {
|
||||
return action;
|
||||
}
|
||||
|
||||
using PolytropicModel = mean_field::model::StellarModel<mean_field::models::SpecificationSet<
|
||||
using PolytropicModel = mean_field::model::StellarModel<mean_field::models::SpecificationSet<
|
||||
mean_field::eos::Polytrope,
|
||||
mean_field::surface::Isobaric,
|
||||
mean_field::integral::FixedTotalMass,
|
||||
mean_field::constraint::FixedCentralDensity>>;
|
||||
using PolytropicProblem = mean_field::equilibrium::StellarEquilibriumProblem<PolytropicModel>;
|
||||
using PolytropicProblem = mean_field::equilibrium::StellarEquilibriumProblem<PolytropicModel>;
|
||||
using PolytropicMaterialSurfaceDescriptor = preconditioning::MaterialSurfaceDescriptorFor<PolytropicProblem>;
|
||||
using MaterialComponent =
|
||||
decltype(preconditioning::materialSurfaceBlock(std::declval<const PolytropicProblem &>()));
|
||||
@@ -181,20 +181,21 @@ TEST_CASE(
|
||||
preconditioning::Coupling<blocks::enthalpy::specific::residual, blocks::gravity::poisson::value>>;
|
||||
|
||||
STATIC_CHECK(preconditioning::PreconditionerComponent<PolytropicStructure>);
|
||||
STATIC_CHECK(preconditioning::ExecutableStellarStructureRuntimeFor<
|
||||
mean_field::operators::PreparedStellarEquilibriumOperator>);
|
||||
STATIC_CHECK(
|
||||
preconditioning::ExecutableStellarStructureRuntimeFor<mean_field::operators::PreparedStellarEquilibriumOperator>
|
||||
);
|
||||
STATIC_CHECK_FALSE(preconditioning::ExecutableStellarStructureRuntimeFor<DistinctPhysicalCore>);
|
||||
STATIC_CHECK(preconditioning::StellarStructureRuntimeFor<
|
||||
PolytropicMaterialSurfaceDescriptor,
|
||||
mean_field::operators::PreparedStellarEquilibriumOperator>);
|
||||
STATIC_CHECK_FALSE(preconditioning::StellarStructureRuntimeFor<
|
||||
PolytropicMaterialSurfaceDescriptor,
|
||||
DistinctPhysicalCore>);
|
||||
STATIC_CHECK(
|
||||
preconditioning::StellarStructureRuntimeFor<
|
||||
PolytropicMaterialSurfaceDescriptor, mean_field::operators::PreparedStellarEquilibriumOperator>
|
||||
);
|
||||
STATIC_CHECK_FALSE(
|
||||
preconditioning::StellarStructureRuntimeFor<PolytropicMaterialSurfaceDescriptor, DistinctPhysicalCore>
|
||||
);
|
||||
STATIC_CHECK(preconditioning::StellarStructurePreconditionerProblem<PolytropicProblem>);
|
||||
STATIC_CHECK(preconditioning::StellarStructurePreparableFor<
|
||||
PolytropicProblem,
|
||||
MaterialComponent,
|
||||
GravityComponent>);
|
||||
STATIC_CHECK(
|
||||
preconditioning::StellarStructurePreparableFor<PolytropicProblem, MaterialComponent, GravityComponent>
|
||||
);
|
||||
STATIC_CHECK(CanPrepareDefaultStellarStructure<PolytropicProblem>);
|
||||
STATIC_CHECK(std::same_as<typename PolytropicStructure::MaterialToGravityCouplings, ExpectedMaterialToGravity>);
|
||||
STATIC_CHECK(std::same_as<typename PolytropicStructure::GravityToMaterialCouplings, ExpectedGravityToMaterial>);
|
||||
@@ -268,7 +269,7 @@ TEST_CASE(
|
||||
integral::FixedTotalMass({.Mtotal = dimensions::MassValue{mass}}),
|
||||
constraint::FixedCentralDensity({.RhoC = dimensions::DensityValue{centralDensity}})
|
||||
);
|
||||
auto problem = equilibrium::discretize(stellarModel, finiteElements);
|
||||
auto problem = equilibrium::discretize(stellarModel, std::move(finiteElements));
|
||||
auto projected = seed::makeProjectedEquilibriumState(problem, seed::LaneEmden({.radialSampleCount = 512}));
|
||||
problem.Prepare(projected.values, makeDependencies(), zeroRotation());
|
||||
const auto &physical = problem.GetPreparedOperator().GetPhysicalOperator();
|
||||
|
||||
Reference in New Issue
Block a user