cbcflow.utils.core module

Utility functions used by the core modules.

Modules:

Classes

class cbcflow.utils.core.NSSpacePoolMixed(mesh, u_degree, p_degree, u_family='auto', p_family='auto')

Bases: cbcflow.utils.core.spaces.NSSpacePool

A function space pool with custom named spaces for use with mixed Navier-Stokes schemes.

Qbc

Scalar valued space for setting pressure BCs.

Ubc

List of scalar valued spaces for setting velocity BCs.

class cbcflow.utils.core.NSSpacePoolSplit(mesh, u_degree, p_degree, u_family='auto', p_family='auto')

Bases: cbcflow.utils.core.spaces.NSSpacePool

A function space pool with custom named spaces for use with split Navier-Stokes schemes.

Qbc

Scalar valued space for setting pressure BCs.

Ubc

List of scalar valued spaces for setting velocity BCs.

class cbcflow.utils.core.NSSpacePool(mesh, u_degree, p_degree, u_family='auto', p_family='auto')

Bases: cbcflow.utils.core.spaces.SpacePool

A function space pool with custom named spaces for use with Navier-Stokes schemes.

DQ

Vector valued space for pressure gradient.

DQ0

Scalar valued space for pressure gradient component.

DU

Vector valued space for gradients of single velocity components.

DU0

Scalar valued space for gradient component of single velocity component.

DV

Tensor valued space for gradients of velocity vector.

Q

Scalar valued space for pressure.

U

Scalar valued space for velocity components.

U_CG1
V

Vector valued space for velocity vector.

V_CG1
W

Mixed velocity-pressure space.

class cbcflow.utils.core.NSSpacePoolSegregated(mesh, u_degree, p_degree, u_family='auto', p_family='auto')

Bases: cbcflow.utils.core.spaces.NSSpacePool

A function space pool with custom named spaces for use with segregated Navier-Stokes schemes.

Qbc

Scalar valued space for setting pressure BCs.

Ubc

List of scalar valued spaces for setting velocity BCs.

class cbcflow.utils.core.SpacePool(mesh)

Bases: object

A function space pool to reuse spaces across a program.

get_custom_space(family, degree, shape)
get_space(degree, rank, family='auto')

Functions

cbcflow.utils.core.strip_code(code)

Strips code of unnecessary spaces, comments etc.

cbcflow.utils.core.show_problem(problem, interactive=True, bc_snapshots=4)

Display properties of the problem.

Intended for inspecting and debugging the problem setup. This functions runs through most of the interface