mtnlion.solution module¶
Tools for access and storage of simulation solutions.
-
class
mtnlion.solution.
Solution
(problem_space: mtnlion.problem_space.ProblemSpaceAssembler, save_list: List[str], dae_space: dolfin.FunctionSpace)[source]¶ Bases:
object
This class provides an interface for converting FEniCS functions into numpy-based solutions
-
get_1d
(function: dolfin.Function, all_funcs=False) → Dict[str, mtnlion.domain.Domain[str, numpy.ndarray]][source]¶ Retrieve the one dimensional values from the given mixed element space function.
- Parameters
function –
all_funcs –
- Returns
-
static
interp_time
(time: numpy.ndarray, domain: Mapping[str, mtnlion.domain.Domain[str, numpy.ndarray]])[source]¶ Create an interpolation function for each of the solutions in storage :param time: The times at which to :param domain: Data to interpolate :return: Interpolation functions for the solution
-
project
(function: Mapping[str, mtnlion.domain.Domain[str, ufl.core.expr.Expr]])[source]¶ Project an expression onto the DAE space
- Parameters
function – Non mixed-element function
-