https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
35RealVectorValue
36VectorConstantIC::value(const Point & /*p*/)
37{
38 return {_x_value, _y_value, _z_value};
39}
registerMooseObject("MooseApp", VectorConstantIC)
This is a template class that implements the workhorse compute and computeNodal methods.
static InputParameters validParams()
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
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.
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...
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.
VectorConstantIC just returns a constant value.
virtual RealVectorValue value(const Point &p) override
The value of the variable at a point.
VectorConstantIC(const InputParameters &parameters)
static InputParameters validParams()