CG
Version 25
Main Page
Namespaces
Classes
Files
File List
File Members
cg.v25
common
src
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
// ==============================================================================
21
class
InterfaceData
22
{
23
public
:
24
InterfaceData
();
25
~InterfaceData
();
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
// ==============================================================================
37
class
InterfaceDataHistory
38
{
39
public
:
40
InterfaceDataHistory
();
41
~InterfaceDataHistory
();
42
43
int
current
;
// points to the latest entry in the interfaceDataList
44
InterfaceDataList
interfaceDataList
;
// circular list
45
};
46
47
48
49
class
GridFaceDescriptor
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
58
~GridFaceDescriptor
();
59
60
int
domain
,
grid
,
side
,
axis
;
61
int
interfaceBC
;
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
74
class
InterfaceDescriptor
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
85
InterfaceDescriptor
();
86
~InterfaceDescriptor
();
87
88
int
domain1
,
domain2
;
// domain identifiers for side1 and side2 of the interface
89
GridList
gridListSide1
,
gridListSide2
;
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
Generated on Fri Jan 4 2013 10:19:22 for CG by
1.8.3