Nalu
Nalu: a generalized unstructured massively parallel low Mach flow code designed to support a variety of energy applications of interest (most notably Wind ECP) built on the Sierra Toolkit and Trilinos solver Tpetra/Epetra stack. The open source BSD, clause 3 license model has been chosen for the code base. See LICENSE for more information. http://NaluCFD.org
Public Member Functions | Public Attributes | List of all members
sierra::nalu::EquationSystems Class Reference

A collection of Equations to be solved on a Realm. More...

#include <EquationSystems.h>

Public Member Functions

 EquationSystems (Realm &realm)
 
 ~EquationSystems ()
 
void load (const YAML::Node &node)
 
std::string get_solver_block_name (const std::string eqName)
 
void breadboard ()
 
Simulationroot ()
 
Realmparent ()
 
size_t size ()
 
EquationSystemoperator[] (int i)
 
void register_nodal_fields (const std::vector< std::string > targetNames)
 
void register_edge_fields (const std::vector< std::string > targetNames)
 
void register_element_fields (const std::vector< std::string > targetNames)
 
void register_interior_algorithm (const std::vector< std::string > targetNames)
 
void register_wall_bc (const std::string targetName, const WallBoundaryConditionData &wallBCData)
 
void register_inflow_bc (const std::string targetName, const InflowBoundaryConditionData &inflowBCData)
 
void register_open_bc (const std::string targetName, const OpenBoundaryConditionData &openBCData)
 
void register_symmetry_bc (const std::string targetName, const SymmetryBoundaryConditionData &symmetryBCData)
 
void register_periodic_bc (const std::string targetNameMaster, const std::string targetNameSlave, const PeriodicBoundaryConditionData &periodicBCData)
 
void register_overset_bc (const OversetBoundaryConditionData &oversetBCData)
 
void register_non_conformal_bc (const NonConformalBoundaryConditionData &nonConformalBCData)
 
void register_surface_pp_algorithm (const PostProcessingData &theData)
 
void register_initial_condition_fcn (stk::mesh::Part *part, const UserFunctionInitialConditionData &fcnIC)
 
void initialize ()
 
void reinitialize_linear_system ()
 
void post_adapt_work ()
 
void populate_derived_quantities ()
 
void initial_work ()
 
bool solve_and_update ()
 Solve and update the state of all variables for a given timestep. More...
 
double provide_system_norm ()
 
double provide_mean_system_norm ()
 
void predict_state ()
 
void populate_boundary_data ()
 
void boundary_data_to_state_data ()
 
void provide_output ()
 
void dump_eq_time ()
 
void pre_timestep_work ()
 
void post_converged_work ()
 
void evaluate_properties ()
 
void pre_iter_work ()
 Perform necessary setup tasks that affect all EquationSystem instances at a given timestep. More...
 
void post_iter_work ()
 Perform necessary actions once all EquationSystem instances have been updated for the prescribed number of outer iterations at a given timestep. More...
 

Public Attributes

Realmrealm_
 
std::string name_
 
int maxIterations_
 
EquationSystemVector equationSystemVector_
 
std::map< std::string, std::string > solverSpecMap_
 
std::vector< AlgorithmDriver * > preIterAlgDriver_
 A list of tasks to be performed before all EquationSystem solve_and_update. More...
 
std::vector< AlgorithmDriver * > postIterAlgDriver_
 A list of tasks to be performed after all EquationSystem solve_and_update. More...
 

Detailed Description

A collection of Equations to be solved on a Realm.

EquationSystems holds a vector of EquationSystem instances representing the equations that are being solved in a given Realm and is responsible for the management of the solve and update of the various field quantities in a given timestep.

See also
EquationSystems::solve_and_update

Constructor & Destructor Documentation

sierra::nalu::EquationSystems::EquationSystems ( Realm realm)
sierra::nalu::EquationSystems::~EquationSystems ( )

Member Function Documentation

void sierra::nalu::EquationSystems::boundary_data_to_state_data ( )
void sierra::nalu::EquationSystems::breadboard ( )
void sierra::nalu::EquationSystems::dump_eq_time ( )
void sierra::nalu::EquationSystems::evaluate_properties ( )
std::string sierra::nalu::EquationSystems::get_solver_block_name ( const std::string  eqName)

References sierra::nalu::NaluEnv::naluOutputP0(), sierra::nalu::NaluEnv::self(), and solverSpecMap_.

Referenced by sierra::nalu::ContinuityEquationSystem::ContinuityEquationSystem(), sierra::nalu::EnthalpyEquationSystem::EnthalpyEquationSystem(), sierra::nalu::HeatCondEquationSystem::HeatCondEquationSystem(), sierra::nalu::MassFractionEquationSystem::MassFractionEquationSystem(), sierra::nalu::MeshDisplacementEquationSystem::MeshDisplacementEquationSystem(), sierra::nalu::MixtureFractionEquationSystem::MixtureFractionEquationSystem(), sierra::nalu::MomentumEquationSystem::MomentumEquationSystem(), sierra::nalu::ProjectedNodalGradientEquationSystem::ProjectedNodalGradientEquationSystem(), sierra::nalu::RadiativeTransportEquationSystem::RadiativeTransportEquationSystem(), sierra::nalu::MeshDisplacementEquationSystem::reinitialize_linear_system(), sierra::nalu::TurbKineticEnergyEquationSystem::reinitialize_linear_system(), sierra::nalu::SpecificDissipationRateEquationSystem::reinitialize_linear_system(), sierra::nalu::HeatCondEquationSystem::reinitialize_linear_system(), sierra::nalu::EnthalpyEquationSystem::reinitialize_linear_system(), sierra::nalu::MixtureFractionEquationSystem::reinitialize_linear_system(), sierra::nalu::ProjectedNodalGradientEquationSystem::reinitialize_linear_system(), sierra::nalu::MomentumEquationSystem::reinitialize_linear_system(), sierra::nalu::ContinuityEquationSystem::reinitialize_linear_system(), sierra::nalu::SpecificDissipationRateEquationSystem::SpecificDissipationRateEquationSystem(), and sierra::nalu::TurbKineticEnergyEquationSystem::TurbKineticEnergyEquationSystem().

void sierra::nalu::EquationSystems::initial_work ( )
void sierra::nalu::EquationSystems::initialize ( )
void sierra::nalu::EquationSystems::load ( const YAML::Node node)
EquationSystem* sierra::nalu::EquationSystems::operator[] ( int  i)
inline

References initialize().

Realm * sierra::nalu::EquationSystems::parent ( )

References realm_.

Referenced by root().

void sierra::nalu::EquationSystems::populate_boundary_data ( )
void sierra::nalu::EquationSystems::populate_derived_quantities ( )
void sierra::nalu::EquationSystems::post_adapt_work ( )
void sierra::nalu::EquationSystems::post_converged_work ( )
void sierra::nalu::EquationSystems::post_iter_work ( )

Perform necessary actions once all EquationSystem instances have been updated for the prescribed number of outer iterations at a given timestep.

See also
EquationSystems::solve_and_update()

References postIterAlgDriver_.

Referenced by solve_and_update().

void sierra::nalu::EquationSystems::pre_iter_work ( )

Perform necessary setup tasks that affect all EquationSystem instances at a given timestep.

See also
EquationSystems::solve_and_update()

References preIterAlgDriver_.

Referenced by solve_and_update().

void sierra::nalu::EquationSystems::pre_timestep_work ( )
void sierra::nalu::EquationSystems::predict_state ( )
double sierra::nalu::EquationSystems::provide_mean_system_norm ( )
void sierra::nalu::EquationSystems::provide_output ( )
double sierra::nalu::EquationSystems::provide_system_norm ( )
void sierra::nalu::EquationSystems::register_edge_fields ( const std::vector< std::string >  targetNames)
void sierra::nalu::EquationSystems::register_element_fields ( const std::vector< std::string >  targetNames)
void sierra::nalu::EquationSystems::register_inflow_bc ( const std::string  targetName,
const InflowBoundaryConditionData inflowBCData 
)
void sierra::nalu::EquationSystems::register_initial_condition_fcn ( stk::mesh::Part *  part,
const UserFunctionInitialConditionData fcnIC 
)
void sierra::nalu::EquationSystems::register_interior_algorithm ( const std::vector< std::string >  targetNames)
void sierra::nalu::EquationSystems::register_nodal_fields ( const std::vector< std::string >  targetNames)
void sierra::nalu::EquationSystems::register_non_conformal_bc ( const NonConformalBoundaryConditionData nonConformalBCData)
void sierra::nalu::EquationSystems::register_open_bc ( const std::string  targetName,
const OpenBoundaryConditionData openBCData 
)
void sierra::nalu::EquationSystems::register_overset_bc ( const OversetBoundaryConditionData oversetBCData)
void sierra::nalu::EquationSystems::register_periodic_bc ( const std::string  targetNameMaster,
const std::string  targetNameSlave,
const PeriodicBoundaryConditionData periodicBCData 
)
void sierra::nalu::EquationSystems::register_surface_pp_algorithm ( const PostProcessingData theData)
void sierra::nalu::EquationSystems::register_symmetry_bc ( const std::string  targetName,
const SymmetryBoundaryConditionData symmetryBCData 
)
void sierra::nalu::EquationSystems::register_wall_bc ( const std::string  targetName,
const WallBoundaryConditionData wallBCData 
)
void sierra::nalu::EquationSystems::reinitialize_linear_system ( )
Simulation * sierra::nalu::EquationSystems::root ( )

References parent(), and sierra::nalu::Realm::root().

Referenced by load().

size_t sierra::nalu::EquationSystems::size ( )
inline
bool sierra::nalu::EquationSystems::solve_and_update ( )

Solve and update the state of all variables for a given timestep.

This method is responsible for executing setup actions before calling solve, performing the actual solve, updating the solution, and performing post-solve actions after the solution has been updated. To provide sufficient granularity and control of this pre- and post- solve actions, the solve method uses the following series of steps:

// Perform tasks for this timestep before any Equation system is called
// Iterate over all equation systems
for (auto eqsys: equationSystems_) {
eqsys->pre_iter_work();
eqsys->solve_and_update();
eqsys->post_iter_work();
}
// Perform tasks after all equation systems have updated

Tasks that require to be performed before any equation system is solved for needs to be registered to preIterAlgDriver_ on EquationSystems, similiary for post-solve tasks. And actions to be performed immediately before individual equation system solves need to be registered in EquationSystem::preIterAlgDriver_.

See also
pre_iter_work(), post_iter_work(), EquationSystem::pre_iter_work(),
EquationSystem::post_iter_work()

References equationSystemVector_, sierra::nalu::Realm::get_activate_memory_diagnostic(), sierra::nalu::NaluEnv::naluOutputP0(), post_iter_work(), pre_iter_work(), sierra::nalu::Realm::provide_memory_summary(), realm_, and sierra::nalu::NaluEnv::self().

Referenced by sierra::nalu::Realm::advance_time_step().

Member Data Documentation

EquationSystemVector sierra::nalu::EquationSystems::equationSystemVector_
int sierra::nalu::EquationSystems::maxIterations_
std::string sierra::nalu::EquationSystems::name_

Referenced by load().

std::vector<AlgorithmDriver*> sierra::nalu::EquationSystems::postIterAlgDriver_

A list of tasks to be performed after all EquationSystem solve_and_update.

Referenced by post_iter_work(), and ~EquationSystems().

std::vector<AlgorithmDriver*> sierra::nalu::EquationSystems::preIterAlgDriver_
Realm& sierra::nalu::EquationSystems::realm_
std::map<std::string, std::string> sierra::nalu::EquationSystems::solverSpecMap_

Referenced by get_solver_block_name(), and load().


The documentation for this class was generated from the following files: