Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DriverProgram.C
Go to the documentation of this file.
1 
9 #include "DriverProgram.H"
10 #include "Mesh.H"
11 
12 namespace GridConversion {
13 
14  namespace DriverProgram {
15 
17  {
18  // FunctionEntry("NAME"): Updates the user-defined stack and
19  // the program profiles with timing information. The placement
20  // of FunctionEntry and FunctionExit calls is at the developer's
21  // discretion.
22  FunctionEntry("Run");
23 
24  // ---------- The Program -----------------
25  // Drives the grid conversion process
26 
27  std::ostringstream Ostr;
28  int error=0;
29 
30  // Parse the input file
31  error = ReadStanfordInput();
32  if(error == 1){
33  std::ostringstream ErrOstr;
34  ErrOstr << "Error reading input file." << std::endl;
35  StdOut(Ostr.str());
36  Ostr.str("");
37  ErrOut(ErrOstr.str());
38  ErrOstr.str("");
39  exit(1);
40  }
41 
42  //Print to check nodes
43  if(verblevel > 3){
44  Ostr << "nodes: " << std::endl;
45  for(int i=0; i < numNodes; i++){
46  Ostr << i+1 << ":" << std::endl;
47  for(int j=0; j < 3; j++){
48  Ostr << nodes[i*3 + j] << " ";
49  }
50  Ostr << std::endl;
51  }
52  }
53  StdOut(Ostr.str());
54  Ostr.str("");
55 
56  //Print to check elems
57  if(verblevel > 3){
58  Ostr << "elements: " << std::endl;
59  for(int i=0; i < numElems; i++){
60  Ostr << i+1 << ":" << std::endl;
61  for(int j=0; j < numNodesPerElem; j++){
62  Ostr << elems[i*numNodesPerElem + j] << " ";
63  }
64  Ostr << std::endl;
65  }
66  }
67  StdOut(Ostr.str());
68  Ostr.str("");
69 
70  //Print to check domains
71  if(verblevel > 3){
72  Ostr << "domains: " << std::endl;
73  for(int i=0; i < domains.size(); i++){
74  Ostr << i+1 << ":" << std::endl;
75  for(int j=0; j < domains[i].size(); j++){
76  Ostr << domains[i][j] << " ";
77  }
78  Ostr << std::endl;
79  }
80  }
81 
82  StdOut(Ostr.str());
83  Ostr.str("");
84  std::cout << "line " << __LINE__ << std::endl;
85 
86  // Populate element connectivty with elems vector
87  SolverUtils::Mesh::Connectivity utilsElems;
88  utilsElems.AddElements(numElems, numNodesPerElem, elems);
89  std::cout << "line " << __LINE__ << std::endl;
90 
91  // Get a map of nodes to elements
92  SolverUtils::Mesh::Connectivity nodesToElems;
93  utilsElems.Sync();
94  utilsElems.Inverse(nodesToElems,numNodes);
95  std::cout << "line " << __LINE__ << std::endl;
96 
97  // Populate domain connectivity with domain vectors
98  SolverUtils::Mesh::Connectivity utilsDomains;
99  for(int i=0; i < domains.size(); i++){
100  utilsDomains.AddElement(domains[i]);
101  }
102  std::cout << "line " << __LINE__ << std::endl;
103 
104 
105  StdOut(Ostr.str());
106  Ostr.str("");
107  std::cout << "line " << __LINE__ << std::endl;
108 
109  //Print to check domain connectivity
110  if(verblevel > 3){
111  Ostr << "Domain connectivity: " << std::endl;
112  for(int i=0; i < utilsDomains.size(); i++){
113  Ostr << i << ":" << std::endl;
114  for(int j=0; j < utilsDomains[i].size(); j++){
115  Ostr << utilsDomains[i][j] << " ";
116  }
117  Ostr << std::endl;
118  }
119  }
120  StdOut(Ostr.str());
121  Ostr.str("");
122 
123  // Get a map of nodes to domains
124  utilsDomains.Sync();
125  utilsDomains.Inverse(nodesToDomains,numNodes);
126 
127  // Print to check the nodes to elements
128  if(verblevel > 3){
129  Ostr << "Nodes to elements: " << std::endl;
130  for(int i=0; i < nodesToElems.size(); i++){
131  Ostr << i+1 << ": ";
132  for(int j=0; j < nodesToElems[i].size(); j++){
133  Ostr << nodesToElems[i][j] << " ";
134  }
135  Ostr << std::endl;
136  }
137  }
138 
139  // Print to check the nodes to domains
140  if(verblevel > 3){
141  Ostr << "Nodes to domains: " << std::endl;
142  for(int i=0; i < nodesToDomains.size(); i++){
143  Ostr << i+1 << ": ";
144  for(int j=0; j < nodesToDomains[i].size(); j++){
145  Ostr << nodesToDomains[i][j] << " ";
146  }
147  Ostr << std::endl;
148  }
149  }
150  StdOut(Ostr.str());
151  Ostr.str("");
152 
153  //If we have tet elements and the user specifies higher
154  //order then we need to make the tets quadratic
155  //NOTE: This functionality is not complete!!!!!!!!!!!
156  if(quadratic){
157  if(numNodesPerElem != 4){
158  std::ostringstream ErrOstr;
159  ErrOstr << "Only 4 node tetrahedra can be made into" << std::endl
160  << "quadratic elements!" << std::endl;
161  StdOut(Ostr.str());
162  Ostr.str("");
163  ErrOut(ErrOstr.str());
164  ErrOstr.str("");
165  exit(1);
166  }
167 
168  //Create node to node map
169  ConnectivityMaps(nodesToElems);
170 
171  // Populate element to element edge for Solver Utils
172  SolverUtils::Mesh::Connectivity utilsElemToElemEdges;
173  utilsElemToElemEdges.AddElements(numElems, numEdgesPerElem, elemToElemEdges);
174  std::cout << "line " << __LINE__ << std::endl;
175 
176  // Get a map of nodes to elements
177  SolverUtils::Mesh::Connectivity elemEdgeToElems;
178  utilsElemToElemEdges.Sync();
179  utilsElemToElemEdges.Inverse(elemEdgeToElems,numElemEdges);
180 
181  //Print to check elemEdgesToElems
182  if(verblevel > 3){
183  Ostr << "Element edges to elements: " << std::endl;
184  for(int i=0; i < elemEdgeToElems.size(); i++){
185  Ostr << i+1 << ":" << std::endl;
186  for(int j=0; j < elemEdgeToElems[i].size(); j++){
187  Ostr << elemEdgeToElems[i][j] << " ";
188  }
189  Ostr << std::endl;
190  }
191  std::cout << "line " << __LINE__ << std::endl;
192  }
193 
194  //Create higher order tets
195  HigherOrderTets(elemEdgeToElems,nodesToDomains);
196 
197  //Print to check nodes
198  if(verblevel > 3){
199  Ostr << "(after higher order) nodes: " << std::endl;
200  for(int i=0; i < numNodes; i++){
201  Ostr << i+1 << ":" << std::endl;
202  for(int j=0; j < 3; j++){
203  Ostr << nodes[i*3 + j] << " ";
204  }
205  Ostr << std::endl;
206  }
207  }
208  StdOut(Ostr.str());
209  Ostr.str("");
210 
211  //Print to check elems
212  if(verblevel > 3){
213  Ostr << "(after higher order) elements: " << std::endl;
214  for(int i=0; i < numElems; i++){
215  Ostr << i+1 << ":" << std::endl;
216  for(int j=0; j < numNodesPerElem; j++){
217  Ostr << elems[i*numNodesPerElem + j] << " ";
218  }
219  Ostr << std::endl;
220  }
221  std::cout << "line " << __LINE__ << std::endl;
222  }
223  StdOut(Ostr.str());
224  Ostr.str("");
225  std::cout << "line " << __LINE__ << std::endl;
226 
227  //Print to check domains
228  if(verblevel > 3){
229  Ostr << "(after higher order) domains: " << std::endl;
230  for(int i=0; i < domains.size(); i++){
231  Ostr << i+1 << ":" << std::endl;
232  for(int j=0; j < domains[i].size(); j++){
233  Ostr << domains[i][j] << " ";
234  }
235  Ostr << std::endl;
236  }
237  }
238 
239  // Populate element connectivty with elems vector
240  SolverUtils::Mesh::Connectivity newUtilsElems;
241  newUtilsElems.AddElements(numElems, numNodesPerElem, elems);
242  std::cout << "line " << __LINE__ << std::endl;
243 
244  // Get a map of nodes to elements
245  nodesToElems.clear();
246  newUtilsElems.Sync();
247  newUtilsElems.Inverse(nodesToElems,numNodes);
248  std::cout << "line " << __LINE__ << std::endl;
249 
250  // Populate domain connectivity with domain vectors
251  SolverUtils::Mesh::Connectivity newUtilsDomains;
252  for(int i=0; i < domains.size(); i++){
253  newUtilsDomains.AddElement(domains[i]);
254  }
255  std::cout << "line " << __LINE__ << std::endl;
256 
257 
258  StdOut(Ostr.str());
259  Ostr.str("");
260  std::cout << "line " << __LINE__ << std::endl;
261 
262  // Get a map of nodes to domains
263  nodesToDomains.clear();
264  newUtilsDomains.Sync();
265  newUtilsDomains.Inverse(nodesToDomains,numNodes);
266 
267  // Print to check the nodes to elements
268  if(verblevel > 3){
269  Ostr << "Nodes to elements: " << std::endl;
270  for(int i=0; i < nodesToElems.size(); i++){
271  Ostr << i+1 << ": ";
272  for(int j=0; j < nodesToElems[i].size(); j++){
273  Ostr << nodesToElems[i][j] << " ";
274  }
275  Ostr << std::endl;
276  }
277  }
278 
279  // Print to check the nodes to domains
280  if(verblevel > 3){
281  Ostr << "Nodes to domains: " << std::endl;
282  for(int i=0; i < nodesToDomains.size(); i++){
283  Ostr << i+1 << ": ";
284  for(int j=0; j < nodesToDomains[i].size(); j++){
285  Ostr << nodesToDomains[i][j] << " ";
286  }
287  Ostr << std::endl;
288  }
289  }
290  StdOut(Ostr.str());
291  Ostr.str("");
292 
293 
294  }//creating higher order tets
295 
296  //Populate elems to domains vector using nodes to domains
297  //loop over all the elements
298  elemsToDomains.resize(numElems);
299 
300 
301  for(int i=0; i < numElems; i++){
302  std::map<int, int>domCount;
303  std::cout << "elem " << i+1 << std::endl;
304  //loop over the nodes for the element
305  for(int j=0; j < numNodesPerElem; j++){
306  int node = elems[numNodesPerElem*i + j];
307  std::cout << "node " << j+1 << " (" << node << ")" << std::endl;
308  node--;
309  //loop over the domains for that node
310  for(int k=0; k < nodesToDomains[node].size(); k++){
311  std::cout << "domain " << k+1 << " ("
312  << nodesToDomains[node][k] << ")" << std::endl;
313  int domain = nodesToDomains[node][k];
314  //We only want to add the domain if 3 or more of the element's
315  //nodes reside on it (i.e., an entire face of the element)
316  if( domCount.find(domain) == domCount.end() )
317  domCount[domain] = 1;
318  else
319  domCount[domain]++;
320 
321  std::cout << "domCount = " << domCount[domain] << std::endl;
322 
323  bool newValue=true;
324  //See if the domain has been added yet
325  for(int l=0; l < elemsToDomains[i].size(); l++){
326  if(elemsToDomains[i][l] == nodesToDomains[node][k]){
327  newValue=false;
328  break;
329  }
330  }//loop over domains for elem
331  //add the domain to the elem
332  if(newValue && domCount[domain] > 2){
333  std::cout << "Adding domain" << std::endl;
334  elemsToDomains[i].push_back(nodesToDomains[node][k]);
335  }
336  }//loop over domains for node
337  }// loop over nodes for elem
338  }//loop over elements
339 
340  // Print to check elems to domains
341  if(verblevel > 3){
342  Ostr << "Elems to domains: " << std::endl;
343  for(int i=0; i < elemsToDomains.size(); i++){
344  Ostr << i+1 << ": ";
345  for(int j=0; j < elemsToDomains[i].size(); j++){
346  Ostr << elemsToDomains[i][j] << " ";
347  }
348  Ostr << std::endl;
349  }
350  }
351 
352  // Print the domain bcs to check
353  if(verblevel > 3){
354  Ostr << "domain bcs: " << std::endl;
355  for(int i=0; i < domainBCs.size(); i++){
356  Ostr << i+1 << ": ";
357  for(int j=0; j < domainBCs[i].size(); j++){
358  Ostr << domainBCs[i][j] << " ";
359  }
360  Ostr << std::endl;
361  }
362  }
363 
364  // Print the domain bc values to check
365  if(verblevel > 3){
366  Ostr << "domain bc values: " << std::endl;
367  for(int i=0; i < domainBCValues.size(); i++){
368  Ostr << i+1 << ": " << std::endl;
369  for(int j=0; j < domainBCValues[i].size(); j++){
370  for(int k=0; k < domainBCValues[i][j].size(); k++){
371  Ostr << " " << domainBCValues[i][j][k] << " ";
372  }
373  Ostr << std::endl;
374  }
375  }
376  }
377 
378 
379  // Print the edges to check
380  if(verblevel > 3){
381  Ostr << "edges: " << std::endl;
382  for(int i=0; i < edges.size(); i++){
383  Ostr << i+1 << ": ";
384  for(int j=0; j < edges[i].size(); j++){
385  Ostr << edges[i][j] << " ";
386  }
387  Ostr << std::endl;
388  }
389  }
390 
391  // Print the edge bcs to check
392  if(verblevel > 3){
393  Ostr << "edge bcs: " << std::endl;
394  for(int i=0; i < edgeBCs.size(); i++){
395  Ostr << i+1 << ": ";
396  for(int j=0; j < edgeBCs[i].size(); j++){
397  Ostr << edgeBCs[i][j] << " ";
398  }
399  Ostr << std::endl;
400  }
401  }
402 
403  // Print the edge bc values to check
404  if(verblevel > 3){
405  Ostr << "edge bc values: " << std::endl;
406  for(int i=0; i < edgeBCValues.size(); i++){
407  Ostr << i+1 << ": " << std::endl;
408  for(int j=0; j < edgeBCValues[i].size(); j++){
409  for(int k=0; k < edgeBCValues[i][j].size(); k++){
410  Ostr << " " << edgeBCValues[i][j][k] << " ";
411  }
412  Ostr << std::endl;
413  }
414  }
415  }
416  StdOut(Ostr.str());
417  Ostr.str("");
418 
419  std::cout << "line " << __LINE__ << std::endl;
420  // Populate the nodal bc vectors from the domain bc vectors
421  nodeBCs.resize(numNodes);
422  nodeBCValues.resize(numNodes);
423  //loop over all domains
424  for(int i=0; i < domains.size(); i++){
425  // loop over all nodes in the domain
426  for(int j=0; j < domains[i].size(); j++){
427  int node;
428  node = domains[i][j]-1;
429  // they are on
430  // loop over all the bc flags for this domain
431  for(int k=0; k < domainBCs[i].size(); k++){
432  bool newValue = true;
433  int type8BC=-1;
434  // loop over all the bc flags for this node
435  for(int l=0; l < nodeBCs[node].size(); l++){
436  // if the node already has this bc & value skip it
437  if(nodeBCs[node][l] == domainBCs[i][k]){
438  type8BC=l;
439  for(int m=0; m < domainBCValues[i][k].size(); m++){
440  if(domainBCValues[i][k][m] != nodeBCValues[node][l][m])
441  break;
442  else if(m == domainBCValues[i][k].size()-1)
443  newValue = false;
444  }
445  }
446  }// node bc flags
447  // if it is a new flag add it and its values to
448  // the node's vectors
449  if(newValue){
450  //nodes can have as many type 6 bcs as needed
451  if(domainBCs[i][k] == 6){
452  nodeBCs[node].push_back(domainBCs[i][k]);
453  nodeBCValues[node].push_back(domainBCValues[i][k]);
454  }
455  //nodes can only have one type 8 bc which is determined
456  //by a "priority" number that is the last bc value number
457  if(domainBCs[i][k] == 8){
458  //the node doesn't have any type 8 bcs yet
459  int last = domainBCValues[i][k].size()-1;
460  if(type8BC == -1){
461  nodeBCs[node].push_back(domainBCs[i][k]);
462  nodeBCValues[node].push_back(domainBCValues[i][k]);
463  }
464  //it does have a type 8 bc already & we should keep the one
465  //with the highest priority (here a higher priority means a
466  //lower number in the last value position)
467  else if(nodeBCValues[node][type8BC][last] > domainBCValues[i][k][last]){
468  for(int l=0; l < nodeBCValues[node][type8BC].size(); l++)
469  nodeBCValues[node][type8BC][l] = domainBCValues[i][k][l];
470  }
471  }//new type 8 bc
472  }//it was a new bc flag for the node
473  }//domain bc flag loop
474  }// loop over nodes in domain
475  } //loop over all domains
476 
477  std::cout << "line " << __LINE__ << std::endl;
478  // Populate the nodal bc vectors from the edge bc vectors
479  //loop over all edges
480  for(int i=0; i < edges.size(); i++){
481  //loop over all nodes
482  for(int j=0; j < nodesToDomains.size(); j++){
483  int onEdge=0;
484  int node=j;
485 
486  //check to see if the node is on the domains of the edge
487  for(int k=0; k < nodesToDomains[node].size(); k++){
488  if(nodesToDomains[node][k] == edges[i][0]
489  || nodesToDomains[node][k] == edges[i][1])
490  onEdge++;
491  }
492 
493  // If the node is on the edge add the edge bcs to the node's bcs
494  if(onEdge == 2){
495  bool newValue = true;
496  //loop over all the bc flags for this edge
497  for(int k=0; k < edgeBCs[i].size(); k++){
498  int type8BC=-1;
499  // loop over all the bc flags for this node
500  for(int l=0; l < nodeBCs[node].size(); l++){
501  // if the node already has this bc & value skip it
502  if(nodeBCs[node][l] == edgeBCs[i][k]){
503  type8BC=l;
504  for(int m=0; m < edgeBCValues[i][k].size(); m++){
505  if(edgeBCValues[i][k][m] != nodeBCValues[node][l][m])
506  break;
507  else if(m == edgeBCValues[i][k].size()-1)
508  newValue = false;
509  }
510  }
511  }// node bc flags
512  // if it is a new flag add it and its values to
513  // the node's vectors
514  if(newValue){
515  //nodes can have as many type 6 bcs as needed
516  if(edgeBCs[i][k] == 6){
517  nodeBCs[node].push_back(edgeBCs[i][k]);
518  nodeBCValues[node].push_back(edgeBCValues[i][k]);
519  }
520  //nodes can only have one type 8 bc which is determined
521  //by a "priority" number that is the last bc value number
522  if(edgeBCs[i][k] == 8){
523  int last = edgeBCValues[i][k].size()-1;
524  //the node doesn't have any type 8 bcs yet
525  if(type8BC == -1){
526  nodeBCs[node].push_back(edgeBCs[i][k]);
527  nodeBCValues[node].push_back(edgeBCValues[i][k]);
528  }
529  //it does have a type 8 bc already & we should keep the one
530  //with the highest priority (here a higher priority means a
531  //lower number in the last value position)
532  else if(nodeBCValues[node][type8BC][last] > edgeBCValues[i][k][last]){
533  for(int l=0; l < nodeBCValues[node][type8BC].size(); l++)
534  nodeBCValues[node][type8BC][l] = edgeBCValues[i][k][l];
535  }
536  }//new type 8 bc
537  }//it was a new bc flag for the node
538  }//loop over the bcs for the edge
539  } //if the node is on the edge
540  } //loop over all the nodes
541  } //loop over all edges
542 
543  std::cout << "line " << __LINE__ << std::endl;
544  // Print the nodal bcs to check
545  if(verblevel > 3){
546  Ostr << "nodal bcs: " << std::endl;
547  for(int i=0; i < numNodes; i++){
548  Ostr << i+1 << ": ";
549  for(int j=0; j < nodeBCs[i].size(); j++){
550  Ostr << nodeBCs[i][j] << " ";
551  }
552  Ostr << std::endl;
553  }
554  }
555 
556  std::cout << "line " << __LINE__ << std::endl;
557  // Print the nodal bc values to check
558  if(verblevel > 3){
559  Ostr << "nodal bc values: " << std::endl;
560  for(int i=0; i < numNodes; i++){
561  Ostr << i+1 << ": " << std::endl;
562  for(int j=0; j < nodeBCValues[i].size(); j++){
563  for(int k=0; k < nodeBCValues[i][j].size(); k++){
564  Ostr << " " << nodeBCValues[i][j][k] << " ";
565  }
566  Ostr << std::endl;
567  }
568  }
569  }
570  StdOut(Ostr.str());
571  Ostr.str("");
572 
573 
574  std::cout << "line " << __LINE__ << std::endl;
575  // Populate the element bc vectors from the nodal bc vectors
576  elemBCs.resize(numElems);
577  elemBCValues.resize(numElems);
578  //loop over all nodes
579  for(int i=0; i < numNodes; i++){
580  std::cout << "node " << i+1 << std::endl;
581  // loop over all elements for the node
582  for(int j=0; j < nodesToElems[i].size(); j++){
583  int elem;
584  elem = nodesToElems[i][j]-1;
585  std::cout << "elem " << elem+1 << std::endl;
586  // elems will get all bc flags for all the nodes
587  // they contain
588  // loop over all the bc flags for this node
589  std::cout << "line " << __LINE__ << std::endl;
590  for(int k=0; k < nodeBCs[i].size(); k++){
591  bool newValue = true;
592  std::cout << "nodeBC " << nodeBCs[i][k] << std::endl;
593  // loop over all the bc flags for this elem
594  for(int l=0; l < elemBCs[elem].size(); l++){
595  std::cout << "elemBC " << elemBCs[elem][l] << std::endl;
596  // if the elem already has this bc & value skip it
597  if(elemBCs[elem][l] == nodeBCs[i][k]){
598  for(int m=0; m < nodeBCValues[i][k].size(); m++){
599  if(nodeBCValues[i][k][m] != elemBCValues[elem][l][m])
600  break;
601  else if(m == nodeBCValues[i][k].size()-1)
602  newValue = false;
603  }
604  }
605  }// elem bc flags
606  // if it is a new flag add it and its values to
607  // the elem's vectors
608  if(newValue){
609  std::cout << "newValue" << std::endl;
610  elemBCs[elem].push_back(nodeBCs[i][k]);
611  elemBCValues[elem].push_back(nodeBCValues[i][k]);
612  }//it was a new bc flag for the elem
613  }//node bc flag loop
614  std::cout << "line " << __LINE__ << std::endl;
615  }// loop over elements for the node
616  } //loop over all nodes
617 
618 
619  std::cout << "line " << __LINE__ << std::endl;
620  // Print the element bcs for a check
621  if(verblevel > 3){
622  Ostr << "elemBCs:" << std::endl;
623  for(int i=0; i < numElems; i++){
624  Ostr << i+1 << ": ";
625  for(int j=0; j < elemBCs[i].size(); j++){
626  Ostr << elemBCs[i][j] << " ";
627  }
628  Ostr << std::endl;
629  }
630  }
631  StdOut(Ostr.str());
632  Ostr.str("");
633  std::cout << "line " << __LINE__ << std::endl;
634 
635  // Print the element bc values for a check
636  if(verblevel > 3){
637  Ostr << "elem BC values:" << std::endl;
638  for(int i=0; i < numElems; i++){
639  Ostr << i+1 << ": " << std::endl;
640  for(int j=0; j < elemBCValues[i].size(); j++){
641  for(int k=0; k < elemBCValues[i][j].size(); k++){
642  Ostr << " " << elemBCValues[i][j][k] << " ";
643  }
644  Ostr << std::endl;
645  }
646  }
647  }
648  StdOut(Ostr.str());
649  Ostr.str("");
650 
651  std::cout << "line " << __LINE__ << std::endl;
652  //Write the output file
653  error = WriteOutput();
654  std::cout << "line " << __LINE__ << std::endl;
655  if(error == 1){
656  std::ostringstream ErrOstr;
657  ErrOstr << "Error writing output file." << std::endl;
658  StdOut(Ostr.str());
659  Ostr.str("");
660  ErrOut(ErrOstr.str());
661  ErrOstr.str("");
662  exit(1);
663  }
664  StdOut(Ostr.str());
665  Ostr.str("");
666  //
667  // ---------- Program End -----------------
668 
669 
670  // Update the stacker/profiler that we are exiting
671  // this function.
672  FunctionExit("Run");
673  std::cout << "line " << __LINE__ << std::endl;
674  // return 0 for success
675  return(0);
676  };
677  };
678 };
virtual int WriteOutput()
This function writes the output grid file.
Definition: WriteOutput.C:6
virtual int HigherOrderTets(SolverUtils::Mesh::Connectivity elemEdgeToElems, SolverUtils::Mesh::Connectivity nodesToDomains)
This function creates higher order tets from linear tets.
Definition: HigherOrder.C:6
j indices k indices k
Definition: Indexing.h:6
std::vector< std::vector< unsigned int > > domains
vector of vectors to hold the domains
std::vector< std::vector< int > > elemBCs
vector to hold list of element bc values
int numElemEdges
number of element edges in mesh
Mesh Stuff.
virtual int Run()
This function implements the main function executed by the program.
Definition: DriverProgram.C:16
virtual int ConnectivityMaps(SolverUtils::Mesh::Connectivity nodesToElems)
This function creates a few different connectivity maps that are needed.
std::vector< unsigned int > elemToElemEdges
map of elements to element edges
GridConversion interface.
std::vector< unsigned int > elems
vector for holding element connectivies read from input
Definition: adj.h:150
int numElems
number of elements in mesh
std::vector< std::vector< int > > edgeBCs
vector to hold list of edge bc flags
std::vector< std::vector< int > > elemsToDomains
vector to hold the domains for each element
std::vector< std::vector< int > > nodeBCs
SolverUtils::Mesh::Connectivity nodesToDomains
blockLoc i
Definition: read.cpp:79
int numNodesPerElem
number of nodes per element
std::vector< std::vector< int > > domainBCs
vector to hold list of domain bc flags
virtual int ReadStanfordInput()
This function parses a Stanford format input file.
std::vector< std::vector< int > > edges
vector of vectors to hold the edges
std::vector< std::vector< std::vector< double > > > domainBCValues
vector to hold list of domain bc values (these are different for each bc type - see the Rocfrac docum...
std::vector< std::vector< std::vector< double > > > edgeBCValues
vector to hold list of edge bc values (these are different for each bc type - see the Rocfrac documen...
j indices j
Definition: Indexing.h:6
std::vector< double > nodes
vector for holding nodal coordinates read from input
std::vector< std::vector< std::vector< double > > > elemBCValues
vector to hold list of element bc values (these are different for each bc type - see the Rocfrac docu...
std::vector< std::vector< std::vector< double > > > nodeBCValues
vector to hold list of node bc values (these are different for each bc type - see the Rocfrac documen...
bool quadratic
boolean for changing the elements to higher order