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_displacement_test_utils {
|
||||
const mean_field::fem::FEM &f,
|
||||
const double phase = 0.29
|
||||
) {
|
||||
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.47
|
||||
) {
|
||||
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
|
||||
);
|
||||
}
|
||||
|
||||
mfem::Vector make_displacement_direction(
|
||||
@@ -49,9 +53,9 @@ namespace prepared_hydrostatic_displacement_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;
|
||||
@@ -93,14 +97,12 @@ namespace prepared_hydrostatic_displacement_test_utils {
|
||||
mfem::Vector residualPlus;
|
||||
mfem::Vector residualMinus;
|
||||
|
||||
mean_field::operators::kernels::apply_hydrostatic_equilibrium(
|
||||
f, *f.domainMapperStateless, rotation, enthalpy, gravityPotential, displacementPlus, bernoulliConstant,
|
||||
residualPlus
|
||||
field_dof_test_utils::apply_hydrostatic_reference(
|
||||
f, rotation, enthalpy, gravityPotential, displacementPlus, bernoulliConstant, residualPlus
|
||||
);
|
||||
|
||||
mean_field::operators::kernels::apply_hydrostatic_equilibrium(
|
||||
f, *f.domainMapperStateless, rotation, enthalpy, gravityPotential, displacementMinus, bernoulliConstant,
|
||||
residualMinus
|
||||
field_dof_test_utils::apply_hydrostatic_reference(
|
||||
f, rotation, enthalpy, gravityPotential, displacementMinus, bernoulliConstant, residualMinus
|
||||
);
|
||||
|
||||
difference = residualPlus;
|
||||
@@ -119,7 +121,7 @@ namespace prepared_hydrostatic_displacement_test_utils {
|
||||
|
||||
TEST_CASE(
|
||||
"Prepared Hydrostatic Displacement Jacobian Matches Centered Differences",
|
||||
tags::barotrope &tags::hydro &tags::jacobian &tags::prepared &tags::unit
|
||||
tags::barotrope_hydrostatic_prepared_jacobian &tags::unit
|
||||
) {
|
||||
auto args = test_utils::setup_args();
|
||||
|
||||
@@ -131,7 +133,7 @@ TEST_CASE(
|
||||
|
||||
const mfem::Vector gravityPotential = prepared_hydrostatic_displacement_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;
|
||||
|
||||
@@ -201,7 +203,7 @@ TEST_CASE(
|
||||
TEST_CASE(
|
||||
"Prepared Hydrostatic Displacement Jacobian Reuses And Refreshes Frozen "
|
||||
"Data",
|
||||
tags::barotrope &tags::hydro &tags::jacobian &tags::prepared &tags::unit
|
||||
tags::barotrope_hydrostatic_prepared_jacobian &tags::unit
|
||||
) {
|
||||
auto args = test_utils::setup_args();
|
||||
|
||||
@@ -213,7 +215,7 @@ TEST_CASE(
|
||||
|
||||
const mfem::Vector gravityPotential = prepared_hydrostatic_displacement_test_utils::make_gravity_potential(f, 0.53);
|
||||
|
||||
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);
|
||||
|
||||
constexpr double bernoulliConstant = 0.36;
|
||||
|
||||
@@ -284,7 +286,7 @@ TEST_CASE(
|
||||
CHECK(rotationReferenceError < 2.0e-7);
|
||||
CHECK(rotationEffect > 1.0e-8);
|
||||
|
||||
displacement = gravity_prepared_test_utils::make_displacement(f, 0.91);
|
||||
displacement = field_dof_test_utils::make_supported_displacement(f, 0.91);
|
||||
|
||||
++dependencies.displacement.revision;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user