From 0d2f7278b3b6880163c602e31f1c06ce21edb196 Mon Sep 17 00:00:00 2001 From: PhilipHildebrand Date: Sat, 17 Dec 2022 14:10:53 +0100 Subject: [PATCH] Removed unnecessary vertex types --- fenicsxprecice/adapter_core.py | 16 +--------------- fenicsxprecice/fenicsxprecice.py | 4 ++-- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/fenicsxprecice/adapter_core.py b/fenicsxprecice/adapter_core.py index 54078c7..57cb477 100644 --- a/fenicsxprecice/adapter_core.py +++ b/fenicsxprecice/adapter_core.py @@ -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 diff --git a/fenicsxprecice/fenicsxprecice.py b/fenicsxprecice/fenicsxprecice.py index e90aa50..c0e4eb4 100644 --- a/fenicsxprecice/fenicsxprecice.py +++ b/fenicsxprecice/fenicsxprecice.py @@ -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 @@ -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)