https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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.

212{ return _exec_type; }

Referenced by ParameterStudyAction::inferMultiAppMode().

◆ walk()

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

Definition at line 793 of file ParameterStudyAction.C.

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

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: