HArD::Core2D
Hybrid Arbitrary Degree::Core 2D - Library to implement 2D schemes with edge and cell polynomials as unknowns
Public Types | Public Member Functions | List of all members
TestCaseNonLinearity Class Reference

The TestCaseNonLinearity class provides definition of a nonlinear function, and related functions. More...

#include <TestCaseNonLinearity.hpp>

Public Types

using nonlinearity_function_type = std::function< double(double, std::string)>
 type for nonlinear function More...
 

Public Member Functions

 TestCaseNonLinearity (const int iTCNL, const double m=1.0)
 Initialise data. More...
 
double nonlinearity (const double s, const std::string type)
 Nonlinearity. More...
 

Detailed Description

The TestCaseNonLinearity class provides definition of a nonlinear function, and related functions.

Member Typedef Documentation

◆ nonlinearity_function_type

type for nonlinear function

Constructor & Destructor Documentation

◆ TestCaseNonLinearity()

TestCaseNonLinearity::TestCaseNonLinearity ( const int  iTCNL,
const double  m = 1.0 
)

Initialise data.

Parameters
iTCNLThe id of the test case
mOptional, power of the porous medium non-linearity

Member Function Documentation

◆ nonlinearity()

double TestCaseNonLinearity::nonlinearity ( const double  s,
const std::string  type 
)

Nonlinearity.

iTCR[0]=-1: \(f(u)=0\)

iTCR[0]=1: \(f(u)=u\)

iTCR[0]=2: \(f(u)=|u|^{m-1}u = |u|^m sign(u)\)

iTCR[0]=3: \(f(u)=max(u,0)^2\)

iTCR[0]=4: \(f(u)=(u+th)^+-th + eps u\)

iTCR[0]=5: \(f(u)=u\) truncated at 0 and th

iTCR[0]=6: Classical Stefan \(f(s)=s\) if \(s<0\), \(f(s)=0\) if \(0\le s\le 1\), \(f(s)=s-1\) if \(s>1\).

Parameters
type"type" = "fct" for the function itself, "nlin" for the nonlinear part gamma such that fct(u) = gamma(u) u, "der" for derivative, "hess" for 2nd derivative

The documentation for this class was generated from the following files: