diff --git a/src/serac/numerics/functional/tests/functional_basic_dg.cpp b/src/serac/numerics/functional/tests/functional_basic_dg.cpp index 6f5c205ae..6c835b530 100644 --- a/src/serac/numerics/functional/tests/functional_basic_dg.cpp +++ b/src/serac/numerics/functional/tests/functional_basic_dg.cpp @@ -189,7 +189,7 @@ void L2_scalar_valued_test(std::string meshfile) interior_faces); double t = 0.0; - check_gradient(residual, t, U0, U1); + check_gradient(residual, t, U0, U1, 2e-4); } TEST(basic, L2_mixed_scalar_test_tris_and_quads_linear) diff --git a/src/serac/physics/base_physics.hpp b/src/serac/physics/base_physics.hpp index 7f6d51158..b7925f260 100644 --- a/src/serac/physics/base_physics.hpp +++ b/src/serac/physics/base_physics.hpp @@ -348,7 +348,7 @@ class BasePhysics { */ virtual const std::unordered_map computeInitialConditionSensitivity() { - SLIC_ERROR_ROOT(axom::fmt::format("Initial condition sensitivities not enabled in physics module {}", name_)); + SLIC_WARNING_ROOT(axom::fmt::format("Initial condition sensitivities not enabled in physics module {}", name_)); return {}; } @@ -363,19 +363,29 @@ class BasePhysics { /** * @brief Set the loads for the adjoint reverse timestep solve + * @param string_to_dual An unorder map from the state field name string to the finite element adjoint/dual load + * The adjoint load is d(qoi)/d(state) */ - virtual void setAdjointLoad(std::unordered_map) + virtual void setAdjointLoad(std::unordered_map string_to_dual) { - SLIC_ERROR_ROOT(axom::fmt::format("Adjoint analysis not defined for physics module {}", name_)); + if (!string_to_dual.empty()) { + SLIC_ERROR_ROOT( + axom::fmt::format("Failed to setAdjointLoad. Adjoint analysis not defined for physics module {}", name_)); + } } /** * @brief Set the dual loads (dirichlet values) for the adjoint reverse timestep solve * This must be called after setAdjointLoad + * @param string_to_bc An unorder map from dual name string to finite element adjoint/state boundary condition + * The adjoint bc is d(qoi)/d(dual) */ - virtual void setDualAdjointBcs(std::unordered_map) + virtual void setDualAdjointBcs(std::unordered_map string_to_bc) { - SLIC_ERROR_ROOT(axom::fmt::format("Adjoint analysis not defined for physics module {}", name_)); + if (!string_to_bc.empty()) { + SLIC_ERROR_ROOT( + axom::fmt::format("Failed to setDualAdjointBCs. Adjoint analysis not defined for physics module {}", name_)); + } } /**