예제 #1
0
 virtual Scalar2<std::complex<double> > value(double x, double y) const
 {
     Scalar2<std::complex<double> >ex(0.0, 0.0);
     #pragma omp critical (custom)
     {
         exact_sol_val(x, y,  ex[0], ex[1]);
     }
     return ex;
 };
예제 #2
0
static void exact_sol(double x, double y, double z, scalar &e0, scalar &e1, scalar &e1dx, scalar &e0dy)
{
  exact_sol_val(x, y, z, e0, e1);

  double t1 = x*x;
  double t2 = y*y;
  double t3 = t1+t2;
  double t4 = sqrt(t3);
  double t5 = jv(2.0/3.0,t4);
  double t6 = 1/t4;
  double t7 = jv(-1.0/3.0,t4);
  double t11 = (-t5-t6*t7/3.0)*t6;
  double t14 = 1/t4/t3;
  double t15 = t14*t5;
  double t21 = t7-2.0/3.0*t6*t5;
  double t22 = 1/t3*t21;
  double t27 = atan2(y,x);
  if (t27 < 0) t27 += 2.0*M_PI;
  double t28 = 2.0/3.0*t27;
  double t29 = cos(t28);
  double t32 = t21*t14;
  double t35 = t21*t6;
  double t36 = t35*t29;
  double t39 = sin(t28);
  double t41 = 1/t1;
  double t43 = 1.0+t2*t41;
  double t44 = 1/t43;
  double t47 = 4.0/3.0*t35/x*t39*y*t44;
  double t48 = t5*t29;
  double t49 = t1*t1;
  double t52 = t43*t43;
  double t53 = 1/t52;
  double t57 = t5*t39;
  double t59 = 1/t1/x;
  e1dx =-(t11*x+2.0/3.0*t15*x-2.0/3.0*t22*x)
         *t6*x*t29+t32*t1*t29-t36-t47+4.0/9.0*t48*t2/t49*t53+4.0/3.0*t57*y*t59*t44-4.0/3.0*t57*t2*y/t49/x*t53;
  e0dy = (t11*y+2.0/3.0*t15*y-2.0/3.0*t22*y)*t6*y*t29-t32*t2*t29+t36-t47-4.0/9.0*t48*t41*t53+4.0/3.0*t57*t59*t53*y;
}
예제 #3
0
 virtual Scalar2<std::complex<double> > value(double x, double y) const 
 {
   Scalar2<std::complex<double> >ex(0.0, 0.0);
   exact_sol_val(x, y,  ex[0], ex[1]);
   return ex;
 };
예제 #4
0
 virtual scalar2 value(double x, double y) const 
 {
   scalar2 ex(0.0, 0.0);
   exact_sol_val(x, y,  ex.val[0], ex.val[1]);
   return ex;
 };