 v0.13.0
ExactFunction Struct Reference

Function. More...

## Public Member Functions

double operator() (const double x, const double y, const double t) const

double operator() (const double x, const double y, const double t) const

double operator() (const double x, const double y, const double z) const

double operator() (const double x, const double y, const double z) const

double operator() (const double x, const double y, const double z) const

## Detailed Description

Function.

This is prescribed exact function. If this function is given by polynomial order of "p" and order of approximation is "p" or higher, solution of finite element method is exact (with machine precision).

$u = 1+x+2y+3z$

This is prescribed exact function. If this function is given by polynomial order of "p" and order of approximation is "p" or higher, solution of finite element method is exact (with machine precision).

$u = 1+x^2+y^2+z^3$

Examples
analytical_nonlinear_poisson.cpp, analytical_poisson.cpp, and analytical_poisson_field_split.cpp.

Definition at line 175 of file mixed_reac_diff.cpp.

## ◆ operator()() [1/5]

 double ExactFunction::operator() ( const double x, const double y, const double t ) const
Examples
analytical_nonlinear_poisson.cpp, analytical_poisson.cpp, and analytical_poisson_field_split.cpp.

Definition at line 176 of file mixed_reac_diff.cpp.

176  {
177  double g = cos(T * x) * cos(T * y);
178  if (t <= ramp_t) {
179  return g * t;
180  } else {
181  return g * ramp_t;
182  }
183  }
const double ramp_t
const double T
constexpr double t
plate stiffness
Definition: plate.cpp:76
constexpr double g

## ◆ operator()() [2/5]

 double ExactFunction::operator() ( const double x, const double y, const double t ) const

Definition at line 155 of file std_reac_diff.cpp.

155  {
156  double g = sin(T * x) * sin(T * y);
157  double val = 0;
158  if (x > -sml) {
159  val = 1.0 * g;
160  } else {
161  val = g;
162  }
163  if (t <= ramp_t) {
164  return val * t;
165  } else {
166  return val * ramp_t;
167  }
168  }
const double sml
const double ramp_t
const double T

## ◆ operator()() [3/5]

 double ExactFunction::operator() ( const double x, const double y, const double z ) const

Definition at line 47 of file analytical_nonlinear_poisson.cpp.

47  {
48  return 1 + x + y + pow(z, 3);
49  }

## ◆ operator()() [4/5]

 double ExactFunction::operator() ( const double x, const double y, const double z ) const

Definition at line 45 of file analytical_poisson.cpp.

45  {
46  return 1 + x * x + y * y + z * z * z;
47  }

## ◆ operator()() [5/5]

 double ExactFunction::operator() ( const double x, const double y, const double z ) const

Definition at line 48 of file analytical_poisson_field_split.cpp.

48  {
49  return 1 + x * x + y * y + z * z * z;
50  }

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