From 17a930b58d67756ddb3d13cc0c37d055f39edd28 Mon Sep 17 00:00:00 2001 From: chvillanuevap Date: Thu, 22 May 2025 23:58:34 -0700 Subject: [PATCH 1/2] Scalar wave branch --- src/serac/physics/base_physics.hpp | 18 +++++++++--------- .../boundary_conditions/boundary_condition.cpp | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/serac/physics/base_physics.hpp b/src/serac/physics/base_physics.hpp index 403d0b3f5e..e687920b04 100644 --- a/src/serac/physics/base_physics.hpp +++ b/src/serac/physics/base_physics.hpp @@ -481,6 +481,15 @@ class BasePhysics { */ std::string name() const { return name_; } + /** + * @brief Accessor for getting all of the primal solutions from the physics modules at a given + * checkpointed cycle index + * + * @param cycle The cycle to retrieve state from + * @return A map containing the primal field names and their associated FiniteElementStates at the requested cycle + */ + std::unordered_map getCheckpointedStates(int cycle); + protected: /** * @brief Create a paraview data collection for the physics package if requested @@ -503,15 +512,6 @@ class BasePhysics { */ void initializeBasePhysicsStates(int cycle, double time); - /** - * @brief Accessor for getting all of the primal solutions from the physics modules at a given - * checkpointed cycle index - * - * @param cycle The cycle to retrieve state from - * @return A map containing the primal field names and their associated FiniteElementStates at the requested cycle - */ - std::unordered_map getCheckpointedStates(int cycle); - /// @brief Name of the physics module std::string name_ = {}; diff --git a/src/serac/physics/boundary_conditions/boundary_condition.cpp b/src/serac/physics/boundary_conditions/boundary_condition.cpp index 4a216c78c6..7191fa30ff 100644 --- a/src/serac/physics/boundary_conditions/boundary_condition.cpp +++ b/src/serac/physics/boundary_conditions/boundary_condition.cpp @@ -99,7 +99,7 @@ void BoundaryCondition::setDofs(mfem::Vector& vector, const double time) const // a single component of a vector-valued function auto scalar_coef = get>(coef_); scalar_coef->SetTime(time); - if (component_) { + if (component_ || attr_markers_.Size() == 0) { // TODO: If attribute markers is empty, that means this is applied to the entire domain (component could be zero). state.project(*scalar_coef, dof_list, *component_); } else { From 6d32b0a0470592d53c4f74ce7fa6242f4ba73b04 Mon Sep 17 00:00:00 2001 From: chvillanuevap Date: Fri, 6 Jun 2025 09:53:54 -0700 Subject: [PATCH 2/2] Change time iteration log formatting --- src/serac/physics/state/state_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/serac/physics/state/state_manager.cpp b/src/serac/physics/state/state_manager.cpp index 194e33077d..f3a980228a 100644 --- a/src/serac/physics/state/state_manager.cpp +++ b/src/serac/physics/state/state_manager.cpp @@ -195,7 +195,7 @@ void StateManager::save(const double t, const int cycle, const std::string& mesh auto& datacoll = datacolls_.at(mesh_tag); std::string file_path = axom::utilities::filesystem::joinPath(datacoll.GetPrefixPath(), datacoll.GetCollectionName()); SLIC_INFO_ROOT( - axom::fmt::format("Saving data collection at time: '{}' and cycle: '{}' to path: '{}'", t, cycle, file_path)); + axom::fmt::format("Saving data collection at time: '{:.9e}' and cycle: '{:06d}' to path: '{}'", t, cycle, file_path)); datacoll.SetTime(t); datacoll.SetCycle(cycle);