6 MultiIndex2D Derivatives2d[3] = { D10, D01, D00 };
7 int SpacesNumbers2d[3] = { 0, 0, 0 };
9 int RowSpace2d[2] = { 0 };
10 int ColumnSpace2d[2] = { 0 };
12 int RhsSpace2d[1] = { 0 };
14 MultiIndex2D AllDerivatives2d[3] = { D00, D10, D01 };
16 void L2H1Errors2d(
int N_Points,
double *X,
double *Y,
double *AbsDetjk,
17 double *Weights,
double hK,
18 double **Der,
double **Exact,
19 double **coeffs,
double *LocError)
22 double *deriv, *exactval, w, t;
27 for(i=0;i<N_Points;i++)
31 w = Weights[i]*AbsDetjk[i];
33 t = deriv[0]-exactval[0];
36 t = deriv[1]-exactval[1];
38 t = deriv[2]-exactval[2];
46 void BilinearAssemble2d(
double Mult,
double *coeff,
double hK,
47 double **OrigValues,
int *N_BaseFuncts,
48 double ***LocMatrices,
double **LocRhs)
50 double **Matrix, *Rhs, val, *MatrixRow;
51 double ansatz00, ansatz10, ansatz01;
52 double test00, test10, test01;
53 double *Orig0, *Orig1, *Orig2;
55 double c0, c1, c2, c3, c4;
57 Matrix = LocMatrices[0];
62 Orig0 = OrigValues[0];
63 Orig1 = OrigValues[1];
64 Orig2 = OrigValues[2];
75 MatrixRow = Matrix[i];
83 Rhs[i] += Mult*test00*c4;
93 val = c0*(test10*ansatz10+test01*ansatz01);
96 val += (c1*ansatz10+c2*ansatz01)*test00;
99 val += c3*ansatz00*test00;
111 void Exact2d(
double x,
double y,
double *values)
113 values[0] = sin(Pi*x)*sin(2*Pi*y);
114 values[1] = Pi*cos(Pi*x)*sin(2*Pi*y);
115 values[2] = 2*Pi*sin(Pi*x)*cos(2*Pi*y);
119 void ExactX(
double x,
double y,
double *values)
127 void ExactY(
double x,
double y,
double *values)
135 void Exact3D(
double x,
double y,
double z,
double *values)
137 values[0] = 4*x*y*z*z;
145 void BoundCondition2d(
int i,
double t, BoundCond &cond)
151 void BoundValue2d(
int BdComp,
double Param,
double &value)
156 void BilinearCoeffs2d(
int n_points,
double *x,
double *y,
157 double **parameters,
double **coeffs)
161 double *coeff, *param;
162 static int first = 1;
172 double lambda = a*sqrt(rho*g/sigma);
173 double Si = 4*Pi*0.1*chi*chi*H0*H0/(2*sqrt(sigma*g*rho));
177 OutPut(
"lambda: " << lambda << endl);
178 OutPut(
"Si: " << Si << endl);
183 for(i=0;i<n_points;i++)
186 param = parameters[i];
191 coeff[3] = lambda*lambda;
193 phin = param[2]*param[5] + param[3]*param[6] + param[4]*param[7];
194 coeff[4] = lambda*Si/chi*( param[2]*param[2] + param[3]*param[3]
196 +lambda*Si * phin*phin;
201 void BilinearCoeffs2dNL(
int n_points,
double *x,
double *y,
202 double **parameters,
double **coeffs)
206 double *coeff, *param;
207 static int first = 1;
209 double phin, Im, H, L, arg;
219 double gamma = 3*chi*H0/Ms;
221 double lambda = a*sqrt(rho*g/sigma);
222 double Si = 4*Pi*0.1*Ms*Ms/(3*chi*sqrt(sigma*g*rho));
226 OutPut(
"lambda: " << lambda << endl);
227 OutPut(
"Si: " << Si << endl);
228 OutPut(
"gamma: " << gamma << endl);
233 for(i=0;i<n_points;i++)
236 param = parameters[i];
241 coeff[3] = lambda*lambda;
243 H = sqrt(param[2]*param[2] + param[3]*param[3] + param[4]*param[4]);
245 Im = log( sinh(arg) / arg );
247 L = 1/tanh(arg) - 1/arg;
249 phin = (param[2]*param[5] + param[3]*param[6] + param[4]*param[7])/H;
251 coeff[4] = lambda*Si*Im + 1.5*chi*lambda*Si*L*L*phin*phin;
260 void MinSurfParams(
double *in,
double *out)
263 out[0] = 1/sqrt(1+in[2]*in[2]+in[3]*in[3]);
267 int N_FEFunctionsMS = 1;
268 int N_ParamFctMS = 1;
269 int N_FEValuesMS = 2;
270 int FEValuesFctIndexMS[2] = { 0, 0 };
271 MultiIndex2D FEValuesMultiIndexMS[2] = { D10, D01 };
272 int N_ParametersMS = 1;
273 int BeginParameterMS[1] = { 0 };
274 ParamFct *ParameterFctMS[1] = { MinSurfParams };
277 void UnDisturbed(
double x,
double y,
double *values)
double RE_NR
Definition: Database.h:313
static TParamDB * ParamDB
Definition: Database.h:1134