TriangulatedStepSelfTest.cpp File Reference

Classes

class  TriangulatedStepSelfTest
 Tests the implementation of TriangulatedWall. More...
 
class  TriangulatedStepWallSelfTest
 Tests the implementation of TriangulatedWall. More...
 

Functions

int main ()
 

Function Documentation

◆ main()

int main ( )
138 {
139  //input file without wall at the end.
140  helpers::writeToFile("TriangulatedStep.vtk","# vtk DataFile Version 2.0\n"
141  "Step\n"
142  "ASCII\n"
143  "DATASET UNSTRUCTURED_GRID\n"
144  "POINTS 8 double\n"
145  "0 0 1\n"
146  "1 0 1\n"
147  "2 0 0.9\n"
148  "3 0 0.9\n"
149  "0 1 1\n"
150  "1 1 1\n"
151  "2 1 0.9\n"
152  "3 1 0.9\n"
153  "\n"
154  "CELLS 6 24\n"
155  "3 0 1 4\n"
156  "3 4 1 5\n"
157  "3 5 1 2\n"
158  "3 5 2 6\n"
159  "3 6 2 3\n"
160  "3 6 3 7\n"
161  "\n"
162  "CELL_TYPES 6\n"
163  "5\n"
164  "5\n"
165  "5\n"
166  "5\n"
167  "5\n"
168  "5");
169 
170  //input file with a wall at the end
171  helpers::writeToFile("TriangulatedStepWall.vtk","# vtk DataFile Version 2.0\n"
172  "Step\n"
173  "ASCII\n"
174  "DATASET UNSTRUCTURED_GRID\n"
175  "POINTS 10 double\n"
176  "0 0 2\n"
177  "1 0 2\n"
178  "2 0 1\n"
179  "3 0 1\n"
180  "3 0 3\n"
181  "0 1 2\n"
182  "1 1 2\n"
183  "2 1 1\n"
184  "3 1 1\n"
185  "3 1 3\n"
186  "\n"
187  "CELLS 8 32\n"
188  "3 0 1 5\n"
189  "3 5 1 6\n"
190  "3 6 1 2\n"
191  "3 6 2 7\n"
192  "3 7 2 3\n"
193  "3 7 3 8\n"
194  "3 8 3 4\n"
195  "3 8 4 9\n"
196  "\n"
197  "CELL_TYPES 8\n"
198  "5\n"
199  "5\n"
200  "5\n"
201  "5\n"
202  "5\n"
203  "5\n"
204  "5\n"
205  "5");
206 
207 // //input file with a wall at the end
208 // helpers::writeToFile("TriangulatedStepWall.vtk","# vtk DataFile Version 2.0\n"
209 // "Step\n"
210 // "ASCII\n"
211 // "DATASET UNSTRUCTURED_GRID\n"
212 // "POINTS 6 double\n"
213 // "0 0 .5\n"
214 // ".5 0 .5\n"
215 // "10 0 10\n"
216 // "0 1 .5\n"
217 // ".5 1 .5\n"
218 // "10 1 10\n"
219 // "\n"
220 // "CELLS 4 16\n"
221 // "3 0 1 3\n"
222 // "3 3 1 4\n"
223 // "3 4 1 2\n"
224 // "3 4 2 5\n"
225 // "\n"
226 // "CELL_TYPES 4\n"
227 // "5\n"
228 // "5\n"
229 // "5\n"
230 // "5");
231 
232  //plot location of contact point
233  helpers::writeToFile("TriangulatedStepSelfTest.gnu","p 'TriangulatedStepSelfTest.fstat' u 4:6 w lp");
234 
235  //TriangulatedStepSelfTest t;
236  //t.solve();
238  t.solve();
239  return 0;
240 }
void solve()
The work horse of the code.
Definition: DPMBase.cc:4270
Tests the implementation of TriangulatedWall.
Definition: TriangulatedStepSelfTest.cpp:87
bool writeToFile(std::string filename, std::string filecontent)
Writes a string to a file.
Definition: FileIOHelpers.cc:58

References DPMBase::solve(), and helpers::writeToFile().