Beispiel #1
0
void SpectralQuad::evaluate_vector(const CartVect& params, const double *field, int num_tuples, double *eval) const
{
    //piece that we shouldn't want to cache
  int d;
  for(d=0; d<2; d++){
    lagrange_0(&_ld[d], params[d]);
  }

  *eval = tensor_i2(_ld[0].J,_ld[0].n,
                    _ld[1].J,_ld[1].n,
                    field,
                    _odwork);
}
Beispiel #2
0
CartVect SpectralQuad::evalFcn(const double *params, const double *field, const int ndim, const int num_tuples, 
                               double *work, double *result) 
{
    //piece that we shouldn't want to cache
  int d=0;
  for(d=0; d<2; d++){
    lagrange_0(&_ld[d], params[d]);
  }
  CartVect result;
  for (d=0; d<3; d++)
  {
    result[d] = tensor_i2(_ld[0].J,_ld[0].n,
                          _ld[1].J,_ld[1].n,
                          _xyz[d],
                          _odwork);
  }
  return result;
}
Beispiel #3
0
CartVect SpectralHex::evaluate( const CartVect& params ) const
{
    //piece that we shouldn't want to cache
  int d=0;
  for(d=0; d<3; d++){
    lagrange_0(&_ld[d], params[d]);
  }
  CartVect result;
  for (d=0; d<3; d++)
  {
    result[d] = tensor_i3(_ld[0].J,_ld[0].n,
                          _ld[1].J,_ld[1].n,
                          _ld[2].J,_ld[2].n,
                          _xyz[d],   // this is the "field"
                          _odwork);
  }
  return result;
}
Beispiel #4
0
inline void findpt_weights_3(findpt_data_3 *p, const real r[3])
{
  lagrange_0(&p->ld[0],r[0]);
  lagrange_0(&p->ld[1],r[1]);
  lagrange_0(&p->ld[2],r[2]);
}