Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Typedefs | Enumerations | Functions | Variables
Nektar::Collections Namespace Reference

Classes

class  BwdTrans_IterPerExp
 Backward transform operator using default StdRegions operator. More...
 
class  BwdTrans_NoCollection
 Backward transform operator using LocalRegions implementation. More...
 
class  BwdTrans_StdMat
 Backward transform operator using standard matrix approach. More...
 
class  BwdTrans_SumFac_Hex
 Backward transform operator using sum-factorisation (Hex) More...
 
class  BwdTrans_SumFac_Prism
 Backward transform operator using sum-factorisation (Prism) More...
 
class  BwdTrans_SumFac_Quad
 Backward transform operator using sum-factorisation (Quad) More...
 
class  BwdTrans_SumFac_Seg
 Backward transform operator using sum-factorisation (Segment) More...
 
class  BwdTrans_SumFac_Tet
 Backward transform operator using sum-factorisation (Tet) More...
 
class  BwdTrans_SumFac_Tri
 Backward transform operator using sum-factorisation (Tri) More...
 
class  CoalescedGeomData
 
class  Collection
 Collection. More...
 
class  CollectionOptimisation
 
class  IProductWRTBase_IterPerExp
 Inner product operator using element-wise operation. More...
 
class  IProductWRTBase_NoCollection
 Inner product operator using original MultiRegions implementation. More...
 
class  IProductWRTBase_StdMat
 Inner product operator using standard matrix approach. More...
 
class  IProductWRTBase_SumFac_Hex
 Backward transform operator using sum-factorisation (Hex) More...
 
class  IProductWRTBase_SumFac_Prism
 Backward transform operator using sum-factorisation (Prism) More...
 
class  IProductWRTBase_SumFac_Quad
 Inner product operator using sum-factorisation (Quad) More...
 
class  IProductWRTBase_SumFac_Seg
 Inner product operator using sum-factorisation (Segment) More...
 
class  IProductWRTBase_SumFac_Tet
 Inner product operator using sum-factorisation (Tet) More...
 
class  IProductWRTBase_SumFac_Tri
 Inner product operator using sum-factorisation (Tri) More...
 
class  IProductWRTDerivBase_IterPerExp
 Inner product WRT deriv base operator using element-wise operation. More...
 
class  IProductWRTDerivBase_NoCollection
 Inner product WRT deriv base operator using LocalRegions implementation. More...
 
class  IProductWRTDerivBase_StdMat
 Inner product WRT deriv base operator using standard matrix approach. More...
 
class  IProductWRTDerivBase_SumFac_Hex
 Inner product WRT deriv base operator using sum-factorisation (Hex) More...
 
class  IProductWRTDerivBase_SumFac_Prism
 Inner product WRT deriv base operator using sum-factorisation (Prism) More...
 
class  IProductWRTDerivBase_SumFac_Quad
 Inner product WRT deriv base operator using sum-factorisation (Quad) More...
 
class  IProductWRTDerivBase_SumFac_Seg
 Inner product WRT deriv base operator using sum-factorisation (Segment) More...
 
class  IProductWRTDerivBase_SumFac_Tet
 Inner product WRT deriv base operator using sum-factorisation (Tet) More...
 
class  IProductWRTDerivBase_SumFac_Tri
 Inner product WRT deriv base operator using sum-factorisation (Tri) More...
 
class  Operator
 Base class for operators on a collection of elements. More...
 
class  OpImpTimingKey
 
class  PhysDeriv_IterPerExp
 Phys deriv operator using element-wise operation. More...
 
class  PhysDeriv_NoCollection
 Phys deriv operator using original LocalRegions implementation. More...
 
class  PhysDeriv_StdMat
 Phys deriv operator using standard matrix approach. More...
 
class  PhysDeriv_SumFac_Hex
 Phys deriv operator using sum-factorisation (Hex) More...
 
class  PhysDeriv_SumFac_Prism
 Phys deriv operator using sum-factorisation (Prism) More...
 
class  PhysDeriv_SumFac_Quad
 Phys deriv operator using sum-factorisation (Quad) More...
 
class  PhysDeriv_SumFac_Seg
 Phys deriv operator using sum-factorisation (Segment) More...
 
class  PhysDeriv_SumFac_Tet
 Phys deriv operator using sum-factorisation (Tet) More...
 
class  PhysDeriv_SumFac_Tri
 Phys deriv operator using sum-factorisation (Tri) More...
 

Typedefs

typedef boost::shared_ptr
< CoalescedGeomData
CoalescedGeomDataSharedPtr
 
typedef std::vector< CollectionCollectionVector
 
typedef boost::shared_ptr
< CollectionVector
CollectionVectorSharedPtr
 
typedef bool ExpansionIsNodal
 
typedef std::map< OperatorType,
ImplementationType
OperatorImpMap
 
typedef boost::shared_ptr
< Operator
OperatorSharedPtr
 Shared pointer to an Operator object. More...
 
typedef boost::tuple
< LibUtilities::ShapeType,
OperatorType,
ImplementationType,
ExpansionIsNodal
OperatorKey
 Key for describing an Operator. More...
 
typedef
Nektar::LibUtilities::NekFactory
< OperatorKey, Operator,
std::vector
< StdRegions::StdExpansionSharedPtr >
, CoalescedGeomDataSharedPtr
OperatorFactory
 Operator factory definition. More...
 

Enumerations

enum  GeomData { eJac, eJacWithStdWeights, eDerivFactors }
 
enum  OperatorType {
  eBwdTrans, eIProductWRTBase, eIProductWRTDerivBase, ePhysDeriv,
  SIZE_OperatorType
}
 
enum  ImplementationType {
  eNoImpType, eNoCollection, eIterPerExp, eStdMat,
  eSumFac, SIZE_ImplementationType
}
 

Functions

void QuadIProduct (bool colldir0, bool colldir1, int numElmt, int nquad0, int nquad1, int nmodes0, int nmodes1, const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &jac, const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &wsp)
 
void TriIProduct (bool sortTopVertex, int numElmt, int nquad0, int nquad1, int nmodes0, int nmodes1, const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &jac, const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &wsp)
 
void HexIProduct (bool colldir0, bool colldir1, bool colldir2, int numElmt, int nquad0, int nquad1, int nquad2, int nmodes0, int nmodes1, int nmodes2, const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &base2, const Array< OneD, const NekDouble > &jac, const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &wsp)
 
void PrismIProduct (bool sortTopVertex, int numElmt, int nquad0, int nquad1, int nquad2, int nmodes0, int nmodes1, int nmodes2, const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &base2, const Array< OneD, const NekDouble > &jac, const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &wsp)
 
void TetIProduct (bool sortTopEdge, int numElmt, int nquad0, int nquad1, int nquad2, int nmodes0, int nmodes1, int nmodes2, const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &base2, const Array< OneD, const NekDouble > &jac, const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &wsp)
 
bool operator< (OperatorKey const &p1, OperatorKey const &p2)
 Less-than comparison operator for OperatorKey objects. More...
 
std::ostream & operator<< (std::ostream &os, OperatorKey const &p)
 Stream output operator for OperatorKey objects. More...
 
OperatorFactoryGetOperatorFactory ()
 Returns the singleton Operator factory object. More...
 
OperatorImpMap SetFixedImpType (ImplementationType defaultType)
 simple Operator Implementation Map generator More...
 

Variables

static CoalescedGeomDataSharedPtr GeomDataNull
 
const char *const OperatorTypeMap []
 
const char *const ImplementationTypeMap []
 

Typedef Documentation

Definition at line 75 of file CoalescedGeomData.h.

Definition at line 98 of file Collection.h.

Definition at line 99 of file Collection.h.

Definition at line 100 of file Operator.h.

Operator factory definition.

Definition at line 172 of file Operator.h.

Definition at line 102 of file Operator.h.

Key for describing an Operator.

Definition at line 159 of file Operator.h.

Shared pointer to an Operator object.

Definition at line 152 of file Operator.h.

Enumeration Type Documentation

Enumerator
eJac 
eJacWithStdWeights 
eDerivFactors 

Definition at line 47 of file CoalescedGeomData.h.

Enumerator
eNoImpType 
eNoCollection 
eIterPerExp 
eStdMat 
eSumFac 
SIZE_ImplementationType 

Definition at line 81 of file Operator.h.

Enumerator
eBwdTrans 
eIProductWRTBase 
eIProductWRTDerivBase 
ePhysDeriv 
SIZE_OperatorType 

Definition at line 64 of file Operator.h.

Function Documentation

OperatorFactory & Nektar::Collections::GetOperatorFactory ( )

Returns the singleton Operator factory object.

Definition at line 110 of file Operator.cpp.

Referenced by Nektar::Collections::Collection::Collection(), and Nektar::Collections::CollectionOptimisation::SetWithTimings().

111 {
112  typedef Loki::SingletonHolder<OperatorFactory,
113  Loki::CreateUsingNew,
114  Loki::NoDestroy,
115  Loki::SingleThreaded> Type;
116  return Type::Instance();
117 }
Nektar::LibUtilities::NekFactory< OperatorKey, Operator, std::vector< StdRegions::StdExpansionSharedPtr >, CoalescedGeomDataSharedPtr > OperatorFactory
Operator factory definition.
Definition: Operator.h:172
void Nektar::Collections::HexIProduct ( bool  colldir0,
bool  colldir1,
bool  colldir2,
int  numElmt,
int  nquad0,
int  nquad1,
int  nquad2,
int  nmodes0,
int  nmodes1,
int  nmodes2,
const Array< OneD, const NekDouble > &  base0,
const Array< OneD, const NekDouble > &  base1,
const Array< OneD, const NekDouble > &  base2,
const Array< OneD, const NekDouble > &  jac,
const Array< OneD, const NekDouble > &  input,
Array< OneD, NekDouble > &  output,
Array< OneD, NekDouble > &  wsp 
)

Definition at line 179 of file IProduct.cpp.

References Vmath::Vcopy(), and Vmath::Vmul().

Referenced by Nektar::Collections::IProductWRTBase_SumFac_Hex::operator()(), and Nektar::Collections::IProductWRTDerivBase_SumFac_Hex::operator()().

189 {
190  int totmodes = nmodes0*nmodes1*nmodes2;
191  int totpoints = nquad0 *nquad1 *nquad2;
192 
193 
194  if(colldir0 && colldir1 && colldir2)
195  {
196 
197  Vmath::Vmul(numElmt*totpoints,jac,1,input,1,output,1);
198  }
199  else
200  {
201  Vmath::Vmul(numElmt*totpoints,jac,1,input,1,wsp,1);
202 
203  // Assign second half of workspace for 2nd DGEMM operation.
204  Array<OneD, NekDouble> wsp1 = wsp + totpoints*numElmt;
205 
206  // note sure what criterion we should use to swap around these
207  // strategies
208  if(numElmt < nmodes0 || 1)
209  {
210  Array<OneD, NekDouble> wsp2 = wsp1 + nmodes0*nquad1*nquad2;
211 
212  //loop over elements
213  for(int n = 0; n < numElmt; ++n)
214  {
215  if(colldir0)
216  {
217 
218  for(int i = 0; i < nmodes0; ++i)
219  {
220  Vmath::Vcopy(nquad1*nquad2,&wsp[n*totpoints] + i,nquad0,
221  wsp1.get()+nquad1*nquad2*i,1);
222  }
223  }
224  else
225  {
226  Blas::Dgemm('T', 'N', nquad1*nquad2, nmodes0, nquad0,
227  1.0, &wsp[n*totpoints], nquad0,
228  base0.get(), nquad0,
229  0.0, wsp1.get(), nquad1*nquad2);
230  }
231 
232 
233  if(colldir1)
234  {
235  // reshuffle data for next operation.
236  for(int i = 0; i < nmodes1; ++i)
237  {
238  Vmath::Vcopy(nquad2*nmodes0,wsp1.get()+i,nquad1,
239  wsp2.get()+nquad2*nmodes0*i,1);
240  }
241  }
242  else
243  {
244  Blas::Dgemm('T', 'N', nquad2*nmodes0, nmodes1, nquad1,
245  1.0, wsp1.get(), nquad1,
246  base1.get(), nquad1,
247  0.0, wsp2.get(), nquad2*nmodes0);
248  }
249 
250  if(colldir2)
251  {
252  // reshuffle data for next operation.
253  for(int i = 0; i < nmodes2; ++i)
254  {
255  Vmath::Vcopy(nmodes0*nmodes1,wsp2.get()+i,nquad2,
256  &output[n*totmodes]+nmodes0*nmodes1*i,1);
257  }
258  }
259  else
260  {
261  Blas::Dgemm('T', 'N', nmodes0*nmodes1, nmodes2, nquad2,
262  1.0, wsp2.get(), nquad2,
263  base2.get(), nquad2,
264  0.0, &output[n*totmodes], nmodes0*nmodes1);
265  }
266  }
267  }
268  else
269  {
270  Array<OneD, NekDouble> wsp2 = wsp1 + numElmt*(max(totpoints,
271  totmodes));
272 
273  if(colldir0)
274  {
275  for(int i = 0; i < nquad0; ++i)
276  {
277  Vmath::Vcopy(nquad1*nquad2*numElmt,&wsp[i],nquad0,
278  &wsp1[i*nquad1*nquad2*numElmt],1);
279  }
280  }
281  else
282  {
283  // large degmm but copy at end.
284  Blas::Dgemm('T','N', nquad1*nquad2*numElmt, nmodes0, nquad0,
285  1.0, &wsp[0], nquad0, base0.get(), nquad0,
286  0.0, &wsp1[0], nquad1*nquad2*numElmt);
287  }
288 
289  if(colldir1)
290  {
291  for(int i = 0; i < nquad1; ++i)
292  {
293  Vmath::Vcopy(nquad2*numElmt*nmodes0,&wsp1[i],nquad1,
294  &wsp2[i*nquad2*numElmt*nmodes0],1);
295  }
296  }
297  else
298  {
299  Blas::Dgemm('T','N', nquad2*numElmt*nmodes0, nmodes1, nquad1,
300  1.0, &wsp1[0], nquad1, base1.get(), nquad1,
301  0.0, &wsp2[0], nquad2*numElmt*nmodes0);
302  }
303 
304 
305  if(numElmt > 1)
306  {
307  if(colldir2)
308  {
309  for(int i = 0; i < nquad2; ++i)
310  {
311  Vmath::Vcopy(nmodes0*nmodes1,&wsp2[i],nquad2,
312  &output[i*nmodes0*nmodes1],1);
313  }
314  }
315  else
316  {
317  Blas::Dgemm('T', 'N', numElmt*nmodes0*nmodes1, nmodes2,
318  nquad2, 1.0, &wsp2[0], nquad2,
319  base2.get(), nquad2, 0.0,
320  &wsp1[0], numElmt*nmodes0*nmodes1);
321  }
322 
323  for(int i = 0; i < totmodes; ++i)
324  {
325  Vmath::Vcopy(numElmt, &wsp1[i*numElmt], 1,
326  &output[i], totmodes);
327  }
328 
329  }
330  else
331  {
332  if(colldir2)
333  {
334  for(int i = 0; i < nquad2; ++i)
335  {
336  Vmath::Vcopy(nmodes0*nmodes1,&wsp2[i],nquad2,
337  &output[i*nmodes0*nmodes1],1);
338  }
339  }
340  else
341  {
342  Blas::Dgemm('T','N', numElmt*nmodes0*nmodes1, nmodes2,
343  nquad2, 1.0, &wsp2[0], nquad2,
344  base2.get(), nquad2, 0.0,
345  &output[0], numElmt*nmodes0*nmodes1);
346  }
347  }
348  }
349  }
350 }
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1061
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
Definition: Vmath.cpp:183
bool Nektar::Collections::operator< ( OperatorKey const &  p1,
OperatorKey const &  p2 
)

Less-than comparison operator for OperatorKey objects.

Definition at line 46 of file Operator.cpp.

47 {
48  if (boost::get<0>(p1) < boost::get<0>(p2))
49  {
50  return true;
51  }
52  if (boost::get<0>(p1) > boost::get<0>(p2))
53  {
54  return false;
55  }
56  if (boost::get<1>(p1) < boost::get<1>(p2))
57  {
58  return true;
59  }
60  if (boost::get<1>(p1) > boost::get<1>(p2))
61  {
62  return false;
63  }
64  if (boost::get<2>(p1) < boost::get<2>(p2))
65  {
66  return true;
67  }
68  if (boost::get<2>(p1) > boost::get<2>(p2))
69  {
70  return false;
71  }
72 
73  if (boost::get<3>(p1) < boost::get<3>(p2))
74  {
75  return true;
76  }
77  if (boost::get<3>(p1) > boost::get<3>(p2))
78  {
79  return false;
80  }
81 
82  return false;
83 }
std::ostream & Nektar::Collections::operator<< ( std::ostream &  os,
OperatorKey const &  p 
)

Stream output operator for OperatorKey objects.

Definition at line 89 of file Operator.cpp.

References ImplementationTypeMap, OperatorTypeMap, and CellMLToNektar.cellml_metadata::p.

90 {
91  os << LibUtilities::ShapeTypeMap[boost::get<0>(p)] << ", "
92  << OperatorTypeMap [boost::get<1>(p)] << ", "
93  << ImplementationTypeMap [boost::get<2>(p)] << ", "
94  << (boost::get<3>(p) ? "Nodal" : "Modal");
95  return os;
96 }
const char *const ImplementationTypeMap[]
Definition: Operator.h:91
const char *const OperatorTypeMap[]
Definition: Operator.h:73
void Nektar::Collections::PrismIProduct ( bool  sortTopVertex,
int  numElmt,
int  nquad0,
int  nquad1,
int  nquad2,
int  nmodes0,
int  nmodes1,
int  nmodes2,
const Array< OneD, const NekDouble > &  base0,
const Array< OneD, const NekDouble > &  base1,
const Array< OneD, const NekDouble > &  base2,
const Array< OneD, const NekDouble > &  jac,
const Array< OneD, const NekDouble > &  input,
Array< OneD, NekDouble > &  output,
Array< OneD, NekDouble > &  wsp 
)

Definition at line 356 of file IProduct.cpp.

References Nektar::LibUtilities::StdSegData::getNumberOfCoefficients(), and Vmath::Vmul().

Referenced by Nektar::Collections::IProductWRTBase_SumFac_Prism::operator()(), and Nektar::Collections::IProductWRTDerivBase_SumFac_Prism::operator()().

366 {
368  nmodes0,nmodes1,nmodes2);
369  int totpoints = nquad0*nquad1*nquad2;
370  int cnt;
371  int mode, mode1;
372 
373  Vmath::Vmul(numElmt*totpoints,jac,1,input,1,wsp,1);
374 
375  Array<OneD, NekDouble> wsp1 = wsp + numElmt * nquad2
376  * (max(nquad0*nquad1,
377  nmodes0*nmodes1));
378 
379  // Perform iproduct with respect to the '0' direction
380  Blas::Dgemm('T', 'N', nquad1*nquad2*numElmt, nmodes0, nquad0,
381  1.0, wsp.get(), nquad0, base0.get(),
382  nquad0, 0.0, wsp1.get(), nquad1*nquad2*numElmt);
383 
384 
385  // Perform iproduct with respect to the '1' direction
386  Blas::Dgemm('T', 'N', nquad2*numElmt*nmodes0, nmodes1, nquad1,
387  1.0, wsp1.get(), nquad1, base1.get(),
388  nquad1, 0.0, wsp.get(), nquad2*numElmt*nmodes0);
389 
390 
391  // Inner product with respect to the '2' direction (not sure if it would
392  // be better to swap loops?)
393  mode = mode1 = cnt = 0;
394  for(int i = 0; i < nmodes0; ++i)
395  {
396  cnt = i*nquad2*numElmt;
397  for(int j = 0; j < nmodes1; ++j)
398  {
399  Blas::Dgemm('T', 'N', nmodes2-i, numElmt, nquad2,
400  1.0, base2.get()+mode*nquad2, nquad2,
401  wsp.get()+j*nquad2*numElmt*nmodes0 + cnt, nquad2,
402  0.0, output.get()+mode1, totmodes);
403  mode1 += nmodes2-i;
404  }
405  mode += nmodes2-i;
406  }
407 
408  // fix for modified basis by splitting top vertex mode
409  if (sortTopVertex)
410  {
411  // top singular vertex
412  // ((1+a)/2 components entry into (1+c)/2)
413  // Could be made into an mxv if we have specialised base1[1]
414  for(int j =0; j < nmodes1; ++j)
415  {
416  Blas::Dgemv('T', nquad2,numElmt,1.0,
417  wsp.get()+j*nquad2*numElmt*nmodes0+nquad2*numElmt,
418  nquad2, base2.get()+nquad2,1,1.0,
419  &output[j*nmodes2+1], totmodes);
420  }
421  }
422 }
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
Definition: Vmath.cpp:183
void Nektar::Collections::QuadIProduct ( bool  colldir0,
bool  colldir1,
int  numElmt,
int  nquad0,
int  nquad1,
int  nmodes0,
int  nmodes1,
const Array< OneD, const NekDouble > &  base0,
const Array< OneD, const NekDouble > &  base1,
const Array< OneD, const NekDouble > &  jac,
const Array< OneD, const NekDouble > &  input,
Array< OneD, NekDouble > &  output,
Array< OneD, NekDouble > &  wsp 
)

Definition at line 49 of file IProduct.cpp.

References Vmath::Vcopy(), and Vmath::Vmul().

Referenced by Nektar::Collections::IProductWRTBase_SumFac_Quad::operator()(), and Nektar::Collections::IProductWRTDerivBase_SumFac_Quad::operator()().

58 {
59  int totpoints = nquad0*nquad1;
60  int totmodes = nmodes0*nmodes1;
61 
62  Vmath::Vmul(numElmt*totpoints,jac,1,input,1,wsp,1);
63 
64  if(colldir0 && colldir1)
65  {
66  Vmath::Vcopy(numElmt*totmodes,wsp.get(),1,output.get(),1);
67  }
68  else
69  {
70  Array<OneD, NekDouble> wsp1 = wsp + max(totpoints,totmodes)*numElmt;
71  if(colldir0)
72  {
73  for(int i = 0; i < nquad0; ++i)
74  {
75  Vmath::Vcopy(nquad1*numElmt,&wsp[i],nquad0,
76  &wsp1[i*nquad1*numElmt],1);
77  }
78  }
79  else
80  {
81  Blas::Dgemm('T','N', nquad1*numElmt,nmodes0,nquad0,1.0,
82  &wsp[0],nquad0, base0.get(), nquad0,
83  0.0,&wsp1[0], nquad1*numElmt);
84  }
85 
86 
87  if(numElmt > 1)
88  {
89 
90  if(colldir1)
91  {
92  for(int i = 0; i < nquad1; ++i)
93  {
94  Vmath::Vcopy(numElmt*nmodes0,&wsp1[i],nquad1,
95  &wsp[i*numElmt*nmodes0],1);
96  }
97  }
98  else
99  {
100 
101  Blas::Dgemm('T','N', numElmt*nmodes0, nmodes1, nquad1,
102  1.0, &wsp1[0], nquad1, base1.get(), nquad1,
103  0.0, &wsp[0], numElmt*nmodes0);
104  }
105 
106  for(int i = 0; i < totmodes; ++i)
107  {
108  Vmath::Vcopy(numElmt,&wsp[i*numElmt],1,&output[i],totmodes);
109  }
110  }
111  else
112  {
113  if(colldir1)
114  {
115  for(int i = 0; i < nquad1; ++i)
116  {
117  Vmath::Vcopy(numElmt*nmodes0,&wsp1[i],nquad1,
118  &output[i*numElmt*nmodes0],1);
119  }
120  }
121  else
122  {
123  Blas::Dgemm('T','N', nmodes0, nmodes1, nquad1,
124  1.0, &wsp1[0], nquad1, base1.get(), nquad1,
125  0.0, &output[0], nmodes0);
126  }
127  }
128  }
129 }
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1061
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
Definition: Vmath.cpp:183
OperatorImpMap Nektar::Collections::SetFixedImpType ( ImplementationType  defaultType)

simple Operator Implementation Map generator

Definition at line 122 of file Operator.cpp.

References SIZE_OperatorType.

123 {
124  OperatorImpMap opMap;
125 
126  for(int i = 0; i < SIZE_OperatorType; ++i)
127  {
128  opMap[(OperatorType)i] = defaultType;
129  }
130 
131  return opMap;
132 }
std::map< OperatorType, ImplementationType > OperatorImpMap
Definition: Operator.h:102
void Nektar::Collections::TetIProduct ( bool  sortTopEdge,
int  numElmt,
int  nquad0,
int  nquad1,
int  nquad2,
int  nmodes0,
int  nmodes1,
int  nmodes2,
const Array< OneD, const NekDouble > &  base0,
const Array< OneD, const NekDouble > &  base1,
const Array< OneD, const NekDouble > &  base2,
const Array< OneD, const NekDouble > &  jac,
const Array< OneD, const NekDouble > &  input,
Array< OneD, NekDouble > &  output,
Array< OneD, NekDouble > &  wsp 
)

Definition at line 428 of file IProduct.cpp.

References Vmath::Ddot(), Nektar::LibUtilities::StdSegData::getNumberOfCoefficients(), and Vmath::Vmul().

Referenced by Nektar::Collections::IProductWRTBase_SumFac_Tet::operator()(), and Nektar::Collections::IProductWRTDerivBase_SumFac_Tet::operator()().

438 {
440  nmodes0,nmodes1,nmodes2);
441  int totpoints = nquad0*nquad1*nquad2;
442  int cnt;
443  int mode, mode1;
444 
445  Vmath::Vmul(numElmt*totpoints,jac,1,input,1,wsp,1);
446 
447  Array<OneD, NekDouble> wsp1 = wsp +
448  nquad2*numElmt*(max(nquad0*nquad1,nmodes0*(2*nmodes1-nmodes0+1)/2));
449 
450 
451  // Perform iproduct with respect to the '0' direction
452  Blas::Dgemm('T', 'N', nquad1*nquad2*numElmt, nmodes0, nquad0,
453  1.0, wsp.get(), nquad0, base0.get(),
454  nquad0, 0.0, wsp1.get(), nquad1*nquad2*numElmt);
455 
456  // Inner product with respect to the '1' direction
457  mode = 0;
458  for(int i=0; i < nmodes0; ++i)
459  {
460  Blas::Dgemm('T', 'N', nquad2*numElmt, nmodes1-i, nquad1,
461  1.0, wsp1.get()+ i*nquad1*nquad2*numElmt, nquad1,
462  base1.get() + mode*nquad1, nquad1,
463  0.0, wsp.get() + mode*nquad2*numElmt,nquad2*numElmt);
464  mode += nmodes1-i;
465  }
466 
467 
468  // fix for modified basis by splitting top vertex mode
469  if (sortTopEdge)
470  {
471  // base singular vertex and singular edge (1+b)/2
472  // ((1+a)/2 components entry into (1+b)/2)
473  // Could be made into an mxm if we have specialised base1[1]
474  for(int n = 0; n < numElmt; ++n)
475  {
476  Blas::Dgemv('T', nquad1, nquad2,
477  1.0, wsp1.get()+numElmt*nquad1*nquad2 +
478  n*nquad1*nquad2, nquad1,
479  base1.get()+nquad1, 1, 1.0,
480  wsp.get()+nquad2*numElmt + n*nquad2, 1);
481  }
482  }
483 
484  // Inner product with respect to the '2' direction
485  mode = mode1 = cnt = 0;
486  for(int i = 0; i < nmodes0; ++i)
487  {
488  for(int j = 0; j < nmodes1-i; ++j, ++cnt)
489  {
490  Blas::Dgemm('T', 'N', nmodes2-i-j, numElmt, nquad2,
491  1.0, base2.get()+mode*nquad2, nquad2,
492  wsp.get()+cnt*nquad2*numElmt, nquad2,
493  0.0, output.get()+mode1, totmodes);
494  mode += nmodes2-i-j;
495  mode1 += nmodes2-i-j;
496  }
497 
498  //increment mode in case order1!=order2
499  mode += (nmodes2-nmodes1)*(nmodes2-nmodes1+1)/2;
500  }
501 
502  // fix for modified basis for top singular vertex component
503  // Already have evaluated (1+c)/2 (1-b)/2 (1-a)/2
504  if(sortTopEdge)
505  {
506  for(int n = 0; n < numElmt; ++n)
507  {
508  // add in (1+c)/2 (1+b)/2 component
509  output[1+n*totmodes] += Blas::Ddot(nquad2,
510  base2.get()+nquad2,1,
511  &wsp[nquad2*numElmt + n*nquad2],1);
512 
513  // add in (1+c)/2 (1-b)/2 (1+a)/2 component
514  output[1+n*totmodes] += Blas::Ddot(nquad2,
515  base2.get()+nquad2,1,
516  &wsp[nquad2*nmodes1*numElmt+n*nquad2],1);
517  }
518  }
519 
520 }
T Ddot(int n, const Array< OneD, const T > &w, const int incw, const Array< OneD, const T > &x, const int incx, const Array< OneD, const int > &y, const int incy)
Definition: VmathArray.hpp:436
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
Definition: Vmath.cpp:183
void Nektar::Collections::TriIProduct ( bool  sortTopVertex,
int  numElmt,
int  nquad0,
int  nquad1,
int  nmodes0,
int  nmodes1,
const Array< OneD, const NekDouble > &  base0,
const Array< OneD, const NekDouble > &  base1,
const Array< OneD, const NekDouble > &  jac,
const Array< OneD, const NekDouble > &  input,
Array< OneD, NekDouble > &  output,
Array< OneD, NekDouble > &  wsp 
)

Definition at line 135 of file IProduct.cpp.

References Nektar::LibUtilities::StdSegData::getNumberOfCoefficients(), and Vmath::Vmul().

Referenced by Nektar::Collections::IProductWRTBase_SumFac_Tri::operator()(), and Nektar::Collections::IProductWRTDerivBase_SumFac_Tri::operator()().

143 {
145  nmodes0, nmodes1);
146  int totpoints = nquad0*nquad1;
147 
148  Vmath::Vmul(numElmt*totpoints,jac,1,input,1,wsp,1);
149 
150  Array<OneD, NekDouble> wsp1 = wsp + max(totpoints,totmodes)*numElmt;
151 
152  Blas::Dgemm('T','N', nquad1*numElmt,nmodes0,nquad0,1.0,&wsp[0],nquad0,
153  base0.get(), nquad0, 0.0, &wsp1[0], nquad1*numElmt);
154 
155  int i, mode;
156  // Inner product with respect to 'b' direction
157  for (mode=i=0; i < nmodes0; ++i)
158  {
159  Blas::Dgemm('T', 'N', nmodes1-i, numElmt, nquad1,
160  1.0, base1.get()+mode*nquad1, nquad1,
161  wsp1.get() + i*nquad1*numElmt, nquad1, 0.0,
162  &output[mode], totmodes);
163 
164  mode += nmodes1 - i;
165  }
166 
167  // fix for modified basis by splitting top vertex mode
168  if (sortTopVertex)
169  {
170  Blas::Dgemv('T', nquad1,numElmt,1.0,wsp1.get()+nquad1*numElmt,nquad1,
171  base1.get()+nquad1,1,1.0, &output[1],totmodes);
172  }
173 }
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
Definition: Vmath.cpp:183

Variable Documentation

CoalescedGeomDataSharedPtr Nektar::Collections::GeomDataNull
static

Definition at line 77 of file CoalescedGeomData.h.

const char* const Nektar::Collections::ImplementationTypeMap[]
Initial value:
=
{
"NoImplementationType",
"NoCollection",
"IterPerExp",
"StdMat",
"SumFac"
}

Definition at line 91 of file Operator.h.

Referenced by Nektar::Collections::CollectionOptimisation::CollectionOptimisation(), operator<<(), and Nektar::Collections::CollectionOptimisation::SetWithTimings().

const char* const Nektar::Collections::OperatorTypeMap[]
Initial value:
=
{
"BwdTrans",
"IProductWRTBase",
"IProductWRTDerivBase",
"PhysDeriv"
}

Definition at line 73 of file Operator.h.

Referenced by Nektar::Collections::CollectionOptimisation::CollectionOptimisation(), operator<<(), and Nektar::Collections::CollectionOptimisation::SetWithTimings().