Skip to content
Snippets Groups Projects
Commit 6f2abc1f authored by Laura Christine Kühle's avatar Laura Christine Kühle
Browse files

Added method and error info to Mesh.

parent 20ca8d16
No related branches found
No related tags found
No related merge requests found
......@@ -40,6 +40,13 @@ class Mesh:
cells : ndarray
Array of cell centers in mesh.
Methods
-------
create_data_dict()
Return dictionary with data necessary to construct mesh.
random_stencil(stencil_len)
Return random stencil.
"""
def __init__(self, num_cells: int, num_ghost_cells: int,
......@@ -62,6 +69,11 @@ class Mesh:
Flag indicating whether the mesh is used for training data
generation. Default: False.
Raises
------
ValueError
If number of cells is not exponential of 2.
"""
self._num_cells = num_cells
self._mode = 'training' if training_data_mode else 'evaluation'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment