A compiled mathematical expression.
More...
|
| procedure, pass(this) | init (this, str) |
| | Compile an expression from a string.
|
| |
| procedure, pass(this) | eval (this, res, n, x, y, z, t, dt) |
| | Evaluate the expression in a set of points.
|
| |
| procedure, pass(this) | free (this) |
| | Destructor.
|
| |
Definition at line 117 of file expression.f90.
◆ eval()
| procedure, pass(this) expression::expression_t::eval |
( |
class(expression_t), intent(inout) |
this, |
|
|
real(kind=rp), dimension(n), intent(inout) |
res, |
|
|
integer, intent(in) |
n, |
|
|
real(kind=rp), dimension(n), intent(in) |
x, |
|
|
real(kind=rp), dimension(n), intent(in) |
y, |
|
|
real(kind=rp), dimension(n), intent(in) |
z, |
|
|
real(kind=rp), intent(in), optional |
t, |
|
|
real(kind=rp), intent(in), optional |
dt |
|
) |
| |
Not thread safe. The evaluation stack is a component of the expression, so two concurrent calls on the same object corrupt each other's intermediate values. A caller inside an OpenMP parallel region must evaluate on one thread only.
- Parameters
-
| [in,out] | res | The result, one value per point. |
| [in] | n | The number of points. |
| [in] | x | The x-coordinates of the points. |
| [in] | y | The y-coordinates of the points. |
| [in] | z | The z-coordinates of the points. |
| [in] | t | The current time, required if the expression uses t. |
| [in] | dt | The current timestep, required if the expression uses dt. |
Definition at line 137 of file expression.f90.
◆ free()
◆ init()
- Parameters
-
| [in] | str | The expression, e.g. "6*U_b*y*(H - y)/H^2". |
Definition at line 135 of file expression.f90.
◆ depth
| integer expression::expression_t::depth = 0 |
◆ lit
◆ n_op
| integer expression::expression_t::n_op = 0 |
◆ op
◆ src
◆ stk
◆ time_dependent
| logical expression::expression_t::time_dependent = .false. |
The documentation for this type was generated from the following file: