feat(support): continued migration to new field dof support system
mass normaliztion, gravity, displacement, and hydrostatic equilibrium are now migrated
This commit is contained in:
@@ -34,14 +34,18 @@ namespace prepared_hydrostatic_jacobian_test_utils {
|
||||
const mean_field::fem::FEM &f,
|
||||
const double phase = 0.23
|
||||
) {
|
||||
return gravity_prepared_test_utils::make_deterministic_vector(f.enthalpyFes->GetTrueVSize(), phase);
|
||||
return field_dof_test_utils::make_deterministic_supported_vector<mean_field::field::Enthalpy>(
|
||||
*f.enthalpyFes, phase
|
||||
);
|
||||
}
|
||||
|
||||
mfem::Vector make_gravity_potential(
|
||||
const mean_field::fem::FEM &f,
|
||||
const double phase = 0.41
|
||||
) {
|
||||
return gravity_prepared_test_utils::make_deterministic_vector(f.gravityPotentialFes->GetTrueVSize(), phase);
|
||||
return field_dof_test_utils::make_deterministic_supported_vector<mean_field::field::Gravity>(
|
||||
*f.gravityPotentialFes, phase
|
||||
);
|
||||
}
|
||||
|
||||
mean_field::physics::RigidRotation make_rotation(const double scale = 1.0) {
|
||||
@@ -75,14 +79,12 @@ namespace prepared_hydrostatic_jacobian_test_utils {
|
||||
mfem::Vector residualPlus;
|
||||
mfem::Vector residualMinus;
|
||||
|
||||
mean_field::operators::kernels::apply_hydrostatic_equilibrium(
|
||||
f, *f.domainMapperStateless, rotation, enthalpyPlus, gravityPotentialPlus, displacement,
|
||||
bernoulliConstantPlus, residualPlus
|
||||
field_dof_test_utils::apply_hydrostatic_reference(
|
||||
f, rotation, enthalpyPlus, gravityPotentialPlus, displacement, bernoulliConstantPlus, residualPlus
|
||||
);
|
||||
|
||||
mean_field::operators::kernels::apply_hydrostatic_equilibrium(
|
||||
f, *f.domainMapperStateless, rotation, enthalpyMinus, gravityPotentialMinus, displacement,
|
||||
bernoulliConstantMinus, residualMinus
|
||||
field_dof_test_utils::apply_hydrostatic_reference(
|
||||
f, rotation, enthalpyMinus, gravityPotentialMinus, displacement, bernoulliConstantMinus, residualMinus
|
||||
);
|
||||
|
||||
// The two states are separated by one complete variation:
|
||||
@@ -103,7 +105,7 @@ namespace prepared_hydrostatic_jacobian_test_utils {
|
||||
TEST_CASE(
|
||||
"Prepared Hydrostatic Algebraic Jacobian Matches Centered Residual "
|
||||
"Differences",
|
||||
tags::barotrope &tags::hydro &tags::jacobian &tags::prepared &tags::unit
|
||||
tags::barotrope_hydrostatic_prepared_jacobian &tags::unit
|
||||
) {
|
||||
auto args = test_utils::setup_args();
|
||||
|
||||
@@ -115,7 +117,7 @@ TEST_CASE(
|
||||
|
||||
const mfem::Vector gravityPotential = prepared_hydrostatic_jacobian_test_utils::make_gravity_potential(f);
|
||||
|
||||
const mfem::Vector displacement = gravity_prepared_test_utils::make_displacement(f, 0.73);
|
||||
const mfem::Vector displacement = field_dof_test_utils::make_supported_displacement(f, 0.73);
|
||||
|
||||
constexpr double bernoulliConstant = 0.39;
|
||||
|
||||
@@ -251,7 +253,7 @@ TEST_CASE(
|
||||
TEST_CASE(
|
||||
"Prepared Hydrostatic Algebraic Jacobian Reuses And Rebuilds Only With "
|
||||
"Geometry",
|
||||
tags::barotrope &tags::hydro &tags::jacobian &tags::prepared &tags::unit
|
||||
tags::barotrope_hydrostatic_prepared_jacobian &tags::unit
|
||||
) {
|
||||
auto args = test_utils::setup_args();
|
||||
|
||||
@@ -263,7 +265,7 @@ TEST_CASE(
|
||||
|
||||
mfem::Vector gravityPotential = prepared_hydrostatic_jacobian_test_utils::make_gravity_potential(f);
|
||||
|
||||
mfem::Vector displacement = gravity_prepared_test_utils::make_displacement(f, 0.42);
|
||||
mfem::Vector displacement = field_dof_test_utils::make_supported_displacement(f, 0.42);
|
||||
|
||||
double bernoulliConstant = 0.37;
|
||||
|
||||
@@ -340,7 +342,7 @@ TEST_CASE(
|
||||
|
||||
CHECK(preparedOperator.GetAlgebraicJacobianStatistics().preparations == 1);
|
||||
|
||||
displacement = gravity_prepared_test_utils::make_displacement(f, 0.73);
|
||||
displacement = field_dof_test_utils::make_supported_displacement(f, 0.73);
|
||||
|
||||
++dependencies.displacement.revision;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user