PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
 
Loading...
Searching...
No Matches
expression.h
Go to the documentation of this file.
1/**
2 * @file expression.h
3 * @brief The expression language shared by every configured field, and the keyed hashes
4 * its random draws and other reproducible draws are built from.
5 *
6 * Callers compile an expression against their own list of variable names and supply the
7 * values in that order at evaluation. `generators/ic.gen` validates the same language;
8 * `tests/fixtures/expression_conformance.txt` holds cases both implementations must agree on.
9 */
10
11#ifndef PICURV_EXPRESSION_H
12#define PICURV_EXPRESSION_H
13
14#include <stdint.h>
15#include <petscsys.h>
16
17#include "variables.h"
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23/**
24 * @brief Disjoint key spaces of the keyed particle draws, so draws made for different
25 * purposes never coincide for one particle.
26 */
27typedef enum {
28 PICURV_DRAW_SPACE_FIELD = 0, /**< An expression's default, per-field stream. */
29 PICURV_DRAW_SPACE_NAMED_STREAM = 1, /**< `uniform(k)`/`normal(k)`: a stream shared across fields. */
30 PICURV_DRAW_SPACE_BROWNIAN = 2, /**< Brownian increments; the salt is the step. */
31 PICURV_DRAW_SPACE_PLACEMENT = 3, /**< Seeding points; the salt is the rejection attempt. */
32 PICURV_DRAW_SPACE_INLET = 4 /**< Injection at an inlet: stream 0 counts per face cell, stream 1 distance in. */
34
35/**
36 * @brief splitmix64 finalizer: a bijective mix of 64 bits.
37 * @param[in] z Bits to mix.
38 * @return The mixed bits.
39 */
40uint64_t PicurvMix64(uint64_t z);
41
42/**
43 * @brief Uniform on [0, 1) from the top 53 bits of a hash.
44 * @param[in] hash Mixed bits.
45 * @return A value in [0, 1).
46 */
47PetscReal PicurvUnitFromHash(uint64_t hash);
48
49/**
50 * @brief Hash that keys a particle draw: a pure function of its arguments, so a draw does
51 * not depend on the rank a particle lives on, the order particles are visited, or
52 * what was drawn before it.
53 * @param[in] seed Run seed (`-particle_random_seed`).
54 * @param[in] space Purpose of the draw.
55 * @param[in] stream Stream within the space.
56 * @param[in] pid Particle identity.
57 * @param[in] salt Event that distinguishes repeated draws for one particle.
58 * @return 64 mixed bits; derive further independent values with PicurvMix64().
59 */
60uint64_t PicurvParticleDrawHash(PetscInt64 seed, PicurvDrawSpace space, uint64_t stream,
61 PetscInt64 pid, PetscInt64 salt);
62
63/** @brief A compiled expression: postfix code for a small stack evaluator. */
65
66/** @brief What a random draw is keyed on, besides the particle and its stream. */
67typedef struct {
68 PetscInt64 seed; /**< Run seed (`-particle_random_seed`). */
69 PetscInt64 pid; /**< Particle identity; draws are pure functions of it. */
70 PetscInt64 salt; /**< Event that produced the particle: 0 for the t=0 population. */
71 PetscInt64 field; /**< Field whose expression draws, the default stream's namespace. */
73
74/**
75 * @brief Compile one expression against a list of variable names.
76 * @details The grammar is Python's expression syntax restricted to numbers, the given
77 * names, `pi`, arithmetic (`+ - * / % **`), comparisons (chained ones included),
78 * `and`/`or`/`not`, and the functions `abs atan2 cos cosh erf exp floor log
79 * maximum minimum sin sinh sqrt tan tanh where`, plus `uniform` and `normal` when
80 * @p allow_random is true. Comparisons and logical operators yield 1 or 0; `%`
81 * takes the sign of the divisor; `**` binds tighter than a unary minus on its left
82 * and groups to the right.
83 * @param[in] text Expression text.
84 * @param[in] names Variable names, in the order evaluation supplies their values.
85 * @param[in] name_count Number of names.
86 * @param[in] allow_random Whether `uniform` and `normal` may be called.
87 * @param[out] expression Compiled expression, owned by the caller.
88 * @return Zero on success; `PETSC_ERR_ARG_WRONG` for a syntax error or an unknown name
89 * or function, with the offending position in the message.
90 */
91PetscErrorCode PicurvExpressionCompile(const char *text, const char *const *names, PetscInt name_count,
92 PetscBool allow_random, PicurvExpression **expression);
93
94/**
95 * @brief Evaluate a compiled expression.
96 * @param[in] expression Compiled expression.
97 * @param[in] values One value per compiled name, in compile order.
98 * @param[in] key Draw key, required when the expression draws; may be NULL otherwise.
99 * @param[out] result Value of the expression; may be non-finite, which the caller judges.
100 * @return Zero on success.
101 */
102PetscErrorCode PicurvExpressionEvaluate(const PicurvExpression *expression, const PetscReal *values,
103 const PicurvExpressionDrawKey *key, PetscReal *result);
104
105/**
106 * @brief Free a compiled expression.
107 * @param[in,out] expression Expression to free; set to NULL.
108 * @return Zero on success.
109 */
110PetscErrorCode PicurvExpressionDestroy(PicurvExpression **expression);
111
112/**
113 * @brief Whether a compiled expression reads one of its variables.
114 * @param[in] expression Compiled expression.
115 * @param[in] index Position of the variable in the compile-time name list.
116 * @param[out] uses True when some instruction loads that variable.
117 * @return Zero on success.
118 */
119PetscErrorCode PicurvExpressionUsesVariable(const PicurvExpression *expression, PetscInt index, PetscBool *uses);
120
121/* ------------------------------------------------------------------------- */
122/* Prescribed velocity sources */
123/* ------------------------------------------------------------------------- */
124
125/** @brief Variables a prescribed velocity source may use, in the order of `values[]`. */
126typedef enum {
127 PICURV_SOURCE_VAR_X = 0, /**< Physical x of the point [m]. */
128 PICURV_SOURCE_VAR_Y, /**< Physical y [m]. */
129 PICURV_SOURCE_VAR_Z, /**< Physical z [m]. */
130 PICURV_SOURCE_VAR_T, /**< Physical time [s]. */
131 PICURV_SOURCE_VAR_XI, /**< Arc-length fraction along the xi grid line, 0 at the - face. */
132 PICURV_SOURCE_VAR_ETA, /**< Arc-length fraction along the eta grid line. */
133 PICURV_SOURCE_VAR_ZETA, /**< Arc-length fraction along the zeta grid line. */
134 PICURV_SOURCE_VAR_L_XI, /**< Physical length of that xi grid line [m]. */
135 PICURV_SOURCE_VAR_L_ETA, /**< Physical length of that eta grid line [m]. */
136 PICURV_SOURCE_VAR_L_ZETA, /**< Physical length of that zeta grid line [m]. */
137 PICURV_SOURCE_VAR_CELL_COUNT, /**< Variables a source reads on every target. */
138 PICURV_SOURCE_VAR_R = PICURV_SOURCE_VAR_CELL_COUNT, /**< On a face, distance from the face's centre [m]. */
141
142/** @brief How a source's values are read. */
143typedef enum {
144 PICURV_SOURCE_FRAME_CARTESIAN = 0, /**< Three values: x, y, z velocity components. */
145 PICURV_SOURCE_FRAME_CURVILINEAR = 1, /**< Three values along the unit xi, eta, zeta grid-line directions. */
146 PICURV_SOURCE_FRAME_NORMAL = 2, /**< One value: the speed into the domain through a face. */
147 PICURV_SOURCE_FRAME_CONTRAVARIANT = 3 /**< Three values: the volume flux through the xi, eta, zeta faces; cells only. */
149
150/**
151 * @brief A prescribed velocity, for any target: one compiled expression per value, the frame
152 * they are in, and the bulk velocity it is scaled to, if any. A target differs only in
153 * the points it evaluates the source at and the weight it takes a mean with.
154 */
155typedef struct {
157 PetscInt count; /**< 1 for the normal frame, otherwise 3; 0 for staged data alone. */
158 PicurvExpression *component[3];
159 PetscBool time_dependent; /**< Some component reads `t`. */
160 PicurvExpression *bulk; /**< Target mean speed [m/s] in `t`, or NULL. */
162 PetscBool bulk_is_flow_rate; /**< `bulk` is a volumetric flow rate [m^3/s] through a face instead. */
164
165/**
166 * @brief Read and compile a velocity source from the options database.
167 * @details Reads `-<prefix>_frame` (`cartesian`, `curvilinear`, on a face `normal`, otherwise `contravariant`), one
168 * expression per value, `-<prefix>_expr_<c>`, written in physical units over the names
169 * of #PicurvSourceVariable, and the optional `-<prefix>_bulk_velocity`, an expression
170 * in `t`. Random draws are not available.
171 * @param[in] prefix Option prefix without its dash, e.g. `ic_source` or `face_source_0`.
172 * @param[in] on_face Whether the target is a face, where the normal frame means something.
173 * @param[in] has_data Whether the target also has staged data, which makes the expressions
174 * optional; without a frame, data on a face is a normal speed.
175 * @param[out] source Compiled source; release it with PicurvVelocitySourceDestroy().
176 * @return Zero on success; `PETSC_ERR_USER_INPUT` for a missing option or unknown frame,
177 * `PETSC_ERR_ARG_WRONG` for a malformed expression.
178 */
179PetscErrorCode PicurvVelocitySourceCreate(const char *prefix, PetscBool on_face, PetscBool has_data,
180 PicurvVelocitySource *source);
181
182/**
183 * @brief Factor on a source's expressions that makes a target's whole mean equal its bulk velocity.
184 * @details Solves `factor * expressions + data = bulk`, over the target's points and weight.
185 * Collective.
186 * @param[in] source Source with a bulk velocity.
187 * @param[in] physical_time Time the bulk velocity is read at [s].
188 * @param[in] local This rank's weighted sums, physical: the expressions' speed, the
189 * staged data's speed along it, and the weight, an area [m^2] for a
190 * flow rate.
191 * @param[in] where The target, for the error messages.
192 * @param[out] factor Factor on the expressions.
193 * @return Zero on success; `PETSC_ERR_ARG_WRONGSTATE` for no weight or a zero mean.
194 */
195PetscErrorCode PicurvVelocitySourceBulkFactor(const PicurvVelocitySource *source, PetscReal physical_time,
196 const PetscReal local[3], const char *where, PetscReal *factor);
197
198/**
199 * @brief Fill a source's position and grid-line variables at one point.
200 * @param[out] values Array of #PICURV_SOURCE_VAR_COUNT; `t` is left to the caller.
201 * @param[in] point Solver-unit position.
202 * @param[in] fraction Grid-line fractions there, from ComputeGridLineFractions().
203 * @param[in] length Solver-unit grid-line lengths there.
204 * @param[in] L_ref Length reference [m].
205 */
206static inline void PicurvSourceSetVariables(PetscReal *values, Cmpnts point, Cmpnts fraction, Cmpnts length,
207 PetscReal L_ref)
208{
209 values[PICURV_SOURCE_VAR_X] = point.x * L_ref;
210 values[PICURV_SOURCE_VAR_Y] = point.y * L_ref;
211 values[PICURV_SOURCE_VAR_Z] = point.z * L_ref;
212 values[PICURV_SOURCE_VAR_XI] = fraction.x;
213 values[PICURV_SOURCE_VAR_ETA] = fraction.y;
214 values[PICURV_SOURCE_VAR_ZETA] = fraction.z;
215 values[PICURV_SOURCE_VAR_L_XI] = length.x * L_ref;
216 values[PICURV_SOURCE_VAR_L_ETA] = length.y * L_ref;
217 values[PICURV_SOURCE_VAR_L_ZETA] = length.z * L_ref;
218}
219
220/** @brief What a source reads at each boundary-face slot this rank owns, gathered once. */
221typedef struct {
222 PetscInt normal; /**< Logical axis of the face normal. */
223 PetscInt a, b; /**< The two tangential axes. */
224 PetscInt layer; /**< Index along the normal of the face's metric and flux. */
225 PetscInt lo[2]; /**< First tangential indices of the owned slots. */
226 PetscInt n[2]; /**< Owned slots along the two tangential axes; 0 off the face. */
227 PetscReal (*values)[PICURV_SOURCE_VAR_COUNT]; /**< Variables per slot; `t` is the caller's. */
228 Cmpnts (*edges)[3]; /**< Directions per slot, for the curvilinear frame. */
230
231/**
232 * @brief Gather each owned slot of a boundary face: face-centre position, the grid-line fractions
233 * and lengths of the interior cell behind it, and its directions. A curvilinear component
234 * is the speed through the grid face, as on every target, so along the face's own axis
235 * the direction follows the face metric rather than the cell's edge.
236 * @param[in] user Block with current metric and face-centre ghosts.
237 * @param[in] face_id Face.
238 * @param[in] fraction Grid-line fractions, from ComputeGridLineFractions().
239 * @param[in] length Grid-line lengths, from ComputeGridLineFractions().
240 * @param[out] slots The slots; release with PicurvSourceFaceSlotsDestroy().
241 * @return PETSc error code.
242 */
243PetscErrorCode PicurvSourceFaceSlotsCreate(UserCtx *user, BCFace face_id, Vec fraction, Vec length,
244 PicurvSourceFaceSlots *slots);
245
246/**
247 * @brief Release what PicurvSourceFaceSlotsCreate() allocated.
248 * @param[in,out] slots The slots.
249 * @return PETSc error code.
250 */
252
253/**
254 * @brief Evaluate a source at one point.
255 * @param[in] source Compiled source.
256 * @param[in] values One value per #PicurvSourceVariable.
257 * @param[in] edges Cell edge vectors along xi, eta, zeta (any length); read only in the
258 * curvilinear frame.
259 * @param[out] value Physical Cartesian velocity, or for the normal frame the speed in `x`.
260 * @return Zero on success; `PETSC_ERR_FP` for a non-finite value.
261 */
262PetscErrorCode PicurvVelocitySourceEvaluate(const PicurvVelocitySource *source, const PetscReal *values,
263 const Cmpnts edges[3], Cmpnts *value);
264
265/**
266 * @brief Set a block's pressure at every interior cell centre from an expression in Pa. Dummy cells
267 * are left to the caller's boundary pass.
268 * @param[in] user Block with current cell centres.
269 * @param[in] pressure Expression over the cell variables, physical.
270 * @param[in] fraction Grid-line fractions, from ComputeGridLineFractions().
271 * @param[in] length Grid-line lengths, from ComputeGridLineFractions().
272 * @param[in] physical_time Time [s].
273 * @return PETSc error code.
274 */
275PetscErrorCode PicurvSourceSetCellPressure(UserCtx *user, const PicurvExpression *pressure, Vec fraction, Vec length,
276 PetscReal physical_time);
277
278/**
279 * @brief Factor on a source's expressions that makes the volume mean of the whole field, along
280 * the source's own direction at each cell, equal its bulk velocity. Collective.
281 * @param[in] user Block; its Ucat holds whatever is staged.
282 * @param[in] source Source with a bulk velocity.
283 * @param[in] fraction Grid-line fractions, from ComputeGridLineFractions().
284 * @param[in] length Grid-line lengths, from ComputeGridLineFractions().
285 * @param[in] physical_time Time [s].
286 * @param[out] factor Factor on the expressions.
287 * @return PETSc error code.
288 */
289PetscErrorCode PicurvSourceCellBulkFactor(UserCtx *user, const PicurvVelocitySource *source, Vec fraction, Vec length,
290 PetscReal physical_time, PetscReal *factor);
291
292/**
293 * @brief Add a source's flux to every owned face of Ucont, evaluating it at each face centre.
294 * @details A Cartesian velocity is dotted with the face metric; a curvilinear component is the
295 * speed through the face, times its area; a contravariant component is the flux itself.
296 * @param[in,out] user Block whose Ucont receives the fluxes.
297 * @param[in] source Source with expressions.
298 * @param[in] fraction Grid-line fractions, from ComputeGridLineFractions().
299 * @param[in] length Grid-line lengths, from ComputeGridLineFractions().
300 * @param[in] physical_time Time [s].
301 * @param[in] factor Factor on the expressions.
302 * @param[in] boundary_faces Whether the boundary - faces are set too; each cell's + face always is.
303 * @return PETSc error code.
304 */
305PetscErrorCode PicurvSourceAddFluxes(UserCtx *user, const PicurvVelocitySource *source, Vec fraction, Vec length,
306 PetscReal physical_time, PetscReal factor, PetscBool boundary_faces);
307
308/**
309 * @brief Free a source's compiled expressions and bulk velocity.
310 * @param[in,out] source Source to release; left empty.
311 * @return Zero on success.
312 */
314
315/** @brief Names of #PicurvSourceVariable, in order. */
317
318
319#ifdef __cplusplus
320}
321#endif
322
323#endif /* PICURV_EXPRESSION_H */
PetscErrorCode PicurvExpressionEvaluate(const PicurvExpression *expression, const PetscReal *values, const PicurvExpressionDrawKey *key, PetscReal *result)
Evaluate a compiled expression.
Definition expression.c:695
uint64_t PicurvMix64(uint64_t z)
splitmix64 finalizer: a bijective mix of 64 bits.
Definition expression.c:587
PicurvExpression * bulk
Target mean speed [m/s] in t, or NULL.
Definition expression.h:160
PetscErrorCode PicurvExpressionDestroy(PicurvExpression **expression)
Free a compiled expression.
Definition expression.c:789
PetscErrorCode PicurvSourceSetCellPressure(UserCtx *user, const PicurvExpression *pressure, Vec fraction, Vec length, PetscReal physical_time)
Set a block's pressure at every interior cell centre from an expression in Pa.
PetscErrorCode PicurvVelocitySourceCreate(const char *prefix, PetscBool on_face, PetscBool has_data, PicurvVelocitySource *source)
Read and compile a velocity source from the options database.
Definition expression.c:830
PetscBool bulk_time_dependent
Definition expression.h:161
PetscInt normal
Logical axis of the face normal.
Definition expression.h:222
PetscInt64 pid
Particle identity; draws are pure functions of it.
Definition expression.h:69
PetscErrorCode PicurvSourceAddFluxes(UserCtx *user, const PicurvVelocitySource *source, Vec fraction, Vec length, PetscReal physical_time, PetscReal factor, PetscBool boundary_faces)
Add a source's flux to every owned face of Ucont, evaluating it at each face centre.
Definition expression.c:998
PicurvDrawSpace
Disjoint key spaces of the keyed particle draws, so draws made for different purposes never coincide ...
Definition expression.h:27
@ PICURV_DRAW_SPACE_FIELD
An expression's default, per-field stream.
Definition expression.h:28
@ PICURV_DRAW_SPACE_BROWNIAN
Brownian increments; the salt is the step.
Definition expression.h:30
@ PICURV_DRAW_SPACE_INLET
Injection at an inlet: stream 0 counts per face cell, stream 1 distance in.
Definition expression.h:32
@ PICURV_DRAW_SPACE_NAMED_STREAM
uniform(k)/normal(k): a stream shared across fields.
Definition expression.h:29
@ PICURV_DRAW_SPACE_PLACEMENT
Seeding points; the salt is the rejection attempt.
Definition expression.h:31
PetscErrorCode PicurvSourceCellBulkFactor(UserCtx *user, const PicurvVelocitySource *source, Vec fraction, Vec length, PetscReal physical_time, PetscReal *factor)
Factor on a source's expressions that makes the volume mean of the whole field, along the source's ow...
Definition expression.c:944
PicurvSourceVariable
Variables a prescribed velocity source may use, in the order of values[].
Definition expression.h:126
@ PICURV_SOURCE_VAR_L_XI
Physical length of that xi grid line [m].
Definition expression.h:134
@ PICURV_SOURCE_VAR_L_ZETA
Physical length of that zeta grid line [m].
Definition expression.h:136
@ PICURV_SOURCE_VAR_XI
Arc-length fraction along the xi grid line, 0 at the - face.
Definition expression.h:131
@ PICURV_SOURCE_VAR_T
Physical time [s].
Definition expression.h:130
@ PICURV_SOURCE_VAR_R
On a face, distance from the face's centre [m].
Definition expression.h:138
@ PICURV_SOURCE_VAR_ZETA
Arc-length fraction along the zeta grid line.
Definition expression.h:133
@ PICURV_SOURCE_VAR_Y
Physical y [m].
Definition expression.h:128
@ PICURV_SOURCE_VAR_X
Physical x of the point [m].
Definition expression.h:127
@ PICURV_SOURCE_VAR_L_ETA
Physical length of that eta grid line [m].
Definition expression.h:135
@ PICURV_SOURCE_VAR_ETA
Arc-length fraction along the eta grid line.
Definition expression.h:132
@ PICURV_SOURCE_VAR_COUNT
Definition expression.h:139
@ PICURV_SOURCE_VAR_CELL_COUNT
Variables a source reads on every target.
Definition expression.h:137
@ PICURV_SOURCE_VAR_Z
Physical z [m].
Definition expression.h:129
PetscErrorCode PicurvExpressionUsesVariable(const PicurvExpression *expression, PetscInt index, PetscBool *uses)
Whether a compiled expression reads one of its variables.
Definition expression.c:805
PetscErrorCode PicurvVelocitySourceDestroy(PicurvVelocitySource *source)
Free a source's compiled expressions and bulk velocity.
PetscInt layer
Index along the normal of the face's metric and flux.
Definition expression.h:224
const char *const kPicurvSourceVariableNames[PICURV_SOURCE_VAR_COUNT]
Names of PicurvSourceVariable, in order.
Definition expression.c:821
PetscErrorCode PicurvVelocitySourceBulkFactor(const PicurvVelocitySource *source, PetscReal physical_time, const PetscReal local[3], const char *where, PetscReal *factor)
Factor on a source's expressions that makes a target's whole mean equal its bulk velocity.
Definition expression.c:882
PetscBool time_dependent
Some component reads t.
Definition expression.h:159
PetscReal PicurvUnitFromHash(uint64_t hash)
Uniform on [0, 1) from the top 53 bits of a hash.
Definition expression.c:599
PetscErrorCode PicurvVelocitySourceEvaluate(const PicurvVelocitySource *source, const PetscReal *values, const Cmpnts edges[3], Cmpnts *value)
Evaluate a source at one point.
Definition expression.c:907
PetscErrorCode PicurvSourceFaceSlotsCreate(UserCtx *user, BCFace face_id, Vec fraction, Vec length, PicurvSourceFaceSlots *slots)
Gather each owned slot of a boundary face: face-centre position, the grid-line fractions and lengths ...
PetscErrorCode PicurvExpressionCompile(const char *text, const char *const *names, PetscInt name_count, PetscBool allow_random, PicurvExpression **expression)
Compile one expression against a list of variable names.
Definition expression.c:549
uint64_t PicurvParticleDrawHash(PetscInt64 seed, PicurvDrawSpace space, uint64_t stream, PetscInt64 pid, PetscInt64 salt)
Hash that keys a particle draw: a pure function of its arguments, so a draw does not depend on the ra...
Definition expression.c:608
PetscInt64 salt
Event that produced the particle: 0 for the t=0 population.
Definition expression.h:70
PetscInt64 field
Field whose expression draws, the default stream's namespace.
Definition expression.h:71
static void PicurvSourceSetVariables(PetscReal *values, Cmpnts point, Cmpnts fraction, Cmpnts length, PetscReal L_ref)
Fill a source's position and grid-line variables at one point.
Definition expression.h:206
PicurvSourceFrame frame
Definition expression.h:156
PetscErrorCode PicurvSourceFaceSlotsDestroy(PicurvSourceFaceSlots *slots)
Release what PicurvSourceFaceSlotsCreate() allocated.
PetscBool bulk_is_flow_rate
bulk is a volumetric flow rate [m^3/s] through a face instead.
Definition expression.h:162
PicurvSourceFrame
How a source's values are read.
Definition expression.h:143
@ PICURV_SOURCE_FRAME_NORMAL
One value: the speed into the domain through a face.
Definition expression.h:146
@ PICURV_SOURCE_FRAME_CONTRAVARIANT
Three values: the volume flux through the xi, eta, zeta faces; cells only.
Definition expression.h:147
@ PICURV_SOURCE_FRAME_CARTESIAN
Three values: x, y, z velocity components.
Definition expression.h:144
@ PICURV_SOURCE_FRAME_CURVILINEAR
Three values along the unit xi, eta, zeta grid-line directions.
Definition expression.h:145
PetscInt64 seed
Run seed (-particle_random_seed).
Definition expression.h:68
PetscInt count
1 for the normal frame, otherwise 3; 0 for staged data alone.
Definition expression.h:157
What a random draw is keyed on, besides the particle and its stream.
Definition expression.h:67
What a source reads at each boundary-face slot this rank owns, gathered once.
Definition expression.h:221
A prescribed velocity, for any target: one compiled expression per value, the frame they are in,...
Definition expression.h:155
Main header file for a complex fluid dynamics solver.
PetscScalar x
Definition variables.h:142
PetscScalar z
Definition variables.h:142
PetscScalar y
Definition variables.h:142
BCFace
Identifies the six logical faces of a structured computational block.
Definition variables.h:300
A 3D point or vector with PetscScalar components.
Definition variables.h:141
User-defined context containing data specific to a single computational grid level.
Definition variables.h:1123