https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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{
19public:
21
23
27 const FunctionName functionName() const;
28
29protected:
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:18
Real f()
Evaluate the function at the current quadrature point and time step.
const FunctionName functionName() const
Definition FunctionIC.C:48
const Function & _func
Function to evaluate to form the initial condition.
Definition FunctionIC.h:46
virtual RealGradient gradient(const Point &p) override
The value of the gradient at a point.
Definition FunctionIC.C:42
static InputParameters validParams()
Definition FunctionIC.C:16
const Real _scaling
Scaling factor, to be able to use a function with multiple ICs.
Definition FunctionIC.h:49
virtual Real value(const Point &p) override
The value of the variable at a point.
Definition FunctionIC.C:36
Base class for function objects.
Definition Function.h:30
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 InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131