v0.13.1
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ExactFunctionGrad Struct Reference

Exact gradient. More...

Public Member Functions

FTensor::Tensor1< double, 3 > operator() (const double x, const double y, const double t) const
 
FTensor::Tensor1< double, 3 > operator() (const double x, const double y, const double t) const
 
FTensor::Tensor1< double, 3 > operator() (const double x, const double y, const double z) const
 
FTensor::Tensor1< double, 3 > operator() (const double x, const double y, const double z) const
 
FTensor::Tensor1< double, 3 > operator() (const double x, const double y, const double z) const
 

Detailed Description

Exact gradient.

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

Definition at line 186 of file mixed_reac_diff.cpp.

Member Function Documentation

◆ operator()() [1/5]

FTensor::Tensor1< double, 3 > ExactFunctionGrad::operator() ( const double  x,
const double  y,
const double  t 
) const
inline
Examples
analytical_nonlinear_poisson.cpp, analytical_poisson.cpp, and analytical_poisson_field_split.cpp.

Definition at line 187 of file mixed_reac_diff.cpp.

188 {
190 double mx = - T * sin(T * x) * cos(T * y);
191 double my = - T * cos(T * x) * sin(T * y);
192
193
194 if (t <= ramp_t) {
195 grad(0) = mx * t;
196 grad(1) = my * t;
197 } else {
198 grad(0) = mx * ramp_t;
199 grad(1) = my * ramp_t;
200 }
201 grad(2) = 0.0;
202 return grad;
203 }
const double ramp_t
const double T
constexpr double t
plate stiffness
Definition: plate.cpp:59

◆ operator()() [2/5]

FTensor::Tensor1< double, 3 > ExactFunctionGrad::operator() ( const double  x,
const double  y,
const double  t 
) const
inline

Definition at line 172 of file std_reac_diff.cpp.

173 {
175 double mx = -T * cos(T * x) * sin(T * y);
176 double my = -T * sin(T * x) * cos(T * y);
177 double hx, hy;
178 if (x > -sml) {
179 hx = 1.0 * mx;
180 hy = 1.0 * my;
181 } else {
182 hx = mx;
183 hy = my;
184 }
185 if (t <= ramp_t) {
186 grad(0) = hx * t;
187 grad(1) = hy * t;
188 } else {
189 grad(0) = hx * ramp_t;
190 grad(1) = hy * ramp_t;
191 }
192 grad(2) = 0.0;
193 return grad;
194 }
const double sml

◆ operator()() [3/5]

FTensor::Tensor1< double, 3 > ExactFunctionGrad::operator() ( const double  x,
const double  y,
const double  z 
) const
inline

Definition at line 44 of file analytical_nonlinear_poisson.cpp.

45 {
47 grad(0) = 1;
48 grad(1) = 1;
49 grad(2) = 3 * z * z;
50 return grad;
51 }

◆ operator()() [4/5]

FTensor::Tensor1< double, 3 > ExactFunctionGrad::operator() ( const double  x,
const double  y,
const double  z 
) const
inline

Definition at line 42 of file analytical_poisson.cpp.

43 {
45 grad(0) = 2 * x;
46 grad(1) = 2 * y;
47 grad(2) = 3 * z * z;
48 return grad;
49 }

◆ operator()() [5/5]

FTensor::Tensor1< double, 3 > ExactFunctionGrad::operator() ( const double  x,
const double  y,
const double  z 
) const
inline

Definition at line 45 of file analytical_poisson_field_split.cpp.

46 {
48 grad(0) = 2 * x;
49 grad(1) = 2 * y;
50 grad(2) = 3 * z * z;
51 return grad;
52 }

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