https://mooseframework.inl.gov
FunctionIC.h
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 #pragma once
11 
12 #include "InitialCondition.h"
13 
18 {
19 public:
21 
23 
27  const FunctionName functionName() const;
28 
29 protected:
33  Real f();
34 
38  virtual Real value(const Point & p) override;
39 
43  virtual RealGradient gradient(const Point & p) override;
44 
46  const Function & _func;
47 
49  const Real _scaling;
50 };
Defines an initial condition that forces the value to be a user specified function.
Definition: FunctionIC.h:17
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:36
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:46
const Real _scaling
Scaling factor, to be able to use a function with multiple ICs.
Definition: FunctionIC.h:49
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.