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_test_utils {
|
||||
const mean_field::fem::FEM &f,
|
||||
const double phase = 0.19
|
||||
) {
|
||||
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.37
|
||||
) {
|
||||
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) {
|
||||
@@ -63,7 +67,7 @@ namespace prepared_hydrostatic_test_utils {
|
||||
|
||||
TEST_CASE(
|
||||
"Prepared Hydrostatic Residual Matches Stateless Kernel",
|
||||
tags::barotrope &tags::hydro &tags::prepared &tags::residuals &tags::unit
|
||||
tags::barotrope_hydrostatic_prepared_residual &tags::unit
|
||||
) {
|
||||
auto args = test_utils::setup_args();
|
||||
|
||||
@@ -75,7 +79,7 @@ TEST_CASE(
|
||||
|
||||
const mfem::Vector gravityPotential = prepared_hydrostatic_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.41;
|
||||
|
||||
@@ -97,9 +101,8 @@ TEST_CASE(
|
||||
|
||||
preparedOperator.BuildResidual(preparedResidual);
|
||||
|
||||
mean_field::operators::kernels::apply_hydrostatic_equilibrium(
|
||||
f, *f.domainMapperStateless, rotation, enthalpy, gravityPotential, displacement, bernoulliConstant,
|
||||
referenceResidual
|
||||
field_dof_test_utils::apply_hydrostatic_reference(
|
||||
f, rotation, enthalpy, gravityPotential, displacement, bernoulliConstant, referenceResidual
|
||||
);
|
||||
|
||||
const double relativeError =
|
||||
@@ -131,7 +134,7 @@ TEST_CASE(
|
||||
|
||||
TEST_CASE(
|
||||
"Prepared Hydrostatic Residual Reuses And Selectively Rebuilds Data",
|
||||
tags::barotrope &tags::hydro &tags::prepared &tags::residuals &tags::unit
|
||||
tags::barotrope_hydrostatic_prepared_residual &tags::unit
|
||||
) {
|
||||
auto args = test_utils::setup_args();
|
||||
|
||||
@@ -143,7 +146,7 @@ TEST_CASE(
|
||||
|
||||
mfem::Vector gravityPotential = prepared_hydrostatic_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.36;
|
||||
|
||||
@@ -168,7 +171,7 @@ TEST_CASE(
|
||||
|
||||
enthalpy(0) += 0.29;
|
||||
gravityPotential(0) -= 0.17;
|
||||
displacement = gravity_prepared_test_utils::make_displacement(f, 0.73);
|
||||
displacement = field_dof_test_utils::make_supported_displacement(f, 0.73);
|
||||
bernoulliConstant += 0.23;
|
||||
|
||||
const auto unchangedReport = preparedOperator.Prepare(
|
||||
@@ -199,9 +202,9 @@ TEST_CASE(
|
||||
|
||||
preparedOperator.BuildResidual(enthalpyResidual);
|
||||
|
||||
mean_field::operators::kernels::apply_hydrostatic_equilibrium(
|
||||
f, *f.domainMapperStateless, initialRotation, enthalpy, initialGravityPotential, initialDisplacement,
|
||||
initialBernoulliConstant, enthalpyReference
|
||||
field_dof_test_utils::apply_hydrostatic_reference(
|
||||
f, initialRotation, enthalpy, initialGravityPotential, initialDisplacement, initialBernoulliConstant,
|
||||
enthalpyReference
|
||||
);
|
||||
|
||||
CHECK_FALSE(enthalpyReport.contextReport.preparedStaticDependencies);
|
||||
@@ -226,9 +229,9 @@ TEST_CASE(
|
||||
|
||||
preparedOperator.BuildResidual(rotationResidual);
|
||||
|
||||
mean_field::operators::kernels::apply_hydrostatic_equilibrium(
|
||||
f, *f.domainMapperStateless, changedRotation, enthalpy, initialGravityPotential, initialDisplacement,
|
||||
initialBernoulliConstant, rotationReference
|
||||
field_dof_test_utils::apply_hydrostatic_reference(
|
||||
f, changedRotation, enthalpy, initialGravityPotential, initialDisplacement, initialBernoulliConstant,
|
||||
rotationReference
|
||||
);
|
||||
|
||||
CHECK_FALSE(rotationReport.contextReport.preparedStaticDependencies);
|
||||
@@ -253,9 +256,9 @@ TEST_CASE(
|
||||
|
||||
preparedOperator.BuildResidual(displacementResidual);
|
||||
|
||||
mean_field::operators::kernels::apply_hydrostatic_equilibrium(
|
||||
f, *f.domainMapperStateless, changedRotation, enthalpy, initialGravityPotential, displacement,
|
||||
initialBernoulliConstant, displacementReference
|
||||
field_dof_test_utils::apply_hydrostatic_reference(
|
||||
f, changedRotation, enthalpy, initialGravityPotential, displacement, initialBernoulliConstant,
|
||||
displacementReference
|
||||
);
|
||||
|
||||
CHECK_FALSE(displacementReport.contextReport.preparedStaticDependencies);
|
||||
|
||||
Reference in New Issue
Block a user