PlasCom2  1.0
XPACC Multi-physics simluation application
RunMaxwellSolver.C
Go to the documentation of this file.
1 #include <iomanip>
2 
3 #include "PlasCom2.H"
4 #include "EulerRHS.H"
5 #include "RK4Advancer.H"
6 #include "PCPPCommUtil.H"
7 #include "PCPPReport.H"
8 #include "PCPPIntervalUtils.H"
9 #include "Initialization.H"
10 #include "MaxwellSolver.H"
11 #include "MaxwellUtil.H"
12 
13 #define EPS0 8.85418782e-12 // permittivity of free space [F/m]
14 #define MU0 1.25663706e-6 // permeability of free space [H/m]
15 
16 
17 
18 void ReportTimings(std::vector<std::vector<double> > &inTimers,const char **timerNames,
19  unsigned int nTimes,std::ostream &outStream);
20 
21 #ifdef USE_PAPI
22 void ReportCounters(long long **inCounters,const char **timerNames,
23  std::vector<std::string> &papiCounterNames,
24  unsigned int nTimes,std::ostream &outStream);
25 #endif
26 
28 {
29 
30  // typedef plascom2::operators::sbp::base operator_t;
31  typedef DomainBaseType::OperatorType operator_t;
36 
38 
39  std::ostringstream messageStream;
40 
41  int myRank = globalCommunicator.Rank();
43  numThreads = 1;
44 
45  // operator_t sbpOperator;
46 
47 
48  FunctionEntry("SimSetup");
49 
50  std::string &domainName(domainInfo.domainNames[0]);
51 
52  DomainBaseType &simDomain(appDomains[0]);
53  DomainBaseType::gridvector &simGrids(simDomain.Grids());
54  DomainBaseType::statevector &gridStates(simDomain.States());
55  DomainBaseType::statevector &gridParams(simDomain.Params());
56 
57  operator_t &sbpOperator(simDomain.Operator());
58 
59  // std::vector<grid_t *> &simGrids(simDomain.Grids());
60  grid_t &simGrid(*simGrids[0]);
61  state_t &simState(*gridStates[0]);
62  state_t &paramState(*gridParams[0]);
63 
64  // grid_t simGrid;
65  // state_t simState;
66  // state_t paramState;
67 
68  comm_t &domainCommunicator(simDomain.Communicator());
69 
70  const std::vector<std::string> &domainGridNames(simDomain.GridNames());
71  const std::string &gridName(domainGridNames[0]);
72 
73  int spatialOrder = simDomain.SpatialOrder();
74  int interiorOrder = (spatialOrder - 1)*2;
75 
76  StdOut(messageStream.str());
77  pcpp::io::RenewStream(messageStream);
78 
79  std::vector<size_t> &gridSizes(simGrid.GridSizes());
80 
81  pcpp::IndexIntervalType &partitionInterval(simGrid.PartitionInterval());
82  pcpp::IndexIntervalType &partitionBufferInterval(simGrid.PartitionBufferInterval());
83  halo_t &simHalo(simGrid.Halo());
84 
87  if(!Restart()) {
88 
89  FunctionEntry("InitSoln");
90 
91 // if(euler::util::InitializeQuiescentState(simGrid,simState,paramState,0)) {
92 // ErrOut("Could not initialize flow.\n");
93 // domainCommunicator.SetExit(1);
94 // }
95 
96  /* ======== Initialize in entire buffer ======== */
97  std::vector<double> EfieldAll(3, 0.0);
98  std::vector<double> BfieldAll(3, 0.0);
99  std::vector<double> JAll(3, 0.0);
100  double epsilonAll = EPS0;
101  double muAll = MU0;
102 
103  if(Maxwell::util::InitializeMaxwellStateConstFields(simGrid, simState, &EfieldAll[0], &BfieldAll[0], &JAll[0], epsilonAll, muAll, true))
104  {
105  ErrOut("Failed to initialize in entire buffer.\n");
106  domainCommunicator.SetExit(1);
107  }
108 
109  /* ======== Initialize in partition only ======== */
110 // std::vector<double> Efield(3, 1.0); Efield[1] = -2.0; Efield[2] = 3.0;
111 // std::vector<double> Bfield(3, -1.0); Bfield[1] = 2.0; Bfield[2] = -3.0;
112 // std::vector<double> J(3, 4.0); J[1] = -5.0; J[2] = 6.0;
113 // double epsilon = EPS0;
114 // double mu = MU0;
115 //
116 // if(Maxwell::util::InitializeMaxwellStateConstFields(simGrid, simState, &Efield[0], &Bfield[0], &J[0], epsilon, mu, false))
117 // {
118 // ErrOut("Failed to initialize in partition.\n");
119 // domainCommunicator.SetExit(1);
120 // }
121 
122  /* ======== Initialize parameters ======== */
123  double *CFLPtr = paramState.template GetFieldBuffer<double>("CFL");
124  double CFLValue = *CFLPtr;
125 
126  if(Maxwell::util::InitializeMaxwellParameters(simGrid, paramState, CFLValue))
127  {
128  ErrOut("Failed to initialize parameters.\n");
129  domainCommunicator.SetExit(1);
130  }
131 
132 
133  if(appConfig.IsSet(ConfigKey(simDomain.Name(),"Init:CaseName"))) {
134 
135  std::string initName(appConfig.GetValue(ConfigKey(simDomain.Name(),"Init:CaseName")));
136  std::string initKey(ConfigKey(ConfigKey(simDomain.Name(),"Init"),initName));
137  std::vector<double> initParams(appConfig.GetValueVector<double>(ConfigKey(initKey,"Params")));
138  std::vector<int> initFlags(appConfig.GetValueVector<int>(ConfigKey(initKey,"Flags")));
139 
140 
141  messageStream << "Initializing flow on Domain (" << simDomain.Name()
142  << ") with initialization case (" << initName << ")." << std::endl
143  << "Parameters: (";
144  pcpp::io::DumpContents(messageStream,initParams,",");
145  messageStream << ")" << std::endl
146  << "Flags: (";
147  pcpp::io::DumpContents(messageStream,initFlags,",");
148  messageStream << ")" << std::endl;
149  StdOut(messageStream.str(),2);
150  pcpp::io::RenewStream(messageStream);
151 
152  if(InitializeSolution(simGrid,simState,paramState,simDomain.DomainBoundary(0),
153  initName,initParams,initFlags,0)) {
154  ErrOut("Solution initialization failed.\n");
155  domainCommunicator.SetExit(1);
156  }
157 
158  }
159  FunctionExit("InitSoln");
160 
161  if(domainCommunicator.Check())
162  return(1);
163 
164  }
165 
166  /* ======== Set up the RHS ======== */
167  rhs_t MaxwellRHS;
168 
169  FunctionEntry("InitRHS");
170 
173  if(MaxwellRHS.Initialize(simGrid,simState,paramState,sbpOperator)) {
174  return(1);
175  }
176 
177  FunctionEntry("SetDomainBoundaries");
178  MaxwellRHS.SetDomainBoundaries(simDomain.DomainBoundary(0));
179  MaxwellRHS.SetDomainBCs(simDomain.BCs());
180  FunctionExit("SetDomainBoundaries");
181  simDomain.SetRHS(MaxwellRHS);
182 
183  FunctionExit("InitRHS");
184 
185 
186 
187  rk4advancer<domain_t> simAdvancer;
188 
189  FunctionEntry("InitAdvancer");
190  simAdvancer.InitializeAdvancer(simDomain,*this,messageStream);
191  FunctionExit("InitAdvancer");
192 
193  StdOut(messageStream.str(),2);
194  pcpp::io::RenewStream(messageStream);
195 
196 
197  // BEGIN OMP PARALLEL SECTION HERE
198 #ifdef USE_OMP
199  numThreads = omp_get_max_threads();
200 #endif
201 
202 #pragma omp parallel
203  {
204  int myThreadId = 0;
205  bool masterThread = true;
206 
207 #ifdef USE_OMP
208  myThreadId = omp_get_thread_num();
209  masterThread = (myThreadId == 0);
210 #endif
211 
212  // if(masterThread)
213  // SyncIO();
214 
215  //
217  //
218 
219 
220 #pragma omp barrier
221 
222  if(masterThread) {
223  StdOut("Partitioning grid among threads.\n",3);
224  }
225 
226  // Insert thread partitioning here
227  // - initialize RHS and grid thread intervals
228  std::vector<int> numThreadsDim;
229  if(simGrid.SetupThreads(numThreadsDim))
230  errorState = 1;
231  MaxwellRHS.InitThreadIntervals();
232 
233 #pragma omp barrier
234 
235  if(masterThread) {
236  StdOut("Partitioning grid among threads done.\n",3);
237  }
238 
239 
240  if(errorState)
241  ErrOut("Grid threading setup failed.\n");
242 
243 #pragma omp barrier
244 
245  if(masterThread) {
246  StdOut("Threads set up, syncing advancer intervals.\n",3);
247  }
248 
249  if(masterThread)
250  FunctionEntry("SyncIntervals");
251 
252 #pragma omp barrier
253 
254  simAdvancer.SyncIntervals();
255 
256 #pragma omp barrier
257 
258  if(masterThread) {
259  StdOut("Intervals sync'd, syncing states.\n",3);
260  }
261 
262  if(masterThread) {
263  FunctionExit("SyncIntervals");
264  FunctionEntry("SyncStates");
265  }
266 #pragma omp barrier
267 
268  simAdvancer.SyncStates();
269 
270 #pragma omp barrier
271 
272  if(masterThread) {
273  StdOut("States sync'd.\n",3);
274  }
275 
276  if(masterThread) {
277  FunctionExit("SyncStates");
278  FunctionExit("SimSetup");
279  }
280 
281 #pragma omp barrier
282 
283  if(masterThread) {
284  messageStream << "Running PlasCom2 with PBS grid with: " << std::endl
285  << "DomainName: " << domainName << std::endl
286  << "GridName: " << gridName << std::endl
287  << "GridSizes: (";
288  pcpp::io::DumpContents(messageStream,gridSizes,",");
289  messageStream << ")" << std::endl
290  << "Partition: ";
291  partitionInterval.PrettyPrint(messageStream);
292  messageStream << std::endl
293  << "Buffer Sizes: (";
294  pcpp::io::DumpContents(messageStream,simGrid.BufferSizes(),",");
295  messageStream << ")" << std::endl
296  << "PBI:";
297  partitionBufferInterval.PrettyPrint(messageStream);
298  messageStream << std::endl
299  << "Number of Threads: (";
300  pcpp::io::DumpContents(messageStream,numThreadsDim,",");
301  messageStream << ")" << std::endl << std::endl
302  << "SBP Order: " << interiorOrder << std::endl
303  << "Current Step: " << iStep << std::endl
304  << "NumStepsMax: " << numStepsMax << std::endl
305  << "NumStepsIO : " << numStepsIO << std::endl
306  << "NumStepsStat: " << numStepsStatus << std::endl;
307  StdOut(messageStream.str(),2);
308  pcpp::io::RenewStream(messageStream);
309  }
310 
311 
312 #pragma omp barrier
313 
314  if(masterThread) {
315  FunctionEntry("Stepping");
316  StdOut("Beginning stepping.\n",3);
317  }
318 
319 #pragma omp barrier
320 
321  /* ======== Time Stepping ======== */
322  // errorState = 0;
323  // int iStep = 0;
325  for(int iiStep = 0; iiStep < numStepsMax; iiStep++) {
326 
327  if(masterThread)
328  iStep = iiStep;
329 
330 #pragma omp barrier
331 
332  if(numStepsStatus > 0) {
333  if(!(iiStep%numStepsStatus)) {
334  if(masterThread) {
335  messageStream << "Step = " << iiStep << std::endl;
336  StdOut(messageStream.str(),1);
337  pcpp::io::RenewStream(messageStream);
338  }
339  }
340  }
341 
342  if(numStepsIO > 0) {
343  if(!(iiStep%numStepsIO)) {
344 
345 #pragma omp barrier
346 
347 // if(masterThread) {
348 // messageStream << "Computing DV before IO" << std::endl;
349 // StdOut(messageStream.str(),1);
350 // pcpp::io::RenewStream(messageStream);
351 // }
352 
353 // errorState = eulerRHS.ComputeDV(myThreadId);
354 
355 //#pragma omp barrier
356 
357 // if(errorState) {
358 // ErrOut("ComputeDV failed.\n");
359 // if(masterThread) {
360 // FunctionExit("Stepping");
361 // }
362 // break;
363 // }
364 
365  if(masterThread) {
366  messageStream << "Performing IO at step " << iiStep << std::endl;
367  StdOut(messageStream.str(),1);
368  pcpp::io::RenewStream(messageStream);
369 
370  FunctionEntry("IO");
372  FunctionExit("IO");
373  }
374 
375 #pragma omp barrier
376 
377  if(errorState) {
378  ErrOut("IO failed.\n");
379  if(masterThread) {
380  FunctionExit("Stepping");
381  }
382  break;
383  }
384 
385  }
386  }
387 
388 #pragma omp barrier
389 
390  if(masterThread) {
391  FunctionEntry("AdvanceDomain");
392  }
393 
394 
395  // This must be called for each domain being simulated
396  if(simAdvancer.AdvanceDomain()) {
397  ErrOut("Advancer failed:\n");
398  ErrOut(messageStream.str());
399  errorState = 1;
400  }
401 
402 #pragma omp barrier
403 
404  if(masterThread) {
405  FunctionExit("AdvanceDomain");
406  }
407 
408  if(errorState)
409  break;
410 
411 #pragma omp barrier
412 
413  if(masterThread) {
414  messageStream << "Computing DV" << std::endl;
415  StdOut(messageStream.str(),1);
416  pcpp::io::RenewStream(messageStream);
417  }
418 
419  errorState = MaxwellRHS.ComputeDV(myThreadId);
420 
421 #pragma omp barrier
422 
423  if(errorState) {
424  ErrOut("ComputeDV failed.\n");
425  if(masterThread) {
426  FunctionExit("Stepping");
427  }
428  break;
429  }
430 
431 
433  // if (domain.Status()) {
434  // Check on domain health and stopping condition
435  // }
436 
437  if(iiStep == 1) // this starts advancer timers after 2 steps
438  simAdvancer.SetTimers(true);
439 
440  #pragma omp barrier
441 
442  if(masterThread)
443  iStep++;
444 
445  }
446 
447 #pragma omp barrier
448  } // End OMP parallel section
449 
450  // Important: reset grid/rhs thread environment
451  simGrid.SetNumThreads(1);
452  MaxwellRHS.InitThreadIntervals();
453 
454  int myThreadId = 0;
455 
456  if(errorState)
457  return(1);
458 
459  FunctionExit("Stepping");
460 
461  messageStream << "Ending at step " << iStep << std::endl;
462  StdOut(messageStream.str());
463  pcpp::io::RenewStream(messageStream);
464 
465  // Check domain status to see if IO should be done
466 // messageStream << "Computing DV before final IO" << std::endl;
467 // StdOut(messageStream.str(),1);
468 // pcpp::io::RenewStream(messageStream);
469 
470 // FunctionEntry("IO");
471 // errorState = eulerRHS.ComputeDV(myThreadId);
472 // FunctionExit("IO");
473 
474 // if(errorState) {
475 // ErrOut("EulerPBSPeriodic: ComputeDV failed.\n");
476 // }
477 
478  messageStream << "Writing final dump." << std::endl;
479  StdOut(messageStream.str(),1);
480  pcpp::io::RenewStream(messageStream);
482 
483  if(errorState)
484  return(1);
485 
486  double *processTimes;
487  unsigned int nTimes;
488  std::vector<std::vector<double> > parallelTimes;
489  std::vector<std::vector<long long> > parallelCounts;
490  const char **timerNames;
491  simAdvancer.GetTimers(&processTimes,&timerNames,&nTimes);
492  pcpp::comm::ReduceTimers(processTimes,nTimes,parallelTimes,globalCommunicator);
493  if(myRank == 0) {
494  std::ostringstream profileStream;
495  ReportTimings(parallelTimes,timerNames,nTimes,profileStream);
496  StdOut(profileStream.str(),2);
497  // std::string profileFileName(profileName+processorTagOut.str());
498  // std::ofstream profileFile;
499  // profileFile.open(profileFileName.c_str());
500  // profileFile << profileStream.str() << std::endl;
501  // profileFile.close();
502  }
503 
504  // #ifdef USE_PAPI
505  // long long **advancerCounters;
506  // testAdvancer.GetCounters(&advancerCounters);
507  // pcpp::io::RenewStream(profileStream);
508  // ReportCounters(advancerCounters,timerNames,papiCounterNames,nTimes,profileStream);
509  // std::string counterProfileName(std::string("PAPICounters")+processorTagOut.str());
510  // if(myRank == 0){
511  // std::ofstream counterFile;
512  // counterFile.open(counterProfileName.c_str());
513  // counterFile << profileStream.str() << std::endl;
514  // counterFile.close();
515  // }
516  // #endif
517  // }
518 
519 
520  return(0);
521 
522 }
523 
524 
525 
526 
527 // #ifdef USE_PAPI
528 // PAPI_library_init(PAPI_VER_CURRENT);
529 // if(PAPI_create_eventset(&papiEventSet) != PAPI_OK){
530 // PAPI_perror("PAPI event creation failed");
531 // exit(1);
532 // }
533 // numCounters = 0;
534 // std::vector<std::string>::iterator papiNameIt = papiEventNames.begin();
535 // while(papiNameIt != papiEventNames.end()){
536 // std::string eventName(*papiNameIt++);
537 // int eventId = 0;
538 // if(PAPI_event_name_to_code(const_cast<char *>(eventName.c_str()),&eventId) != PAPI_OK){
539 // std::ostringstream papiErrStream;
540 // papiErrStream << "Event not found (" << eventName << ")\n";
541 // myGlobal.ErrOut(papiErrStream.str());
542 // continue;
543 // }
544 // if(PAPI_add_event(papiEventSet,eventId) != PAPI_OK){
545 // std::ostringstream papiErrStream;
546 // papiErrStream << "Event could not be added (" << eventName << ")\n";
547 // PAPI_perror(const_cast<char *>(papiErrStream.str().c_str()));
548 // continue;
549 // } else {
550 // papiCounterNames.push_back(eventName);
551 // numCounters++;
552 // }
553 // }
554 // if(PAPI_start(papiEventSet) != PAPI_OK){
555 // PAPI_perror("Could not start PAPI");
556 // exit(1);
557 // }
558 // std::vector<long long> counterValues(numCounters,0);
559 // // std::vector<long long> counterTicks(numCounters,0);
560 // #endif
561 
562 // // Remove the previous probe file
563 // pcpp::io::Remove("euler3d.probe");
564 
565 // int numThreads = 1;
566 // int errorState = 0;
567 
568 // #ifdef USE_OMP
569 // numThreads = omp_get_max_threads();
570 // #endif
571 // processorTagOut << "_"
572 // << (numThreads < 10 ? "000" :
573 // numThreads < 100 ? "00" :
574 // numThreads < 1000 ? "0" : "")
575 // << numThreads;
576 // // profileName = profileName + processorTagOut.str();
577 
578 
579 // #ifdef USE_PAPI
580 // std::ostringstream papiDriverReport;
581 // PAPI_stop(papiEventSet,&counterValues[0]);
582 // papiDriverReport << "Driver PAPI Counters: " << std::endl;
583 // for(int iCounter = 0;iCounter < numCounters;iCounter++)
584 // papiDriverReport << papiCounterNames[iCounter] << ":\t\t" << counterValues[iCounter] << std::endl;
585 // myGlobal.StdOut(papiDriverReport.str());
586 // #endif
587 
588 // messageStream << "Final Time: " << t << std::endl;
589 
590 // // if(numStepsIO > 0){
591 // // domainState.Report(messageStream);
592 // // myGlobal.StdOut(messageStream.str());
593 // // pcpp::io::RenewStream(messageStream);
594 // // }
595 
596 // if(profLevel > 0){
597 // std::ostringstream profileStream;
598 // profileStream << "#Number of grids: " << 1 << std::endl
599 // << "#Number of procs: " << nProc << std::endl
600 // << "#Number of threads: " << numThreads << std::endl
601 // << "#Number of points: " << numGlobalNodes[0] << " "
602 // << numGlobalNodes[1] << " " << numGlobalNodes[2]
603 // << std::endl
604 // << "#Number of steps: " << numSteps << std::endl;
605 // myGlobal.Report(profileStream);
606 // double *processTimes;
607 // unsigned int nTimes;
608 // std::vector<std::vector<double> > parallelTimes;
609 // std::vector<std::vector<long long> > parallelCounts;
610 // const char **timerNames;
611 // testAdvancer.GetTimers(&processTimes,&timerNames,&nTimes);
612 // pcpp::comm::ReduceTimers(processTimes,nTimes,parallelTimes,simComm);
613 // if(myRank == 0){
614 // ReportTimings(parallelTimes,timerNames,nTimes,profileStream);
615 // std::string profileFileName(profileName+processorTagOut.str());
616 // std::ofstream profileFile;
617 // profileFile.open(profileFileName.c_str());
618 // profileFile << profileStream.str() << std::endl;
619 // profileFile.close();
620 // }
621 // #ifdef USE_PAPI
622 // long long **advancerCounters;
623 // testAdvancer.GetCounters(&advancerCounters);
624 // pcpp::io::RenewStream(profileStream);
625 // ReportCounters(advancerCounters,timerNames,papiCounterNames,nTimes,profileStream);
626 // std::string counterProfileName(std::string("PAPICounters")+processorTagOut.str());
627 // if(myRank == 0){
628 // std::ofstream counterFile;
629 // counterFile.open(counterProfileName.c_str());
630 // counterFile << profileStream.str() << std::endl;
631 // counterFile.close();
632 // }
633 // #endif
634 // }
635 
636 // myGlobal.Finalize();
637 
638 // return(0);
639 
640 
641 //void ReportTimings(std::vector<std::vector<double> > &inTimers,const char **timerNames,unsigned int nTimes,
642 // std::ostream &outStream)
643 //{
644 // outStream << "# -------------------------------------------------------------------" << std::endl
645 // << "# Routine\tMin\t\tMax\t\tMean" << std::endl
646 // << "# ___________________________________________________________________" << std::endl;
647 // outStream.setf(std::ios::left);
648 // for(int iTimer = 0;iTimer < nTimes;iTimer++){
649 // outStream << std::setw(12) << timerNames[iTimer]
650 // << "\t" << std::setw(14) << inTimers[0][iTimer]
651 // << "\t" << std::setw(14) << inTimers[1][iTimer]
652 // << "\t" << std::setw(14) << inTimers[2][iTimer]
653 // << std::endl;
654 // }
655 //}
656 
657 
658 //#ifdef USE_PAPI
659 //void ReportCounters(long long **inCounters,const char **timerNames,std::vector<std::string> &papiCounterNames,
660 // unsigned int nTimes,std::ostream &outStream)
661 //{
662 // outStream << "# -----------------------------------------------------------------" << std::endl
663 // << "# Routine";
664 // for(int iCount = 0;iCount < numCounters;iCount++)
665 // outStream << "\t" << papiCounterNames[iCount];
666 // outStream << std::endl
667 // << "# _________________________________________________________________" << std::endl;
668 // outStream.setf(std::ios::left);
669 // for(int iTimer = 0;iTimer < nTimes;iTimer++){
670 // outStream << std::setw(12) << timerNames[iTimer];
671 // for(int iCount = 0;iCount < numCounters;iCount++){
672 // outStream << "\t" << std::setw(14) << inCounters[iTimer][iCount];
673 // }
674 // outStream << std::endl;
675 // }
676 //}
677 //#endif
int InitializeMaxwellParameters(const GridType &inGrid, StateType &inParams, double CFLValue)
Definition: MaxwellUtil.H:354
#define MU0
int InitializeMaxwellStateConstFields(const GridType &inGrid, StateType &inState, double *constE, double *constB, double *constJ, double &constEps, double &constMu, bool everyWhere=false)
Definition: MaxwellUtil.H:49
virtual int ErrOut(const std::string &outstr)
Definition: Global.H:456
plascom2::operators::sbp::base operator_t
int InitializeSolution(const GridType &inGrid, StateType &inState, StateType &inParam, std::vector< BoundaryType > &inBoundaries, const std::string &initName, const std::vector< double > &inParams, const std::vector< int > &inFlags, int threadId, std::ostream *messageStream=NULL)
virtual void FunctionExit(const StackType &stackentry)
FunctionExit updates the Stack as well as the Profiler.
Definition: Global.H:609
void const size_t const size_t * gridSizes
Definition: EulerKernels.H:10
void RenewStream(std::ostringstream &outStream)
domainvector appDomains
Definition: Simulation.H:47
virtual int Restart()
Definition: PlasCom2.H:58
pcpp::CommunicatorType comm_t
virtual int AdvanceDomain()
Advances domain, grid, and state by one step.
Definition: RK4Advancer.H:455
pcpp::IndexIntervalType interval_t
pcpp::ParallelGlobalType global_t
Definition: TestHDF5.C:16
int numProcessors
Number of processors.
Definition: PCPPProgram.H:146
DomainBaseT DomainBaseType
Definition: Simulation.H:29
void ReduceTimers(double *processTimes, unsigned int nTimes, std::vector< std::vector< double > > &parallelTimes, pcpp::CommunicatorType &inCommunicator)
Definition: PCPPCommUtil.C:9
virtual void FunctionEntry(const StackType &stackentry)
FunctionEntry updates the Stack as well as the Profiler.
Definition: Global.H:604
#define EPS0
virtual int StdOut(const std::string &outstr, unsigned char inlev=1)
Definition: Global.H:439
Main encapsulation of MPI.
Definition: COMM.H:62
std::string GetValue(const std::string &key) const
Definition: Parameters.C:24
virtual int WriteDomains()
std::vector< std::string > GetValueVector(const std::string &key) const
Definition: Parameters.C:36
DomainInfoType domainInfo
Definition: Simulation.H:45
void DumpContents(std::ostream &Ostr, const ContainerType &c, std::string del="\)
Dump container contents.
Definition: AppTools.H:117
static const char * timerNames[]
Definition: RK4Advancer.H:30
void GetTimers(double **timersPtr, const char ***namesPtr, unsigned int *numTimers)
Definition: RK4Advancer.H:879
std::string ConfigKey(const std::string &configName, const std::string &keyName)
Definition: PCPPUtil.C:191
CommunicatorType globalCommunicator
Definition: Global.H:531
virtual int InitializeAdvancer(DomainType &inDomain, pcpp::ParallelGlobalType &inGlobal, std::ostream &inStream)
Initializes the advancer object.
Definition: RK4Advancer.H:168
int SyncStates()
Definition: RK4Advancer.H:354
simulation::grid::halo halo_t
Definition: PlasCom2.H:18
void ReportTimings(std::vector< std::vector< double > > &inTimers, const char **timerNames, unsigned int nTimes, std::ostream &outStream)
Definition: RunPlasCom2.C:738
Simple Block Structured Mesh object.
Definition: IndexUtil.H:21
fixtures::ConfigurationType appConfig
Definition: Simulation.H:42
std::vector< std::string > domainNames
Definition: Domain.H:26
int numThreads
Number of threads.
Definition: PCPPProgram.H:148
void SyncIntervals()
Definition: RK4Advancer.H:896
bool IsSet(const std::string &Key) const
Definition: Parameters.C:115
void SetTimers(bool onoff)
Definition: RK4Advancer.H:111