pyoomph.output.generic module
- class pyoomph.output.generic.IntegralObservableOutput(filename=None, file_ext=None, first_column=['time'])[source]
Bases:
GenericOutputOutputs all integral observables on this domain to a text file.
- Parameters:
filename (
Optional[str]) – The name of the output file (without extension). Default is None, meaning that the output file will be named after the domain.file_ext (
Union[str,List[str],None]) – The file extension. Default is None, meaning that the default file extension from the problem will be used.first_column (
List[str]) – The value(s) to be written in the first column of the output file. Default is"time".
- class pyoomph.output.generic.ODEFileOutput(filename=None, first_column='time', in_units={}, hide_underscore=False)[source]
Bases:
GenericOutputODEFileOutput writes the variables of all ODE unknowns at the current time to a text file.
- Parameters:
filename (
Optional[str]) – The name of the output file. Default is None, meaning that the output file will be named after the equation tree node.first_column (
Union[str,GiNaC_GlobalParam,List[Union[str,GiNaC_GlobalParam]],None]) – The value(s) to be written in the first column of the output file. Default is “time”.in_units (
Dict[str,Union[Expression,int,float]]) – A dictionary specifying the units of the variables to be written in the output file. Default is an empty dictionary, i.e. base SI units.hide_underscore (
bool) – A flag indicating whether to hide variable names starting with an underscore in the output file. Default is False.
- class pyoomph.output.generic.TextFileOutput(filetrunk=None, filename=None, nondimensional=False, hide_underscore=True, hide_lagrangian=True, eigenvector=None, eigenmode='abs', reverse_segment_if=None, sort_segments_by=None, discontinuous=False, add_eigen_to_mesh_positions=True, operator=None, tesselate_tri=True)[source]
Bases:
GenericOutputA class for writing the degrees of freedom at the current time step to a text file. Will be invoked whenever Problem.output is called.
- Parameters:
filetrunk (Optional[str]) – The file trunk name. If not set, it will take the filename from the domain we added this equation to.
filename (Optional[str]) – Same as filetrunk, but for backwards compatibility.
nondimensional (bool) – Flag indicating whether the output should be nondimensional. Default is False.
hide_underscore (bool) – Flag indicating whether to hide variables starting with an underscore. Default is True.
hide_lagrangian (bool) – Flag indicating whether to hide Lagrangian coordinates. Default is True.
eigenvector (Optional[int]) – The eigenvector index. If set, we write the eigenvector at this index instead of the solution. Only writing output when the eigenvector at this index is calculated. Default is None.
eigenmode (MeshDataEigenModes) – The eigenmode type (“abs”,”real”,”imag”). Default is “abs”.
reverse_segment_if (Optional[Callable[[List[int], NPFloatArray], bool]]) – A function to reverse individual segments of a segregated 1d line embedded in higher spaces. Default is None.
sort_segments_by (Optional[Callable[[List[int], NPFloatArray], float]]) – A function to sort such segments based on a condition. Otherwise, the ordering is more or less random. Default is None.
discontinuous (bool) – Flag indicating whether discontinuous output should be written. In that case, each node can be written multiple times, potential with different values. Default is False.
add_eigen_to_mesh_positions (bool) – When outputting an eigenvector on a moving mesh, do we want to add the original mesh coordinates to the eigensolution or not. Default is True.