ParMooN
 All Classes Functions Variables Friends Pages
TwoInteriorLayers.h
1 // ======================================================================
2 // sharp characteristic interior layer
3 // Knopp, Lube, Rapin, CMAME 2002
4 // ======================================================================
5 #define __TWO_INTERIOR_LAYERS__
6 
7 #include <MooNMD_Io.h>
8 #include <Constants.h>
9 
10 void ExampleFile()
11 {
12  OutPut("Example: TwoInteriorLayers.h" << endl) ;
13 }
14 // exact solution
15 void Exact(double x, double y, double *values)
16 {
17 
18  values[0]= 0;
19  values[1]= 0;
20  values[2]= 0;
21  values[3]= 0;
22 }
23 
24 // kind of boundary condition (for FE space needed)
25 void BoundCondition(int i, double t, BoundCond &cond)
26 {
27  if (i==3)
28  cond = NEUMANN;
29  else
30  cond = DIRICHLET;
31 }
32 
33 // value of boundary condition
34 void BoundValue(int BdComp, double Param, double &value)
35 {
36  if (BdComp==0)
37  {
38  if ((Param>1.0/3.0)&& (Param<2.0/3.0))
39  value = 1;
40  else
41  value = 0;
42  }
43  else
44  value = 0;
45 }
46 
47 void BilinearCoeffs(int n_points, double *X, double *Y,
48  double **parameters, double **coeffs)
49 {
50  static double eps=1/TDatabase::ParamDB->PE_NR;
51  int i;
52  double *coeff;
53  double x, y;
54 
55  for(i=0;i<n_points;i++)
56  {
57  coeff = coeffs[i];
58  x = X[i];
59  y = Y[i];
60 
61  coeff[0] = eps;
62  coeff[1] = -y;
63  coeff[2] = x;
64  coeff[3] = 0;
65  coeff[4] = 0;
66  coeff[5] = sqrt(x*x + y*y);
67  }
68 }
69 
70 
71 
static TParamDB * ParamDB
Definition: Database.h:1134