www.mooseframework.org
FunctionIC.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 #pragma once
11 
12 #include "InitialCondition.h"
13 
14 #include <string>
15 
16 class Function;
17 class InputParameters;
18 
19 template <typename T>
21 
27 {
28 public:
30 
32 
36  const FunctionName functionName() const;
37 
38 protected:
42  Real f();
43 
47  virtual Real value(const Point & p) override;
48 
52  virtual RealGradient gradient(const Point & p) override;
53 
55  const Function & _func;
56 
58  const Real _scaling;
59 };
Defines a boundary condition that forces the value to be a user specified function at the boundary...
Definition: FunctionIC.h:26
virtual RealGradient gradient(const Point &p) override
The value of the gradient at a point.
Definition: FunctionIC.C:42
Base class for function objects.
Definition: Function.h:37
Real f()
Evaluate the function at the current quadrature point and time step.
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...
const Function & _func
Function to evaluate to form the initial condition.
Definition: FunctionIC.h:55
const Real _scaling
Scaling factor, to be able to use a function with multiple ICs.
Definition: FunctionIC.h:58
InputParameters validParams()
const FunctionName functionName() const
Definition: FunctionIC.C:48
virtual Real value(const Point &p) override
The value of the variable at a point.
Definition: FunctionIC.C:36
static InputParameters validParams()
Definition: FunctionIC.C:16
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
FunctionIC(const InputParameters &parameters)
Definition: FunctionIC.C:28
const InputParameters & parameters() const
Get the parameters of the object.