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 788 of file ParameterStudyAction.C.

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

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: