Base class for adding common actions for testing. More...
#include <TestAction.h>
Public Types | |
typedef DataFileName | DataFileParameterType |
Public Member Functions | |
TestAction (const InputParameters ¶ms) | |
virtual void | act () |
void | timedAct () |
virtual void | addRelationshipManagers (Moose::RelationshipManagerType when_type) |
MooseObjectName | uniqueActionName () const |
const std::string & | specificTaskName () const |
const std::set< std::string > & | getAllTasks () const |
void | appendTask (const std::string &task) |
MooseApp & | getMooseApp () const |
const std::string & | type () const |
virtual const std::string & | name () const |
std::string | typeAndName () const |
std::string | errorPrefix (const std::string &error_type) const |
void | callMooseError (std::string msg, const bool with_prefix) const |
MooseObjectParameterName | uniqueParameterName (const std::string ¶meter_name) const |
const InputParameters & | parameters () const |
MooseObjectName | uniqueName () const |
const T & | getParam (const std::string &name) const |
std::vector< std::pair< T1, T2 > > | getParam (const std::string ¶m1, const std::string ¶m2) const |
const T * | queryParam (const std::string &name) const |
const T & | getRenamedParam (const std::string &old_name, const std::string &new_name) const |
T | getCheckedPointerParam (const std::string &name, const std::string &error_string="") const |
bool | isParamValid (const std::string &name) const |
bool | isParamSetByUser (const std::string &nm) const |
void | paramError (const std::string ¶m, Args... args) const |
void | paramWarning (const std::string ¶m, Args... args) const |
void | paramInfo (const std::string ¶m, Args... args) const |
void | connectControllableParams (const std::string ¶meter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const |
void | mooseError (Args &&... args) const |
void | mooseErrorNonPrefixed (Args &&... args) const |
void | mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const |
void | mooseWarning (Args &&... args) const |
void | mooseWarningNonPrefixed (Args &&... args) const |
void | mooseDeprecated (Args &&... args) const |
void | mooseInfo (Args &&... args) const |
std::string | getDataFileName (const std::string ¶m) const |
std::string | getDataFileNameByName (const std::string &relative_path) const |
std::string | getDataFilePath (const std::string &relative_path) const |
PerfGraph & | perfGraph () |
const Parallel::Communicator & | comm () const |
processor_id_type | n_processors () const |
processor_id_type | processor_id () const |
Static Public Member Functions | |
static InputParameters | validParams () |
Public Attributes | |
const ConsoleStream | _console |
Static Public Attributes | |
static constexpr auto | SYSTEM |
static constexpr auto | NAME |
Protected Member Functions | |
void | addMeshInternal (const unsigned int &nx) |
Adds the mesh with a provided number of elements in x direction. More... | |
virtual void | addObjects () |
Adds all non-mesh objects. More... | |
void | addScalarVariables (const std::vector< VariableName > &names, const std::vector< FunctionName > &values) |
Adds scalar variables. More... | |
virtual void | addAuxVariables () |
Adds aux variables. More... | |
virtual void | addMaterials () |
Adds materials. More... | |
void | addSolutionVariable (const VariableName &var_name, const std::string &family="LAGRANGE", const std::string &order="FIRST", const Real &scaling=1.0) |
Adds a solution variable. More... | |
void | addAuxVariable (const VariableName &var_name, const std::string &fe_family, const std::string &fe_order) |
Adds an aux variable. More... | |
void | addConstantIC (const VariableName &var_name, const Real &value) |
Adds a constant initial condition. More... | |
void | addFunctionIC (const VariableName &var_name, const FunctionName &function_name) |
Adds a function initial condition. More... | |
virtual void | addMesh () |
Adds the mesh. More... | |
virtual void | addPreconditioner () |
Adds the preconditioner. More... | |
virtual void | addExecutioner () |
Adds the executioner. More... | |
virtual void | addOutput () |
Add output. More... | |
virtual void | addInitialConditions ()=0 |
Adds the initial conditions. More... | |
virtual void | addSolutionVariables ()=0 |
Adds the solution variables. More... | |
virtual void | addUserObjects ()=0 |
Adds user objects. More... | |
bool | addRelationshipManagers (Moose::RelationshipManagerType when_type, const InputParameters &moose_object_pars) |
void | associateWithParameter (const std::string ¶m_name, InputParameters ¶ms) const |
void | associateWithParameter (const InputParameters &from_params, const std::string ¶m_name, InputParameters ¶ms) const |
const T & | getMeshProperty (const std::string &data_name, const std::string &prefix) |
const T & | getMeshProperty (const std::string &data_name) |
bool | hasMeshProperty (const std::string &data_name, const std::string &prefix) const |
bool | hasMeshProperty (const std::string &data_name, const std::string &prefix) const |
bool | hasMeshProperty (const std::string &data_name) const |
bool | hasMeshProperty (const std::string &data_name) const |
std::string | meshPropertyName (const std::string &data_name) const |
PerfID | registerTimedSection (const std::string §ion_name, const unsigned int level) const |
PerfID | registerTimedSection (const std::string §ion_name, const unsigned int level, const std::string &live_message, const bool print_dots=true) const |
std::string | timedSectionName (const std::string §ion_name) const |
Static Protected Member Functions | |
static std::string | meshPropertyName (const std::string &data_name, const std::string &prefix) |
Protected Attributes | |
bool | _default_use_transient_executioner |
Default for option to use a transient executioner. More... | |
const std::vector< VariableName > | _scalar_variables |
List of scalar variables to add. More... | |
const std::vector< FunctionName > | _scalar_variable_values |
List of values for the scalar variables to add. More... | |
const std::vector< VariableName > | _aux_variables |
List of aux variables to add. More... | |
const std::vector< FunctionName > | _aux_variable_values |
List of function names for aux variables to add. More... | |
const std::vector< std::string > | _mat_property_names |
List of material properties to add. More... | |
const std::vector< FunctionName > | _mat_property_values |
List of function names for material properties to add. More... | |
const std::string | _fe_family |
Default FE family. More... | |
const std::string | _fe_order |
Default FE order. More... | |
const bool & | _ad |
True for setting up testing with AD, false otherwise. More... | |
std::string | _registered_identifier |
std::string | _specific_task_name |
std::set< std::string > | _all_tasks |
ActionWarehouse & | _awh |
const std::string & | _current_task |
std::shared_ptr< MooseMesh > & | _mesh |
std::shared_ptr< MooseMesh > & | _displaced_mesh |
std::shared_ptr< FEProblemBase > & | _problem |
PerfID | _act_timer |
MooseApp & | _app |
const std::string | _type |
const std::string | _name |
const InputParameters & | _pars |
Factory & | _factory |
ActionFactory & | _action_factory |
MooseApp & | _pg_moose_app |
const std::string | _prefix |
const Parallel::Communicator & | _communicator |
Base class for adding common actions for testing.
Definition at line 17 of file TestAction.h.
TestAction::TestAction | ( | const InputParameters & | params | ) |
Definition at line 44 of file TestAction.C.
|
virtual |
Implements Action.
Definition at line 75 of file TestAction.C.
|
protected |
Adds an aux variable.
[in] | var_name | name of the variable to add |
[in] | fe_family | finite element family |
[in] | fe_order | finite element order |
Definition at line 248 of file TestAction.C.
Referenced by ClosureTestAction::addAuxVariables(), JacobianTest1PhaseRDGAction::addAuxVariables(), addAuxVariables(), ClosureTestAction::setupADOutput(), and ClosureTestAction::setupOutput().
|
protectedvirtual |
Adds aux variables.
Reimplemented in JacobianTestGeneralAction, JacobianTest1PhaseRDGAction, JacobianTest1PhaseAction, ClosureTest1PhaseAction, and ClosureTestAction.
Definition at line 180 of file TestAction.C.
Referenced by ClosureTestAction::addAuxVariables(), JacobianTest1PhaseAction::addAuxVariables(), JacobianTestGeneralAction::addAuxVariables(), and addObjects().
Adds a constant initial condition.
[in] | var_name | name of the variable for which to add initial condition |
[in] | value | value of the initial condition |
Definition at line 265 of file TestAction.C.
Referenced by JacobianTest1PhaseRDGAction::addSolutionVariables().
|
protectedvirtual |
Adds the executioner.
Definition at line 302 of file TestAction.C.
Referenced by addObjects().
|
protected |
Adds a function initial condition.
[in] | var_name | name of the variable for which to add initial condition |
[in] | function_name | names of the IC function |
Definition at line 281 of file TestAction.C.
Referenced by JacobianTest1PhaseRDGAction::addAuxVariables(), addAuxVariables(), ClosureTestAction::addInitialConditions(), JacobianTestGeneralAction::addSolutionVariables(), and JacobianTest1PhaseRDGAction::addSolutionVariablesRiemannIC().
|
protectedpure virtual |
Adds the initial conditions.
Implemented in JacobianTestGeneralAction, JacobianTest1PhaseRDGAction, ClosureTest1PhaseAction, JacobianTest1PhaseAction, and ClosureTestAction.
Referenced by addObjects().
|
protectedvirtual |
Adds materials.
Reimplemented in JacobianTestGeneralAction, JacobianTest1PhaseRDGAction, JacobianTest1PhaseAction, ClosureTest1PhaseAction, and ClosureTestAction.
Definition at line 214 of file TestAction.C.
Referenced by ClosureTestAction::addMaterials(), JacobianTest1PhaseAction::addMaterials(), JacobianTestGeneralAction::addMaterials(), and addObjects().
|
protectedvirtual |
Adds the mesh.
Reimplemented in JacobianTest1PhaseRDGAction.
Definition at line 99 of file TestAction.C.
Referenced by act().
Adds the mesh with a provided number of elements in x direction.
[in] | nx | number of elements in x direction |
Definition at line 105 of file TestAction.C.
Referenced by JacobianTest1PhaseRDGAction::addMesh(), and addMesh().
|
protectedvirtual |
Adds all non-mesh objects.
Reimplemented in JacobianTest1PhaseRDGAction.
Definition at line 140 of file TestAction.C.
Referenced by act(), and JacobianTest1PhaseRDGAction::addObjects().
|
protectedvirtual |
Add output.
Reimplemented in ClosureTestAction.
Definition at line 351 of file TestAction.C.
Referenced by addObjects().
|
protectedvirtual |
Adds the preconditioner.
Reimplemented in JacobianTestAction.
Definition at line 297 of file TestAction.C.
Referenced by addObjects().
|
protected |
Adds scalar variables.
[in] | names | names of the variables to add |
[in] | values | values of the variables to add |
Definition at line 154 of file TestAction.C.
Referenced by addObjects().
|
protected |
Adds a solution variable.
[in] | var_name | name of the variable to add |
[in] | family | variable family |
[in] | order | variable order |
[in] | scaling | scaling factor to apply to variable |
Definition at line 230 of file TestAction.C.
Referenced by addScalarVariables(), ClosureTestAction::addSolutionVariables(), JacobianTest1PhaseRDGAction::addSolutionVariables(), JacobianTestGeneralAction::addSolutionVariables(), and JacobianTest1PhaseRDGAction::addSolutionVariablesRiemannIC().
|
protectedpure virtual |
Adds the solution variables.
Implemented in JacobianTestGeneralAction, JacobianTest1PhaseRDGAction, JacobianTest1PhaseAction, and ClosureTestAction.
Referenced by addObjects().
|
protectedpure virtual |
Adds user objects.
Implemented in JacobianTestGeneralAction, JacobianTest1PhaseRDGAction, JacobianTest1PhaseAction, and ClosureTest1PhaseAction.
Referenced by addObjects().
|
static |
Definition at line 17 of file TestAction.C.
Referenced by JacobianTestAction::validParams(), and ClosureTestAction::validParams().
|
protected |
True for setting up testing with AD, false otherwise.
Definition at line 154 of file TestAction.h.
Referenced by ClosureTestAction::addMaterials(), and JacobianTest1PhaseRDGAction::addMaterials().
|
protected |
List of function names for aux variables to add.
Definition at line 142 of file TestAction.h.
Referenced by addAuxVariables(), and TestAction().
|
protected |
List of aux variables to add.
Definition at line 140 of file TestAction.h.
Referenced by addAuxVariables(), and TestAction().
|
protected |
Default for option to use a transient executioner.
Definition at line 132 of file TestAction.h.
Referenced by addExecutioner(), and ClosureTestAction::ClosureTestAction().
|
protected |
Default FE family.
Definition at line 150 of file TestAction.h.
Referenced by ClosureTestAction::addAuxVariables(), JacobianTest1PhaseRDGAction::addAuxVariables(), and addAuxVariables().
|
protected |
Default FE order.
Definition at line 152 of file TestAction.h.
Referenced by ClosureTestAction::addAuxVariables(), JacobianTest1PhaseRDGAction::addAuxVariables(), and addAuxVariables().
|
protected |
List of material properties to add.
Definition at line 145 of file TestAction.h.
Referenced by addMaterials(), and TestAction().
|
protected |
List of function names for material properties to add.
Definition at line 147 of file TestAction.h.
Referenced by addMaterials(), and TestAction().
|
protected |
List of values for the scalar variables to add.
Definition at line 137 of file TestAction.h.
Referenced by addObjects(), and TestAction().
|
protected |
List of scalar variables to add.
Definition at line 135 of file TestAction.h.
Referenced by addObjects(), and TestAction().