eturb.operators

Operators

Information regarding mesh, mathematical operators, and domain decomposition.

Todo

Move length to abl.par file and extrude it to allow double precision values.

Note

We deliberately try not to use the variable names used in Nek5000, as those are ambiguously named.

Functions

next_power(value[, base])

Compute the perfect power of base greater than or equal to value.

Classes

Operators([sim, params])

Container for parameters and writing box and SIZE files.

class eturb.operators.Operators(sim=None, params=None)[source]

Container for parameters and writing box and SIZE files.

Note

Some values are not available as parameters and instead automatically computed for generating the SIZE file.

SIZE

properties

Comment

lelg

max_n_seq

Max. number of elements globally

lelt

max_n_loc

Max. number of elements per processor (should be not smaller
than lelg/lpmin, i.e.

lelx

max_nx

Automatically computed. Max. number of elements along x
direction for the global tensor product solver / dimensions.

lely

max_ny

Same as above for y direction.

lelz

max_nz

Same as above for z direction.

lbelt

order_mhd

Automatically computed as
lelt if "MHD" in params.nek.problem_type.equation.

lpelt

order_linear

Automatically computed as
lelt if "linear" in params.nek.problem_type.equation.

lcvelt

order_cvode

Automatically computed as
lelt if params.nek.cvode._enabled is True

lx1m

order_mesh_solver

p-order for mesh solver. Automatically computed based
params.nek.general.stress_formulation and whether
Arbitrary Lagrangian-Eulerian (ALE) methods are used or not.

Documentation for params

Documentation for params.oper

The following table matches counterpart of mandatory SIZE variables.

SIZE

params.oper

Comment

ldim

dim

Domain dimensions (2 or 3)

lpmin

nproc_min

Min MPI ranks

lpmax

nproc_max

Max MPI ranks

ldimt

scalars

Number of auxilary fields (minimum 1).

Documentation for params.oper.max

The following table matches counterpart of optional SIZE variables. These refer to upper bound number of something. The parameters are considered “optional” and would be ignored with the default values.

SIZE

params.oper.max

Comment

mxprev

dim_proj

Max. dimension of projection space

lgmres

dim_krylov

Max. dimension of Krylov space for GMRES

lhis

hist

Max. number of history (i.e. monitoring) points.

maxobj

obj

Max. number of objects?

lorder

order_time

Max. temporal order (minimum: 2)

lpert

perturb

Max. number of perturbations

toteq

scalars_cons

Max. conserved scalars

ldimt_proj

scalars_proj

Max. scalars for residual projection

nsessmax

sessions

Max. sessions to NEKNEK

Documentation for params.oper.elem

The following table relate to element configuration for certain operations. The parameters are considered “optional” (except for lx1 / order and lxd / coef_dealiasing which are mandatory) and would be ignored with the default values.

SIZE

params.oper.elem

Comment

lxd

coef_dealiasing

p-order 1 for over-integration. Automatically computed from float
coef_dealiasing. See order_dealiasing

lx1

order

p-order (avoid uneven and values <6).

lxo

order_out

Max. p-order on output (should be >= order)

lx2

staggered

p-order for pressure. Automatically computed from boolean
staggered (True implies \(\mathbb{P}_N - \mathbb{P}_{N-2}\) and False implies
\(\mathbb{P}_N - \mathbb{P}_{N}\) or a collocated grid). See order_pressure
1

Polynomial order which means the number of GLL / GL points per element.

Documentation for params.oper.misc

Other miscellaneous parameters:

SIZE

params.oper.misc

Comment

lfdm

fast_diag

Equals to True for global tensor product solver (that uses fast
diagonalization method). False otherwise.
property max_n_loc

Equivalent to lelt. The next integer greater than or equals max_n_seq / params.oper.nproc_min.

property max_n_seq

Equivalent to lelg.

property max_nx

Equivalent to lelx.

property max_ny

Equivalent to lely.

property max_nz

Equivalent to lelz.

memory_required()[source]

According to FAQ the following estimate:

lx1*ly1*lz1*lelt * 3000byte + lelg * 12byte + MPI + optional libraries
(e.g. CVODE)
property nb_fields

Used in .box file.

property order

Equivalent to lx1.

property order_cvode

Equivalent to lcvelt.

property order_dealiasing

Equivalent to lxd.

property order_linear

Equivalent to lpelt.

property order_mesh_solver

Equivalent to lx1m.

Todo

Must include a condition to check if ALE methods are used or not.

property order_mhd

Equivalent to lbelt.

property order_pressure

Equivalent to lx2.

produce_long_str_describing_oper(oper_method='Base')[source]

Produce a string describing the operator.

produce_str_describing_oper()[source]

Produce a string describing the operator.

write_box(template, fp=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>, comments='')[source]

Write the .box file which is input for the genbox meshing tool.

Parameters
  • template (jinja2.environment.Template) – Template instance like abl.templates.box

  • fp (io.TextIOWrapper) – File handler to write to

write_size(template, fp=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>, comments='')[source]

Write the SIZE file which is required for compilation.

Parameters

template (jinja2.environment.Template) – Template instance like abl.templates.size

eturb.operators.next_power(value, base=2)[source]

Compute the perfect power of base greater than or equal to value.

Parameters
Return int