Skip to content

Commit

Permalink
Panzer: add step size and stage number to initial condition builder
Browse files Browse the repository at this point in the history
  • Loading branch information
rppawlo committed Jan 6, 2025
1 parent ece6cfc commit 8a2734d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/panzer/disc-fe/src/Panzer_AssemblyEngine_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,8 @@ evaluateBCs(const panzer::BCType bc_type,
workset.alpha = in.alpha;
workset.beta = betaValue;
workset.time = in.time;
workset.step_size = in.step_size;
workset.stage_number = in.stage_number;
workset.gather_seeds = in.gather_seeds;
workset.evaluate_transient_terms = in.evaluate_transient_terms;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ evaluateInitialCondition(WorksetContainer & wkstContainer,
const std::map< std::string,Teuchos::RCP< PHX::FieldManager<panzer::Traits> > >& phx_ic_field_managers,
Teuchos::RCP<panzer::LinearObjContainer> loc,
const panzer::LinearObjFactory<panzer::Traits>& lo_factory,
const double time_stamp)
const double time_stamp,
const double step_size,
const int stage_number)
{
typedef LinearObjContainer LOC;
panzer::Traits::PED ped;
Expand Down Expand Up @@ -185,6 +187,8 @@ evaluateInitialCondition(WorksetContainer & wkstContainer,
for (std::size_t i = 0; i < w.size(); ++i) {
panzer::Workset& workset = w[i];
workset.time = time_stamp;
workset.step_size = step_size;
workset.stage_number = static_cast<double>(stage_number);

fm->evaluateFields<panzer::Traits::Residual>(workset);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,16 @@ namespace panzer {
std::vector<Teuchos::RCP<panzer::PhysicsBlock> > & physics_blocks);

/** Execute the construction of an initial condition.
*
* The time_stamp, step_size and stage_number are workset parameters used in some transient problems. These are optional.
*/
void evaluateInitialCondition(WorksetContainer & wkstContainer,
const std::map<std::string, Teuchos::RCP< PHX::FieldManager<panzer::Traits> > >& phx_ic_field_managers,
Teuchos::RCP<panzer::LinearObjContainer> loc,
const panzer::LinearObjFactory<panzer::Traits>& lo_factory,
const double time_stamp);
const double time_stamp,
const double step_size = 0.0,
const int stage_number = 0);
}

#endif

0 comments on commit 8a2734d

Please sign in to comment.