-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Compatibility with precice:develop (#179)
* Rename SolverInterface to Participant and remove old API functions * Further changes for v3 compatibility * Update to new API. Tests except for gradient mapping are all working. * Fix for empty mesh. * Add missing API functions and small corrections * Fix building issue * Reformating test/Participant.cpp * Fixing test_write_block_scalar_gradient_data_single_float * Fix gradient tests * Import getVersionInformation in the correct way * initialize() does not return anything * Remove merge conflict tag * Mistake in resolving merge conflicts --------- Co-authored-by: Benjamin Rodenberg <[email protected]>
- Loading branch information
1 parent
562616b
commit d7a1234
Showing
11 changed files
with
920 additions
and
1,413 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
from libcpp cimport bool | ||
from libcpp.set cimport set | ||
from libcpp.string cimport string | ||
from libcpp.vector cimport vector | ||
|
||
cdef extern from "precice/Participant.hpp" namespace "precice": | ||
cdef cppclass Participant: | ||
# construction and configuration | ||
|
||
Participant (const string&, const string&, int, int) except + | ||
|
||
Participant (const string&, const string&, int, int, void*) except + | ||
|
||
void configure (const string&) | ||
|
||
# steering methods | ||
|
||
void initialize () | ||
|
||
void advance (double computedTimestepLength) | ||
|
||
void finalize() | ||
|
||
# status queries | ||
|
||
int getMeshDimensions(const string& meshName) const | ||
|
||
int getDataDimensions(const string& meshName, const string& dataName) const | ||
|
||
bool isCouplingOngoing() const | ||
|
||
bool isTimeWindowComplete() const | ||
|
||
double getMaxTimeStepSize() const | ||
|
||
bool requiresInitialData() | ||
|
||
bool requiresWritingCheckpoint() | ||
|
||
bool requiresReadingCheckpoint() | ||
|
||
# mesh access | ||
|
||
bool hasMesh (const string& meshName) const | ||
|
||
bool requiresMeshConnectivityFor (const string& meshName) const | ||
|
||
int setMeshVertex (const string& meshName, vector[double] position) | ||
|
||
int getMeshVertexSize (const string& meshName) const | ||
|
||
void setMeshVertices (const string& meshName, vector[double] positions, vector[int]& ids) | ||
|
||
void setMeshEdge (const string& meshName, int firstVertexID, int secondVertexID) | ||
|
||
void setMeshEdges (const string& meshName, vector[int] vertices) | ||
|
||
void setMeshTriangle (const string& meshName, int firstVertexID, int secondVertexID, int thirdVertexID) | ||
|
||
void setMeshTriangles (const string& meshName, vector[int] vertices) | ||
|
||
void setMeshQuad (const string& meshName, int firstVertexID, int secondVertexID, int thirdVertexID, int fourthVertexID) | ||
|
||
void setMeshQuads (const string& meshName, vector[int] vertices) | ||
|
||
void setMeshTetrahedron (const string& meshName, int firstVertexID, int secondVertexID, int thirdVertexID, int fourthVertexID) | ||
|
||
void setMeshTetrahedra (const string& meshName, vector[int] vertices) | ||
|
||
# data access | ||
|
||
bool hasData (const string& dataName, const string& meshName) const | ||
|
||
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 | ||
|
||
# direct access | ||
|
||
void setMeshAccessRegion (const string& meshName, vector[double] boundingBox) const | ||
|
||
void getMeshVerticesAndIDs (const string& meshName, vector[int]& ids, vector[double]& coordinates) const | ||
|
||
# Gradient related API | ||
|
||
bool requiresGradientDataFor(const string& meshName, const string& dataName) const | ||
|
||
void writeGradientData(const string& meshName, const string& dataName, vector[int] vertices, vector[double] gradientValues) | ||
|
||
|
||
cdef extern from "precice/Tooling.hpp" namespace "precice": | ||
string getVersionInformation() |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.