Mentions légales du service

Skip to content
Snippets Groups Projects
Commit d763bb33 authored by ALI Olivier's avatar ALI Olivier :monkey_face:
Browse files

Minor update (comments) in the CustomDomain class.

parent f78d9a1f
No related branches found
No related tags found
1 merge request!10Draft: Feature/upgrade to fenicsx
...@@ -83,14 +83,12 @@ class CustomDomain(AbstractDomain, BuiltInModel): ...@@ -83,14 +83,12 @@ class CustomDomain(AbstractDomain, BuiltInModel):
points = np.array(points) points = np.array(points)
cells = np.array(cells) cells = np.array(cells)
# self.mesh = fe.Mesh()
self.mesh = None
self.dim = points.shape[1] self.dim = points.shape[1]
print(f'self.dim = {self.dim}')
# editor = fe.MeshEditor() # editor = fe.MeshEditor()
# OA: What is the purpose of the following block ?
if self._cell_type == 'line': if self._cell_type == 'line':
topo_dim = 1 # OA: changed variable name top -> topo_dim topo_dim = 1 # OA: changed variable name top -> topo_dim
# OA: what is the use of this variable ? # OA: what is the use of this variable ?
...@@ -98,6 +96,7 @@ class CustomDomain(AbstractDomain, BuiltInModel): ...@@ -98,6 +96,7 @@ class CustomDomain(AbstractDomain, BuiltInModel):
topo_dim = 2 topo_dim = 2
elif self._cell_type == 'tetra': elif self._cell_type == 'tetra':
topo_dim = 3 topo_dim = 3
# editor.open(self.mesh, self._cell_type, topo_dim, self.dim) # editor.open(self.mesh, self._cell_type, topo_dim, self.dim)
# editor.init_vertices(len(points)) # editor.init_vertices(len(points))
# editor.init_cells(len(cells)) # editor.init_cells(len(cells))
...@@ -107,7 +106,6 @@ class CustomDomain(AbstractDomain, BuiltInModel): ...@@ -107,7 +106,6 @@ class CustomDomain(AbstractDomain, BuiltInModel):
# editor.close() # editor.close()
print(f'pts used to create mesh = {points[:, :self.dim]}')
_cell = ufl.Cell(self._cell_type, geometric_dimension=self.dim) _cell = ufl.Cell(self._cell_type, geometric_dimension=self.dim)
_domain = ufl.Mesh(ufl.VectorElement("CG", _cell, 1)) _domain = ufl.Mesh(ufl.VectorElement("CG", _cell, 1))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment