bamboost.plugins_dev.fenics
Attributes
- __all__=
['FenicsBamboostPlugin']
- log=
BAMBOOST_LOGGER.getChild('bamboost_plugin_fenics')
Classes
_T_Simulation
Attributes:
- data:
_T_Series
Bases
SimulationWriter._file
SimulationWriter.__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.FenicsWriter
Arguments:
- value:
float
=...
- step:
typing.Optional[int]
=...
WriteStrategy
Enum for write style.
Attributes:
- SCATTERED=
0
Scattered write style. Each process writes its own data. This is slower because the location to write to is not necessarily contiguous.
- CONTIGUOUS=
1
Contiguous 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) -> None
Add a Fenics function to the step.
Arguments:
- name:
str
The name of the field.
- function:
fenics.fenics.Function
The 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._status
Group._obj
Group._is_valid()
Group._group_map
Group.__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) -> None
Add 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) -> None
Arguments:
- name:
str
- field:
fenics.fenics.Function
- dtype:
typing.Optional[str]
=None
(self, name, field, dtype=None, center=FieldType.NODE) -> None
Assembles 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.Function
FEniCS function
- dtype:
typing.Optional[str]
=None
Optional. 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.ndarray
A 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.ndarray
A tuple with the local vector, a mapping from the local to the_FenicsMeshes
Bases
Group._status
Group._obj
Group._is_valid()
Group._group_map
Group.__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) -> None
Add a mesh with the given name to the simulation.
Arguments:
- mesh:
fenics.fenics.Mesh
- name:
str
=bamboost.constants.DEFAULT_MESH_NAME
Name 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:
WriteStrategy
Write 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