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:
@@ -51,9 +51,9 @@ namespace prepared_hydrostatic_complete_test_utils {
|
||||
const double firstPhase,
|
||||
const double secondPhase
|
||||
) {
|
||||
mfem::Vector direction = gravity_prepared_test_utils::make_displacement(f, firstPhase);
|
||||
mfem::Vector direction = field_dof_test_utils::make_supported_displacement(f, firstPhase);
|
||||
|
||||
const mfem::Vector secondField = gravity_prepared_test_utils::make_displacement(f, secondPhase);
|
||||
const mfem::Vector secondField = field_dof_test_utils::make_supported_displacement(f, secondPhase);
|
||||
|
||||
direction -= secondField;
|
||||
return direction;
|
||||
@@ -97,14 +97,12 @@ namespace prepared_hydrostatic_complete_test_utils {
|
||||
mfem::Vector residualPlus;
|
||||
mfem::Vector residualMinus;
|
||||
|
||||
mean_field::operators::kernels::apply_hydrostatic_equilibrium(
|
||||
f, *f.domainMapperStateless, rotation, enthalpyPlus, gravityPotentialPlus, displacementPlus,
|
||||
bernoulliConstantPlus, residualPlus
|
||||
field_dof_test_utils::apply_hydrostatic_reference(
|
||||
f, rotation, enthalpyPlus, gravityPotentialPlus, displacementPlus, bernoulliConstantPlus, residualPlus
|
||||
);
|
||||
|
||||
mean_field::operators::kernels::apply_hydrostatic_equilibrium(
|
||||
f, *f.domainMapperStateless, rotation, enthalpyMinus, gravityPotentialMinus, displacementMinus,
|
||||
bernoulliConstantMinus, residualMinus
|
||||
field_dof_test_utils::apply_hydrostatic_reference(
|
||||
f, rotation, enthalpyMinus, gravityPotentialMinus, displacementMinus, bernoulliConstantMinus, residualMinus
|
||||
);
|
||||
|
||||
difference = residualPlus;
|
||||
@@ -131,7 +129,7 @@ namespace prepared_hydrostatic_complete_test_utils {
|
||||
TEST_CASE(
|
||||
"Prepared Hydrostatic Complete Jacobian Matches Sum And Centered "
|
||||
"Differences",
|
||||
tags::barotrope &tags::hydro &tags::integration &tags::jacobian &tags::prepared &tags::self_consistency
|
||||
tags::barotrope_hydrostatic_prepared_jacobian &tags::self_consistency
|
||||
) {
|
||||
auto args = test_utils::setup_args();
|
||||
|
||||
@@ -140,12 +138,16 @@ TEST_CASE(
|
||||
mean_field::operators::PreparedHydrostaticEquilibriumOperator preparedOperator(f, *f.domainMapperStateless);
|
||||
|
||||
const mfem::Vector enthalpy =
|
||||
gravity_prepared_test_utils::make_deterministic_vector(f.enthalpyFes->GetTrueVSize(), 0.34);
|
||||
field_dof_test_utils::make_deterministic_supported_vector<mean_field::field::Enthalpy>(
|
||||
*f.enthalpyFes, 0.34
|
||||
);
|
||||
|
||||
const mfem::Vector gravityPotential =
|
||||
gravity_prepared_test_utils::make_deterministic_vector(f.gravityPotentialFes->GetTrueVSize(), 0.57);
|
||||
field_dof_test_utils::make_deterministic_supported_vector<mean_field::field::Gravity>(
|
||||
*f.gravityPotentialFes, 0.57
|
||||
);
|
||||
|
||||
const mfem::Vector displacement = gravity_prepared_test_utils::make_displacement(f, 0.68);
|
||||
const mfem::Vector displacement = field_dof_test_utils::make_supported_displacement(f, 0.68);
|
||||
|
||||
constexpr double bernoulliConstant = 0.43;
|
||||
|
||||
@@ -159,10 +161,14 @@ TEST_CASE(
|
||||
);
|
||||
|
||||
const mfem::Vector enthalpyVariation =
|
||||
gravity_prepared_test_utils::make_deterministic_vector(f.enthalpyFes->GetTrueVSize(), 1.07);
|
||||
field_dof_test_utils::make_deterministic_supported_vector<mean_field::field::Enthalpy>(
|
||||
*f.enthalpyFes, 1.07
|
||||
);
|
||||
|
||||
const mfem::Vector gravityPotentialVariation =
|
||||
gravity_prepared_test_utils::make_deterministic_vector(f.gravityPotentialFes->GetTrueVSize(), 1.31);
|
||||
field_dof_test_utils::make_deterministic_supported_vector<mean_field::field::Gravity>(
|
||||
*f.gravityPotentialFes, 1.31
|
||||
);
|
||||
|
||||
const mfem::Vector displacementVariation =
|
||||
prepared_hydrostatic_complete_test_utils::make_displacement_direction(f, 1.19, 0.38);
|
||||
@@ -221,7 +227,7 @@ TEST_CASE(
|
||||
TEST_CASE(
|
||||
"Prepared Hydrostatic MFEM Adapter Uses Four Block Layout And Reuses "
|
||||
"Preparation",
|
||||
tags::barotrope &tags::hydro &tags::integration &tags::jacobian &tags::mfem_operators &tags::prepared &tags::unit
|
||||
tags::barotrope_hydrostatic_prepared_jacobian &tags::mfem_operators &tags::unit
|
||||
) {
|
||||
auto args = test_utils::setup_args();
|
||||
|
||||
@@ -230,12 +236,16 @@ TEST_CASE(
|
||||
mean_field::operators::PreparedHydrostaticEquilibriumOperator preparedOperator(f, *f.domainMapperStateless);
|
||||
|
||||
const mfem::Vector enthalpy =
|
||||
gravity_prepared_test_utils::make_deterministic_vector(f.enthalpyFes->GetTrueVSize(), 0.41);
|
||||
field_dof_test_utils::make_deterministic_supported_vector<mean_field::field::Enthalpy>(
|
||||
*f.enthalpyFes, 0.41
|
||||
);
|
||||
|
||||
const mfem::Vector gravityPotential =
|
||||
gravity_prepared_test_utils::make_deterministic_vector(f.gravityPotentialFes->GetTrueVSize(), 0.63);
|
||||
field_dof_test_utils::make_deterministic_supported_vector<mean_field::field::Gravity>(
|
||||
*f.gravityPotentialFes, 0.63
|
||||
);
|
||||
|
||||
const mfem::Vector displacement = gravity_prepared_test_utils::make_displacement(f, 0.74);
|
||||
const mfem::Vector displacement = field_dof_test_utils::make_supported_displacement(f, 0.74);
|
||||
|
||||
constexpr double bernoulliConstant = 0.38;
|
||||
|
||||
@@ -255,20 +265,26 @@ TEST_CASE(
|
||||
|
||||
CHECK(
|
||||
layout.Offset(mean_field::operators::HydrostaticJacobianInputBlock::gravityPotential) ==
|
||||
f.enthalpyFes->GetTrueVSize()
|
||||
preparedOperator.GetEnthalpyMap().reduced_size()
|
||||
);
|
||||
|
||||
CHECK(layout.Size(mean_field::operators::HydrostaticJacobianInputBlock::bernoulliConstant) == 1);
|
||||
|
||||
CHECK(adapter.Width() == layout.GetTotalSize());
|
||||
CHECK(adapter.Height() == layout.GetResidualSize());
|
||||
CHECK(adapter.Height() == f.enthalpyFes->GetTrueVSize());
|
||||
CHECK(adapter.Height() == preparedOperator.GetEnthalpyMap().reduced_size());
|
||||
|
||||
CHECK(preparedOperator.GetEnthalpyMap().inactive_size() > 0);
|
||||
|
||||
const mfem::Vector enthalpyVariation =
|
||||
gravity_prepared_test_utils::make_deterministic_vector(f.enthalpyFes->GetTrueVSize(), 1.12);
|
||||
field_dof_test_utils::make_deterministic_supported_vector<mean_field::field::Enthalpy>(
|
||||
*f.enthalpyFes, 1.12
|
||||
);
|
||||
|
||||
const mfem::Vector gravityPotentialVariation =
|
||||
gravity_prepared_test_utils::make_deterministic_vector(f.gravityPotentialFes->GetTrueVSize(), 1.39);
|
||||
field_dof_test_utils::make_deterministic_supported_vector<mean_field::field::Gravity>(
|
||||
*f.gravityPotentialFes, 1.39
|
||||
);
|
||||
|
||||
const mfem::Vector displacementVariation =
|
||||
prepared_hydrostatic_complete_test_utils::make_displacement_direction(f, 1.28, 0.49);
|
||||
|
||||
Reference in New Issue
Block a user