https://mooseframework.inl.gov
Loading...
Searching...
No Matches
AddAuxVariableAction.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
11#include "FEProblem.h"
12
13registerMooseAction("MooseApp", AddAuxVariableAction, "add_aux_variable");
14
17{
19 params.addClassDescription("Add auxiliary variable to the simulation.");
20 return params;
21}
22
27
30{
31 return MooseEnum("LAGRANGE MONOMIAL SCALAR LAGRANGE_VEC MONOMIAL_VEC L2_HIERARCHIC "
32 "L2_HIERARCHIC_VEC L2_LAGRANGE L2_LAGRANGE_VEC L2_RAVIART_THOMAS",
33 "LAGRANGE",
34 true);
35}
36
39{
40 return MooseEnum(
41 "CONSTANT FIRST SECOND THIRD FOURTH FIFTH SIXTH SEVENTH EIGHTH NINTH", "FIRST", true);
42}
43
44void
46{
48
50 mooseError("Non-scalar AuxVariables must be CONSTANT, FIRST, SECOND, THIRD, FOURTH, FIFTH, "
51 "SIXTH, SEVENTH, EIGHTH or NINTH order (",
53 " supplied)");
54
55 // Need static_cast to resolve overloads
56 _problem_add_var_method = static_cast<void (FEProblemBase::*)(
57 const std::string &, const std::string &, InputParameters &)>(&FEProblemBase::addAuxVariable);
58}
registerMooseAction("MooseApp", AddAuxVariableAction, "add_aux_variable")
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Definition MooseError.h:311
Action for creating Auxiliary variables.
AddAuxVariableAction(const InputParameters &params)
static MooseEnum getAuxVariableFamilies()
Returns available families for AuxVariables.
void init() override
Initialize the action's member variables.
static InputParameters validParams()
static MooseEnum getAuxVariableOrders()
Returns available orders for AuxVariables.
Adds nonlinear variable.
std::function< void(FEProblemBase &, const std::string &, const std::string &, InputParameters &)> _problem_add_var_method
libMesh::FEType _fe_type
FEType for the variable being created.
static InputParameters validParams()
bool _scalar_var
True if the variable being created is a scalar.
virtual void init()
Initialize the action's member variables.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual void addAuxVariable(const std::string &var_type, const std::string &var_name, InputParameters &params)
Canonical method for adding an auxiliary variable.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition MooseEnum.h:55
OrderWrapper order