bamboost.plugins_dev.fenics
Attributes
- __all__=
['FenicsBamboostPlugin'] - log=
BAMBOOST_LOGGER.getChild('bamboost_plugin_fenics')
Classes
_T_Simulation
Attributes:
- data:
_T_Series
Bases
SimulationWriter._fileSimulationWriter.__init__()SimulationWriter.status()SimulationWriter.description()SimulationWriter.require_series()SimulationWriter.__enter__()SimulationWriter.__exit__()SimulationWriter.initialize()SimulationWriter._initialize_series()SimulationWriter.copy_files()SimulationWriter.create_run_script()SimulationWriter.run_simulation()SimulationWriter.submit_simulation()
_Simulation.mutable_Simulation.name_Simulation.path_Simulation._psize_Simulation._prank_Simulation._ranks_Simulation._index_Simulation.collection_uid_Simulation._data_file_Simulation._xdmf_file_Simulation._bash_file_Simulation.__eq__()_Simulation._repr_html_()_Simulation.root_Simulation._orm_Simulation.from_uid()_Simulation.uid_Simulation.edit()_Simulation.update_database()_Simulation.parameters_Simulation.metadata_Simulation.created_at_Simulation.links_Simulation.files_Simulation.git_Simulation.mesh_Simulation.open_in_paraview()_Simulation.enter_path()_Simulation.create_xdmf()
_T_Series
Bases
(self, value=..., step=...) -> FenicsBamboostPlugin.FenicsWriterArguments:
- value:
float=... - step:
typing.Optional[int]=...
WriteStrategy
Enum for write style.
Attributes:
- SCATTERED=
0Scattered write style. Each process writes its own data. This is slower because the location to write to is not necessarily contiguous.
- CONTIGUOUS=
1Contiguous write style. Data is gathered on the root process and written contigously.
_FenicsStepWriter
(self, series, step)Helper writer for input from FEniCS directly.
Arguments:
- series:
Series[bamboost._typing.Mutable] - step:
int
Bases
(self, name, function, *, mesh_name=DEFAULT_MESH_NAME, field_type=FieldType.NODE) -> NoneAdd a Fenics function to the step.
Arguments:
- name:
strThe name of the field.
- function:
fenics.fenics.FunctionThe Fenics function to add.
- mesh_name:
str=bamboost.constants.DEFAULT_MESH_NAME(Optional) The name of the mesh to which the field belongs. ()
(Optional) The type of the field (default: FieldType.NODE). This is only relevant for XDMF writing.
_FenicsFieldData
Bases
Group._statusGroup._objGroup._is_valid()Group._group_mapGroup.__setitem__()Group.__delitem__()Group.__contains__()Group._ipython_key_completions_()Group.__iter__()Group._assert_file_map_is_valid()Group.keys()Group.groups()Group.datasets()Group.items()Group._repr_html_()Group.require_self()Group.require_group()Group.require_dataset()Group.add_numerical_dataset()Group.add_dataset()
(self, name, function, field_type=FieldType.NODE, attrs=None, dtype=None, *, file_map=True) -> NoneAdd a Fenics function to the field.
Arguments:
- name:
str - function:
fenics.fenics.Function - attrs:
typing.Optional[dict[str, typing.Any]]=None - dtype:
typing.Optional[str]=None - file_map:
bool=True
(self, name, field, dtype=None, center=FieldType.NODE) -> NoneArguments:
- name:
str - field:
fenics.fenics.Function - dtype:
typing.Optional[str]=None
(self, name, field, dtype=None, center=FieldType.NODE) -> NoneAssembles the vector on the root process and writes it to file contiguously.
This is faster but requires the entire array to fit in memory.
Arguments:
- name:
str - field:
fenics.fenics.FunctionFEniCS function
- dtype:
typing.Optional[str]=NoneOptional. Numpy style datatype, see h5py documentation, defaults to the dtype of the vector
Optional. Center of the data. Can be 'Node' or 'Cell'. Default is 'Node'.
(self, func) -> tuple[np.ndarray, np.ndarray, int]Get global dofs for a given function.
Arguments:
- func:
fenics.fenics.Function
Returns
numpy.numpy.ndarrayA tuple with the local vector, a mapping from the local to the(self, func) -> tuple[np.ndarray, np.ndarray, int]Get global dofs for a given function.
Arguments:
- func:
fenics.fenics.Function
Returns
numpy.numpy.ndarrayA tuple with the local vector, a mapping from the local to the_FenicsMeshes
Bases
Group._statusGroup._objGroup._is_valid()Group._group_mapGroup.__setitem__()Group.__delitem__()Group.__contains__()Group._ipython_key_completions_()Group.__iter__()Group._assert_file_map_is_valid()Group.keys()Group.groups()Group.datasets()Group.items()Group._repr_html_()Group.require_self()Group.require_group()Group.require_dataset()Group.add_numerical_dataset()Group.add_dataset()
(self, mesh, name=DEFAULT_MESH_NAME, cell_type=CellType.TRIANGLE) -> NoneAdd a mesh with the given name to the simulation.
Arguments:
- mesh:
fenics.fenics.Mesh - name:
str=bamboost.constants.DEFAULT_MESH_NAMEName of the mesh
Cell type (default: "triangle"). In general, we do not care about the cell type and leave it up to the user to make sense of the data they provide. However, the cell type specified is needed for writing an XDMF file. For possible types, consult the XDMF/paraview manual.
_T_FenicsPluginOpts
Attributes:
- write_strategy:
WriteStrategyWrite strategy for the data. Contiguous is faster but requires the entire array to fit in memory of the root process.
FenicsBamboostPlugin
Plugin for writing FEniCS data to HDF5 files.
Attributes:
- FenicsWriter=
bamboost.plugins_dev.fenics._FenicsStepWriter - FenicsFieldData=
bamboost.plugins_dev.fenics._FenicsFieldData - FenicsMeshes=
bamboost.plugins_dev.fenics._FenicsMeshes
Bamboost