Skip to content

Commit

Permalink
Removed unnecessary vertex types
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipHildebrand committed Dec 17, 2022
1 parent 038aa4f commit 0d2f727
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
16 changes: 1 addition & 15 deletions fenicsxprecice/adapter_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,13 @@
logger.setLevel(level=logging.INFO)


class VertexType(Enum):
"""
Defines type of vertices that exist in the adapter.
OWNED vertices are vertices on the coupling interface owned by this rank
UNOWNED vertices are vertices on the coupling interface which are not owned by this rank. They are borrowed
vertices from neigbouring ranks
FENICSX vertices are OWNED + UNOWNED vertices in the order as seen by FEniCSx
"""
OWNED = 153
UNOWNED = 471
FENICSX = 557


class Vertices:
"""
Vertices class provides a generic skeleton for vertices. A set of vertices has a set of IDs and
coordinates as defined in FEniCSx.
"""

def __init__(self, vertex_type):
self._vertex_type = vertex_type
def __init__(self):
self._ids = None
self._coordinates = None

Expand Down
4 changes: 2 additions & 2 deletions fenicsxprecice/fenicsxprecice.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from .config import Config
import logging
import precice
from .adapter_core import FunctionType, determine_function_type, convert_fenicsx_to_precice, get_fenicsx_vertices, CouplingMode, Vertices, VertexType
from .adapter_core import FunctionType, determine_function_type, convert_fenicsx_to_precice, get_fenicsx_vertices, CouplingMode, Vertices
from .expression_core import SegregatedRBFInterpolationExpression
from .solverstate import SolverState
from dolfinx.fem import Function, FunctionSpace
Expand Down Expand Up @@ -62,7 +62,7 @@ def __init__(self, mpi_comm, adapter_config_filename='precice-adapter-config.jso
self._dofmap = None # initialized later using function space provided by user

# coupling mesh related quantities
self._fenicsx_vertices = Vertices(VertexType.FENICSX)
self._fenicsx_vertices = Vertices()
self._precice_vertex_ids = None # initialized later

# read data related quantities (read data is read from preCICE and applied in FEniCSx)
Expand Down

0 comments on commit 0d2f727

Please sign in to comment.