ParMooN
 All Classes Functions Variables Friends Pages
SineLaplace.h
1 // ======================================================================
2 // Sine problem
3 // ======================================================================
4 
5 
6 void ExampleFile()
7 {
8  OutPut("Example: SineLaplace.h" << endl) ;
9 }
10 
11 // exact solution
12 void Exact(double x, double y, double *values)
13 {
14  values[0] = sin(Pi*x)*sin(Pi*y);
15  values[1] = Pi*cos(Pi*x)*sin(Pi*y);
16  values[2] = Pi*sin(Pi*x)*cos(Pi*y);
17  values[3] = -2*Pi*Pi*sin(Pi*x)*sin(Pi*y);
18 }
19 
20 // kind of boundary condition (for FE space needed)
21 void BoundCondition(int BdComp, double t, BoundCond &cond)
22 {
23  if(BdComp==1)
24  cond = NEUMANN;
25  else
26  cond = DIRICHLET;
27 }
28 
29 // value of boundary condition
30 void BoundValue(int BdComp, double Param, double &value)
31 {
32  static double eps=1/TDatabase::ParamDB->PE_NR;
33 
34  if(BdComp==1)
35  value = -eps*Pi*sin(Pi*Param);
36  else
37  value = 0;
38 }
39 
40 void BilinearCoeffs(int n_points, double *x, double *y,
41  double **parameters, double **coeffs)
42 {
43  static double eps=1/TDatabase::ParamDB->PE_NR;
44  int i;
45  double *coeff;
46 
47  for(i=0;i<n_points;i++)
48  {
49  coeff = coeffs[i];
50  //double *param = parameters[i];
51 
52  coeff[0] = eps;
53  coeff[1] = 0;
54  coeff[2] = 0;
55  coeff[3] = 0;
56 
57  coeff[4] = (2*Pi*Pi*eps)*sin(Pi*x[i])*sin(Pi*y[i]);
58  }
59 }
60 
static TParamDB * ParamDB
Definition: Database.h:1134