7 OutPut(
"Example: SinCos_CST_Oldroyd.h ") ;
13 void ExactU1(
double x,
double y,
double *values)
15 values[0] = sin(Pi*x);
16 values[1] = Pi*cos(Pi*x);
18 values[3] = -Pi*Pi*sin(Pi*x);
21 void ExactU2(
double x,
double y,
double *values)
23 values[0] = -Pi*y*cos(Pi*x);
24 values[1] = Pi*Pi*y*sin(Pi*x);
25 values[2] = -Pi*cos(Pi*x);
26 values[3] = Pi*Pi*Pi*y*cos(Pi*x);
29 void ExactP(
double x,
double y,
double *values)
31 values[0] = sin(Pi*x)*cos(Pi*y);
32 values[1] = Pi*cos(Pi*x)*cos(Pi*y);
33 values[2] = -Pi*sin(Pi*x)*sin(Pi*y);
34 values[3] = -Pi*Pi*sin(Pi*x)*cos(Pi*y)-Pi*Pi*sin(Pi*x)*cos(Pi*y);
55 void BoundCondition(
int i,
double t, BoundCond &cond)
61 void U1BoundValue(
int BdComp,
double Param,
double &value)
65 case 0: value=sin(Pi*Param);
67 case 1: value=sin(Pi);
69 case 2: value=sin(Pi*(1-Param));
73 default: cout <<
"wrong boundary part number" << endl;
79 void U2BoundValue(
int BdComp,
double Param,
double &value)
85 case 1: value=Pi*Param;
87 case 2: value=-Pi*cos(Pi*(1-Param));
89 case 3: value=-Pi*(1-Param);
91 default: cout <<
"wrong boundary part number" << endl;
100 void LinCoeffs(
int n_points,
double *X,
double *Y,
101 double **parameters,
double **coeffs)
106 double u1, u1x, u1y, u1lap, u2, u2x, u2y, u2lap, px, py;
108 for(i=0;i<n_points;i++)
120 u1lap = -Pi*Pi*sin(Pi*x);
121 u2 = -Pi*y*cos(Pi*x);
122 u2x = Pi*Pi*y*sin(Pi*x);
124 u2lap = Pi*Pi*Pi*y*cos(Pi*x);
125 px = Pi*cos(Pi*x)*cos(Pi*y);
126 py = -Pi*sin(Pi*x)*sin(Pi*y);
128 coeff[1] = -nu*u1lap+u1*u1x+u2*u1y+px;
129 coeff[2] = -nu*u2lap+u1*u2x+u2*u2y+py;
143 void ExactS1(
double x,
double y,
double *values)
145 values[0] = sin(Pi*x);
146 values[1] = Pi*cos(Pi*x);
148 values[3] = -Pi*Pi*sin(Pi*x);
151 void ExactS2(
double x,
double y,
double *values)
153 values[0] = -Pi*y*cos(Pi*x);
154 values[1] = Pi*Pi*y*sin(Pi*x);
155 values[2] = -Pi*cos(Pi*x);
156 values[3] = Pi*Pi*Pi*y*cos(Pi*x);
161 void ExactS3(
double x,
double y,
double *values)
163 values[0] = sin(Pi*x)*cos(Pi*y);
164 values[1] = Pi*cos(Pi*x)*cos(Pi*y);
165 values[2] = -Pi*sin(Pi*x)*sin(Pi*y);
166 values[3] = -Pi*Pi*sin(Pi*x)*cos(Pi*y)-Pi*Pi*sin(Pi*x)*cos(Pi*y);
187 void BoundCondition_CST(
int i,
double t, BoundCond &cond)
193 void S1BoundValue(
int BdComp,
double Param,
double &value)
197 case 0: value=sin(Pi*Param);
201 case 2: value=sin(Pi*(1-Param));
205 default: cout <<
"wrong boundary part number" << endl;
211 void S2BoundValue(
int BdComp,
double Param,
double &value)
217 case 1: value=Pi*Param;
219 case 2: value=-Pi*cos(Pi*(1-Param));
221 case 3: value=-Pi*(1-Param);
223 default: cout <<
"wrong boundary part number" << endl;
231 void S3BoundValue(
int BdComp,
double Param,
double &value)
235 case 0: value=sin(Pi*Param);
239 case 2: value=-sin(Pi*(1-Param));
243 default: cout <<
"wrong boundary part number" << endl;
250 void LinCoeffs_CST(
int n_points,
double *X,
double *Y,
251 double **parameters,
double **coeffs)
257 double u1, u1x, u1y, u2, u2x, u2y, tau1, tau2, tau3, tau1x, tau1y, tau2x, tau2y, tau3x, tau3y;
259 for(i=0;i<n_points;i++)
271 u2 = -Pi*y*cos(Pi*x);
272 u2x = Pi*Pi*y*sin(Pi*x);
275 tau1x = Pi*cos(Pi*x);
277 tau2 = -Pi*y*cos(Pi*x);
278 tau2x = Pi*Pi*y*sin(Pi*x);
279 tau2y = -Pi*cos(Pi*x);
281 tau3 = sin(Pi*x)*cos(Pi*y);
282 tau3x = Pi*cos(Pi*x)*cos(Pi*y);
283 tau3y = -Pi*sin(Pi*x)*sin(Pi*y);
286 coeff[1] = (u1*tau1x) + (u2*tau1y) - 2*(tau1*u1x + tau2*u1y) + nu*(tau1);
287 coeff[2] = (u1*tau2x) + (u2*tau2y) - (tau1*u2x + tau3*u1y) + (nu*tau2);
288 coeff[3] = (u1*tau3x) + (u2*tau3y) - 2*(tau2*u2x + tau3*u2y) + nu*(tau3);
double RE_NR
Definition: Database.h:313
static TParamDB * ParamDB
Definition: Database.h:1134