Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/serac/physics/base_physics.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string, FiniteElementState> getCheckpointedStates(int cycle);

protected:
/**
* @brief Create a paraview data collection for the physics package if requested
Expand All @@ -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<std::string, FiniteElementState> getCheckpointedStates(int cycle);
Copy link
Collaborator

@tupek2 tupek2 May 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused by this change? We have other tests that use loadCheckpointedState(const std::string& state_name, int cycle), which is public. Why not use that?


/// @brief Name of the physics module
std::string name_ = {};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::shared_ptr<mfem::Coefficient>>(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).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this needed? was there a bug?

state.project(*scalar_coef, dof_list, *component_);

} else {
Expand Down
2 changes: 1 addition & 1 deletion src/serac/physics/state/state_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading