_pyoomph package
This is the coupling between the C++ core and the Python frontend of pyoomph
Module contents
This module exposes the compiled C++ core of pyoomph via pybind11 to python. Here, the relevant C++ base classes and further low-level functions can be found. Usually, it is not necessary for a user to use these functions directly.
- _pyoomph.FinaliseMPI() None
- _pyoomph.GiNaC_Diff(arg0: _pyoomph.Expression, arg1: _pyoomph.Expression) _pyoomph.Expression
Derivative, but does not evaluate until code generation
- _pyoomph.GiNaC_EvalFlag(arg0: str) _pyoomph.Expression
Evaluate a flag at runtime (e.g. moving_mesh->0,1) or similar to activate or deactivate terms based on this
- _pyoomph.GiNaC_FakeExponentialMode(mode: _pyoomph.Expression, dual: bool = False) _pyoomph.Expression
- _pyoomph.GiNaC_Matrix(arg0: SupportsInt, arg1: collections.abc.Sequence[_pyoomph.Expression]) _pyoomph.Expression
- _pyoomph.GiNaC_SymSubs(arg0: _pyoomph.Expression, arg1: _pyoomph.Expression, arg2: _pyoomph.Expression) _pyoomph.Expression
Call GiNaC::subs, but does not evaluate until code generation
- _pyoomph.GiNaC_TimeSymbol() _pyoomph.Expression
- _pyoomph.GiNaC_UnitVect(arg0: SupportsInt, arg1: SupportsInt, arg2: SupportsInt, arg3: _pyoomph.Expression) _pyoomph.Expression
- _pyoomph.GiNaC_Vect(arg0: collections.abc.Sequence[_pyoomph.Expression]) _pyoomph.Expression
- _pyoomph.GiNaC_absolute(arg0: _pyoomph.Expression) _pyoomph.Expression
Calculates the absolute value. Note: It will differentiate as absolute(f(x))’=signum(f(x))*f’(x)
- _pyoomph.GiNaC_acos(arg0: _pyoomph.Expression) _pyoomph.Expression
Calculates acos
- _pyoomph.GiNaC_asin(*args, **kwargs)
Overloaded function.
GiNaC_asin(arg0: _pyoomph.Expression) -> _pyoomph.Expression
Calculates asin
GiNaC_asin(arg0: typing.SupportsFloat) -> _pyoomph.Expression
Calculates asin
- _pyoomph.GiNaC_atan(arg0: _pyoomph.Expression) _pyoomph.Expression
Calculates atan
- _pyoomph.GiNaC_atan2(arg0: _pyoomph.Expression, arg1: _pyoomph.Expression) _pyoomph.Expression
Calculates atan2
- _pyoomph.GiNaC_collect(arg0: _pyoomph.Expression, arg1: _pyoomph.Expression) _pyoomph.Expression
- _pyoomph.GiNaC_collect_common_factors(arg0: _pyoomph.Expression) _pyoomph.Expression
- _pyoomph.GiNaC_collect_units(arg0: _pyoomph.Expression) tuple[_pyoomph.Expression, _pyoomph.Expression, _pyoomph.Expression, bool]
Splits an expression into a numerical factor, units, and the rest
- _pyoomph.GiNaC_contract(arg0: _pyoomph.Expression, arg1: _pyoomph.Expression) _pyoomph.Expression
Calculates the dot for vectors and double dot for matrices
- _pyoomph.GiNaC_cos(arg0: _pyoomph.Expression) _pyoomph.Expression
Calculates the cosine
- _pyoomph.GiNaC_cosh(arg0: _pyoomph.Expression) _pyoomph.Expression
Calculates the sine hyperbolicus
- _pyoomph.GiNaC_debug_ex(arg0: _pyoomph.Expression) _pyoomph.Expression
- _pyoomph.GiNaC_delayed_expansion(arg0: collections.abc.Callable[[], _pyoomph.Expression]) _pyoomph.Expression
- _pyoomph.GiNaC_determinant(arg0: _pyoomph.Expression, arg1: _pyoomph.Expression) _pyoomph.Expression
Calculates the determinant of an n x n matrix
- _pyoomph.GiNaC_diff(arg0: _pyoomph.Expression, arg1: _pyoomph.Expression) _pyoomph.Expression
Calculates the derivative
- _pyoomph.GiNaC_dimtestfunction(arg0: str, arg1: _pyoomph.FiniteElementCode, arg2: collections.abc.Sequence[str]) _pyoomph.Expression
Symbol which is expanded to the test function of the passed field.
- _pyoomph.GiNaC_dimtestfunction_from_var(arg0: _pyoomph.Expression) _pyoomph.Expression
Symbol which is expanded to the test function of the passed field.
- _pyoomph.GiNaC_directional_derivative(arg0: _pyoomph.Expression, arg1: _pyoomph.Expression, arg2: _pyoomph.Expression, arg3: _pyoomph.Expression, arg4: _pyoomph.Expression, arg5: _pyoomph.Expression) _pyoomph.Expression
Calculates the directional derivative of a scalar, matrix or tensor
- _pyoomph.GiNaC_div(arg0: _pyoomph.Expression, arg1: _pyoomph.Expression, arg2: _pyoomph.Expression, arg3: _pyoomph.Expression, arg4: _pyoomph.Expression) _pyoomph.Expression
Calculates the divergence
- _pyoomph.GiNaC_dot(arg0: _pyoomph.Expression, arg1: _pyoomph.Expression) _pyoomph.Expression
Calculates the dot product
- _pyoomph.GiNaC_double_dot(arg0: _pyoomph.Expression, arg1: _pyoomph.Expression) _pyoomph.Expression
Calculates the double dot product A:B
- _pyoomph.GiNaC_eval_at_expansion_mode(arg0: _pyoomph.Expression, arg1: _pyoomph.Expression) _pyoomph.Expression
Set the mode index (base or azimuthal mode) for vars and nondims
- _pyoomph.GiNaC_eval_in_domain(arg0: _pyoomph.Expression, arg1: _pyoomph.FiniteElementCode, arg2: collections.abc.Sequence[str]) _pyoomph.Expression
Expand vars and nondims in a particular domain
- _pyoomph.GiNaC_eval_in_past(arg0: _pyoomph.Expression, arg1: _pyoomph.Expression, arg2: _pyoomph.Expression) _pyoomph.Expression
Expand vars and nondims in a particular domain
- _pyoomph.GiNaC_exp(arg0: _pyoomph.Expression) _pyoomph.Expression
Calculates exp
- _pyoomph.GiNaC_expand(arg0: _pyoomph.Expression) _pyoomph.Expression
Expand expression after internal expansion of all fields with GiNaC::expand
- _pyoomph.GiNaC_factor(arg0: _pyoomph.Expression) _pyoomph.Expression
- _pyoomph.GiNaC_field(arg0: str, arg1: _pyoomph.FiniteElementCode, arg2: collections.abc.Sequence[str]) _pyoomph.Expression
Create a placeholder for a field, used for e.g. properties. Considers scaling
- _pyoomph.GiNaC_general_weak_differential_contribution(arg0: str, arg1: collections.abc.Sequence[_pyoomph.Expression], arg2: _pyoomph.Expression, arg3: _pyoomph.Expression, arg4: _pyoomph.Expression, arg5: _pyoomph.Expression, arg6: _pyoomph.Expression) _pyoomph.Expression
Any differential weak contribution that depends on the coordinate system
- _pyoomph.GiNaC_get_global_symbol(arg0: str) _pyoomph.Expression
Get the time ‘t’, or coordinates ‘x’,’y’,’z’
- _pyoomph.GiNaC_get_imag_part(arg0: _pyoomph.Expression) _pyoomph.Expression
- _pyoomph.GiNaC_get_real_part(arg0: _pyoomph.Expression) _pyoomph.Expression
- _pyoomph.GiNaC_grad(arg0: _pyoomph.Expression, arg1: _pyoomph.Expression, arg2: _pyoomph.Expression, arg3: _pyoomph.Expression, arg4: _pyoomph.Expression) _pyoomph.Expression
Calculates the gradient
- _pyoomph.GiNaC_heaviside(arg0: _pyoomph.Expression) _pyoomph.Expression
Calculates the step function
- _pyoomph.GiNaC_imaginary_i() _pyoomph.Expression
- _pyoomph.GiNaC_internal_function_with_element_arg(arg0: str, arg1: collections.abc.Sequence[_pyoomph.Expression]) _pyoomph.Expression
Internal functions, used e.g. for elemental functions like element_size etc
- _pyoomph.GiNaC_inverse_matrix(arg0: _pyoomph.Expression, arg1: _pyoomph.Expression, arg2: _pyoomph.Expression) _pyoomph.Expression
Calculates the inverse of an n x n matrix
- _pyoomph.GiNaC_is_a_matrix(arg0: _pyoomph.Expression) bool
- _pyoomph.GiNaC_log(arg0: _pyoomph.Expression) _pyoomph.Expression
Calculates natural log
- _pyoomph.GiNaC_matproduct(arg0: _pyoomph.Expression, arg1: _pyoomph.Expression) _pyoomph.Expression
- _pyoomph.GiNaC_maximum(arg0: _pyoomph.Expression, arg1: _pyoomph.Expression) _pyoomph.Expression
Calculates the maximum
- _pyoomph.GiNaC_minimize_functional_derivative(arg0: _pyoomph.Expression, arg1: collections.abc.Sequence[_pyoomph.Expression], arg2: _pyoomph.Expression, arg3: _pyoomph.Expression) _pyoomph.Expression
Calculates weak formulation of the variation of the functional with integrant F
- _pyoomph.GiNaC_minimum(arg0: _pyoomph.Expression, arg1: _pyoomph.Expression) _pyoomph.Expression
Calculates the minimum
- _pyoomph.GiNaC_new_symbol(arg0: str) _pyoomph.Expression
- _pyoomph.GiNaC_nondimfield(arg0: str, arg1: _pyoomph.FiniteElementCode, arg2: collections.abc.Sequence[str]) _pyoomph.Expression
Create a placeholder for a non-dimensiona field. Opposed to ‘field’, dimensions are not considerd
- _pyoomph.GiNaC_normal(arg0: _pyoomph.Expression) _pyoomph.Expression
- _pyoomph.GiNaC_piecewise_geq0(arg0: _pyoomph.Expression, arg1: _pyoomph.Expression, arg2: _pyoomph.Expression) _pyoomph.Expression
Returns a if cond>=0, else b
- _pyoomph.GiNaC_python_cb_function(arg0: _pyoomph.CustomMathExpression, arg1: collections.abc.Sequence[_pyoomph.Expression]) _pyoomph.Expression
- _pyoomph.GiNaC_python_multi_cb_function(arg0: _pyoomph.CustomMultiReturnExpressionBase, arg1: collections.abc.Sequence[_pyoomph.Expression], arg2: SupportsInt) _pyoomph.Expression
- _pyoomph.GiNaC_python_multi_cb_indexed_result(arg0: _pyoomph.Expression, arg1: SupportsInt) _pyoomph.Expression
- _pyoomph.GiNaC_rational_number(arg0: SupportsInt, arg1: SupportsInt) _pyoomph.Expression
Rational number
- _pyoomph.GiNaC_remove_mode_from_jacobian_or_hessian(arg0: _pyoomph.Expression, arg1: _pyoomph.Expression, arg2: _pyoomph.Expression) _pyoomph.Expression
- _pyoomph.GiNaC_scale(arg0: str, arg1: _pyoomph.FiniteElementCode, arg2: collections.abc.Sequence[str]) _pyoomph.Expression
Expands to the scale of this field
- _pyoomph.GiNaC_sep_base_units(arg0: _pyoomph.Expression) dict[str, tuple[int, int]]
- _pyoomph.GiNaC_series(arg0: _pyoomph.Expression, arg1: _pyoomph.Expression, arg2: _pyoomph.Expression, arg3: _pyoomph.Expression) _pyoomph.Expression
- _pyoomph.GiNaC_signum(arg0: _pyoomph.Expression) _pyoomph.Expression
Calculates the signum of the argument. Note: It will differentiate to 0, even at x=0
- _pyoomph.GiNaC_sin(arg0: _pyoomph.Expression) _pyoomph.Expression
Calculates the sine
- _pyoomph.GiNaC_sinh(arg0: _pyoomph.Expression) _pyoomph.Expression
Calculates the sine hyperbolicus
- _pyoomph.GiNaC_split_subexpressions_in_real_and_imaginary_parts(arg0: _pyoomph.Expression) _pyoomph.Expression
- _pyoomph.GiNaC_subexpression(arg0: _pyoomph.Expression) _pyoomph.Expression
Creates a subexpression
- _pyoomph.GiNaC_subs(arg0: _pyoomph.Expression, arg1: _pyoomph.Expression, arg2: _pyoomph.Expression) _pyoomph.Expression
Call GiNaC::subs, evaluate directly
- _pyoomph.GiNaC_subsfields(arg0: _pyoomph.Expression, arg1: collections.abc.Mapping[str, _pyoomph.Expression], arg2: collections.abc.Mapping[str, _pyoomph.Expression], arg3: collections.abc.Mapping[str, _pyoomph.Expression]) _pyoomph.Expression
- _pyoomph.GiNaC_tan(arg0: _pyoomph.Expression) _pyoomph.Expression
Calculates tan
- _pyoomph.GiNaC_tanh(arg0: _pyoomph.Expression) _pyoomph.Expression
Calculates tanh
- _pyoomph.GiNaC_testfunction(arg0: str, arg1: _pyoomph.FiniteElementCode, arg2: collections.abc.Sequence[str]) _pyoomph.Expression
Symbol which is expanded to the test function of the passed field.
- _pyoomph.GiNaC_testfunction_from_var(arg0: _pyoomph.Expression, arg1: bool) _pyoomph.Expression
Symbol which is expanded to the test function of the passed field.
- _pyoomph.GiNaC_testscale(arg0: str, arg1: _pyoomph.FiniteElementCode, arg2: collections.abc.Sequence[str]) _pyoomph.Expression
Expands to the scale of the test function
- _pyoomph.GiNaC_time_stepper_weight(arg0: SupportsInt, arg1: SupportsInt, arg2: str) _pyoomph.Expression
- _pyoomph.GiNaC_trace(arg0: _pyoomph.Expression) _pyoomph.Expression
Calculates the trace of a matrix
- _pyoomph.GiNaC_transpose(arg0: _pyoomph.Expression) _pyoomph.Expression
Calculates the transposed matrix
- _pyoomph.GiNaC_unit(arg0: str, arg1: str) _pyoomph.Expression
- _pyoomph.GiNaC_unit_matrix(arg0: SupportsInt) _pyoomph.Expression
Creates the identity matrix
- _pyoomph.GiNaC_vector_dim() int
- _pyoomph.GiNaC_weak(arg0: _pyoomph.Expression, arg1: _pyoomph.Expression, arg2: _pyoomph.Expression, arg3: _pyoomph.Expression) _pyoomph.Expression
(a,b) for weak forms, i.e. integral a*b*dx with flags&1 means lagrangian, flags&2 means dimensional
- _pyoomph.GiNaC_wrap_coordinate_system(arg0: _pyoomph.CustomCoordinateSystem) _pyoomph.Expression
- _pyoomph.InitMPI(arg0: collections.abc.Sequence[str]) None
- class _pyoomph.MeshTemplate
Bases:
pybind11_objectA base class for the MeshTemplate class in pyoomph
- add_facet_to_curve_entity(self: _pyoomph.MeshTemplate, arg0: collections.abc.Sequence[SupportsInt], arg1: _pyoomph.MeshTemplateCurvedEntityBase) None
Adds a facet to a curved boundary so that e.g. additional nodes of refined meshes will be exactly on this curve
- add_node(self: _pyoomph.MeshTemplate, x: SupportsFloat, y: SupportsFloat = 0.0, z: SupportsFloat = 0.0) int
Adds a node at the given position. Creates overlapping nodes, if there is already a node at this position.
- add_node_unique(self: _pyoomph.MeshTemplate, x: SupportsFloat, y: SupportsFloat = 0.0, z: SupportsFloat = 0.0) int
Adds a node at the given position. If there is already a node at this position,no new node is created
- add_nodes_to_boundary(self: _pyoomph.MeshTemplate, arg0: str, arg1: collections.abc.Sequence[SupportsInt]) None
Adds a list of nodes, i.e. a facet, to a boundary
- add_periodic_node_pair(self: _pyoomph.MeshTemplate, n_mst: SupportsInt, n_slv: SupportsInt) None
- get_node_position(self: _pyoomph.MeshTemplate, arg0: SupportsInt) list[float]
- new_bulk_element_collection(self: _pyoomph.MeshTemplate, arg0: str) _pyoomph.MeshTemplateElementCollection
- class _pyoomph.MeshTemplateCurvedEntityBase
Bases:
pybind11_objectA generic class representing a relation for a curved boundary representation
- get_information_string(self: _pyoomph.MeshTemplateCurvedEntityBase) str
- get_parametric_from_pos(self: _pyoomph.MeshTemplateCurvedEntityBase, arg0: SupportsInt, arg1: collections.abc.Sequence[SupportsFloat], arg2: collections.abc.Sequence[SupportsFloat]) None
- get_pos_from_parametric(self: _pyoomph.MeshTemplateCurvedEntityBase, arg0: SupportsInt, arg1: collections.abc.Sequence[SupportsFloat], arg2: collections.abc.Sequence[SupportsFloat]) None
- static load_from_strings(arg0: collections.abc.Sequence[str], arg1: SupportsInt) dict[int, _pyoomph.MeshTemplateCurvedEntityBase]
- class _pyoomph.MeshTemplateElementCollection
Bases:
pybind11_objectA collection of bulk elements, i.e. a bulk domain of a mesh. Must be created as part of a
MeshTemplatebynew_domain()- add_SV_tri_2d_C1(self: _pyoomph.MeshTemplateElementCollection, arg0: SupportsInt, arg1: SupportsInt, arg2: SupportsInt) list[_pyoomph.MeshTemplateElementTriC1]
- add_brick_3d_C1(self: _pyoomph.MeshTemplateElementCollection, arg0: SupportsInt, arg1: SupportsInt, arg2: SupportsInt, arg3: SupportsInt, arg4: SupportsInt, arg5: SupportsInt, arg6: SupportsInt, arg7: SupportsInt) _pyoomph.MeshTemplateElementBrickC1
Adds a hexahedral element by eight node indices
- add_brick_3d_C2(self: _pyoomph.MeshTemplateElementCollection, arg0: collections.abc.Sequence[SupportsInt]) _pyoomph.MeshTemplateElementBrickC2
Adds a second-order hexahedral element by 27 node indices
- add_line_1d_C1(self: _pyoomph.MeshTemplateElementCollection, arg0: SupportsInt, arg1: SupportsInt) _pyoomph.MeshTemplateElementLineC1
Adds a line element by two node indices
- add_line_1d_C2(self: _pyoomph.MeshTemplateElementCollection, arg0: SupportsInt, arg1: SupportsInt, arg2: SupportsInt) _pyoomph.MeshTemplateElementLineC2
Adds a second order line element by three node indices
- add_point_element(self: _pyoomph.MeshTemplateElementCollection, arg0: SupportsInt) _pyoomph.MeshTemplateElementPoint
Adds a single point element to the domain
- add_quad_2d_C1(self: _pyoomph.MeshTemplateElementCollection, arg0: SupportsInt, arg1: SupportsInt, arg2: SupportsInt, arg3: SupportsInt) _pyoomph.MeshTemplateElementQuadC1
Adds a quadrilateral element by four node indices
- add_quad_2d_C2(self: _pyoomph.MeshTemplateElementCollection, arg0: SupportsInt, arg1: SupportsInt, arg2: SupportsInt, arg3: SupportsInt, arg4: SupportsInt, arg5: SupportsInt, arg6: SupportsInt, arg7: SupportsInt, arg8: SupportsInt) _pyoomph.MeshTemplateElementQuadC2
Adds a second-order quadrilateral element by nine node indices
- add_tetra_3d_C1(self: _pyoomph.MeshTemplateElementCollection, arg0: SupportsInt, arg1: SupportsInt, arg2: SupportsInt, arg3: SupportsInt) _pyoomph.MeshTemplateElementTetraC1
Adds a tetrahedral element by four node indices
- add_tetra_3d_C2(self: _pyoomph.MeshTemplateElementCollection, arg0: collections.abc.Sequence[SupportsInt]) _pyoomph.MeshTemplateElementTetraC2
Adds a second-order tetrahedral element by ten node indices
- add_tri_2d_C1(self: _pyoomph.MeshTemplateElementCollection, arg0: SupportsInt, arg1: SupportsInt, arg2: SupportsInt) _pyoomph.MeshTemplateElementTriC1
Adds a triangular element by three node indices
- add_tri_2d_C2(self: _pyoomph.MeshTemplateElementCollection, arg0: SupportsInt, arg1: SupportsInt, arg2: SupportsInt, arg3: SupportsInt, arg4: SupportsInt, arg5: SupportsInt) _pyoomph.MeshTemplateElementTriC2
Adds a second-order triangular element by six node indices
- get_adjacent_boundary_names(self: _pyoomph.MeshTemplateElementCollection) list[str]
- get_element_dimension(self: _pyoomph.MeshTemplateElementCollection) int
- lagrangian_dimension(self: _pyoomph.MeshTemplateElementCollection) int
Returns the dimension of the Lagrangian coordinates
- nodal_dimension(self: _pyoomph.MeshTemplateElementCollection) int
Returns the dimension of the Eulerian coordinates
- set_all_nodes_as_boundary_nodes(self: _pyoomph.MeshTemplateElementCollection) None
- set_element_code(self: _pyoomph.MeshTemplateElementCollection, arg0: _pyoomph.DynamicBulkElementInstance) None
- set_lagrangian_dimension(self: _pyoomph.MeshTemplateElementCollection, arg0: SupportsInt) None
Sets the dimension of the Lagrangian coordinates
- set_nodal_dimension(self: _pyoomph.MeshTemplateElementCollection, arg0: SupportsInt) None
Sets the dimension of the Eulerian coordinates
- _pyoomph.csr_rows_to_coo_rows(arg0: Annotated[numpy.typing.ArrayLike, numpy.int32], arg1: SupportsInt, arg2: SupportsInt) numpy.typing.NDArray[numpy.int32]
- _pyoomph.feenableexcept() None
- _pyoomph.get_Solver_callback() _pyoomph.GeneralSolverCallback
- _pyoomph.get_verbosity_flag() int
- _pyoomph.has_tcc() bool
- _pyoomph.set_Solver_callback(arg0: _pyoomph.GeneralSolverCallback) None
- _pyoomph.set_interpolate_new_interface_dofs(arg0: bool) None
- _pyoomph.set_jit_include_dir(arg0: str) str
- _pyoomph.set_tolerance_for_singular_jacobian(arg0: SupportsFloat) None
- _pyoomph.set_use_eigen_Z2_error_estimators(arg0: bool) None
- _pyoomph.set_verbosity_flag(arg0: SupportsInt) None