https://mooseframework.inl.gov
Public Member Functions | Private Attributes | List of all members
ExecutionTypeWalker Class Reference

This class is a hit walker used to see what type of execution the input is doing. More...

#include <ParameterStudyAction.h>

Inheritance diagram for ExecutionTypeWalker:
[legend]

Public Member Functions

 ExecutionTypeWalker ()
 
void walk (const std::string &fullpath, const std::string &nodename, hit::Node *n) override
 
unsigned int getExecutionType () const
 

Private Attributes

unsigned int _exec_type
 
bool _found_exec
 

Detailed Description

This class is a hit walker used to see what type of execution the input is doing.

Definition at line 206 of file ParameterStudyAction.h.

Constructor & Destructor Documentation

◆ ExecutionTypeWalker()

ExecutionTypeWalker::ExecutionTypeWalker ( )
inline

Definition at line 209 of file ParameterStudyAction.h.

Member Function Documentation

◆ getExecutionType()

unsigned int ExecutionTypeWalker::getExecutionType ( ) const
inline

Definition at line 212 of file ParameterStudyAction.h.

Referenced by ParameterStudyAction::inferMultiAppMode().

212 { return _exec_type; }

◆ walk()

void ExecutionTypeWalker::walk ( const std::string &  fullpath,
const std::string &  nodename,
hit::Node *  n 
)
override

Definition at line 791 of file ParameterStudyAction.C.

794 {
795  if (fullpath == "Executioner")
796  {
797  // This should not be hit since there shouldn't be two Executioner blocks
798  // But if it does happen, then go back to not knowing
799  if (_found_exec)
800  _exec_type = 0;
801  else
802  {
803  // Get the type of executioner
804  std::string executioner_type = "Unknown";
805  const auto typeit = n->find("type");
806  if (typeit && typeit != n && typeit->type() == hit::NodeType::Field)
807  executioner_type = n->param<std::string>("type");
808 
809  // If it's Steady or Eigenvalue, then it's a steady-state problem
810  if (executioner_type == "Steady" || executioner_type == "Eigenvalue")
811  _exec_type = 1;
812  // If it's Transient
813  else if (executioner_type == "Transient")
814  {
815  // Now we'll see if it's a pseudo transient
816  const auto it = n->find("steady_state_detection");
817  if (it && it != n && it->type() == hit::NodeType::Field &&
818  n->param<bool>("steady_state_detection"))
819  _exec_type = 2;
820  else
821  _exec_type = 3;
822  }
823  }
824 
825  _found_exec = true;
826  }
827 }

Member Data Documentation

◆ _exec_type

unsigned int ExecutionTypeWalker::_exec_type
private

Definition at line 215 of file ParameterStudyAction.h.

Referenced by getExecutionType(), and walk().

◆ _found_exec

bool ExecutionTypeWalker::_found_exec
private

Definition at line 216 of file ParameterStudyAction.h.

Referenced by walk().


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