16 SpectralQuad::SpectralQuad() :
Map( 0 ) {}
37 if(
_init &&
_n == order )
return;
47 for(
int d = 0; d < 2; d++ )
55 unsigned int nf =
_n *
_n, ne =
_n, nw = 2 *
_n *
_n + 3 *
_n;
62 for(
int d = 0; d < 2; d++ )
87 for( d = 0; d < 2; d++ )
92 for( d = 0; d < 3; d++ )
103 const double iter_tol,
104 const double inside_tol,
115 double r[2] = { 0, 0 };
121 std::vector< CartVect > dummy;
122 throw Map::EvaluationError(
CartVect( x_star ), dummy );
129 return insideFcn( params, 2, inside_tol );
144 void SpectralQuad::evaluate_vector(
const CartVect& params,
const double* field,
int num_tuples,
double* eval )
const
148 for( d = 0; d < 2; d++ )
155 void SpectralQuad::integrate_vector(
const double* field,
159 const int num_tuples,
168 return EvalSet::inside( params, ndim, tol );
178 assert( this->
vertex.size() == 4 );
179 static double corner_params[4][2] = { { -1., -1. }, { 1., -1. }, { 1., 1. }, { -1., 1. } };
183 for(
int i = 0; i <
_n; i++ )
185 double csi =
_z[0][i];
186 for(
int j = 0; j <
_n; j++ )
188 double eta =
_z[1][j];
190 for(
int k = 0; k < 4; k++ )
192 const double N_k = ( 1 + csi * corner_params[k][0] ) * ( 1 + eta * corner_params[k][1] );
209 x = (
double*)
_xyz[0];
210 y = (
double*)
_xyz[1];
211 z = (
double*)
_xyz[2];