1313
1414function getMeshDimensions ()
1515 PreCICE. createParticipant (" test" , " dummy.xml" , 0 , 1 )
16- fakeMeshDimension = 3 # compare to test/Participant .c, fake_dimensions
17- fakeMeshName = " FakeMesh" # compare to test/Participant .c, fake_mesh_name
16+ fakeMeshDimension = 3 # compare to test/DummyParticipant .c, fake_dimensions
17+ fakeMeshName = " FakeMesh" # compare to test/DummyParticipant .c, fake_mesh_name
1818 return fakeMeshDimension == PreCICE. getMeshDimensions (fakeMeshName)
1919end
2020
2121function getDataDimensions ()
2222 PreCICE. createParticipant (" test" , " dummy.xml" , 0 , 1 )
23- fakeMeshName = " FakeMesh" # compare to test/Participant .c, fake_mesh_name
24- fakeDataName = " FakeData" # compare to test/Participant .c, fake_data_name
25- fakeDataDimension = 3 # compare to test/Participant .c, fake_dimensions
23+ fakeMeshName = " FakeMesh" # compare to test/DummyParticipant .c, fake_mesh_name
24+ fakeDataName = " FakeData" # compare to test/DummyParticipant .c, fake_data_name
25+ fakeDataDimension = 3 # compare to test/DummyParticipant .c, fake_dimensions
2626 return fakeDataDimension == PreCICE. getDataDimensions (fakeMeshName, fakeDataName)
2727end
2828
5858
5959function hasMesh ()
6060 PreCICE. createParticipant (" test" , " dummy.xml" , 0 , 1 )
61- fakeMeshName = " FakeMesh" # compare to test/Participant .c, fake_mesh_name
61+ fakeMeshName = " FakeMesh" # compare to test/DummyParticipant .c, fake_mesh_name
6262 return false == PreCICE. hasMesh (fakeMeshName)
6363end
6464
6565function hasData ()
6666 PreCICE. createParticipant (" test" , " dummy.xml" , 0 , 1 )
67- fakeMeshName = " FakeMesh" # compare to test/Participant .c, fake_mesh_name
68- fakeDataName = " FakeData" # compare to test/Participant .c, fake_data_name
67+ fakeMeshName = " FakeMesh" # compare to test/DummyParticipant .c, fake_mesh_name
68+ fakeDataName = " FakeData" # compare to test/DummyParticipant .c, fake_data_name
6969 return false == PreCICE. hasData (fakeMeshName, fakeDataName)
7070end
7171
7272function requiresMeshConnectivityFor ()
7373 PreCICE. createParticipant (" test" , " dummy.xml" , 0 , 1 )
74- fakeMeshName = " FakeMesh" # compare to test/Participant .c, fake_mesh_name
74+ fakeMeshName = " FakeMesh" # compare to test/DummyParticipant .c, fake_mesh_name
7575 return false == PreCICE. requiresMeshConnectivityFor (fakeMeshName)
7676end
7777
7878function setMeshVertex ()
7979 PreCICE. createParticipant (" test" , " dummy.xml" , 0 , 1 )
80- fakeMeshName = " FakeMesh" # compare to test/Participant .c, fake_mesh_name
81- fakeMeshDimension = 3 # compare to test/Participant .c, fake_dimensions
80+ fakeMeshName = " FakeMesh" # compare to test/DummyParticipant .c, fake_mesh_name
81+ fakeMeshDimension = 3 # compare to test/DummyParticipant .c, fake_dimensions
8282 fakePosition = rand (Cdouble, fakeMeshDimension)
8383 fakeVertexId = PreCICE. setMeshVertex (fakeMeshName, fakePosition)
8484 return 0 == fakeVertexId
8787
8888function setMeshVertices ()
8989 PreCICE. createParticipant (" test" , " dummy.xml" , 0 , 1 )
90- fakeMeshName = " FakeMesh" # compare to test/Participant .c, fake_mesh_name
91- fakeMeshDimension = 3 # compare to test/Participant .c, fake_dimensions
92- nFakeVertices = 3 # compare to test/Participant .c, n_fake_vertices
90+ fakeMeshName = " FakeMesh" # compare to test/DummyParticipant .c, fake_mesh_name
91+ fakeMeshDimension = 3 # compare to test/DummyParticipant .c, fake_dimensions
92+ nFakeVertices = 3 # compare to test/DummyParticipant .c, n_fake_vertices
9393 positions = rand (Cdouble, (nFakeVertices, fakeMeshDimension))
9494 expectedOutput = 0 : (nFakeVertices- 1 )
9595 actualOutput = PreCICE. setMeshVertices (fakeMeshName, positions)
9898
9999# function setMeshVerticesEmpty()
100100# PreCICE.createParticipant("test", "dummy.xml", 0, 1)
101- # fakeMeshName = "FakeMesh" # compare to test/Participant .c, fake_mesh_name
102- # fakeMeshDimension = 3 # compare to test/Participant .c, fake_dimensions
103- # nFakeVertices = 0 # compare to test/Participant .c, n_fake_vertices
101+ # fakeMeshName = "FakeMesh" # compare to test/DummyParticipant .c, fake_mesh_name
102+ # fakeMeshDimension = 3 # compare to test/DummyParticipant .c, fake_dimensions
103+ # nFakeVertices = 0 # compare to test/DummyParticipant .c, n_fake_vertices
104104# positions = rand(Cdouble, (nFakeVertices, fakeMeshDimension))
105105# expectedOutput = []
106106# actualOutput = PreCICE.setMeshVertices(fakeMeshName, positions)
109109
110110function getMeshVertexSize ()
111111 PreCICE. createParticipant (" test" , " dummy.xml" , 0 , 1 )
112- fakeMeshName = " FakeMesh" # compare to test/Participant .c, fake_mesh_name
113- nFakeVertices = 3 # compare to test/Participant .c, n_fake_vertices
112+ fakeMeshName = " FakeMesh" # compare to test/DummyParticipant .c, fake_mesh_name
113+ nFakeVertices = 3 # compare to test/DummyParticipant .c, n_fake_vertices
114114 nVertices = PreCICE. getMeshVertexSize (fakeMeshName)
115115 return nFakeVertices == nVertices
116116end
126126
127127function readWriteData ()
128128 PreCICE. createParticipant (" test" , " dummy.xml" , 0 , 1 )
129- fakeMeshName = " FakeMesh" # compare to test/Participant .c, fake_mesh_name
130- fakeDataName = " FakeData" # compare to test/Participant .c, fake_data_name
129+ fakeMeshName = " FakeMesh" # compare to test/DummyParticipant .c, fake_mesh_name
130+ fakeDataName = " FakeData" # compare to test/DummyParticipant .c, fake_data_name
131131 writeData = [3.0 7.0 8.0 ; 7.0 6.0 5.0 ]
132132 PreCICE. writeData (fakeMeshName, fakeDataName, Cint[1 , 2 ], writeData)
133133 readData = PreCICE. readData (fakeMeshName, fakeDataName, Cint[1 , 2 ], 1.0 )
@@ -144,16 +144,16 @@ end
144144
145145function requiresGradientDataFor ()
146146 PreCICE. createParticipant (" test" , " dummy.xml" , 0 , 1 )
147- fakeMeshName = " FakeMesh" # compare to test/Participant .c, fake_mesh_name
148- fakeDataName = " FakeData" # compare to test/Participant .c, fake_data_name
147+ fakeMeshName = " FakeMesh" # compare to test/DummyParticipant .c, fake_mesh_name
148+ fakeDataName = " FakeData" # compare to test/DummyParticipant .c, fake_data_name
149149 return false == PreCICE. requiresGradientDataFor (fakeMeshName, fakeDataName)
150150
151151end
152152
153153function writeGradientData ()
154154 PreCICE. createParticipant (" test" , " dummy.xml" , 0 , 1 )
155- fakeMeshName = " FakeMesh" # compare to test/Participant .c, fake_mesh_name
156- fakeDataName = " FakeData" # compare to test/Participant .c, fake_data_name
155+ fakeMeshName = " FakeMesh" # compare to test/DummyParticipant .c, fake_mesh_name
156+ fakeDataName = " FakeData" # compare to test/DummyParticipant .c, fake_data_name
157157 nVertices = 2
158158 ndims = 3
159159 gradientData = rand (nVertices, ndims * ndims)
@@ -166,26 +166,26 @@ end
166166
167167function getVersionInformation ()
168168 versionInfo = PreCICE. getVersionInformation ()
169- fakeVersionInfo = " dummy" # compare to test/Participant .c
169+ fakeVersionInfo = " dummy" # compare to test/DummyParticipant .c
170170 return versionInfo == fakeVersionInfo
171171end
172172
173173function setMeshAccessRegion ()
174174 PreCICE. createParticipant (" test" , " dummy.xml" , 0 , 1 )
175- fakeMeshName = " FakeMesh" # compare to test/Participant .c, fake_mesh_name
175+ fakeMeshName = " FakeMesh" # compare to test/DummyParticipant .c, fake_mesh_name
176176 fakeBoundingBox = [0.0 , 1.0 , 2.0 , 3.0 , 4.0 , 5.0 ]
177177 PreCICE. setMeshAccessRegion (fakeMeshName, fakeBoundingBox)
178178 return true
179179end
180180
181- function getMeshVerticesAndIDs ()
181+ function getMeshVertexIDsAndCoordinates ()
182182 PreCICE. createParticipant (" test" , " dummy.xml" , 0 , 1 )
183- fakeMeshName = " FakeMesh" # compare to test/Participant .c, fake_mesh_name
184- fakeMeshDimension = 3 # compare to test/Participant .c, fake_dimensions
185- nFakeVertices = 3 # compare to test/Participant .c, fake_n_vertices
183+ fakeMeshName = " FakeMesh" # compare to test/DummyParticipant .c, fake_mesh_name
184+ fakeMeshDimension = 3 # compare to test/DummyParticipant .c, fake_dimensions
185+ nFakeVertices = 3 # compare to test/DummyParticipant .c, fake_n_vertices
186186 vertexIDs = Cint[0 , 1 , 2 ]
187187 expected_vertices =
188- reshape (0 : (nFakeVertices* fakeMeshDimension- 1 ), (nFakeVertices, fakeMeshDimension))
189- fakeIDs, fakeVertices = PreCICE. getMeshVerticesAndIDs (fakeMeshName)
188+ reshape (0.0 : (nFakeVertices* fakeMeshDimension- 1 ), (nFakeVertices, fakeMeshDimension))
189+ fakeIDs, fakeVertices = PreCICE. getMeshVertexIDsAndCoordinates (fakeMeshName)
190190 return fakeIDs == vertexIDs && fakeVertices == expected_vertices
191191end
0 commit comments