https://mooseframework.inl.gov
VectorConstantIC.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 
10 #include "VectorConstantIC.h"
11 #include "libmesh/point.h"
12 
14 
17 {
19  params.addRequiredParam<Real>("x_value", "The x value to be set in IC");
20  params.addParam<Real>("y_value", 0, "The y value to be set in IC");
21  params.addParam<Real>("z_value", 0, "The z value to be set in IC");
22 
23  params.addClassDescription("Sets constant component values for a vector field variable.");
24  return params;
25 }
26 
28  : VectorInitialCondition(parameters),
29  _x_value(getParam<Real>("x_value")),
30  _y_value(getParam<Real>("y_value")),
31  _z_value(getParam<Real>("z_value"))
32 {
33 }
34 
36 VectorConstantIC::value(const Point & /*p*/)
37 {
38  return {_x_value, _y_value, _z_value};
39 }
virtual RealVectorValue value(const Point &p) override
The value of the variable at a point.
This is a template class that implements the workhorse compute and computeNodal methods.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
static InputParameters validParams()
registerMooseObject("MooseApp", VectorConstantIC)
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
static InputParameters validParams()
VectorConstantIC just returns a constant value.
VectorConstantIC(const InputParameters &parameters)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
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...
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object...