CG  Version 25
DeformingGridGenerationInformation.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // DeformingGridGenerationInformation:
3 // contains params for HyperbolicGridGenerator
4 
5 #ifndef DEFORMING_GRID_GENERATION_INFORMATION
6 #define DEFORMING_GRID_GENERATION_INFORMATION
7 
9 public:
16 
17  //..Constructor/Destructor
18  DeformingGridGenerationInformation( const int rangeDim00=2 )
19  {
20  rangeDimension = rangeDim00;
21  assert( ( 1<=rangeDimension ) && ( rangeDimension<= 3 ));
22  gridDimensions = new int[rangeDimension];
24  // default dimensions 11 x 11 x 11
25  for (int i=0; i<rangeDimension; i++)
26  {
27  gridDimensions[i] = 11;
29  }
30 
31  distanceToMarch = 0.2;
32  dissipation = 0.1;
34  };
35 
37 
38  int setGridDimensions( int n1, int n2 )
39  {
40  if (rangeDimension != 2) {
41  cout << "ERROR DeformingGridGenerationInformation::setGridDimensions(n1,n2)\n";
42  cout << "----- rangeDimension is not 2\n";
43  return -1;
44  }
45  assert(gridDimensions != NULL );
46  gridDimensions[0]=n1;
47  gridDimensions[1]=n2;
48  return 0;
49  }
50 
51  int setGridDimensions( int n1, int n2, int n3)
52  {
53  cout << "ERROR DeformingGridGenerationInformation::setGridDimensions(n1,n2,n3)\n";
54  cout << "----- only 2 dims supported for now.\n";
55  return -1;
56  }
57 
58  int setGridGeneratorDimensions( int n1, int n2 )
59  {
60  if (rangeDimension != 2) {
61  cout << "ERROR DeformingGridGenerationInformation::setGridGeneratorDimensions(n1,n2)\n";
62  cout << "----- rangeDimension is not 2\n";
63  return -1;
64  }
68  return 0;
69  }
70 
71  int setGridGeneratorDimensions( int n1, int n2, int n3)
72  {
73  cout << "ERROR DeformingGridGenerationInformation::setGridGeneratorDimensions(n1,n2,n3)\n";
74  cout << "----- only 2 dims supported for now.\n";
75  return -1;
76  }
77 
78 
79 };
80 
81 #endif