Interpolation functions
Throughout the code NEML uses interpolation functions to represent
model parameters that depend on temperature or, occasionally, some other
variable.
A NEML interpolation function is a scalar function of a single variable
.
The interface must also provide the first derivative of the function with respect that the variable.
These interpolation functions are used throughout NEML in place of scalar parameters. Except where noted, currently only for the InterpolatedIsotrpicHardeningRule, interpolation functions are used to give the parameter as a function of temperature. A constant parameter, e.g. one that does not depend on temperature can be expressed by using a ConstantInterpolate object.
Interpolate
The interface for all interpolate objects.
-
class Interpolate : public neml::NEMLObject
Base class for interpolation functions.
Subclassed by neml::ConstantInterpolate, neml::ExpInterpolate, neml::GenericPiecewiseInterpolate, neml::MTSInterpolate, neml::MTSShearInterpolate, neml::PiecewiseLinearInterpolate, neml::PiecewiseLogLinearInterpolate, neml::PiecewiseSemiLogXLinearInterpolate, neml::PolynomialInterpolate, neml::PowerLawInterpolate
Public Functions
-
Interpolate(ParameterSet ¶ms)
-
virtual double value(double x) const = 0
Returns the value of the function.
-
virtual double derivative(double x) const = 0
Returns the derivative of the function.
-
double operator()(double x) const
Nice wrapper for function call syntax.
-
bool valid() const
Is the interpolate valid?
-
Interpolate(ParameterSet ¶ms)
ConstantInterpolate
Expresses a constant parameter

-
class ConstantInterpolate : public neml::Interpolate
A constant value.
Public Functions
-
ConstantInterpolate(ParameterSet ¶ms)
The parameter is the constant value!
-
virtual double value(double x) const
Returns the value of the function.
-
virtual double derivative(double x) const
Returns the derivative of the function.
Public Static Functions
-
static std::string type()
Type for the object system.
-
static ParameterSet parameters()
Create parameters for the object system.
-
static std::unique_ptr<NEMLObject> initialize(ParameterSet ¶ms)
Create object from a ParameterSet.
-
ConstantInterpolate(ParameterSet ¶ms)
GenericPiecewiseInterpolate
A general piecewise interpolate. If
then it
calls interpolation function
.
For
it calls interpolation function
.
-
class GenericPiecewiseInterpolate : public neml::Interpolate
Generic piecewise interpolation.
Public Functions
-
GenericPiecewiseInterpolate(ParameterSet ¶ms)
-
virtual double value(double x) const
Returns the value of the function.
-
virtual double derivative(double x) const
Returns the derivative of the function.
Public Static Functions
-
static std::string type()
Type for the object system.
-
static ParameterSet parameters()
Create parameters for the object system.
-
static std::unique_ptr<NEMLObject> initialize(ParameterSet ¶ms)
Create object from a ParameterSet.
-
GenericPiecewiseInterpolate(ParameterSet ¶ms)
PolynomialInterpolate
Polynomial interpolation of the type

The polynomial coefficients are given starting with the highest order, like in the numpy library.
-
class PolynomialInterpolate : public neml::Interpolate
Simple polynomial interpolation.
Public Functions
-
PolynomialInterpolate(ParameterSet ¶ms)
Input is the coefficients of the polynomial, from highest to lowest order.
-
virtual double value(double x) const
Returns the value of the function.
-
virtual double derivative(double x) const
Returns the derivative of the function.
Public Static Functions
-
static std::string type()
Type for the object system.
-
static ParameterSet parameters()
Create parameters for the object system.
-
static std::unique_ptr<NEMLObject> initialize(ParameterSet ¶ms)
Create object from a ParameterSet.
-
PolynomialInterpolate(ParameterSet ¶ms)
PiecewiseLinearInterpolate
Piecewise linear interpolation where parameters give the x and y coordinates
of the endpoints of each linear segment.
For 

For
the function returns
and for
the function returns
.
-
class PiecewiseLinearInterpolate : public neml::Interpolate
Piecewise linear interpolation.
Public Functions
-
PiecewiseLinearInterpolate(ParameterSet ¶ms)
Parameters are a list of x coordinates and a corresponding list of y coordinates
-
virtual double value(double x) const
Returns the value of the function.
-
virtual double derivative(double x) const
Returns the derivative of the function.
Public Static Functions
-
static std::string type()
Type for the object system.
-
static ParameterSet parameters()
Create parameters for the object system.
-
static std::unique_ptr<NEMLObject> initialize(ParameterSet ¶ms)
Create object from a ParameterSet.
-
PiecewiseLinearInterpolate(ParameterSet ¶ms)
PiecewiseLogLinearInterpolate
Exactly like PiecewiseLinearInterpolate except the interpolation in y is done in log space.
The input y values are given as
where
is the actual value of the function at
.
For 

For
the function returns
and for
the function returns
.
-
class PiecewiseLogLinearInterpolate : public neml::Interpolate
Piecewise loglinear interpolation.
Public Functions
-
PiecewiseLogLinearInterpolate(ParameterSet ¶ms)
Similar to piecewise linear interpolation except the y coordinates are given as ln(y) and the interpolation is done in log space
-
virtual double value(double x) const
Returns the value of the function.
-
virtual double derivative(double x) const
Returns the derivative of the function.
Public Static Functions
-
static std::string type()
Type for the object system.
-
static ParameterSet parameters()
Create parameters for the object system.
-
static std::unique_ptr<NEMLObject> initialize(ParameterSet ¶ms)
Create object from a ParameterSet.
-
PiecewiseLogLinearInterpolate(ParameterSet ¶ms)
MTSShearInterpolate
The shear modulus interpolation used in the Mechanical Threshold Stress [MTS1999] flow stress model

-
class MTSShearInterpolate : public neml::Interpolate
The MTS shear modulus function proposed in the original paper.
Public Functions
-
MTSShearInterpolate(ParameterSet ¶ms)
Interpolation using the MTS model form f(x) = V0 - D / (exp(T0 / x) - 1)
-
virtual double value(double x) const
Returns the value of the function.
-
virtual double derivative(double x) const
Returns the derivative of the function.
Public Static Functions
-
static std::string type()
Type for the object system.
-
static ParameterSet parameters()
Create parameters for the object system.
-
static std::unique_ptr<NEMLObject> initialize(ParameterSet ¶ms)
Create object from a ParameterSet.
-
MTSShearInterpolate(ParameterSet ¶ms)
Helper Functions
-
std::vector<std::shared_ptr<Interpolate>> neml::make_vector(const std::vector<double> &iv)
A helper to make a vector of constant interpolates from a vector.
A helper to evaluate a vector of interpolates.
A helper to evaluate the derivative of a vector of interpolates.