www.mooseframework.org
SetupQuadratureAction.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #include "SetupQuadratureAction.h"
16 #include "Conversion.h"
17 #include "FEProblem.h"
18 #include "MooseEnum.h"
19 
20 template <>
23 {
24  MooseEnum types("CLOUGH CONICAL GAUSS GRID MONOMIAL SIMPSON TRAP GAUSS_LOBATTO", "GAUSS");
25  MooseEnum order("AUTO CONSTANT FIRST SECOND THIRD FOURTH FIFTH SIXTH SEVENTH EIGHTH NINTH TENTH "
26  "ELEVENTH TWELFTH THIRTEENTH FOURTEENTH FIFTEENTH SIXTEENTH SEVENTEENTH "
27  "EIGHTTEENTH NINTEENTH TWENTIETH",
28  "AUTO");
29 
31 
32  params.addParam<MooseEnum>("type", types, "Type of the quadrature rule");
33  params.addParam<MooseEnum>("order", order, "Order of the quadrature");
34  params.addParam<MooseEnum>("element_order", order, "Order of the quadrature for elements");
35  params.addParam<MooseEnum>("side_order", order, "Order of the quadrature for sides");
36 
37  return params;
38 }
39 
41  : Action(parameters),
42  _type(Moose::stringToEnum<QuadratureType>(getParam<MooseEnum>("type"))),
43  _order(Moose::stringToEnum<Order>(getParam<MooseEnum>("order"))),
44  _element_order(Moose::stringToEnum<Order>(getParam<MooseEnum>("element_order"))),
45  _side_order(Moose::stringToEnum<Order>(getParam<MooseEnum>("side_order")))
46 {
47 }
48 
49 void
51 {
52  if (_problem.get() != NULL)
54 }
T stringToEnum(const std::string &s)
Definition: Conversion.C:193
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
SetupQuadratureAction(InputParameters parameters)
Base class for actions.
Definition: Action.h:39
virtual void act() override
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:37
std::shared_ptr< FEProblemBase > & _problem
Convenience reference to a problem this action works on.
Definition: Action.h:131
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an option parameter and a documentation string to the InputParameters object...
Definition: Moose.h:84
InputParameters validParams< SetupQuadratureAction >()
InputParameters validParams< Action >()
Definition: Action.C:23