CG  Version 25
Interface.h
Go to the documentation of this file.
1 // ===================================================================================================
2 // This file contains class that are used with interfaces between domains for multi-domain problems.
3 // ===================================================================================================
4 
5 #ifndef INTERFACE_H
6 #define INTERFACE_H
7 
8 #include "Overture.h"
9 
10 #ifndef OV_USE_OLD_STL_HEADERS
11 #include <vector>
12 #include <list>
13 #else
14 #include <vector.h>
15 #include <list.h>
16 #endif
17 
18 // ==============================================================================
20 // ==============================================================================
22 {
23 public:
26 
27  real t; // time
28  RealArray u,f; // for now save both the solution and RHS values on the interface
29 };
30 
31 
32 typedef std::vector<InterfaceData> InterfaceDataList ;
33 
34 // ==============================================================================
36 // ==============================================================================
38 {
39 public:
42 
43  int current; // points to the latest entry in the interfaceDataList
45 };
46 
47 
48 
50 // ==========================================================================================
51 // This class holds information about a particular grid face that belongs to an interface
52 // ==========================================================================================
53 {
54  public:
55 
56 GridFaceDescriptor(int domain_, int grid_, int side_, int axis_ );
57 
59 
62 real a[3]; // holds the coefficients of the BC such as a[0]*u + a[1]*u.n =
63 RealArray *u;
64 
65 InterfaceDataHistory interfaceDataHistory; // holds a history of interface values at past times
66 InterfaceDataHistory interfaceDataIterates; // interface values at past iterates for the current time.
67 
68 };
69 
70 typedef std::vector<GridFaceDescriptor> GridList;
71 
72 class InterfaceTransfer; // forward declaration
73 
75 // ===========================================================================================
76 // This class holds information about and interface such as the
77 // the lists of grid faces that are adjacent to a particular interface.
78 //
79 // /gridList1: list of GridFaceDescriptor's for grid faces adjacent to side 1 of this interface
80 // /gridList2: list of GridFaceDescriptor's for grid faces adjacent to side 2 of this interface
81 // ===========================================================================================
82 {
83 public:
84 
87 
88 int domain1, domain2; // domain identifiers for side1 and side2 of the interface
90 InterfaceTransfer *interfaceTransfer; // This object knows how to transfer info across an interface
91 
92 real interfaceTolerance; // tolerance for satisfying the interface equations
93 real interfaceOmega; // relaxation parameter for solving the interface equations
94 real estimatedConvergenceRate; // estimate convergence rate for solving the interface equations
95 
96 int maximumNumberOfIntefaceIterations; // max iterations allowed when solving the interface equations
97 
98 int numberOfInterfaceSolves; // keeps track of how many iterface solves (for statistics)
99 
100 int totalNumberOfInterfaceIterations; // keeps track of how many iterations were used (for statistics)
101 };
102 
103 
104 
105 typedef std::vector<InterfaceDescriptor> InterfaceList;
106 
107 
108 // // ==========================================================================================
109 // /// /brief This class holds information about interface boundary conditions on a single face.
110 // // ==========================================================================================
111 // class InterfaceBoundaryConditionInfo
112 // {
113 // public:
114 
115 // InterfaceBoundaryConditionInfo(int domain, int grid, int side, int axis )
116 // : face(domain,grid,side,axis)
117 // {
118 // component=-1;
119 // interfaceBC=-1;
120 // u=NULL;
121 // a[0]=1.; a[1]=0; a[2]=0.;
122 // };
123 
124 // GridFaceDescriptor face;
125 // int component;
126 // int interfaceBC;
127 // real a[3]; // hold coefficients of BC such as a[0]*u + a[1]*u.n =
128 // RealArray *u;
129 // };
130 
131 
132 
133 #endif