From 10003984769bb81f8473016aa00cf5581160f8ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Simonis?= Date: Mon, 25 Nov 2024 10:36:57 +0100 Subject: [PATCH 1/3] Remove unused configure --- cyprecice/Participant.pxd | 2 -- 1 file changed, 2 deletions(-) diff --git a/cyprecice/Participant.pxd b/cyprecice/Participant.pxd index 01614ce0..4015b695 100644 --- a/cyprecice/Participant.pxd +++ b/cyprecice/Participant.pxd @@ -11,8 +11,6 @@ cdef extern from "precice/Participant.hpp" namespace "precice": Participant (const string&, const string&, int, int, void*) except + - void configure (const string&) - # steering methods void initialize () From 31574d4196a360d085c02531dd8f73aa0c4434f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Simonis?= Date: Mon, 25 Nov 2024 11:12:31 +0100 Subject: [PATCH 2/3] Remove const from member functions --- cyprecice/Participant.pxd | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/cyprecice/Participant.pxd b/cyprecice/Participant.pxd index 4015b695..ff75049c 100644 --- a/cyprecice/Participant.pxd +++ b/cyprecice/Participant.pxd @@ -21,15 +21,15 @@ cdef extern from "precice/Participant.hpp" namespace "precice": # status queries - int getMeshDimensions(const string& meshName) const + int getMeshDimensions(const string& meshName) - int getDataDimensions(const string& meshName, const string& dataName) const + int getDataDimensions(const string& meshName, const string& dataName) - bool isCouplingOngoing() const + bool isCouplingOngoing() - bool isTimeWindowComplete() const + bool isTimeWindowComplete() - double getMaxTimeStepSize() const + double getMaxTimeStepSize() bool requiresInitialData() @@ -39,11 +39,11 @@ cdef extern from "precice/Participant.hpp" namespace "precice": # mesh access - bool requiresMeshConnectivityFor (const string& meshName) const + bool requiresMeshConnectivityFor (const string& meshName) int setMeshVertex (const string& meshName, vector[double] position) - int getMeshVertexSize (const string& meshName) const + int getMeshVertexSize (const string& meshName) void setMeshVertices (const string& meshName, vector[double] positions, vector[int]& ids) @@ -71,17 +71,17 @@ cdef extern from "precice/Participant.hpp" namespace "precice": void writeData (const string& meshName, const string& dataName, vector[int] vertices, vector[double] values) - void readData (const string& meshName, const string& dataName, vector[int] vertices, const double relativeReadTime, vector[double]& values) const + void readData (const string& meshName, const string& dataName, vector[int] vertices, const double relativeReadTime, vector[double]& values) # direct access - void setMeshAccessRegion (const string& meshName, vector[double] boundingBox) const + void setMeshAccessRegion (const string& meshName, vector[double] boundingBox) - void getMeshVertexIDsAndCoordinates (const string& meshName, vector[int]& ids, vector[double]& coordinates) const + void getMeshVertexIDsAndCoordinates (const string& meshName, vector[int]& ids, vector[double]& coordinates) # Gradient related API - bool requiresGradientDataFor(const string& meshName, const string& dataName) const + bool requiresGradientDataFor(const string& meshName, const string& dataName) void writeGradientData(const string& meshName, const string& dataName, vector[int] vertices, vector[double] gradientValues) From 311077c0001a1921dec8712580eaa4b4bcfbda91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Simonis?= Date: Mon, 25 Nov 2024 11:22:25 +0100 Subject: [PATCH 3/3] Add except to throwing functions --- cyprecice/Participant.pxd | 46 +++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/cyprecice/Participant.pxd b/cyprecice/Participant.pxd index ff75049c..e4995189 100644 --- a/cyprecice/Participant.pxd +++ b/cyprecice/Participant.pxd @@ -13,17 +13,17 @@ cdef extern from "precice/Participant.hpp" namespace "precice": # steering methods - void initialize () + void initialize () except + - void advance (double computedTimestepLength) + void advance (double computedTimestepLength) except + void finalize() # status queries - int getMeshDimensions(const string& meshName) + int getMeshDimensions(const string& meshName) except + - int getDataDimensions(const string& meshName, const string& dataName) + int getDataDimensions(const string& meshName, const string& dataName) except + bool isCouplingOngoing() @@ -39,51 +39,51 @@ cdef extern from "precice/Participant.hpp" namespace "precice": # mesh access - bool requiresMeshConnectivityFor (const string& meshName) + bool requiresMeshConnectivityFor (const string& meshName) except + - int setMeshVertex (const string& meshName, vector[double] position) + int setMeshVertex (const string& meshName, vector[double] position) except + - int getMeshVertexSize (const string& meshName) + int getMeshVertexSize (const string& meshName) except + - void setMeshVertices (const string& meshName, vector[double] positions, vector[int]& ids) + void setMeshVertices (const string& meshName, vector[double] positions, vector[int]& ids) except + - void setMeshEdge (const string& meshName, int firstVertexID, int secondVertexID) + void setMeshEdge (const string& meshName, int firstVertexID, int secondVertexID) except + - void setMeshEdges (const string& meshName, vector[int] vertices) + void setMeshEdges (const string& meshName, vector[int] vertices) except + - void setMeshTriangle (const string& meshName, int firstVertexID, int secondVertexID, int thirdVertexID) + void setMeshTriangle (const string& meshName, int firstVertexID, int secondVertexID, int thirdVertexID) except + - void setMeshTriangles (const string& meshName, vector[int] vertices) + void setMeshTriangles (const string& meshName, vector[int] vertices) except + - void setMeshQuad (const string& meshName, int firstVertexID, int secondVertexID, int thirdVertexID, int fourthVertexID) + void setMeshQuad (const string& meshName, int firstVertexID, int secondVertexID, int thirdVertexID, int fourthVertexID) except + - void setMeshQuads (const string& meshName, vector[int] vertices) + void setMeshQuads (const string& meshName, vector[int] vertices) except + - void setMeshTetrahedron (const string& meshName, int firstVertexID, int secondVertexID, int thirdVertexID, int fourthVertexID) + void setMeshTetrahedron (const string& meshName, int firstVertexID, int secondVertexID, int thirdVertexID, int fourthVertexID) except + - void setMeshTetrahedra (const string& meshName, vector[int] vertices) + void setMeshTetrahedra (const string& meshName, vector[int] vertices) except + # remeshing - void resetMesh (const string& meshName) + void resetMesh (const string& meshName) except + # data access - void writeData (const string& meshName, const string& dataName, vector[int] vertices, vector[double] values) + void writeData (const string& meshName, const string& dataName, vector[int] vertices, vector[double] values) except + - void readData (const string& meshName, const string& dataName, vector[int] vertices, const double relativeReadTime, vector[double]& values) + void readData (const string& meshName, const string& dataName, vector[int] vertices, const double relativeReadTime, vector[double]& values) except + # direct access - void setMeshAccessRegion (const string& meshName, vector[double] boundingBox) + void setMeshAccessRegion (const string& meshName, vector[double] boundingBox) except + - void getMeshVertexIDsAndCoordinates (const string& meshName, vector[int]& ids, vector[double]& coordinates) + void getMeshVertexIDsAndCoordinates (const string& meshName, vector[int]& ids, vector[double]& coordinates) except + # Gradient related API - bool requiresGradientDataFor(const string& meshName, const string& dataName) + bool requiresGradientDataFor(const string& meshName, const string& dataName) except + - void writeGradientData(const string& meshName, const string& dataName, vector[int] vertices, vector[double] gradientValues) + void writeGradientData(const string& meshName, const string& dataName, vector[int] vertices, vector[double] gradientValues) except + cdef extern from "precice/Tooling.hpp" namespace "precice":