PlasCom2  1.0
XPACC Multi-physics simluation application
TestPlasCom2Viscous.C
Go to the documentation of this file.
1 #include "Testing.H"
2 #include "PlasCom2.H"
3 #include "Simulation.H"
4 #include "RKTestFixtures.H"
5 #include "EulerRHS.H"
6 #include "Stencil.H"
7 #include "PCPPCommUtil.H"
8 #include "PCPPReport.H"
9 #include "PCPPIntervalUtils.H"
10 #include "TestFixtures.H"
11 #include "EulerTestFixtures.H"
12 #include "PC2Util.H"
13 
14 #include <cmath>
15 
17 
21 
22 
24  pcpp::CommunicatorType &testComm)
25 {
26 
27  bool viscousShockTestResult = true;
28 
29  const std::string testFunctionName("TestPlasCom2_ViscousShock2DX");
30  const std::string testSuiteName("ViscidTest");
31  const std::string testCaseName("ViscousShock2DX");
32  const std::string testDirectory(testSuiteName+"/"+testCaseName);
33  const std::string originalDirectory(ix::sys::CWD());
34  std::ostringstream compareStream;
35  double errorTolerance = 5e-14;
36 
37  int myRank = testComm.Rank();
38 
39  if(myRank == 0)
40  std::cout << "Executing " << testFunctionName << std::endl;
41 
42  testComm.Barrier();
43 
44  int argc = 4;
45  const char *argv[] = {"plascom2x","-c","shock.test.config",NULL};
46 
47  plascom2::application simulationApplicationNonDimen2(argc,const_cast<char **>(argv),
48  testComm.Comm());
49  int returnValue = 0;
50 
51  if(!ix::sys::FILEEXISTS(testDirectory)){
52  viscousShockTestResult = false;
53  if(myRank == 0){
54  std::cout << testFunctionName << ": testing directory ("
55  << testDirectory << ") did not exist. Aborting test."
56  << std::endl;
57  }
58  goto endTest;
59  }
60 
61  ix::sys::ChDir(testDirectory);
62 
63  // nonDimensional run using PlasComCM non-dimensionalization
64  {
65  ix::sys::ChDir("nonDimenPC1X");
66 
67  if(!ix::sys::FILEEXISTS("accepted/accepted_shock2d_nd2_1000.h5")){
68  if(myRank == 0)
69  std::cout << testFunctionName << ": Accepted solution file ("
70  << "accepted/accepted_shock2d_nd_1000.h5) not found."
71  << " Aborting test." << std::endl;
72  viscousShockTestResult = false;
73  goto endTest;
74  }
75 
76  ix::sys::ChDir("regression");
77 
78  if(myRank == 0)
79  ix::sys::Remove("PlasCom2_000001000.h5");
80 
81  if(myRank == 0)
82  std::cout << "Running nonDimensional PlasCom2..." << std::endl;
83  testComm.Barrier();
84 
85  returnValue = application::ApplicationDriver(simulationApplicationNonDimen2);
86 
87  if(myRank == 0)
88  std::cout << "Done running nonDimensional PlasCom2." << std::endl;
89 
90  if(returnValue > 0){
91  std::cout << testFunctionName << ": PlasCom2 returned error code ("
92  << returnValue << "). Test failed." << std::endl;
93  viscousShockTestResult = false;
94  goto endTest;
95  }
96 
97  if(!ix::sys::FILEEXISTS("PlasCom2_000001000.h5")){
98  std::cout << testFunctionName << ": PlasCom2 failed to produce expected"
99  << std::endl
100  << "output file (PlasCom2_000001000.h5). Test failed." << std::endl;
101  viscousShockTestResult = false;
102  goto endTest;
103  }
104 
105  ix::sys::ChDir("../");
106 
107  if(myRank == 0){
108  std::cout << "Comparing results to expected result...";
109  returnValue = plascom2::util::PC2Compare("regression/PlasCom2_000001000.h5",
110  "accepted/accepted_shock2d_nd2_1000.h5",
111  errorTolerance,compareStream);
112  if(returnValue == 0)
113  std::cout << "passed." << std::endl;
114  else {
115  std::cout << "failed." << std::endl;
116  viscousShockTestResult = false;
117  std::cout << testFunctionName << ": Resulting state "
118  << "comparison yielded negative result:"
119  << std::endl
120  << compareStream.str()
121  << std::endl;
122  }
123  }
124  ix::sys::ChDir("../");
125  }
126  viscousShockTestResult = CheckResult(viscousShockTestResult,testComm);
127 
128  endTest:
129  {
131  ix::sys::ChDir(originalDirectory);
132  parallelUnitResults.UpdateResult("PlasCom2:Viscid:Shock2DXRegression",viscousShockTestResult);
133  }
134 
135  return;
136 
137 }
138 
140  pcpp::CommunicatorType &testComm)
141 {
142 
143  bool viscousShockTestResult = true;
144 
145  const std::string testFunctionName("TestPlasCom2_VSCurvilinear2DX_Regression");
146  const std::string testSuiteName("ViscidTest");
147  const std::string testCaseName("ViscousShock2DX");
148  const std::string testDirectory(testSuiteName+"/"+testCaseName);
149  const std::string originalDirectory(ix::sys::CWD());
150  std::ostringstream compareStream;
151  double errorTolerance = 5e-14;
152 
153  int myRank = testComm.Rank();
154 
155  testComm.Barrier();
156  if(myRank == 0)
157  std::cout << "Executing " << testFunctionName << std::endl;
158 
159  testComm.Barrier();
160 
161  int argc = 4;
162  const char *argv[] = {"plascom2x","-c","curvilinear.config",NULL};
163 
164  plascom2::application simulationApplicationNonDimen2(argc,const_cast<char **>(argv),
165  testComm.Comm());
166  int returnValue = 0;
167 
168  if(!ix::sys::FILEEXISTS(testDirectory)){
169  viscousShockTestResult = false;
170  if(myRank == 0){
171  std::cout << testFunctionName << ": testing directory ("
172  << testDirectory << ") did not exist. Aborting test."
173  << std::endl;
174  }
175  goto endTest;
176  }
177 
178  ix::sys::ChDir(testDirectory);
179 
180  // nonDimensional run using PlasComCM non-dimensionalization
181  {
182  ix::sys::ChDir("nonDimenPC1X");
183 
184  if(!ix::sys::FILEEXISTS("accepted/accepted_shock2d_nd2_1000.h5")){
185  if(myRank == 0)
186  std::cout << testFunctionName << ": Accepted solution file ("
187  << "accepted/accepted_shock2d_nd_1000.h5) not found."
188  << " Aborting test." << std::endl;
189  viscousShockTestResult = false;
190  goto endTest;
191  }
192 
193  ix::sys::ChDir("regression");
194 
195 
196  testComm.Barrier();
197  if(myRank == 0)
198  if(ix::sys::FILEEXISTS("PlasCom2_000001000.h5"))
199  ix::sys::Remove("PlasCom2_000001000.h5");
200  testComm.Barrier();
201 
202  if(myRank == 0)
203  std::cout << "Running nonDimensional PlasCom2..." << std::endl;
204 
205  returnValue = application::ApplicationDriver(simulationApplicationNonDimen2);
206 
207  testComm.Barrier();
208  if(myRank == 0)
209  std::cout << "Done running nonDimensional PlasCom2." << std::endl;
210 
211  if(returnValue > 0){
212  std::cout << testFunctionName << ": PlasCom2 returned error code ("
213  << returnValue << "). Test failed." << std::endl;
214  viscousShockTestResult = false;
215  goto endTest;
216  }
217 
218  if(!ix::sys::FILEEXISTS("PlasCom2_000001000.h5")){
219  std::cout << testFunctionName << ": PlasCom2 failed to produce expected"
220  << std::endl
221  << "output file (PlasCom2_000001000.h5). Test failed." << std::endl;
222  viscousShockTestResult = false;
223  goto endTest;
224  }
225 
226  ix::sys::ChDir("../");
227 
228  if(myRank == 0){
229  std::cout << "Comparing results to expected result...";
230  returnValue = plascom2::util::PC2Compare("regression/PlasCom2_000001000.h5",
231  "accepted/accepted_shock2d_nd2_1000.h5",
232  errorTolerance,compareStream);
233  if(returnValue == 0)
234  std::cout << "passed." << std::endl;
235  else {
236  std::cout << "failed." << std::endl;
237  viscousShockTestResult = false;
238  std::cout << testFunctionName << ": Resulting state "
239  << "comparison yielded negative result:"
240  << std::endl
241  << compareStream.str()
242  << std::endl;
243  }
244  }
245  ix::sys::ChDir("../");
246  }
247  viscousShockTestResult = CheckResult(viscousShockTestResult,testComm);
248 
249  endTest:
250  {
252  ix::sys::ChDir(originalDirectory);
253  parallelUnitResults.UpdateResult("PlasCom2:Viscid:CurvilinearVS2DX",viscousShockTestResult);
254  }
255 
256  testComm.Barrier();
257  return;
258 
259 }
260 
262  pcpp::CommunicatorType &testComm)
263 {
264 
265  bool viscousShockTestResult = true;
266 
267  const std::string testFunctionName("TestPlasCom2_VSRectilinear2DX_Regression");
268  const std::string testSuiteName("ViscidTest");
269  const std::string testCaseName("ViscousShock2DX");
270  const std::string testDirectory(testSuiteName+"/"+testCaseName);
271  const std::string originalDirectory(ix::sys::CWD());
272  std::ostringstream compareStream;
273  double errorTolerance = 5e-14;
274 
275  int myRank = testComm.Rank();
276 
277  testComm.Barrier();
278  if(myRank == 0)
279  std::cout << "Executing " << testFunctionName << std::endl;
280 
281  testComm.Barrier();
282 
283  int argc = 4;
284  const char *argv[] = {"plascom2x","-c","rectilinear.config",NULL};
285 
286  plascom2::application simulationApplicationNonDimen2(argc,const_cast<char **>(argv),
287  testComm.Comm());
288  int returnValue = 0;
289 
290  if(!ix::sys::FILEEXISTS(testDirectory)){
291  viscousShockTestResult = false;
292  if(myRank == 0){
293  std::cout << testFunctionName << ": testing directory ("
294  << testDirectory << ") did not exist. Aborting test."
295  << std::endl;
296  }
297  goto endTest;
298  }
299 
300  ix::sys::ChDir(testDirectory);
301 
302  // nonDimensional run using PlasComCM non-dimensionalization
303  {
304  ix::sys::ChDir("nonDimenPC1X");
305 
306  if(!ix::sys::FILEEXISTS("accepted/accepted_shock2d_nd2_1000.h5")){
307  if(myRank == 0)
308  std::cout << testFunctionName << ": Accepted solution file ("
309  << "accepted/accepted_shock2d_nd_1000.h5) not found."
310  << " Aborting test." << std::endl;
311  viscousShockTestResult = false;
312  goto endTest;
313  }
314 
315  ix::sys::ChDir("regression");
316 
317  testComm.Barrier();
318  if(myRank == 0)
319  if(ix::sys::FILEEXISTS("PlasCom2_000001000.h5"))
320  ix::sys::Remove("PlasCom2_000001000.h5");
321 
322  testComm.Barrier();
323  if(myRank == 0)
324  std::cout << "Running nonDimensional PlasCom2..." << std::endl;
325 
326  returnValue = application::ApplicationDriver(simulationApplicationNonDimen2);
327 
328  testComm.Barrier();
329  if(myRank == 0)
330  std::cout << "Done running nonDimensional PlasCom2." << std::endl;
331 
332  if(returnValue > 0){
333  std::cout << testFunctionName << ": PlasCom2 returned error code ("
334  << returnValue << "). Test failed." << std::endl;
335  viscousShockTestResult = false;
336  goto endTest;
337  }
338 
339  if(!ix::sys::FILEEXISTS("PlasCom2_000001000.h5")){
340  std::cout << testFunctionName << ": PlasCom2 failed to produce expected"
341  << std::endl
342  << "output file (PlasCom2_000001000.h5). Test failed." << std::endl;
343  viscousShockTestResult = false;
344  goto endTest;
345  }
346 
347  ix::sys::ChDir("../");
348 
349  if(myRank == 0){
350  std::cout << "Comparing results to expected result...";
351  returnValue = plascom2::util::PC2Compare("regression/PlasCom2_000001000.h5",
352  "accepted/accepted_shock2d_nd2_1000.h5",
353  errorTolerance,compareStream);
354  if(returnValue == 0)
355  std::cout << "passed." << std::endl;
356  else {
357  std::cout << "failed." << std::endl;
358  viscousShockTestResult = false;
359  std::cout << testFunctionName << ": Resulting state "
360  << "comparison yielded negative result:"
361  << std::endl
362  << compareStream.str()
363  << std::endl;
364  }
365  }
366  ix::sys::ChDir("../");
367  }
368  viscousShockTestResult = CheckResult(viscousShockTestResult,testComm);
369 
370  endTest:
371  {
373  ix::sys::ChDir(originalDirectory);
374  parallelUnitResults.UpdateResult("PlasCom2:Viscid:RectilinearVS2DX",viscousShockTestResult);
375  }
376 
377  testComm.Barrier();
378  return;
379 
380 }
381 
383  pcpp::CommunicatorType &testComm)
384 {
385 
386  bool poiseulleTestResult = true;
387 
388  const std::string testFunctionName("TestPlasCom2_Poiseuille2DX");
389  const std::string testSuiteName("ViscidTest");
390  const std::string testCaseName("Poiseuille2DX");
391  const std::string testDirectory(testSuiteName+"/"+testCaseName);
392  const std::string originalDirectory(ix::sys::CWD());
393  std::ostringstream compareStream;
394  double errorTolerance = 5e-14;
395 
396  int myRank = testComm.Rank();
397 
398  if(myRank == 0)
399  std::cout << "Executing " << testFunctionName << std::endl;
400 
401  int argc = 4;
402  const char *argv[] = {"plascom2x","-c","cartesian.config",NULL};
403 
404  plascom2::application simulationApplicationNonDimen2(argc,const_cast<char **>(argv),
405  testComm.Comm());
406  int returnValue = 0;
407 
408  if(!ix::sys::FILEEXISTS(testDirectory)){
409  poiseulleTestResult = false;
410  if(myRank == 0){
411  std::cout << testFunctionName << ": testing directory ("
412  << testDirectory << ") did not exist. Aborting test."
413  << std::endl;
414  }
415  goto endTest;
416  }
417 
418  ix::sys::ChDir(testDirectory);
419 
420  // nonDimensional run using PlasComCM non-dimensionalization
421  {
422  ix::sys::ChDir("nonDimenPC1");
423 
424  if(!ix::sys::FILEEXISTS("accepted/accepted_poiseuille2d_nonDimenPC1_100.h5")){
425  if(myRank == 0)
426  std::cout << testFunctionName << ": Accepted solution file ("
427  << "accepted/accepted_poiseuille2d_nonDimenPC1_100.h5) not found."
428  << " Aborting test." << std::endl;
429  poiseulleTestResult = false;
430  goto endTest;
431  }
432 
433  ix::sys::ChDir("regression");
434  if(myRank == 0)
435  ix::sys::Remove("PlasCom2_000000100.h5");
436 
437  if(myRank == 0)
438  std::cout << "Running nonDimensional PlasCom2..." << std::endl;
439 
440  returnValue = application::ApplicationDriver(simulationApplicationNonDimen2);
441 
442  if(myRank == 0)
443  std::cout << "Done running nonDimensional PlasCom2." << std::endl;
444 
445  if(returnValue > 0){
446  std::cout << testFunctionName << ": PlasCom2 returned error code ("
447  << returnValue << "). Test failed." << std::endl;
448  poiseulleTestResult = false;
449  goto endTest;
450  }
451 
452  if(!ix::sys::FILEEXISTS("PlasCom2_000000100.h5")){
453  std::cout << testFunctionName << ": PlasCom2 failed to produce expected"
454  << std::endl
455  << "output file (PlasCom2_000000100.h5). Test failed." << std::endl;
456  poiseulleTestResult = false;
457  goto endTest;
458  }
459 
460  ix::sys::ChDir("../");
461 
462  if(myRank == 0){
463  std::cout << "Comparing results to expected result...";
464  returnValue = plascom2::util::PC2Compare("regression/PlasCom2_000000100.h5",
465  "accepted/accepted_poiseuille2d_nonDimenPC1_100.h5",
466  errorTolerance,compareStream);
467  if(returnValue == 0)
468  std::cout << "passed." << std::endl;
469  else {
470  std::cout << "failed." << std::endl;
471  poiseulleTestResult = false;
472  std::cout << testFunctionName << ": Resulting state "
473  << "comparison yielded negative result:"
474  << std::endl
475  << compareStream.str()
476  << std::endl;
477  }
478  }
479  ix::sys::ChDir("../");
480  }
481  poiseulleTestResult = CheckResult(poiseulleTestResult,testComm);
482 
483  endTest:
484  {
486  ix::sys::ChDir(originalDirectory);
487  parallelUnitResults.UpdateResult("PlasCom2:Viscid:Poiseuille2DXRegression",poiseulleTestResult);
488  }
489  return;
490 }
491 
493  pcpp::CommunicatorType &testComm)
494 {
495 
496  bool poiseulleTestResult = true;
497 
498  const std::string testFunctionName("TestPlasCom2_Poiseuille2DXRM_Regression");
499  const std::string testSuiteName("ViscidTest");
500  const std::string testCaseName("Poiseuille2DX");
501  const std::string testDirectory(testSuiteName+"/"+testCaseName);
502  const std::string originalDirectory(ix::sys::CWD());
503  std::ostringstream compareStream;
504  double errorTolerance = 5e-14;
505 
506  int myRank = testComm.Rank();
507 
508  if(myRank == 0)
509  std::cout << "Executing " << testFunctionName << std::endl;
510 
511  int argc = 4;
512  const char *argv[] = {"plascom2x","-c","rectilinear.config",NULL};
513 
514  plascom2::application simulationApplicationNonDimen2(argc,const_cast<char **>(argv),
515  testComm.Comm());
516  int returnValue = 0;
517 
518  if(!ix::sys::FILEEXISTS(testDirectory)){
519  poiseulleTestResult = false;
520  if(myRank == 0){
521  std::cout << testFunctionName << ": testing directory ("
522  << testDirectory << ") did not exist. Aborting test."
523  << std::endl;
524  }
525  goto endTest;
526  }
527 
528  ix::sys::ChDir(testDirectory);
529 
530  // nonDimensional run using PlasComCM non-dimensionalization
531  {
532  ix::sys::ChDir("nonDimenPC1");
533 
534  if(!ix::sys::FILEEXISTS("accepted/accepted_poiseuille2d_nonDimenPC1_100.h5")){
535  if(myRank == 0)
536  std::cout << testFunctionName << ": Accepted solution file ("
537  << "accepted/accepted_poiseuille2d_nonDimenPC1_100.h5) not found."
538  << " Aborting test." << std::endl;
539  poiseulleTestResult = false;
540  goto endTest;
541  }
542 
543  ix::sys::ChDir("regression");
544 
545  if(myRank == 0){
546  if(ix::sys::FILEEXISTS("PlasCom2_000000100.h5")){
547  ix::sys::Remove("PlasCom2_000000100.h5");
548  }
549  std::cout << "Running nonDimensional PlasCom2..." << std::endl;
550  }
551  testComm.Barrier();
552 
553  returnValue = application::ApplicationDriver(simulationApplicationNonDimen2);
554 
555  if(myRank == 0)
556  std::cout << "Done running nonDimensional PlasCom2." << std::endl;
557 
558  if(returnValue > 0){
559  std::cout << testFunctionName << ": PlasCom2 returned error code ("
560  << returnValue << "). Test failed." << std::endl;
561  poiseulleTestResult = false;
562  goto endTest;
563  }
564 
565  if(!ix::sys::FILEEXISTS("PlasCom2_000000100.h5")){
566  std::cout << testFunctionName << ": PlasCom2 failed to produce expected"
567  << std::endl
568  << "output file (PlasCom2_000000100.h5). Test failed." << std::endl;
569  poiseulleTestResult = false;
570  goto endTest;
571  }
572 
573  ix::sys::ChDir("../");
574 
575 
576  if(myRank == 0){
577  std::cout << "Comparing results to expected result...";
578  returnValue = plascom2::util::PC2Compare("regression/PlasCom2_000000100.h5",
579  "accepted/accepted_poiseuille2d_nonDimenPC1_100.h5",
580  errorTolerance,compareStream);
581  if(returnValue == 0)
582  std::cout << "passed." << std::endl;
583  else {
584  std::cout << "failed." << std::endl;
585  poiseulleTestResult = false;
586  std::cout << testFunctionName << ": Resulting state "
587  << "comparison yielded negative result:"
588  << std::endl
589  << compareStream.str()
590  << std::endl;
591  }
592  }
593  ix::sys::ChDir("../");
594  }
595  poiseulleTestResult = CheckResult(poiseulleTestResult,testComm);
596 
597  endTest:
598  {
600  ix::sys::ChDir(originalDirectory);
601  parallelUnitResults.UpdateResult("PlasCom2:Viscid:PF2DXRectilinear",poiseulleTestResult);
602  }
603 
604  testComm.Barrier();
605 
606  return;
607 }
608 
610  pcpp::CommunicatorType &testComm)
611 {
612 
613  bool poiseulleTestResult = true;
614 
615  const std::string testFunctionName("TestPlasCom2_Poiseuille2DXCM_Regression");
616  const std::string testSuiteName("ViscidTest");
617  const std::string testCaseName("Poiseuille2DX");
618  const std::string testDirectory(testSuiteName+"/"+testCaseName);
619  const std::string originalDirectory(ix::sys::CWD());
620  std::ostringstream compareStream;
621  double errorTolerance = 5e-14;
622 
623  int myRank = testComm.Rank();
624 
625  if(myRank == 0)
626  std::cout << "Executing " << testFunctionName << std::endl;
627 
628  int argc = 4;
629  const char *argv[] = {"plascom2x","-c","curvilinear.config",NULL};
630 
631  plascom2::application simulationApplicationNonDimen2(argc,const_cast<char **>(argv),
632  testComm.Comm());
633  int returnValue = 0;
634 
635  if(!ix::sys::FILEEXISTS(testDirectory)){
636  poiseulleTestResult = false;
637  if(myRank == 0){
638  std::cout << testFunctionName << ": testing directory ("
639  << testDirectory << ") did not exist. Aborting test."
640  << std::endl;
641  }
642  goto endTest;
643  }
644 
645  ix::sys::ChDir(testDirectory);
646 
647  // nonDimensional run using PlasComCM non-dimensionalization
648  {
649  ix::sys::ChDir("nonDimenPC1");
650 
651  if(!ix::sys::FILEEXISTS("accepted/accepted_poiseuille2d_nonDimenPC1_100.h5")){
652  if(myRank == 0)
653  std::cout << testFunctionName << ": Accepted solution file ("
654  << "accepted/accepted_poiseuille2d_nonDimenPC1_100.h5) not found."
655  << " Aborting test." << std::endl;
656  poiseulleTestResult = false;
657  goto endTest;
658  }
659 
660  ix::sys::ChDir("regression");
661 
662  if(myRank == 0){
663  if(ix::sys::FILEEXISTS("PlasCom2_000000100.h5")){
664  ix::sys::Remove("PlasCom2_000000100.h5");
665  }
666  std::cout << "Running nonDimensional PlasCom2..." << std::endl;
667  }
668  testComm.Barrier();
669 
670  returnValue = application::ApplicationDriver(simulationApplicationNonDimen2);
671 
672  if(myRank == 0)
673  std::cout << "Done running nonDimensional PlasCom2." << std::endl;
674 
675  if(returnValue > 0){
676  std::cout << testFunctionName << ": PlasCom2 returned error code ("
677  << returnValue << "). Test failed." << std::endl;
678  poiseulleTestResult = false;
679  goto endTest;
680  }
681 
682  if(!ix::sys::FILEEXISTS("PlasCom2_000000100.h5")){
683  std::cout << testFunctionName << ": PlasCom2 failed to produce expected"
684  << std::endl
685  << "output file (PlasCom2_000000100.h5). Test failed." << std::endl;
686  poiseulleTestResult = false;
687  goto endTest;
688  }
689 
690  ix::sys::ChDir("../");
691 
692 
693  if(myRank == 0){
694  std::cout << "Comparing results to expected result...";
695  returnValue = plascom2::util::PC2Compare("regression/PlasCom2_000000100.h5",
696  "accepted/accepted_poiseuille2d_nonDimenPC1_100.h5",
697  errorTolerance,compareStream);
698  if(returnValue == 0)
699  std::cout << "passed." << std::endl;
700  else {
701  std::cout << "failed." << std::endl;
702  poiseulleTestResult = false;
703  std::cout << testFunctionName << ": Resulting state "
704  << "comparison yielded negative result:"
705  << std::endl
706  << compareStream.str()
707  << std::endl;
708  }
709  }
710  ix::sys::ChDir("../");
711  }
712  poiseulleTestResult = CheckResult(poiseulleTestResult,testComm);
713 
714  endTest:
715  {
717  ix::sys::ChDir(originalDirectory);
718  parallelUnitResults.UpdateResult("PlasCom2:Viscid:PF2DXCurvilinear",poiseulleTestResult);
719  }
720 
721  testComm.Barrier();
722 
723  return;
724 }
725 
726 
728  pcpp::CommunicatorType &testComm)
729 {
730 
731  bool poiseulleTestResult = true;
732 
733  const std::string testFunctionName("TestPlasCom2_Poiseuille2DY");
734  const std::string testSuiteName("ViscidTest");
735  const std::string testCaseName("Poiseuille2DY");
736  const std::string testDirectory(testSuiteName+"/"+testCaseName);
737  const std::string originalDirectory(ix::sys::CWD());
738  std::ostringstream compareStream;
739  double errorTolerance = 5e-14;
740 
741  int myRank = testComm.Rank();
742 
743  if(myRank == 0)
744  std::cout << "Executing " << testFunctionName << std::endl;
745 
746  testComm.Barrier();
747 
748  int argc = 4;
749  const char *argv[] = {"plascom2x","-c","cartesian.config",NULL};
750 
751  plascom2::application simulationApplicationNonDimen2(argc,const_cast<char **>(argv),
752  testComm.Comm());
753  int returnValue = 0;
754 
755  if(!ix::sys::FILEEXISTS(testDirectory)){
756  poiseulleTestResult = false;
757  if(myRank == 0){
758  std::cout << testFunctionName << ": testing directory ("
759  << testDirectory << ") did not exist. Aborting test."
760  << std::endl;
761  }
762  goto endTest;
763  }
764 
765  ix::sys::ChDir(testDirectory);
766 
767  // nonDimensional run using PlasComCM non-dimensionalization
768  {
769  ix::sys::ChDir("dimen");
770 
771  if(!ix::sys::FILEEXISTS("accepted/accepted_poiseuille2d_dimen_100.h5")){
772  if(myRank == 0)
773  std::cout << testFunctionName << ": Accepted solution file ("
774  << "accepted/accepted_poiseuille2d_dimen_100.h5) not found."
775  << " Aborting test." << std::endl;
776  poiseulleTestResult = false;
777  goto endTest;
778  }
779 
780  ix::sys::ChDir("regression");
781 
782  if(myRank == 0)
783  ix::sys::Remove("PlasCom2_000000100.h5");
784 
785  if(myRank == 0)
786  std::cout << "Running dimensional PlasCom2..." << std::endl;
787 
788  returnValue = application::ApplicationDriver(simulationApplicationNonDimen2);
789 
790  if(myRank == 0)
791  std::cout << "Done running dimensional PlasCom2." << std::endl;
792 
793  if(returnValue > 0){
794  std::cout << testFunctionName << ": PlasCom2 returned error code ("
795  << returnValue << "). Test failed." << std::endl;
796  poiseulleTestResult = false;
797  goto endTest;
798  }
799 
800  if(!ix::sys::FILEEXISTS("PlasCom2_000000100.h5")){
801  std::cout << testFunctionName << ": PlasCom2 failed to produce expected"
802  << std::endl
803  << "output file (PlasCom2_000000100.h5). Test failed." << std::endl;
804  poiseulleTestResult = false;
805  goto endTest;
806  }
807 
808  ix::sys::ChDir("../");
809 
810  if(myRank == 0){
811  std::cout << "Comparing results to expected result...";
812  returnValue = plascom2::util::PC2Compare("regression/PlasCom2_000000100.h5",
813  "accepted/accepted_poiseuille2d_dimen_100.h5",
814  errorTolerance,compareStream);
815  if(returnValue == 0)
816  std::cout << "passed." << std::endl;
817  else {
818  std::cout << "failed." << std::endl;
819  poiseulleTestResult = false;
820  std::cout << testFunctionName << ": Resulting state "
821  << "comparison yielded negative result:"
822  << std::endl
823  << compareStream.str()
824  << std::endl;
825  }
826  }
827  ix::sys::ChDir("../");
828  }
829  poiseulleTestResult = CheckResult(poiseulleTestResult,testComm);
830 
831  endTest:
832  {
834  ix::sys::ChDir(originalDirectory);
835  parallelUnitResults.UpdateResult("PlasCom2:Viscid:Poiseuille2DYRegression",poiseulleTestResult);
836  }
837 
838  return;
839 
840 }
841 
843  pcpp::CommunicatorType &testComm)
844 {
845 
846  bool poiseulleTestResult = true;
847 
848  const std::string testFunctionName("TestPlasCom2_PFRectilinear2DY");
849  const std::string testSuiteName("ViscidTest");
850  const std::string testCaseName("Poiseuille2DY");
851  const std::string testDirectory(testSuiteName+"/"+testCaseName);
852  const std::string originalDirectory(ix::sys::CWD());
853  std::ostringstream compareStream;
854  double errorTolerance = 5e-14;
855 
856  int myRank = testComm.Rank();
857 
858  if(myRank == 0)
859  std::cout << "Executing " << testFunctionName << std::endl;
860 
861  testComm.Barrier();
862 
863  int argc = 4;
864  const char *argv[] = {"plascom2x","-c","rectilinear.config",NULL};
865 
866  plascom2::application simulationApplicationNonDimen2(argc,const_cast<char **>(argv),
867  testComm.Comm());
868  int returnValue = 0;
869 
870  if(!ix::sys::FILEEXISTS(testDirectory)){
871  poiseulleTestResult = false;
872  if(myRank == 0){
873  std::cout << testFunctionName << ": testing directory ("
874  << testDirectory << ") did not exist. Aborting test."
875  << std::endl;
876  }
877  goto endTest;
878  }
879 
880  ix::sys::ChDir(testDirectory);
881 
882  // nonDimensional run using PlasComCM non-dimensionalization
883  {
884  ix::sys::ChDir("dimen");
885 
886  if(!ix::sys::FILEEXISTS("accepted/accepted_poiseuille2d_dimen_100.h5")){
887  if(myRank == 0)
888  std::cout << testFunctionName << ": Accepted solution file ("
889  << "accepted/accepted_poiseuille2d_dimen_100.h5) not found."
890  << " Aborting test." << std::endl;
891  poiseulleTestResult = false;
892  goto endTest;
893  }
894 
895  ix::sys::ChDir("regression");
896 
897  if(myRank == 0){
898  if(ix::sys::FILEEXISTS("PlasCom2_000000100.h5"))
899  ix::sys::Remove("PlasCom2_000000100.h5");
900  std::cout << "Running dimensional PlasCom2..." << std::endl;
901  }
902  testComm.Barrier();
903 
904  returnValue = application::ApplicationDriver(simulationApplicationNonDimen2);
905 
906  if(myRank == 0)
907  std::cout << "Done running dimensional PlasCom2." << std::endl;
908 
909  if(returnValue > 0){
910  std::cout << testFunctionName << ": PlasCom2 returned error code ("
911  << returnValue << "). Test failed." << std::endl;
912  poiseulleTestResult = false;
913  goto endTest;
914  }
915 
916  if(!ix::sys::FILEEXISTS("PlasCom2_000000100.h5")){
917  std::cout << testFunctionName << ": PlasCom2 failed to produce expected"
918  << std::endl
919  << "output file (PlasCom2_000000100.h5). Test failed." << std::endl;
920  poiseulleTestResult = false;
921  goto endTest;
922  }
923 
924  ix::sys::ChDir("../");
925 
926 
927  if(myRank == 0){
928  std::cout << "Comparing results to expected result...";
929  returnValue = plascom2::util::PC2Compare("regression/PlasCom2_000000100.h5",
930  "accepted/accepted_poiseuille2d_dimen_100.h5",
931  errorTolerance,compareStream);
932  if(returnValue == 0)
933  std::cout << "passed." << std::endl;
934  else {
935  std::cout << "failed." << std::endl;
936  poiseulleTestResult = false;
937  std::cout << testFunctionName << ": Resulting state "
938  << "comparison yielded negative result:"
939  << std::endl
940  << compareStream.str()
941  << std::endl;
942  }
943  }
944  ix::sys::ChDir("../");
945  }
946  poiseulleTestResult = CheckResult(poiseulleTestResult,testComm);
947 
948  endTest:
949  {
951  ix::sys::ChDir(originalDirectory);
952  parallelUnitResults.UpdateResult("PlasCom2:Viscid:PF2DYRectilinear",poiseulleTestResult);
953  }
954 
955  testComm.Barrier();
956 
957  return;
958 }
959 
961  pcpp::CommunicatorType &testComm)
962 {
963 
964  bool poiseulleTestResult = true;
965 
966  const std::string testFunctionName("TestPlasCom2_PFCurvilinear2DY");
967  const std::string testSuiteName("ViscidTest");
968  const std::string testCaseName("Poiseuille2DY");
969  const std::string testDirectory(testSuiteName+"/"+testCaseName);
970  const std::string originalDirectory(ix::sys::CWD());
971  std::ostringstream compareStream;
972  double errorTolerance = 5e-14;
973 
974  int myRank = testComm.Rank();
975 
976  if(myRank == 0)
977  std::cout << "Executing " << testFunctionName << std::endl;
978 
979  testComm.Barrier();
980 
981  int argc = 4;
982  const char *argv[] = {"plascom2x","-c","curvilinear.config",NULL};
983 
984  plascom2::application simulationApplicationNonDimen2(argc,const_cast<char **>(argv),
985  testComm.Comm());
986  int returnValue = 0;
987 
988  if(!ix::sys::FILEEXISTS(testDirectory)){
989  poiseulleTestResult = false;
990  if(myRank == 0){
991  std::cout << testFunctionName << ": testing directory ("
992  << testDirectory << ") did not exist. Aborting test."
993  << std::endl;
994  }
995  goto endTest;
996  }
997 
998  ix::sys::ChDir(testDirectory);
999 
1000  // nonDimensional run using PlasComCM non-dimensionalization
1001  {
1002  ix::sys::ChDir("dimen");
1003 
1004  if(!ix::sys::FILEEXISTS("accepted/accepted_poiseuille2d_dimen_100.h5")){
1005  if(myRank == 0)
1006  std::cout << testFunctionName << ": Accepted solution file ("
1007  << "accepted/accepted_poiseuille2d_dimen_100.h5) not found."
1008  << " Aborting test." << std::endl;
1009  poiseulleTestResult = false;
1010  goto endTest;
1011  }
1012 
1013  ix::sys::ChDir("regression");
1014 
1015  if(myRank == 0){
1016  if(ix::sys::FILEEXISTS("PlasCom2_000000100.h5"))
1017  ix::sys::Remove("PlasCom2_000000100.h5");
1018  std::cout << "Running dimensional PlasCom2..." << std::endl;
1019  }
1020  testComm.Barrier();
1021 
1022  returnValue = application::ApplicationDriver(simulationApplicationNonDimen2);
1023 
1024  if(myRank == 0)
1025  std::cout << "Done running dimensional PlasCom2." << std::endl;
1026 
1027  if(returnValue > 0){
1028  std::cout << testFunctionName << ": PlasCom2 returned error code ("
1029  << returnValue << "). Test failed." << std::endl;
1030  poiseulleTestResult = false;
1031  goto endTest;
1032  }
1033 
1034  if(!ix::sys::FILEEXISTS("PlasCom2_000000100.h5")){
1035  std::cout << testFunctionName << ": PlasCom2 failed to produce expected"
1036  << std::endl
1037  << "output file (PlasCom2_000000100.h5). Test failed." << std::endl;
1038  poiseulleTestResult = false;
1039  goto endTest;
1040  }
1041 
1042  ix::sys::ChDir("../");
1043 
1044 
1045  if(myRank == 0){
1046  std::cout << "Comparing results to expected result...";
1047  returnValue = plascom2::util::PC2Compare("regression/PlasCom2_000000100.h5",
1048  "accepted/accepted_poiseuille2d_dimen_100.h5",
1049  errorTolerance,compareStream);
1050  if(returnValue == 0)
1051  std::cout << "passed." << std::endl;
1052  else {
1053  std::cout << "failed." << std::endl;
1054  poiseulleTestResult = false;
1055  std::cout << testFunctionName << ": Resulting state "
1056  << "comparison yielded negative result:"
1057  << std::endl
1058  << compareStream.str()
1059  << std::endl;
1060  }
1061  }
1062  ix::sys::ChDir("../");
1063  }
1064  poiseulleTestResult = CheckResult(poiseulleTestResult,testComm);
1065 
1066  endTest:
1067  {
1069  ix::sys::ChDir(originalDirectory);
1070  parallelUnitResults.UpdateResult("PlasCom2:Viscid:PF2DYCurvilinear",poiseulleTestResult);
1071  }
1072 
1073  testComm.Barrier();
1074 
1075  return;
1076 }
1077 
1079  pcpp::CommunicatorType &testComm)
1080 {
1081 
1082  bool poiseulleTestResult = true;
1083 
1084  const std::string testFunctionName("TestPlasCom2_Poiseuille3DZ");
1085  const std::string testSuiteName("ViscidTest");
1086  const std::string testCaseName("Poiseuille3DZ");
1087  const std::string testDirectory(testSuiteName+"/"+testCaseName);
1088  const std::string originalDirectory(ix::sys::CWD());
1089  std::ostringstream compareStream;
1090  double errorTolerance = 5e-14;
1091 
1092  int myRank = testComm.Rank();
1093 
1094  if(myRank == 0)
1095  std::cout << "Executing " << testFunctionName << std::endl;
1096 
1097  int argc = 4;
1098  const char *argv[] = {"plascom2x","-c","cartesian.config",NULL};
1099 
1100  plascom2::application simulationApplicationNonDimen2(argc,const_cast<char **>(argv),
1101  testComm.Comm());
1102  int returnValue = 0;
1103 
1104  if(!ix::sys::FILEEXISTS(testDirectory)){
1105  poiseulleTestResult = false;
1106  if(myRank == 0){
1107  std::cout << testFunctionName << ": testing directory ("
1108  << testDirectory << ") did not exist. Aborting test."
1109  << std::endl;
1110  }
1111  goto endTest;
1112  }
1113 
1114  ix::sys::ChDir(testDirectory);
1115 
1116  // nonDimensional run using PlasComCM non-dimensionalization
1117  {
1118  ix::sys::ChDir("nonDimen");
1119 
1120  if(!ix::sys::FILEEXISTS("accepted/accepted_poiseuille3d_nonDimen_10.h5")){
1121  if(myRank == 0)
1122  std::cout << testFunctionName << ": Accepted solution file ("
1123  << "accepted/accepted_poiseuille3d_nonDimen_10.h5) not found."
1124  << " Aborting test." << std::endl;
1125  poiseulleTestResult = false;
1126  goto endTest;
1127  }
1128 
1129  ix::sys::ChDir("regression");
1130 
1131  if(myRank == 0)
1132  ix::sys::Remove("PlasCom2_000000010.h5");
1133 
1134  if(myRank == 0)
1135  std::cout << "Running dimensional PlasCom2..." << std::endl;
1136 
1137  returnValue = application::ApplicationDriver(simulationApplicationNonDimen2);
1138 
1139  if(myRank == 0)
1140  std::cout << "Done running dimensional PlasCom2." << std::endl;
1141 
1142  if(returnValue > 0){
1143  std::cout << testFunctionName << ": PlasCom2 returned error code ("
1144  << returnValue << "). Test failed." << std::endl;
1145  poiseulleTestResult = false;
1146  goto endTest;
1147  }
1148 
1149  if(!ix::sys::FILEEXISTS("PlasCom2_000000010.h5")){
1150  std::cout << testFunctionName << ": PlasCom2 failed to produce expected"
1151  << std::endl
1152  << "output file (PlasCom2_000000010.h5). Test failed." << std::endl;
1153  poiseulleTestResult = false;
1154  goto endTest;
1155  }
1156 
1157  ix::sys::ChDir("../");
1158 
1159  if(myRank == 0){
1160  std::cout << "Comparing results to expected result...";
1161  returnValue = plascom2::util::PC2Compare("regression/PlasCom2_000000010.h5",
1162  "accepted/accepted_poiseuille3d_nonDimen_10.h5",
1163  errorTolerance,compareStream);
1164  if(returnValue == 0)
1165  std::cout << "passed." << std::endl;
1166  else {
1167  std::cout << "failed." << std::endl;
1168  poiseulleTestResult = false;
1169  std::cout << testFunctionName << ": Resulting state "
1170  << "comparison yielded negative result:"
1171  << std::endl
1172  << compareStream.str()
1173  << std::endl;
1174  }
1175  }
1176  ix::sys::ChDir("../");
1177  }
1178  poiseulleTestResult = CheckResult(poiseulleTestResult,testComm);
1179 
1180  endTest:
1181  {
1183  ix::sys::ChDir(originalDirectory);
1184  parallelUnitResults.UpdateResult("PlasCom2:Viscid:Poiseuille3DZRegression",poiseulleTestResult);
1185  }
1186 
1187  return;
1188 
1189 }
1190 
1192  pcpp::CommunicatorType &testComm)
1193 {
1194 
1195  bool poiseulleTestResult = true;
1196 
1197  const std::string testFunctionName("TestPlasCom2_PF3DZRectilinear");
1198  const std::string testSuiteName("ViscidTest");
1199  const std::string testCaseName("Poiseuille3DZ");
1200  const std::string testDirectory(testSuiteName+"/"+testCaseName);
1201  const std::string originalDirectory(ix::sys::CWD());
1202  std::ostringstream compareStream;
1203  double errorTolerance = 5e-14;
1204  pcpp::CommunicatorType pc2Comm(testComm);
1205 
1206  int myRank = testComm.Rank();
1207 
1208  if(myRank == 0)
1209  std::cout << "Executing " << testFunctionName << std::endl;
1210 
1211  int argc = 4;
1212  const char *argv[] = {"plascom2x","-c","rectilinear.config",NULL};
1213 
1214  plascom2::application simulationApplicationNonDimen2(argc,const_cast<char **>(argv),
1215  pc2Comm.Comm());
1216  int returnValue = 0;
1217 
1218  if(!ix::sys::FILEEXISTS(testDirectory)){
1219  poiseulleTestResult = false;
1220  if(myRank == 0){
1221  std::cout << testFunctionName << ": testing directory ("
1222  << testDirectory << ") did not exist. Aborting test."
1223  << std::endl;
1224  }
1225  goto endTest;
1226  }
1227 
1228  ix::sys::ChDir(testDirectory);
1229 
1230  // nonDimensional run using PlasComCM non-dimensionalization
1231  {
1232  ix::sys::ChDir("nonDimen");
1233 
1234  if(!ix::sys::FILEEXISTS("accepted/accepted_poiseuille3d_nonDimen_10.h5")){
1235  if(myRank == 0)
1236  std::cout << testFunctionName << ": Accepted solution file ("
1237  << "accepted/accepted_poiseuille3d_nonDimen_10.h5) not found."
1238  << " Aborting test." << std::endl;
1239  poiseulleTestResult = false;
1240  goto endTest;
1241  }
1242 
1243  ix::sys::ChDir("regression");
1244 
1245  if(myRank == 0){
1246  if(ix::sys::FILEEXISTS("PlasCom2_000000010.h5"))
1247  ix::sys::Remove("PlasCom2_000000010.h5");
1248  std::cout << "Running dimensional PlasCom2..." << std::endl;
1249  }
1250  testComm.Barrier();
1251 
1252  returnValue = application::ApplicationDriver(simulationApplicationNonDimen2);
1253 
1254  if(myRank == 0)
1255  std::cout << "Done running dimensional PlasCom2." << std::endl;
1256 
1257  if(returnValue > 0){
1258  std::cout << testFunctionName << ": PlasCom2 returned error code ("
1259  << returnValue << "). Test failed." << std::endl;
1260  poiseulleTestResult = false;
1261  goto endTest;
1262  }
1263 
1264  if(!ix::sys::FILEEXISTS("PlasCom2_000000010.h5")){
1265  std::cout << testFunctionName << ": PlasCom2 failed to produce expected"
1266  << std::endl
1267  << "output file (PlasCom2_000000010.h5). Test failed." << std::endl;
1268  poiseulleTestResult = false;
1269  goto endTest;
1270  }
1271 
1272  ix::sys::ChDir("../");
1273 
1274  if(myRank == 0){
1275  std::cout << "Comparing results to expected result...";
1276  returnValue = plascom2::util::PC2Compare("regression/PlasCom2_000000010.h5",
1277  "accepted/accepted_poiseuille3d_nonDimen_10.h5",
1278  errorTolerance,compareStream);
1279  if(returnValue == 0)
1280  std::cout << "passed." << std::endl;
1281  else {
1282  std::cout << "failed." << std::endl;
1283  poiseulleTestResult = false;
1284  std::cout << testFunctionName << ": Resulting state "
1285  << "comparison yielded negative result:"
1286  << std::endl
1287  << compareStream.str()
1288  << std::endl;
1289  }
1290  }
1291  ix::sys::ChDir("../");
1292  }
1293  poiseulleTestResult = CheckResult(poiseulleTestResult,testComm);
1294 
1295  endTest:
1296  {
1298  ix::sys::ChDir(originalDirectory);
1299  parallelUnitResults.UpdateResult("PlasCom2:Viscid:PF3DZRectilinear",poiseulleTestResult);
1300  }
1301 
1302  testComm.Barrier();
1303  return;
1304 
1305 }
1306 
1308  pcpp::CommunicatorType &testComm)
1309 {
1310 
1311  bool poiseulleTestResult = true;
1312 
1313  const std::string testFunctionName("TestPlasCom2_PF3DZCurvilinear");
1314  const std::string testSuiteName("ViscidTest");
1315  const std::string testCaseName("Poiseuille3DZ");
1316  const std::string testDirectory(testSuiteName+"/"+testCaseName);
1317  const std::string originalDirectory(ix::sys::CWD());
1318  std::ostringstream compareStream;
1319  double errorTolerance = 5e-14;
1320 
1321  int myRank = testComm.Rank();
1322 
1323  if(myRank == 0)
1324  std::cout << "Executing " << testFunctionName << std::endl;
1325 
1326  int argc = 4;
1327  const char *argv[] = {"plascom2x","-c","curvilinear.config",NULL};
1328 
1329  plascom2::application simulationApplicationNonDimen2(argc,const_cast<char **>(argv),
1330  testComm.Comm());
1331  int returnValue = 0;
1332 
1333  if(!ix::sys::FILEEXISTS(testDirectory)){
1334  poiseulleTestResult = false;
1335  if(myRank == 0){
1336  std::cout << testFunctionName << ": testing directory ("
1337  << testDirectory << ") did not exist. Aborting test."
1338  << std::endl;
1339  }
1340  goto endTest;
1341  }
1342 
1343  ix::sys::ChDir(testDirectory);
1344 
1345  // nonDimensional run using PlasComCM non-dimensionalization
1346  {
1347  ix::sys::ChDir("nonDimen");
1348 
1349  if(!ix::sys::FILEEXISTS("accepted/accepted_poiseuille3d_nonDimen_10.h5")){
1350  if(myRank == 0)
1351  std::cout << testFunctionName << ": Accepted solution file ("
1352  << "accepted/accepted_poiseuille3d_nonDimen_10.h5) not found."
1353  << " Aborting test." << std::endl;
1354  poiseulleTestResult = false;
1355  goto endTest;
1356  }
1357 
1358  ix::sys::ChDir("regression");
1359 
1360  if(myRank == 0){
1361  if(ix::sys::FILEEXISTS("PlasCom2_000000010.h5"))
1362  ix::sys::Remove("PlasCom2_000000010.h5");
1363  std::cout << "Running dimensional PlasCom2..." << std::endl;
1364  }
1365  testComm.Barrier();
1366 
1367  returnValue = application::ApplicationDriver(simulationApplicationNonDimen2);
1368 
1369  if(myRank == 0)
1370  std::cout << "Done running dimensional PlasCom2." << std::endl;
1371 
1372  if(returnValue > 0){
1373  std::cout << testFunctionName << ": PlasCom2 returned error code ("
1374  << returnValue << "). Test failed." << std::endl;
1375  poiseulleTestResult = false;
1376  goto endTest;
1377  }
1378 
1379  if(!ix::sys::FILEEXISTS("PlasCom2_000000010.h5")){
1380  std::cout << testFunctionName << ": PlasCom2 failed to produce expected"
1381  << std::endl
1382  << "output file (PlasCom2_000000010.h5). Test failed." << std::endl;
1383  poiseulleTestResult = false;
1384  goto endTest;
1385  }
1386 
1387  ix::sys::ChDir("../");
1388 
1389  if(myRank == 0){
1390  std::cout << "Comparing results to expected result...";
1391  returnValue = plascom2::util::PC2Compare("regression/PlasCom2_000000010.h5",
1392  "accepted/accepted_poiseuille3d_nonDimen_10.h5",
1393  errorTolerance,compareStream);
1394  if(returnValue == 0)
1395  std::cout << "passed." << std::endl;
1396  else {
1397  std::cout << "failed." << std::endl;
1398  poiseulleTestResult = false;
1399  std::cout << testFunctionName << ": Resulting state "
1400  << "comparison yielded negative result:"
1401  << std::endl
1402  << compareStream.str()
1403  << std::endl;
1404  }
1405  }
1406  ix::sys::ChDir("../");
1407  }
1408  poiseulleTestResult = CheckResult(poiseulleTestResult,testComm);
1409 
1410  endTest:
1411  {
1413  ix::sys::ChDir(originalDirectory);
1414  parallelUnitResults.UpdateResult("PlasCom2:Viscid:PF3DZCurvilinear",poiseulleTestResult);
1415  }
1416 
1417  testComm.Barrier();
1418  return;
1419 
1420 }
1421 
1423  pcpp::CommunicatorType &testComm)
1424 {
1425 
1426  bool viscousShockTestResult = true;
1427 
1428  const std::string testFunctionName("TestPlasCom2_ViscousShock2DY");
1429  const std::string testSuiteName("ViscidTest");
1430  const std::string testCaseName("ViscousShock2DY");
1431  const std::string testDirectory(testSuiteName+"/"+testCaseName);
1432  const std::string originalDirectory(ix::sys::CWD());
1433  std::ostringstream compareStream;
1434  double errorTolerance = 5e-14;
1435 
1436  int myRank = testComm.Rank();
1437 
1438  if(myRank == 0)
1439  std::cout << "Executing " << testFunctionName << std::endl;
1440 
1441  int argc = 4;
1442  const char *argv[] = {"plascom2x","-c","shock.test.config",NULL};
1443 
1444  // plascom2::application simulationApplicationDimen(argc,const_cast<char **>(argv),
1445  // testComm.Comm());
1446 
1447  plascom2::application simulationApplicationNonDimen2(argc,const_cast<char **>(argv),
1448  testComm.Comm());
1449  int returnValue = 0;
1450 
1451  if(!ix::sys::FILEEXISTS(testDirectory)){
1452  viscousShockTestResult = false;
1453  if(myRank == 0){
1454  std::cout << testFunctionName << ": testing directory ("
1455  << testDirectory << ") did not exist. Aborting test."
1456  << std::endl;
1457  }
1458  goto endTest;
1459  }
1460 
1461  ix::sys::ChDir(testDirectory);
1462 
1463  // nonDimensional run using PlasComCM non-dimensionalization
1464  {
1465  ix::sys::ChDir("nonDimen");
1466 
1467  if(!ix::sys::FILEEXISTS("accepted/accepted_shock2d_nd_1000.h5")){
1468  if(myRank == 0)
1469  std::cout << testFunctionName << ": Accepted solution file ("
1470  << "accepted/accepted_shock2d_nd_1000.h5) not found."
1471  << " Aborting test." << std::endl;
1472  viscousShockTestResult = false;
1473  goto endTest;
1474  }
1475 
1476  ix::sys::ChDir("regression");
1477 
1478  if(myRank == 0)
1479  ix::sys::Remove("PlasCom2_000001000.h5");
1480 
1481  if(myRank == 0)
1482  std::cout << "Running nonDimensional PlasCom2..." << std::endl;
1483  testComm.Barrier();
1484 
1485  returnValue = application::ApplicationDriver(simulationApplicationNonDimen2);
1486 
1487  if(myRank == 0)
1488  std::cout << "Done running nonDimensional PlasCom2." << std::endl;
1489 
1490  if(returnValue > 0){
1491  std::cout << testFunctionName << ": PlasCom2 returned error code ("
1492  << returnValue << "). Test failed." << std::endl;
1493  viscousShockTestResult = false;
1494  goto endTest;
1495  }
1496 
1497  if(!ix::sys::FILEEXISTS("PlasCom2_000001000.h5")){
1498  std::cout << testFunctionName << ": PlasCom2 failed to produce expected"
1499  << std::endl
1500  << "output file (PlasCom2_000001000.h5). Test failed." << std::endl;
1501  viscousShockTestResult = false;
1502  goto endTest;
1503  }
1504 
1505  ix::sys::ChDir("../");
1506 
1507  if(myRank == 0){
1508  std::cout << "Comparing results to expected result...";
1509  returnValue = plascom2::util::PC2Compare("regression/PlasCom2_000001000.h5",
1510  "accepted/accepted_shock2d_nd_1000.h5",
1511  errorTolerance,compareStream);
1512  if(returnValue == 0)
1513  std::cout << "passed." << std::endl;
1514  else {
1515  std::cout << "failed." << std::endl;
1516  viscousShockTestResult = false;
1517  std::cout << testFunctionName << ": Resulting state "
1518  << "comparison yielded negative result:"
1519  << std::endl
1520  << compareStream.str()
1521  << std::endl;
1522  }
1523  }
1524  ix::sys::ChDir("../");
1525  }
1526  viscousShockTestResult = CheckResult(viscousShockTestResult,testComm);
1527 
1528  endTest:
1529  {
1531  ix::sys::ChDir(originalDirectory);
1532  parallelUnitResults.UpdateResult("PlasCom2:Viscid:Shock2DYRegression",viscousShockTestResult);
1533  }
1534 
1535  return;
1536 
1537 }
1538 
1540  pcpp::CommunicatorType &testComm)
1541 {
1542 
1543  bool viscousShockTestResult = true;
1544 
1545  const std::string testFunctionName("TestPlasCom2_VSRectilinear2DY");
1546  const std::string testSuiteName("ViscidTest");
1547  const std::string testCaseName("ViscousShock2DY");
1548  const std::string testDirectory(testSuiteName+"/"+testCaseName);
1549  const std::string originalDirectory(ix::sys::CWD());
1550  std::ostringstream compareStream;
1551  double errorTolerance = 5e-14;
1552 
1553  int myRank = testComm.Rank();
1554 
1555  if(myRank == 0)
1556  std::cout << "Executing " << testFunctionName << std::endl;
1557 
1558  int argc = 4;
1559  const char *argv[] = {"plascom2x","-c","rectilinear.config",NULL};
1560 
1561  plascom2::application simulationApplicationNonDimen2(argc,const_cast<char **>(argv),
1562  testComm.Comm());
1563  int returnValue = 0;
1564 
1565  if(!ix::sys::FILEEXISTS(testDirectory)){
1566  viscousShockTestResult = false;
1567  if(myRank == 0){
1568  std::cout << testFunctionName << ": testing directory ("
1569  << testDirectory << ") did not exist. Aborting test."
1570  << std::endl;
1571  }
1572  goto endTest;
1573  }
1574 
1575  ix::sys::ChDir(testDirectory);
1576 
1577  // nonDimensional run using PlasComCM non-dimensionalization
1578  {
1579  ix::sys::ChDir("nonDimen");
1580 
1581  if(!ix::sys::FILEEXISTS("accepted/accepted_shock2d_nd_1000.h5")){
1582  if(myRank == 0)
1583  std::cout << testFunctionName << ": Accepted solution file ("
1584  << "accepted/accepted_shock2d_nd_1000.h5) not found."
1585  << " Aborting test." << std::endl;
1586  viscousShockTestResult = false;
1587  goto endTest;
1588  }
1589 
1590  ix::sys::ChDir("regression");
1591 
1592  if(myRank == 0){
1593  if(ix::sys::FILEEXISTS("PlasCom2_000001000.h5"))
1594  ix::sys::Remove("PlasCom2_000001000.h5");
1595  std::cout << "Running nonDimensional PlasCom2..." << std::endl;
1596  }
1597 
1598  testComm.Barrier();
1599 
1600  returnValue = application::ApplicationDriver(simulationApplicationNonDimen2);
1601 
1602  testComm.Barrier();
1603 
1604  if(myRank == 0)
1605  std::cout << "Done running nonDimensional PlasCom2." << std::endl;
1606 
1607  if(returnValue > 0){
1608  std::cout << testFunctionName << ": PlasCom2 returned error code ("
1609  << returnValue << "). Test failed." << std::endl;
1610  viscousShockTestResult = false;
1611  goto endTest;
1612  }
1613 
1614  if(!ix::sys::FILEEXISTS("PlasCom2_000001000.h5")){
1615  std::cout << testFunctionName << ": PlasCom2 failed to produce expected"
1616  << std::endl
1617  << "output file (PlasCom2_000001000.h5). Test failed." << std::endl;
1618  viscousShockTestResult = false;
1619  goto endTest;
1620  }
1621 
1622  ix::sys::ChDir("../");
1623 
1624  if(myRank == 0){
1625  std::cout << "Comparing results to expected result...";
1626  returnValue = plascom2::util::PC2Compare("regression/PlasCom2_000001000.h5",
1627  "accepted/accepted_shock2d_nd_1000.h5",
1628  errorTolerance,compareStream);
1629  if(returnValue == 0)
1630  std::cout << "passed." << std::endl;
1631  else {
1632  std::cout << "failed." << std::endl;
1633  viscousShockTestResult = false;
1634  std::cout << testFunctionName << ": Resulting state "
1635  << "comparison yielded negative result:"
1636  << std::endl
1637  << compareStream.str()
1638  << std::endl;
1639  }
1640  }
1641  ix::sys::ChDir("../");
1642  }
1643  viscousShockTestResult = CheckResult(viscousShockTestResult,testComm);
1644 
1645  endTest:
1646  {
1648  ix::sys::ChDir(originalDirectory);
1649  parallelUnitResults.UpdateResult("PlasCom2:Viscid:VSRectilinear2DY",viscousShockTestResult);
1650  }
1651 
1652  testComm.Barrier();
1653 
1654  return;
1655 
1656 }
1657 
1659  pcpp::CommunicatorType &testComm)
1660 {
1661 
1662  bool viscousShockTestResult = true;
1663 
1664  const std::string testFunctionName("TestPlasCom2_VSCurvilinear2DY");
1665  const std::string testSuiteName("ViscidTest");
1666  const std::string testCaseName("ViscousShock2DY");
1667  const std::string testDirectory(testSuiteName+"/"+testCaseName);
1668  const std::string originalDirectory(ix::sys::CWD());
1669  std::ostringstream compareStream;
1670  double errorTolerance = 5e-14;
1671 
1672  int myRank = testComm.Rank();
1673 
1674  if(myRank == 0)
1675  std::cout << "Executing " << testFunctionName << std::endl;
1676 
1677  int argc = 4;
1678  const char *argv[] = {"plascom2x","-c","curvilinear.config",NULL};
1679 
1680  plascom2::application simulationApplicationNonDimen2(argc,const_cast<char **>(argv),
1681  testComm.Comm());
1682  int returnValue = 0;
1683 
1684  if(!ix::sys::FILEEXISTS(testDirectory)){
1685  viscousShockTestResult = false;
1686  if(myRank == 0){
1687  std::cout << testFunctionName << ": testing directory ("
1688  << testDirectory << ") did not exist. Aborting test."
1689  << std::endl;
1690  }
1691  goto endTest;
1692  }
1693 
1694  ix::sys::ChDir(testDirectory);
1695 
1696  // nonDimensional run using PlasComCM non-dimensionalization
1697  {
1698  ix::sys::ChDir("nonDimen");
1699 
1700  if(!ix::sys::FILEEXISTS("accepted/accepted_shock2d_nd_1000.h5")){
1701  if(myRank == 0)
1702  std::cout << testFunctionName << ": Accepted solution file ("
1703  << "accepted/accepted_shock2d_nd_1000.h5) not found."
1704  << " Aborting test." << std::endl;
1705  viscousShockTestResult = false;
1706  goto endTest;
1707  }
1708 
1709  ix::sys::ChDir("regression");
1710 
1711  if(myRank == 0){
1712  if(ix::sys::FILEEXISTS("PlasCom2_000001000.h5"))
1713  ix::sys::Remove("PlasCom2_000001000.h5");
1714  std::cout << "Running nonDimensional PlasCom2..." << std::endl;
1715  }
1716 
1717  testComm.Barrier();
1718 
1719  returnValue = application::ApplicationDriver(simulationApplicationNonDimen2);
1720 
1721  testComm.Barrier();
1722 
1723  if(myRank == 0)
1724  std::cout << "Done running nonDimensional PlasCom2." << std::endl;
1725 
1726  if(returnValue > 0){
1727  std::cout << testFunctionName << ": PlasCom2 returned error code ("
1728  << returnValue << "). Test failed." << std::endl;
1729  viscousShockTestResult = false;
1730  goto endTest;
1731  }
1732 
1733  if(!ix::sys::FILEEXISTS("PlasCom2_000001000.h5")){
1734  std::cout << testFunctionName << ": PlasCom2 failed to produce expected"
1735  << std::endl
1736  << "output file (PlasCom2_000001000.h5). Test failed." << std::endl;
1737  viscousShockTestResult = false;
1738  goto endTest;
1739  }
1740 
1741  ix::sys::ChDir("../");
1742 
1743  if(myRank == 0){
1744  std::cout << "Comparing results to expected result...";
1745  returnValue = plascom2::util::PC2Compare("regression/PlasCom2_000001000.h5",
1746  "accepted/accepted_shock2d_nd_1000.h5",
1747  errorTolerance,compareStream);
1748  if(returnValue == 0)
1749  std::cout << "passed." << std::endl;
1750  else {
1751  std::cout << "failed." << std::endl;
1752  viscousShockTestResult = false;
1753  std::cout << testFunctionName << ": Resulting state "
1754  << "comparison yielded negative result:"
1755  << std::endl
1756  << compareStream.str()
1757  << std::endl;
1758  }
1759  }
1760  ix::sys::ChDir("../");
1761  }
1762  viscousShockTestResult = CheckResult(viscousShockTestResult,testComm);
1763 
1764  endTest:
1765  {
1767  ix::sys::ChDir(originalDirectory);
1768  parallelUnitResults.UpdateResult("PlasCom2:Viscid:VSCurvilinear2DY",viscousShockTestResult);
1769  }
1770 
1771  testComm.Barrier();
1772 
1773  return;
1774 
1775 }
1776 
1778  pcpp::CommunicatorType &testComm)
1779 {
1780 
1781  bool viscousShockTestResult = true;
1782 
1783  const std::string testFunctionName("TestPlasCom2_ViscousShock3DZ");
1784  const std::string testSuiteName("ViscidTest");
1785  const std::string testCaseName("ViscousShock3DZ");
1786  const std::string testDirectory(testSuiteName+"/"+testCaseName);
1787  const std::string originalDirectory(ix::sys::CWD());
1788  std::ostringstream compareStream;
1789  double errorTolerance = 5e-14;
1790 
1791  int myRank = testComm.Rank();
1792 
1793  if(myRank == 0)
1794  std::cout << "Executing " << testFunctionName << std::endl;
1795 
1796  int argc = 4;
1797  const char *argv[] = {"plascom2x","-c","shock.test.config",NULL};
1798 
1799  pcpp::CommunicatorType pc2Comm(testComm);
1800  plascom2::application simulationApplication(argc,const_cast<char **>(argv),pc2Comm.Comm());
1801 
1802  int returnValue = 0;
1803 
1804  if(!ix::sys::FILEEXISTS(testDirectory)){
1805  viscousShockTestResult = false;
1806  if(myRank == 0){
1807  std::cout << testFunctionName << ": testing directory ("
1808  << testDirectory << ") did not exist. Aborting test."
1809  << std::endl;
1810  }
1811  goto endTest;
1812  }
1813 
1814  ix::sys::ChDir(testDirectory);
1815 
1816  // nonDimensional run using PlasComCM non-dimensionalization
1817  {
1818  ix::sys::ChDir("nonDimen");
1819 
1820  if(!ix::sys::FILEEXISTS("accepted/accepted_shock3d_nd_100.h5")){
1821  if(myRank == 0)
1822  std::cout << testFunctionName << ": Accepted solution file ("
1823  << "accepted/accepted_shock3d_nd_100.h5) not found."
1824  << " Aborting test." << std::endl;
1825  viscousShockTestResult = false;
1826  goto endTest;
1827  }
1828 
1829  ix::sys::ChDir("regression");
1830 
1831  if(myRank == 0)
1832  ix::sys::Remove("PlasCom2_000000100.h5");
1833  testComm.Barrier();
1834  if(myRank == 0)
1835  std::cout << "Running nonDimensional PlasCom2..." << std::endl;
1836 
1837  returnValue = application::ApplicationDriver(simulationApplication);
1838 
1839  if(myRank == 0)
1840  std::cout << "Done running nonDimensional PlasCom2." << std::endl;
1841 
1842  testComm.Barrier();
1843 
1844  if(returnValue > 0){
1845  std::cout << testFunctionName << ": PlasCom2 returned error code ("
1846  << returnValue << "). Test failed." << std::endl;
1847  viscousShockTestResult = false;
1848  }
1849 
1850  viscousShockTestResult = CheckResult(viscousShockTestResult,testComm);
1851 
1852  if(!viscousShockTestResult)
1853  goto endTest;
1854 
1855  if(!ix::sys::FILEEXISTS("PlasCom2_000000100.h5")){
1856  std::cout << testFunctionName << ": PlasCom2 failed to produce expected"
1857  << std::endl
1858  << "output file (PlasCom2_000000100.h5). Test failed." << std::endl;
1859  viscousShockTestResult = false;
1860  goto endTest;
1861  }
1862 
1863  ix::sys::ChDir("../");
1864 
1865  if(myRank == 0){
1866  std::cout << "Comparing results to expected result...";
1867  returnValue = plascom2::util::PC2Compare("regression/PlasCom2_000000100.h5",
1868  "accepted/accepted_shock3d_nd_100.h5",
1869  errorTolerance,compareStream);
1870  if(returnValue == 0)
1871  std::cout << "passed." << std::endl;
1872  else {
1873  std::cout << "failed." << std::endl;
1874  viscousShockTestResult = false;
1875  std::cout << testFunctionName << ": Resulting state "
1876  << "comparison yielded negative result:"
1877  << std::endl
1878  << compareStream.str()
1879  << std::endl;
1880  }
1881  }
1882 
1883  ix::sys::ChDir("../");
1884  }
1885 
1886  viscousShockTestResult = CheckResult(viscousShockTestResult,testComm);
1887 
1888  endTest:
1889  {
1890 
1892  ix::sys::ChDir(originalDirectory);
1893  parallelUnitResults.UpdateResult("PlasCom2:Viscid:Shock3DZRegression",viscousShockTestResult);
1894  }
1895 
1896  return;
1897 
1898 }
1899 
1901  pcpp::CommunicatorType &testComm)
1902 {
1903 
1904  bool viscousShockTestResult = true;
1905 
1906  const std::string testFunctionName("TestPlasCom2_VSRectilinear3DZ");
1907  const std::string testSuiteName("ViscidTest");
1908  const std::string testCaseName("ViscousShock3DZ");
1909  const std::string testDirectory(testSuiteName+"/"+testCaseName);
1910  const std::string originalDirectory(ix::sys::CWD());
1911  std::ostringstream compareStream;
1912  double errorTolerance = 5e-14;
1913 
1914  int myRank = testComm.Rank();
1915 
1916  if(myRank == 0)
1917  std::cout << "Executing " << testFunctionName << std::endl;
1918 
1919  int argc = 4;
1920  const char *argv[] = {"plascom2x","-c","rectilinear.config",NULL};
1921 
1922  pcpp::CommunicatorType pc2Comm(testComm);
1923  plascom2::application simulationApplication(argc,const_cast<char **>(argv),pc2Comm.Comm());
1924 
1925  int returnValue = 0;
1926 
1927  if(!ix::sys::FILEEXISTS(testDirectory)){
1928  viscousShockTestResult = false;
1929  if(myRank == 0){
1930  std::cout << testFunctionName << ": testing directory ("
1931  << testDirectory << ") did not exist. Aborting test."
1932  << std::endl;
1933  }
1934  goto endTest;
1935  }
1936 
1937  ix::sys::ChDir(testDirectory);
1938 
1939  // nonDimensional run using PlasComCM non-dimensionalization
1940  {
1941  ix::sys::ChDir("nonDimen");
1942 
1943  if(!ix::sys::FILEEXISTS("accepted/accepted_shock3d_nd_100.h5")){
1944  if(myRank == 0)
1945  std::cout << testFunctionName << ": Accepted solution file ("
1946  << "accepted/accepted_shock3d_nd_100.h5) not found."
1947  << " Aborting test." << std::endl;
1948  viscousShockTestResult = false;
1949  goto endTest;
1950  }
1951 
1952  ix::sys::ChDir("regression");
1953 
1954  if(myRank == 0){
1955  if(ix::sys::FILEEXISTS("PlasCom2_000000100.h5"))
1956  ix::sys::Remove("PlasCom2_000000100.h5");
1957  std::cout << "Running nonDimensional PlasCom2..." << std::endl;
1958  }
1959 
1960  testComm.Barrier();
1961 
1962  returnValue = application::ApplicationDriver(simulationApplication);
1963 
1964  testComm.Barrier();
1965 
1966  if(myRank == 0)
1967  std::cout << "Done running nonDimensional PlasCom2." << std::endl;
1968 
1969  testComm.Barrier();
1970 
1971  if(returnValue > 0){
1972  std::cout << testFunctionName << ": PlasCom2 returned error code ("
1973  << returnValue << "). Test failed." << std::endl;
1974  viscousShockTestResult = false;
1975  }
1976 
1977  viscousShockTestResult = CheckResult(viscousShockTestResult,testComm);
1978 
1979  if(!viscousShockTestResult)
1980  goto endTest;
1981 
1982  if(!ix::sys::FILEEXISTS("PlasCom2_000000100.h5")){
1983  std::cout << testFunctionName << ": PlasCom2 failed to produce expected"
1984  << std::endl
1985  << "output file (PlasCom2_000000100.h5). Test failed." << std::endl;
1986  viscousShockTestResult = false;
1987  goto endTest;
1988  }
1989 
1990  ix::sys::ChDir("../");
1991 
1992  if(myRank == 0){
1993  std::cout << "Comparing results to expected result...";
1994  returnValue = plascom2::util::PC2Compare("regression/PlasCom2_000000100.h5",
1995  "accepted/accepted_shock3d_nd_100.h5",
1996  errorTolerance,compareStream);
1997  if(returnValue == 0)
1998  std::cout << "passed." << std::endl;
1999  else {
2000  std::cout << "failed." << std::endl;
2001  viscousShockTestResult = false;
2002  std::cout << testFunctionName << ": Resulting state "
2003  << "comparison yielded negative result:"
2004  << std::endl
2005  << compareStream.str()
2006  << std::endl;
2007  }
2008  }
2009 
2010  ix::sys::ChDir("../");
2011  }
2012 
2013  viscousShockTestResult = CheckResult(viscousShockTestResult,testComm);
2014 
2015  endTest:
2016  {
2017 
2019  ix::sys::ChDir(originalDirectory);
2020  parallelUnitResults.UpdateResult("PlasCom2:Viscid:VSRectilinear3DZ",viscousShockTestResult);
2021  }
2022 
2023  testComm.Barrier();
2024  return;
2025 
2026 }
2027 
2029  pcpp::CommunicatorType &testComm)
2030 {
2031 
2032  bool viscousShockTestResult = true;
2033 
2034  const std::string testFunctionName("TestPlasCom2_VSCurvilinear3DZ");
2035  const std::string testSuiteName("ViscidTest");
2036  const std::string testCaseName("ViscousShock3DZ");
2037  const std::string testDirectory(testSuiteName+"/"+testCaseName);
2038  const std::string originalDirectory(ix::sys::CWD());
2039  std::ostringstream compareStream;
2040  double errorTolerance = 5e-14;
2041 
2042  int myRank = testComm.Rank();
2043 
2044  if(myRank == 0)
2045  std::cout << "Executing " << testFunctionName << std::endl;
2046 
2047  int argc = 4;
2048  const char *argv[] = {"plascom2x","-c","curvilinear.config",NULL};
2049 
2050  pcpp::CommunicatorType pc2Comm(testComm);
2051  plascom2::application simulationApplication(argc,const_cast<char **>(argv),pc2Comm.Comm());
2052 
2053  int returnValue = 0;
2054 
2055  if(!ix::sys::FILEEXISTS(testDirectory)){
2056  viscousShockTestResult = false;
2057  if(myRank == 0){
2058  std::cout << testFunctionName << ": testing directory ("
2059  << testDirectory << ") did not exist. Aborting test."
2060  << std::endl;
2061  }
2062  goto endTest;
2063  }
2064 
2065  ix::sys::ChDir(testDirectory);
2066 
2067  // nonDimensional run using PlasComCM non-dimensionalization
2068  {
2069  ix::sys::ChDir("nonDimen");
2070 
2071  if(!ix::sys::FILEEXISTS("accepted/accepted_shock3d_nd_100.h5")){
2072  if(myRank == 0)
2073  std::cout << testFunctionName << ": Accepted solution file ("
2074  << "accepted/accepted_shock3d_nd_100.h5) not found."
2075  << " Aborting test." << std::endl;
2076  viscousShockTestResult = false;
2077  goto endTest;
2078  }
2079 
2080  ix::sys::ChDir("regression");
2081 
2082  if(myRank == 0){
2083  if(ix::sys::FILEEXISTS("PlasCom2_000000100.h5"))
2084  ix::sys::Remove("PlasCom2_000000100.h5");
2085  std::cout << "Running nonDimensional PlasCom2..." << std::endl;
2086  }
2087 
2088  testComm.Barrier();
2089 
2090  returnValue = application::ApplicationDriver(simulationApplication);
2091 
2092  testComm.Barrier();
2093 
2094  if(myRank == 0)
2095  std::cout << "Done running nonDimensional PlasCom2." << std::endl;
2096 
2097  testComm.Barrier();
2098 
2099  if(returnValue > 0){
2100  std::cout << testFunctionName << ": PlasCom2 returned error code ("
2101  << returnValue << "). Test failed." << std::endl;
2102  viscousShockTestResult = false;
2103  }
2104 
2105  viscousShockTestResult = CheckResult(viscousShockTestResult,testComm);
2106 
2107  if(!viscousShockTestResult)
2108  goto endTest;
2109 
2110  if(!ix::sys::FILEEXISTS("PlasCom2_000000100.h5")){
2111  std::cout << testFunctionName << ": PlasCom2 failed to produce expected"
2112  << std::endl
2113  << "output file (PlasCom2_000000100.h5). Test failed." << std::endl;
2114  viscousShockTestResult = false;
2115  goto endTest;
2116  }
2117 
2118  ix::sys::ChDir("../");
2119 
2120  if(myRank == 0){
2121  std::cout << "Comparing results to expected result...";
2122  returnValue = plascom2::util::PC2Compare("regression/PlasCom2_000000100.h5",
2123  "accepted/accepted_shock3d_nd_100.h5",
2124  errorTolerance,compareStream);
2125  if(returnValue == 0)
2126  std::cout << "passed." << std::endl;
2127  else {
2128  std::cout << "failed." << std::endl;
2129  viscousShockTestResult = false;
2130  std::cout << testFunctionName << ": Resulting state "
2131  << "comparison yielded negative result:"
2132  << std::endl
2133  << compareStream.str()
2134  << std::endl;
2135  }
2136  }
2137 
2138  ix::sys::ChDir("../");
2139  }
2140 
2141  viscousShockTestResult = CheckResult(viscousShockTestResult,testComm);
2142 
2143  endTest:
2144  {
2145 
2147  ix::sys::ChDir(originalDirectory);
2148  parallelUnitResults.UpdateResult("PlasCom2:Viscid:VSCurvilinear3DZ",viscousShockTestResult);
2149  }
2150 
2151  testComm.Barrier();
2152  return;
2153 
2154 }
void TestPlasCom2_VSCurvilinear2DY_Regression(ix::test::results &parallelUnitResults, pcpp::CommunicatorType &testComm)
void TestPlasCom2_PFRectilinear2DX_Regression(ix::test::results &parallelUnitResults, pcpp::CommunicatorType &testComm)
simulation::grid::parallel_blockstructured pbsgrid_t
int ApplicationDriver(ApplicationType &simulationApplication)
void TestPlasCom2_VSCurvilinear2DX_Regression(ix::test::results &parallelUnitResults, pcpp::CommunicatorType &testComm)
simulation::state::base state_t
void TestPlasCom2_Poiseuille2DY_Regression(ix::test::results &parallelUnitResults, pcpp::CommunicatorType &testComm)
int Remove(const std::string &fname)
Definition: UnixUtils.C:141
void TestPlasCom2_PFCurvilinear2DY_Regression(ix::test::results &parallelUnitResults, pcpp::CommunicatorType &testComm)
std::vector< DomainBaseType > domainvector
Definition: Simulation.H:32
void TestPlasCom2_VSRectilinear3DZ_Regression(ix::test::results &parallelUnitResults, pcpp::CommunicatorType &testComm)
void TestPlasCom2_ViscousShock3DZ_Regression(ix::test::results &parallelUnitResults, pcpp::CommunicatorType &testComm)
int PC2Compare(const std::string &redFileName, const std::string &blueFileName, double errTolerance, std::ostream &outStream)
Read two HDF5 files and compare the state data therein.
Definition: PC2Util.C:30
bool CheckResult(bool &localResult, pcpp::CommunicatorType &testComm)
Definition: PCPPCommUtil.C:176
int ChDir(const std::string &path)
Definition: UnixUtils.C:297
void TestPlasCom2_PFRectilinear3DZ_Regression(ix::test::results &parallelUnitResults, pcpp::CommunicatorType &testComm)
void TestPlasCom2_VSRectilinear2DY_Regression(ix::test::results &parallelUnitResults, pcpp::CommunicatorType &testComm)
void TestPlasCom2_VSRectilinear2DX_Regression(ix::test::results &parallelUnitResults, pcpp::CommunicatorType &testComm)
void TestPlasCom2_Poiseuille2DX_Regression(ix::test::results &parallelUnitResults, pcpp::CommunicatorType &testComm)
Encapsulating class for collections of test results.
Definition: Testing.H:18
void TestPlasCom2_ViscousShock2DX_Regression(ix::test::results &parallelUnitResults, pcpp::CommunicatorType &testComm)
bool FILEEXISTS(const std::string &fname)
Definition: UnixUtils.C:189
Main encapsulation of MPI.
Definition: COMM.H:62
Testing constructs for unit testing.
void TestPlasCom2_ViscousShock2DY_Regression(ix::test::results &parallelUnitResults, pcpp::CommunicatorType &testComm)
plascom2::application::domainvector DomainVector
const std::string CWD()
Definition: UnixUtils.C:291
void UpdateResult(const std::string &name, const ValueType &result)
Updates an existing test result.
Definition: Testing.H:55
void TestPlasCom2_PFCurvilinear2DX_Regression(ix::test::results &parallelUnitResults, pcpp::CommunicatorType &testComm)
void TestPlasCom2_PFCurvilinear3DZ_Regression(ix::test::results &parallelUnitResults, pcpp::CommunicatorType &testComm)
void TestPlasCom2_VSCurvilinear3DZ_Regression(ix::test::results &parallelUnitResults, pcpp::CommunicatorType &testComm)
void TestPlasCom2_Poiseuille3DZ_Regression(ix::test::results &parallelUnitResults, pcpp::CommunicatorType &testComm)
void TestPlasCom2_PFRectilinear2DY_Regression(ix::test::results &parallelUnitResults, pcpp::CommunicatorType &testComm)