API reference#
ogstools package#
- ogstools.cli(check=False)[source]#
Allows access to ogs binary tools via python and performs checks to see if OGS is installed correctly.
- Parameters:
check (bool) – If True, verify that OGS is available on PATH and warn if multiple versions are found.
- Return type:
Any
Example cli().vtkdiff(“file1.vtu”, “file2.vtu”)
- Returns:
A CLI object that supports ogs command line tools.
- Return type:
Any
- ogstools.status(verbose=False)[source]#
- Checks if OGS is installed correctly. It prints detailed error message if OGS is not installed correctly.
- param verbose:
If verbose is True it prints always the status of related environment variables. (OGS_BIN_PATH, PATH, virtual environment)
- Returns:
True if OGS is installed correctly, False otherwise.
- Return type:
bool
- ogstools.meshes_from_gmsh(filename, dim=0, reindex=True, log=True, meshname='domain')[source]#
Deprecated since version 0.7.1.
Use
Meshes.from_gmsh()instead. Generates pyvista unstructured grids from a gmsh mesh (.msh).Extracts domain-, boundary- and physical group-submeshes.
- Parameters:
filename (Path) – Gmsh mesh file (.msh) as input data
dim (int | list[int]) – Spatial dimension (1, 2 or 3), trying automatic detection, if not given. If multiple dimensions are provided, all elements of these dimensions are embedded in the resulting domain mesh.
reindex (bool) – Physical groups / regions / Material IDs to be renumbered consecutively beginning with zero.
log (bool) – If False, silence log messages
meshame – The name of the domain mesh.
- Returns:
A dictionary of names and corresponding meshes
- Return type:
dict[str, Mesh]
Subpackages#
- ogstools.feflowlib package
- ogstools.logparser package
analysis_convergence_coupling_iteration()analysis_convergence_newton_iteration()analysis_simulation()analysis_simulation_termination()analysis_time_step()convergence_order_per_ts_iteration()errors_per_ts_iteration()fill_ogs_context()model_and_clock_time()ogs_regexes()parse_file()plot_convergence()plot_convergence_order()read_version()time_step_vs_iterations()- Submodules
- ogstools.logparser.common_ogs_analyses module
pre_post_check()analysis_time_step()analysis_simulation()analysis_convergence_newton_iteration()analysis_convergence_coupling_iteration()time_step_vs_iterations()errors_per_ts_iteration()convergence_order_per_ts_iteration()model_and_clock_time()analysis_simulation_termination()fill()fill_ogs_context()
- ogstools.logparser.log_file_handler module
- ogstools.logparser.log_parser module
- ogstools.logparser.plots module
- ogstools.logparser.regexes module
LogInfoTerminationWarningTypeErrorTypeCriticalTypeMPIProcessNoRankOutputOGSVersionLogOGSVersionLog2StepStatusContextTimeStepContextTimeStepProcessContextTimeStepProcessIterationContextAssemblyTimeTimeStepEndIterationStartIterationEndCouplingIterationStartCouplingIterationEndTimeStepStartTimeStepOutputTimeSolvingProcessStartSolvingProcessEndTimeStepSolutionTimeCoupledSchemeTimeStepFinishedTimeDirichletTimeLinearSolverTimeMeshReadTimeSimulationExecutionTimeSimulationExecutionTimeFailedSimulationAbortComponentConvergenceCriterionTimeStepConvergenceCriterionCouplingIterationConvergenceGenericCodePointPhaseFieldEnergyVarErrorMessageCriticalMessageWarningMessageSimulationStartTimeSimulationEndTimeSimulationEndTimeFailedogs_regexes()new_regexes()
- ogstools.logparser.common_ogs_analyses module
- ogstools.materiallib package
- ogstools.meshlib package
BoundaryGaussian2D()LayerLayerSetLocationFrameMeshMeshesMeshSeriesMeshSeries.__init__()MeshSeries.from_data()MeshSeries.extend()MeshSeries.resample()MeshSeries.extract_probe()MeshSeries.copy()MeshSeries.__getitem__()MeshSeries.items()MeshSeries.aggregate_over_time()MeshSeries.clear_cache()MeshSeries.closest_timestep()MeshSeries.closest_timevalue()MeshSeries.ip_tesselated()MeshSeries.mesh()MeshSeries.rawdata_file()MeshSeries.read_interp()MeshSeries.timevaluesMeshSeries.timestepsMeshSeries.values()MeshSeries.point_dataMeshSeries.cell_dataMeshSeries.field_dataMeshSeries.time_of_min()MeshSeries.time_of_max()MeshSeries.aggregate_over_domain()MeshSeries.plot_domain_aggregate()MeshSeries.probe()MeshSeries.plot_probe()MeshSeries.plot_time_slice()MeshSeries.mesh_funcMeshSeries.transform()MeshSeries.scale()MeshSeries.extract()MeshSeries.save()MeshSeries.remove_array()
RasterSurfacecuboid()difference()difference_matrix()difference_pairwise()meshes_from_gmsh()rect()to_ip_mesh()to_ip_point_cloud()to_region_prism()to_region_simplified()to_region_tetraeder()to_region_voxel()- Subpackages
- Submodules
- ogstools.meshlib.boundary module
- ogstools.meshlib.boundary_set module
- ogstools.meshlib.boundary_subset module
- ogstools.meshlib.data_dict module
- ogstools.meshlib.data_processing module
- ogstools.meshlib.geo module
- ogstools.meshlib.gmsh_BHE module
- ogstools.meshlib.gmsh_converter module
- ogstools.meshlib.gmsh_meshing module
- ogstools.meshlib.ip_mesh module
- ogstools.meshlib.mesh module
- ogstools.meshlib.mesh_series module
- ogstools.meshlib.meshes module
- ogstools.meshlib.meshes_from_yaml module
- ogstools.meshlib.meshes_from_yaml_cli module
- ogstools.meshlib.refine_mesh module
- ogstools.meshlib.subdomains module
- ogstools.meshlib.vtk_pyvista module
- ogstools.meshlib.xdmf_reader module
- ogstools.msh2vtu package
- ogstools.ogs6py package
ProjectProject.__init__()Project.add_element()Project.add_include()Project.add_block()Project.deactivate_property()Project.deactivate_parameter()Project.remove_element()Project.replace_text()Project.replace_block_by_include()Project.replace_mesh()Project.replace_parameter()Project.replace_parameter_value()Project.replace_phase_property_value()Project.replace_medium_property_value()Project.set()Project.restart()Project.run_model()Project.statusProject.terminate_run()Project.write_input()Project.property_dataframe()Project.write_property_latextable()Project.set_media()
- Submodules
- ogstools.ogs6py.build_tree module
- ogstools.ogs6py.curves module
- ogstools.ogs6py.display module
- ogstools.ogs6py.geo module
- ogstools.ogs6py.linsolvers module
- ogstools.ogs6py.local_coordinate_system module
- ogstools.ogs6py.media module
- ogstools.ogs6py.mesh module
- ogstools.ogs6py.nonlinsolvers module
- ogstools.ogs6py.parameters module
- ogstools.ogs6py.processes module
- ogstools.ogs6py.processvars module
- ogstools.ogs6py.project module
- ogstools.ogs6py.project_media_importer module
- ogstools.ogs6py.properties module
- ogstools.ogs6py.python_script module
- ogstools.ogs6py.timeloop module
- ogstools.physics package
- ogstools.plot package
animate()compute_levels()contourf()contourf_pv()heatmap()line()quiver()shape_on_top()streamlines()subplot()- Submodules
- ogstools.plot.animation module
- ogstools.plot.contourplots module
- ogstools.plot.contourplots_pv module
- ogstools.plot.features module
- ogstools.plot.heatmaps module
- ogstools.plot.levels module
- ogstools.plot.lineplots module
- ogstools.plot.plot_setup module
- ogstools.plot.plot_setup_defaults module
- ogstools.plot.shared module
- ogstools.plot.utils module
- ogstools.plot.vectorplots module
- ogstools.simulation package
- ogstools.studies package
- ogstools.variables package
- Submodules
- ogstools.variables.custom_colormaps module
- ogstools.variables.matrix module
- ogstools.variables.mesh_dependent module
- ogstools.variables.tensor_math module
identity()sym_tensor_to_mat()mat_to_sym_tensor()trace()matrix_trace()eigenvalues()eigenvectors()det()frobenius_norm()invariant_1()invariant_2()invariant_3()mean()effective_pressure()hydrostatic_component()deviator()deviator_invariant_1()deviator_invariant_2()deviator_invariant_3()octahedral_shear()von_mises()qp_ratio()to_polar()
- ogstools.variables.unit_registry module
- ogstools.variables.variable module
- ogstools.variables.vector module
- Submodules
- ogstools.workflow package