Nektar++
IProductWRTBase.cpp
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File: IProductWRTBase.cpp
4 //
5 // For more information, please see: http://www.nektar.info
6 //
7 // The MIT License
8 //
9 // Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10 // Department of Aeronautics, Imperial College London (UK), and Scientific
11 // Computing and Imaging Institute, University of Utah (USA).
12 //
13 // Permission is hereby granted, free of charge, to any person obtaining a
14 // copy of this software and associated documentation files (the "Software"),
15 // to deal in the Software without restriction, including without limitation
16 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
17 // and/or sell copies of the Software, and to permit persons to whom the
18 // Software is furnished to do so, subject to the following conditions:
19 //
20 // The above copyright notice and this permission notice shall be included
21 // in all copies or substantial portions of the Software.
22 //
23 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29 // DEALINGS IN THE SOFTWARE.
30 //
31 // Description: IProductWRTBase operator implementations
32 //
33 ///////////////////////////////////////////////////////////////////////////////
34 
35 #include <boost/core/ignore_unused.hpp>
36 
37 #include <MatrixFreeOps/Operator.hpp>
38 
39 #include <Collections/Operator.h>
40 #include <Collections/Collection.h>
41 #include <Collections/IProduct.h>
43 
44 using namespace std;
45 
46 namespace Nektar {
47 namespace Collections {
48 
56 
57 /**
58  * @brief Inner product operator using standard matrix approach
59  */
61 {
62  public:
64 
66  {
67  }
68 
69  void operator()(
70  const Array<OneD, const NekDouble> &input,
71  Array<OneD, NekDouble> &output,
72  Array<OneD, NekDouble> &output1,
73  Array<OneD, NekDouble> &output2,
74  Array<OneD, NekDouble> &wsp) final
75  {
76  boost::ignore_unused(output1, output2);
77 
78  ASSERTL1(wsp.size() == m_wspSize,
79  "Incorrect workspace size");
80 
81  if(m_isDeformed)
82  {
83  Vmath::Vmul(m_jac.size(),m_jac,1,input,1,wsp,1);
84  }
85  else
86  {
88  for(int e = 0; e < m_numElmt; ++e)
89  {
90  Vmath::Smul(m_nqe,m_jac[e],input+e*m_nqe,1,tmp = wsp+e*m_nqe,1);
91  }
92  }
93 
94  Blas::Dgemm('N', 'N', m_mat->GetRows(), m_numElmt,
95  m_mat->GetColumns(), 1.0, m_mat->GetRawPtr(),
96  m_mat->GetRows(), wsp.get(), m_stdExp->GetTotPoints(),
97  0.0, output.get(), m_stdExp->GetNcoeffs());
98  }
99 
100  void operator()(int dir,
101  const Array<OneD, const NekDouble> &input,
102  Array<OneD, NekDouble> &output,
103  Array<OneD, NekDouble> &wsp) final
104  {
105  boost::ignore_unused(dir, input, output, wsp);
106  NEKERROR(ErrorUtil::efatal, "Not valid for this operator.");
107  }
108 
109  virtual void CheckFactors(StdRegions::FactorMap factors,
110  int coll_phys_offset)
111  {
112  boost::ignore_unused(factors, coll_phys_offset);
113  ASSERTL0(false, "Not valid for this operator.");
114  }
115 
116 
117  protected:
120 
121  private:
123  vector<StdRegions::StdExpansionSharedPtr> pCollExp,
124  CoalescedGeomDataSharedPtr pGeomData,
125  StdRegions::FactorMap factors)
126  : Operator(pCollExp, pGeomData, factors)
127  {
128  m_jac = pGeomData->GetJac(pCollExp);
130  m_stdExp->DetShapeType(), *m_stdExp);
131  m_mat = m_stdExp->GetStdMatrix(key);
132  m_nqe = m_stdExp->GetTotPoints();
133  m_wspSize = m_nqe*m_numElmt;
134  }
135 };
136 
137 /// Factory initialisation for the IProductWRTBase_StdMat operators
138 OperatorKey IProductWRTBase_StdMat::m_typeArr[] = {
141  IProductWRTBase_StdMat::create, "IProductWRTBase_StdMat_Seg"),
144  IProductWRTBase_StdMat::create, "IProductWRTBase_StdMat_Tri"),
147  IProductWRTBase_StdMat::create, "IProductWRTBase_StdMat_NodalTri"),
150  IProductWRTBase_StdMat::create, "IProductWRTBase_StdMat_Quad"),
153  IProductWRTBase_StdMat::create, "IProductWRTBase_StdMat_Tet"),
156  IProductWRTBase_StdMat::create, "IProductWRTBase_StdMat_NodalTet"),
159  IProductWRTBase_StdMat::create, "IProductWRTBase_StdMat_Pyr"),
162  IProductWRTBase_StdMat::create, "IProductWRTBase_StdMat_Prism"),
165  IProductWRTBase_StdMat::create, "IProductWRTBase_StdMat_NodalPrism"),
168  IProductWRTBase_StdMat::create, "IProductWRTBase_StdMat_Hex"),
171  IProductWRTBase_StdMat::create, "IProductWRTBase_SumFac_Pyr")
172 };
173 
174 /**
175  * @brief Inner product operator using operator using matrix free operators.
176  */
178 {
179  public:
181 
183  {
184  }
185 
186  virtual void operator()(
187  const Array<OneD, const NekDouble> &input,
188  Array<OneD, NekDouble> &output,
189  Array<OneD, NekDouble> &output1,
190  Array<OneD, NekDouble> &output2,
191  Array<OneD, NekDouble> &wsp) final
192  {
193  boost::ignore_unused(output1, output2, wsp);
194 
195  if (m_isPadded)
196  {
197  // copy into padded vector
198  Vmath::Vcopy(m_nIn, input, 1, m_input, 1);
199  // call op
200  (*m_oper)(m_input, m_output);
201  // copy out of padded vector
202  Vmath::Vcopy(m_nOut, m_output, 1, output, 1);
203  }
204  else
205  {
206  (*m_oper)(input, output);
207  }
208  }
209 
210  void operator()(int dir,
211  const Array<OneD, const NekDouble> &input,
212  Array<OneD, NekDouble> &output,
213  Array<OneD, NekDouble> &wsp) final
214  {
215  boost::ignore_unused(dir, input, output, wsp);
216  NEKERROR(ErrorUtil::efatal, "Not valid for this operator.");
217  }
218 
219  virtual void CheckFactors(StdRegions::FactorMap factors,
220  int coll_phys_offset)
221  {
222  boost::ignore_unused(factors, coll_phys_offset);
223  ASSERTL0(false, "Not valid for this operator.");
224  }
225 
226  private:
227  std::shared_ptr<MatrixFree::IProduct> m_oper;
228 
230  vector<StdRegions::StdExpansionSharedPtr> pCollExp,
231  CoalescedGeomDataSharedPtr pGeomData,
232  StdRegions::FactorMap factors)
233  : Operator(pCollExp, pGeomData, factors),
234  MatrixFreeOneInOneOut(pCollExp[0]->GetStdExp()->GetTotPoints(),
235  pCollExp[0]->GetStdExp()->GetNcoeffs(),
236  pCollExp.size())
237  {
238 
239  // Basis vector
240  const auto dim = pCollExp[0]->GetStdExp()->GetShapeDimension();
241  std::vector<LibUtilities::BasisSharedPtr> basis(dim);
242  for (unsigned int i = 0; i < dim; ++i)
243  {
244  basis[i] = pCollExp[0]->GetBasis(i);
245  }
246 
247  // Get shape type
248  auto shapeType = pCollExp[0]->GetStdExp()->DetShapeType();
249 
250  // Generate operator string and create operator.
251  std::string op_string = "IProduct";
252  op_string += MatrixFree::GetOpstring(shapeType, m_isDeformed);
253  auto oper = MatrixFree::GetOperatorFactory().
254  CreateInstance(op_string, basis, m_nElmtPad);
255 
256  // Set Jacobian
257  oper->SetJac(pGeomData->GetJacInterLeave(pCollExp,m_nElmtPad));
258 
259  m_oper = std::dynamic_pointer_cast<MatrixFree::IProduct>(oper);
260  ASSERTL0(m_oper, "Failed to cast pointer.");
261 
262  }
263 };
264 
265 /// Factory initialisation for the IProductWRTBase_MatrixFree operators
266 OperatorKey IProductWRTBase_MatrixFree::m_typeArr[] = {
269  IProductWRTBase_MatrixFree::create, "IProductWRTBase_MatrixFree_Seg"),
272  IProductWRTBase_MatrixFree::create, "IProductWRTBase_MatrixFree_Quad"),
275  IProductWRTBase_MatrixFree::create, "IProductWRTBase_MatrixFree_Tri"),
278  IProductWRTBase_MatrixFree::create, "IProductWRTBase_MatrixFree_Hex"),
281  IProductWRTBase_MatrixFree::create, "IProductWRTBase_MatrixFree_Prism"),
284  IProductWRTBase_MatrixFree::create, "IProductWRTBase_MatrixFree_Pyr"),
287  IProductWRTBase_MatrixFree::create, "IProductWRTBase_MatrixFree_Tet")
288 
289 };
290 
291 
292 /**
293  * @brief Inner product operator using element-wise operation
294  */
296 {
297  public:
299 
301  {
302  }
303 
305  const Array<OneD, const NekDouble> &input,
306  Array<OneD, NekDouble> &output,
307  Array<OneD, NekDouble> &output1,
308  Array<OneD, NekDouble> &output2,
309  Array<OneD, NekDouble> &wsp) final
310  {
311  boost::ignore_unused(output1, output2);
312 
313  ASSERTL1(wsp.size() == m_wspSize,
314  "Incorrect workspace size");
315 
316  const int nCoeffs = m_stdExp->GetNcoeffs();
317  const int nPhys = m_stdExp->GetTotPoints();
319 
320  Vmath::Vmul(m_jacWStdW.size(),m_jacWStdW,1,input,1,wsp,1);
321 
322  for (int i = 0; i < m_numElmt; ++i)
323  {
324  m_stdExp->IProductWRTBase_SumFac(wsp + i*nPhys,
325  tmp = output + i*nCoeffs,
326  false);
327  }
328  }
329 
330  void operator()(int dir,
331  const Array<OneD, const NekDouble> &input,
332  Array<OneD, NekDouble> &output,
333  Array<OneD, NekDouble> &wsp) final
334  {
335  boost::ignore_unused(dir, input, output, wsp);
336  NEKERROR(ErrorUtil::efatal, "Not valid for this operator.");
337  }
338 
339  virtual void CheckFactors(StdRegions::FactorMap factors,
340  int coll_phys_offset)
341  {
342  boost::ignore_unused(factors, coll_phys_offset);
343  ASSERTL0(false, "Not valid for this operator.");
344  }
345 
346  protected:
348 
349  private:
351  vector<StdRegions::StdExpansionSharedPtr> pCollExp,
352  CoalescedGeomDataSharedPtr pGeomData,
353  StdRegions::FactorMap factors)
354  : Operator(pCollExp, pGeomData, factors)
355  {
356  int nqtot = 1;
357  LibUtilities::PointsKeyVector PtsKey = m_stdExp->GetPointsKeys();
358  for(int i = 0; i < PtsKey.size(); ++i)
359  {
360  nqtot *= PtsKey[i].GetNumPoints();
361  }
362 
363  m_jacWStdW = pGeomData->GetJacWithStdWeights(pCollExp);
364 
365  m_wspSize = nqtot*m_numElmt;
366  }
367 
368 };
369 
370 /// Factory initialisation for the IProductWRTBase_IterPerExp operators
371 OperatorKey IProductWRTBase_IterPerExp::m_typeArr[] = {
374  IProductWRTBase_IterPerExp::create,
375  "IProductWRTBase_IterPerExp_Seg"),
378  IProductWRTBase_IterPerExp::create,
379  "IProductWRTBase_IterPerExp_Tri"),
382  IProductWRTBase_IterPerExp::create,
383  "IProductWRTBase_IterPerExp_NodalTri"),
386  IProductWRTBase_IterPerExp::create,
387  "IProductWRTBase_IterPerExp_Quad"),
390  IProductWRTBase_IterPerExp::create,
391  "IProductWRTBase_IterPerExp_Tet"),
394  IProductWRTBase_IterPerExp::create,
395  "IProductWRTBase_IterPerExp_NodalTet"),
398  IProductWRTBase_IterPerExp::create,
399  "IProductWRTBase_IterPerExp_Pyr"),
402  IProductWRTBase_IterPerExp::create,
403  "IProductWRTBase_IterPerExp_Prism"),
406  IProductWRTBase_IterPerExp::create,
407  "IProductWRTBase_IterPerExp_NodalPrism"),
410  IProductWRTBase_IterPerExp::create,
411  "IProductWRTBase_IterPerExp_Hex"),
412 };
413 
414 
415 /**
416  * @brief Inner product operator using original MultiRegions implementation.
417  */
419 {
420  public:
422 
424  {
425  }
426 
428  const Array<OneD, const NekDouble> &input,
429  Array<OneD, NekDouble> &output,
430  Array<OneD, NekDouble> &output1,
431  Array<OneD, NekDouble> &output2,
432  Array<OneD, NekDouble> &wsp) final
433  {
434  boost::ignore_unused(output1, output2, wsp);
435 
436  const int nCoeffs = m_expList[0]->GetNcoeffs();
437  const int nPhys = m_expList[0]->GetTotPoints();
439 
440  for (int i = 0; i < m_numElmt; ++i)
441  {
442  m_expList[i]->IProductWRTBase(input + i*nPhys,
443  tmp = output + i*nCoeffs);
444  }
445 
446  }
447 
448  void operator()(int dir,
449  const Array<OneD, const NekDouble> &input,
450  Array<OneD, NekDouble> &output,
451  Array<OneD, NekDouble> &wsp) final
452  {
453  boost::ignore_unused(dir, input, output, wsp);
454  NEKERROR(ErrorUtil::efatal, "Not valid for this operator.");
455  }
456 
457  virtual void CheckFactors(StdRegions::FactorMap factors,
458  int coll_phys_offset)
459  {
460  boost::ignore_unused(factors, coll_phys_offset);
461  ASSERTL0(false, "Not valid for this operator.");
462  }
463 
464  protected:
465  vector<StdRegions::StdExpansionSharedPtr> m_expList;
466 
467  private:
469  vector<StdRegions::StdExpansionSharedPtr> pCollExp,
470  CoalescedGeomDataSharedPtr pGeomData,
471  StdRegions::FactorMap factors)
472  : Operator(pCollExp, pGeomData, factors)
473  {
474  m_expList = pCollExp;
475  }
476 };
477 
478 /// Factory initialisation for the IProductWRTBase_NoCollection operators
479 OperatorKey IProductWRTBase_NoCollection::m_typeArr[] = {
482  IProductWRTBase_NoCollection::create,
483  "IProductWRTBase_NoCollection_Seg"),
486  IProductWRTBase_NoCollection::create,
487  "IProductWRTBase_NoCollection_Tri"),
490  IProductWRTBase_NoCollection::create,
491  "IProductWRTBase_NoCollection_NodalTri"),
494  IProductWRTBase_NoCollection::create,
495  "IProductWRTBase_NoCollection_Quad"),
498  IProductWRTBase_NoCollection::create,
499  "IProductWRTBase_NoCollection_Tet"),
502  IProductWRTBase_NoCollection::create,
503  "IProductWRTBase_NoCollection_NodalTet"),
506  IProductWRTBase_NoCollection::create,
507  "IProductWRTBase_NoCollection_Pyr"),
510  IProductWRTBase_NoCollection::create,
511  "IProductWRTBase_NoCollection_Prism"),
514  IProductWRTBase_NoCollection::create,
515  "IProductWRTBase_NoCollection_NodalPrism"),
518  IProductWRTBase_NoCollection::create,
519  "IProductWRTBase_NoCollection_Hex"),
520 };
521 
522 
523 /**
524  * @brief Inner product operator using sum-factorisation (Segment)
525  */
527 {
528  public:
530 
532  {
533  }
534 
536  const Array<OneD, const NekDouble> &input,
537  Array<OneD, NekDouble> &output,
538  Array<OneD, NekDouble> &output1,
539  Array<OneD, NekDouble> &output2,
540  Array<OneD, NekDouble> &wsp) final
541  {
542  boost::ignore_unused(output1, output2);
543 
544  if(m_colldir0)
545  {
546  Vmath::Vmul(m_numElmt*m_nquad0,m_jacWStdW,1,input,1,output,1);
547  }
548  else
549  {
550  Vmath::Vmul(m_numElmt*m_nquad0,m_jacWStdW,1,input,1,wsp,1);
551 
552  // out = B0*in;
553  Blas::Dgemm('T','N', m_nmodes0, m_numElmt, m_nquad0,
554  1.0, m_base0.get(), m_nquad0,
555  &wsp[0], m_nquad0, 0.0,
556  &output[0], m_nmodes0);
557  }
558  }
559 
560  void operator()(int dir,
561  const Array<OneD, const NekDouble> &input,
562  Array<OneD, NekDouble> &output,
563  Array<OneD, NekDouble> &wsp) final
564  {
565  boost::ignore_unused(dir, input, output, wsp);
566  NEKERROR(ErrorUtil::efatal, "Not valid for this operator.");
567  }
568 
569  virtual void CheckFactors(StdRegions::FactorMap factors,
570  int coll_phys_offset)
571  {
572  boost::ignore_unused(factors, coll_phys_offset);
573  ASSERTL0(false, "Not valid for this operator.");
574  }
575 
576  protected:
577  const int m_nquad0;
578  const int m_nmodes0;
579  const bool m_colldir0;
582 
583  private:
585  vector<StdRegions::StdExpansionSharedPtr> pCollExp,
586  CoalescedGeomDataSharedPtr pGeomData,
587  StdRegions::FactorMap factors)
588  : Operator (pCollExp, pGeomData, factors),
589  m_nquad0 (m_stdExp->GetNumPoints(0)),
590  m_nmodes0 (m_stdExp->GetBasisNumModes(0)),
591  m_colldir0(m_stdExp->GetBasis(0)->Collocation()),
592  m_base0 (m_stdExp->GetBasis(0)->GetBdata())
593  {
594  m_wspSize = m_numElmt*m_nquad0;
595  m_jacWStdW = pGeomData->GetJacWithStdWeights(pCollExp);
596  }
597 };
598 
599 /// Factory initialisation for the IProductWRTBase_SumFac_Seg operator
600 OperatorKey IProductWRTBase_SumFac_Seg::m_type = GetOperatorFactory().
601  RegisterCreatorFunction(
603  IProductWRTBase_SumFac_Seg::create, "IProductWRTBase_SumFac_Seg");
604 
605 
606 
607 /**
608  * @brief Inner product operator using sum-factorisation (Quad)
609  */
611 {
612  public:
614 
616  {
617  }
618 
620  Array<OneD, NekDouble> &output,
621  Array<OneD, NekDouble> &output1,
622  Array<OneD, NekDouble> &output2,
623  Array<OneD, NekDouble> &wsp) final
624  {
625  boost::ignore_unused(output1, output2);
626 
627  ASSERTL1(wsp.size() == m_wspSize,
628  "Incorrect workspace size");
629 
630  QuadIProduct(m_colldir0,m_colldir1,m_numElmt,
631  m_nquad0, m_nquad1,
632  m_nmodes0, m_nmodes1,
633  m_base0, m_base1,
634  m_jacWStdW, input, output, wsp);
635  }
636 
637  void operator()(int dir,
638  const Array<OneD, const NekDouble> &input,
639  Array<OneD, NekDouble> &output,
640  Array<OneD, NekDouble> &wsp) final
641  {
642  boost::ignore_unused(dir, input, output, wsp);
643  NEKERROR(ErrorUtil::efatal, "Not valid for this operator.");
644  }
645 
646  virtual void CheckFactors(StdRegions::FactorMap factors,
647  int coll_phys_offset)
648  {
649  boost::ignore_unused(factors, coll_phys_offset);
650  ASSERTL0(false, "Not valid for this operator.");
651  }
652 
653  protected:
654  const int m_nquad0;
655  const int m_nquad1;
656  const int m_nmodes0;
657  const int m_nmodes1;
658  const bool m_colldir0;
659  const bool m_colldir1;
663 
664  private:
666  vector<StdRegions::StdExpansionSharedPtr> pCollExp,
667  CoalescedGeomDataSharedPtr pGeomData,
668  StdRegions::FactorMap factors)
669  : Operator (pCollExp, pGeomData, factors),
670  m_nquad0 (m_stdExp->GetNumPoints(0)),
671  m_nquad1 (m_stdExp->GetNumPoints(1)),
672  m_nmodes0 (m_stdExp->GetBasisNumModes(0)),
673  m_nmodes1 (m_stdExp->GetBasisNumModes(1)),
674  m_colldir0(m_stdExp->GetBasis(0)->Collocation()),
675  m_colldir1(m_stdExp->GetBasis(1)->Collocation()),
676  m_base0 (m_stdExp->GetBasis(0)->GetBdata()),
677  m_base1 (m_stdExp->GetBasis(1)->GetBdata())
678  {
679  m_jacWStdW = pGeomData->GetJacWithStdWeights(pCollExp);
680  m_wspSize = 2 * m_numElmt
681  * (max(m_nquad0*m_nquad1,m_nmodes0*m_nmodes1));
682  }
683 };
684 
685 /// Factory initialisation for the IProductWRTBase_SumFac_Quad operator
686 OperatorKey IProductWRTBase_SumFac_Quad::m_type = GetOperatorFactory().
687  RegisterCreatorFunction(
689  IProductWRTBase_SumFac_Quad::create, "IProductWRTBase_SumFac_Quad");
690 
691 
692 /**
693  * @brief Inner product operator using sum-factorisation (Tri)
694  */
696 {
697  public:
699 
701  {
702  }
703 
705  const Array<OneD, const NekDouble> &input,
706  Array<OneD, NekDouble> &output,
707  Array<OneD, NekDouble> &output1,
708  Array<OneD, NekDouble> &output2,
709  Array<OneD, NekDouble> &wsp) final
710  {
711  boost::ignore_unused(output1, output2);
712 
713  ASSERTL1(wsp.size() == m_wspSize,
714  "Incorrect workspace size");
715 
716  TriIProduct(m_sortTopVertex, m_numElmt, m_nquad0, m_nquad1,
717  m_nmodes0, m_nmodes1,m_base0,m_base1,m_jacWStdW, input,
718  output,wsp);
719  }
720 
721  void operator()(int dir,
722  const Array<OneD, const NekDouble> &input,
723  Array<OneD, NekDouble> &output,
724  Array<OneD, NekDouble> &wsp) final
725  {
726  boost::ignore_unused(dir, input, output, wsp);
727  NEKERROR(ErrorUtil::efatal, "Not valid for this operator.");
728  }
729 
730  virtual void CheckFactors(StdRegions::FactorMap factors,
731  int coll_phys_offset)
732  {
733  boost::ignore_unused(factors, coll_phys_offset);
734  ASSERTL0(false, "Not valid for this operator.");
735  }
736 
737  protected:
738  const int m_nquad0;
739  const int m_nquad1;
740  const int m_nmodes0;
741  const int m_nmodes1;
746 
747  private:
749  vector<StdRegions::StdExpansionSharedPtr> pCollExp,
750  CoalescedGeomDataSharedPtr pGeomData,
751  StdRegions::FactorMap factors)
752  : Operator (pCollExp, pGeomData, factors),
753  m_nquad0 (m_stdExp->GetNumPoints(0)),
754  m_nquad1 (m_stdExp->GetNumPoints(1)),
755  m_nmodes0 (m_stdExp->GetBasisNumModes(0)),
756  m_nmodes1 (m_stdExp->GetBasisNumModes(1)),
757  m_base0 (m_stdExp->GetBasis(0)->GetBdata()),
758  m_base1 (m_stdExp->GetBasis(1)->GetBdata())
759  {
760  m_jacWStdW = pGeomData->GetJacWithStdWeights(pCollExp);
761  m_wspSize = 2 * m_numElmt
762  * (max(m_nquad0*m_nquad1,m_nmodes0*m_nmodes1));
763  if(m_stdExp->GetBasis(0)->GetBasisType()
765  {
766  m_sortTopVertex = true;
767  }
768  else
769  {
770  m_sortTopVertex = false;
771  }
772  }
773 };
774 
775 /// Factory initialisation for the IProductWRTBase_SumFac_Tri operator
776 OperatorKey IProductWRTBase_SumFac_Tri::m_type = GetOperatorFactory().
777  RegisterCreatorFunction(
779  IProductWRTBase_SumFac_Tri::create, "IProductWRTBase_SumFac_Tri");
780 
781 
782 /**
783  * @brief Inner Product operator using sum-factorisation (Hex)
784  */
786 {
787  public:
789 
791  {
792  }
793 
795  const Array<OneD, const NekDouble> &input,
796  Array<OneD, NekDouble> &output,
797  Array<OneD, NekDouble> &output1,
798  Array<OneD, NekDouble> &output2,
799  Array<OneD, NekDouble> &wsp) final
800  {
801  boost::ignore_unused(output1, output2);
802 
803  ASSERTL1(wsp.size() == m_wspSize,
804  "Incorrect workspace size");
805 
806  HexIProduct(m_colldir0,m_colldir1,m_colldir2, m_numElmt,
807  m_nquad0, m_nquad1, m_nquad2,
808  m_nmodes0, m_nmodes1, m_nmodes2,
809  m_base0, m_base1, m_base2,
810  m_jacWStdW,input,output,wsp);
811  }
812 
813  void operator()(int dir,
814  const Array<OneD, const NekDouble> &input,
815  Array<OneD, NekDouble> &output,
816  Array<OneD, NekDouble> &wsp) final
817  {
818  boost::ignore_unused(dir, input, output, wsp);
819  NEKERROR(ErrorUtil::efatal, "Not valid for this operator.");
820  }
821 
822  virtual void CheckFactors(StdRegions::FactorMap factors,
823  int coll_phys_offset)
824  {
825  boost::ignore_unused(factors, coll_phys_offset);
826  ASSERTL0(false, "Not valid for this operator.");
827  }
828 
829  protected:
830  const int m_nquad0;
831  const int m_nquad1;
832  const int m_nquad2;
833  const int m_nmodes0;
834  const int m_nmodes1;
835  const int m_nmodes2;
836  const bool m_colldir0;
837  const bool m_colldir1;
838  const bool m_colldir2;
843 
844  private:
846  vector<StdRegions::StdExpansionSharedPtr> pCollExp,
847  CoalescedGeomDataSharedPtr pGeomData,
848  StdRegions::FactorMap factors)
849  : Operator (pCollExp, pGeomData, factors),
850  m_nquad0 (m_stdExp->GetNumPoints(0)),
851  m_nquad1 (m_stdExp->GetNumPoints(1)),
852  m_nquad2 (m_stdExp->GetNumPoints(2)),
853  m_nmodes0 (m_stdExp->GetBasisNumModes(0)),
854  m_nmodes1 (m_stdExp->GetBasisNumModes(1)),
855  m_nmodes2 (m_stdExp->GetBasisNumModes(2)),
856  m_colldir0(m_stdExp->GetBasis(0)->Collocation()),
857  m_colldir1(m_stdExp->GetBasis(1)->Collocation()),
858  m_colldir2(m_stdExp->GetBasis(2)->Collocation()),
859  m_base0 (m_stdExp->GetBasis(0)->GetBdata()),
860  m_base1 (m_stdExp->GetBasis(1)->GetBdata()),
861  m_base2 (m_stdExp->GetBasis(2)->GetBdata())
862 
863  {
864  m_jacWStdW = pGeomData->GetJacWithStdWeights(pCollExp);
865  m_wspSize = 3 * m_numElmt * (max(m_nquad0*m_nquad1*m_nquad2,
866  m_nmodes0*m_nmodes1*m_nmodes2));
867  }
868 };
869 
870 /// Factory initialisation for the IProductWRTBase_SumFac_Hex operator
871 OperatorKey IProductWRTBase_SumFac_Hex::m_type = GetOperatorFactory().
872  RegisterCreatorFunction(
874  IProductWRTBase_SumFac_Hex::create, "IProductWRTBase_SumFac_Hex");
875 
876 
877 
878 /**
879  * @brief Inner product operator using sum-factorisation (Tet)
880  */
882 {
883  public:
885 
887  {
888  }
889 
891  const Array<OneD, const NekDouble> &input,
892  Array<OneD, NekDouble> &output,
893  Array<OneD, NekDouble> &output1,
894  Array<OneD, NekDouble> &output2,
895  Array<OneD, NekDouble> &wsp) final
896  {
897  boost::ignore_unused(output1, output2);
898 
899  ASSERTL1(wsp.size() == m_wspSize,
900  "Incorrect workspace size");
901 
902  TetIProduct(m_sortTopEdge, m_numElmt,
903  m_nquad0, m_nquad1, m_nquad2,
904  m_nmodes0, m_nmodes1, m_nmodes2,
905  m_base0, m_base1, m_base2,
906  m_jacWStdW,input,output,wsp);
907 
908  }
909 
910  void operator()(int dir,
911  const Array<OneD, const NekDouble> &input,
912  Array<OneD, NekDouble> &output,
913  Array<OneD, NekDouble> &wsp) final
914  {
915  boost::ignore_unused(dir, input, output, wsp);
916  NEKERROR(ErrorUtil::efatal, "Not valid for this operator.");
917  }
918 
919  virtual void CheckFactors(StdRegions::FactorMap factors,
920  int coll_phys_offset)
921  {
922  boost::ignore_unused(factors, coll_phys_offset);
923  ASSERTL0(false, "Not valid for this operator.");
924  }
925 
926  protected:
927  const int m_nquad0;
928  const int m_nquad1;
929  const int m_nquad2;
930  const int m_nmodes0;
931  const int m_nmodes1;
932  const int m_nmodes2;
938 
939  private:
941  vector<StdRegions::StdExpansionSharedPtr> pCollExp,
942  CoalescedGeomDataSharedPtr pGeomData,
943  StdRegions::FactorMap factors)
944  : Operator (pCollExp, pGeomData, factors),
945  m_nquad0 (m_stdExp->GetNumPoints(0)),
946  m_nquad1 (m_stdExp->GetNumPoints(1)),
947  m_nquad2 (m_stdExp->GetNumPoints(2)),
948  m_nmodes0 (m_stdExp->GetBasisNumModes(0)),
949  m_nmodes1 (m_stdExp->GetBasisNumModes(1)),
950  m_nmodes2 (m_stdExp->GetBasisNumModes(2)),
951  m_base0 (m_stdExp->GetBasis(0)->GetBdata()),
952  m_base1 (m_stdExp->GetBasis(1)->GetBdata()),
953  m_base2 (m_stdExp->GetBasis(2)->GetBdata())
954  {
955  m_jacWStdW = pGeomData->GetJacWithStdWeights(pCollExp);
956  m_wspSize = m_numElmt*(max(m_nquad0*m_nquad1*m_nquad2,
957  m_nquad2*m_nmodes0*(2*m_nmodes1-m_nmodes0+1)/2)+
958  m_nquad2*m_nquad1*m_nmodes0);
959 
960  if(m_stdExp->GetBasis(0)->GetBasisType()
962  {
963  m_sortTopEdge = true;
964  }
965  else
966  {
967  m_sortTopEdge = false;
968  }
969  }
970 };
971 
972 /// Factory initialisation for the IProductWRTBase_SumFac_Tet operator
973 OperatorKey IProductWRTBase_SumFac_Tet::m_type = GetOperatorFactory().
974  RegisterCreatorFunction(
976  IProductWRTBase_SumFac_Tet::create, "IProductWRTBase_SumFac_Tet");
977 
978 
979 
980 /**
981  * @brief Inner Product operator using sum-factorisation (Prism)
982  */
984 {
985  public:
987 
989  {
990  }
991 
993  const Array<OneD, const NekDouble> &input,
994  Array<OneD, NekDouble> &output,
995  Array<OneD, NekDouble> &output1,
996  Array<OneD, NekDouble> &output2,
997  Array<OneD, NekDouble> &wsp) final
998  {
999  boost::ignore_unused(output1, output2);
1000 
1001  ASSERTL1(wsp.size() == m_wspSize,
1002  "Incorrect workspace size");
1003 
1004  PrismIProduct(m_sortTopVertex, m_numElmt,
1005  m_nquad0, m_nquad1, m_nquad2,
1006  m_nmodes0, m_nmodes1, m_nmodes2,
1007  m_base0, m_base1, m_base2,
1008  m_jacWStdW,input,output,wsp);
1009  }
1010 
1011  void operator()(int dir,
1012  const Array<OneD, const NekDouble> &input,
1013  Array<OneD, NekDouble> &output,
1014  Array<OneD, NekDouble> &wsp) final
1015  {
1016  boost::ignore_unused(dir, input, output, wsp);
1017  NEKERROR(ErrorUtil::efatal, "Not valid for this operator.");
1018  }
1019 
1020  virtual void CheckFactors(StdRegions::FactorMap factors,
1021  int coll_phys_offset)
1022  {
1023  boost::ignore_unused(factors, coll_phys_offset);
1024  ASSERTL0(false, "Not valid for this operator.");
1025  }
1026 
1027  protected:
1028  const int m_nquad0;
1029  const int m_nquad1;
1030  const int m_nquad2;
1031  const int m_nmodes0;
1032  const int m_nmodes1;
1033  const int m_nmodes2;
1039 
1040  private:
1042  vector<StdRegions::StdExpansionSharedPtr> pCollExp,
1043  CoalescedGeomDataSharedPtr pGeomData,
1044  StdRegions::FactorMap factors)
1045  : Operator (pCollExp, pGeomData, factors),
1046  m_nquad0 (m_stdExp->GetNumPoints(0)),
1047  m_nquad1 (m_stdExp->GetNumPoints(1)),
1048  m_nquad2 (m_stdExp->GetNumPoints(2)),
1049  m_nmodes0 (m_stdExp->GetBasisNumModes(0)),
1050  m_nmodes1 (m_stdExp->GetBasisNumModes(1)),
1051  m_nmodes2 (m_stdExp->GetBasisNumModes(2)),
1052  m_base0 (m_stdExp->GetBasis(0)->GetBdata()),
1053  m_base1 (m_stdExp->GetBasis(1)->GetBdata()),
1054  m_base2 (m_stdExp->GetBasis(2)->GetBdata())
1055 
1056  {
1057  m_jacWStdW = pGeomData->GetJacWithStdWeights(pCollExp);
1058 
1059  m_wspSize = m_numElmt * m_nquad2
1060  *(max(m_nquad0*m_nquad1,m_nmodes0*m_nmodes1))
1061  + m_nquad1*m_nquad2*m_numElmt*m_nmodes0;
1062 
1063  if(m_stdExp->GetBasis(0)->GetBasisType()
1065  {
1066  m_sortTopVertex = true;
1067  }
1068  else
1069  {
1070  m_sortTopVertex = false;
1071  }
1072  }
1073 };
1074 
1075 /// Factory initialisation for the IProductWRTBase_SumFac_Prism operator
1076 OperatorKey IProductWRTBase_SumFac_Prism::m_type = GetOperatorFactory().
1077  RegisterCreatorFunction(
1079  IProductWRTBase_SumFac_Prism::create, "IProductWRTBase_SumFac_Prism");
1080 
1081 
1082 /**
1083  * @brief Inner Product operator using sum-factorisation (Pyr)
1084  */
1086 {
1087  public:
1089 
1091  {
1092  }
1093 
1095  const Array<OneD, const NekDouble> &input,
1096  Array<OneD, NekDouble> &output,
1097  Array<OneD, NekDouble> &output1,
1098  Array<OneD, NekDouble> &output2,
1099  Array<OneD, NekDouble> &wsp) final
1100  {
1101  boost::ignore_unused(output1, output2);
1102 
1103  ASSERTL1(wsp.size() == m_wspSize,
1104  "Incorrect workspace size");
1105 
1106  PyrIProduct(m_sortTopVertex, m_numElmt,
1107  m_nquad0, m_nquad1, m_nquad2,
1108  m_nmodes0, m_nmodes1, m_nmodes2,
1109  m_base0, m_base1, m_base2,
1110  m_jacWStdW,input,output,wsp);
1111  }
1112 
1113  void operator()(int dir,
1114  const Array<OneD, const NekDouble> &input,
1115  Array<OneD, NekDouble> &output,
1116  Array<OneD, NekDouble> &wsp) final
1117  {
1118  boost::ignore_unused(dir, input, output, wsp);
1119  NEKERROR(ErrorUtil::efatal, "Not valid for this operator.");
1120  }
1121 
1122  virtual void CheckFactors(StdRegions::FactorMap factors,
1123  int coll_phys_offset)
1124  {
1125  boost::ignore_unused(factors, coll_phys_offset);
1126  ASSERTL0(false, "Not valid for this operator.");
1127  }
1128 
1129  protected:
1130  const int m_nquad0;
1131  const int m_nquad1;
1132  const int m_nquad2;
1133  const int m_nmodes0;
1134  const int m_nmodes1;
1135  const int m_nmodes2;
1141 
1142  private:
1144  vector<StdRegions::StdExpansionSharedPtr> pCollExp,
1145  CoalescedGeomDataSharedPtr pGeomData,
1146  StdRegions::FactorMap factors)
1147  : Operator (pCollExp, pGeomData, factors),
1148  m_nquad0 (m_stdExp->GetNumPoints(0)),
1149  m_nquad1 (m_stdExp->GetNumPoints(1)),
1150  m_nquad2 (m_stdExp->GetNumPoints(2)),
1151  m_nmodes0 (m_stdExp->GetBasisNumModes(0)),
1152  m_nmodes1 (m_stdExp->GetBasisNumModes(1)),
1153  m_nmodes2 (m_stdExp->GetBasisNumModes(2)),
1154  m_base0 (m_stdExp->GetBasis(0)->GetBdata()),
1155  m_base1 (m_stdExp->GetBasis(1)->GetBdata()),
1156  m_base2 (m_stdExp->GetBasis(2)->GetBdata())
1157 
1158  {
1159  m_jacWStdW = pGeomData->GetJacWithStdWeights(pCollExp);
1160 
1161  m_wspSize = m_numElmt * m_nquad2
1162  *(max(m_nquad0*m_nquad1,m_nmodes0*m_nmodes1))
1163  + m_nquad1*m_nquad2*m_numElmt*m_nmodes0;
1164 
1165  if(m_stdExp->GetBasis(0)->GetBasisType()
1167  {
1168  m_sortTopVertex = true;
1169  }
1170  else
1171  {
1172  m_sortTopVertex = false;
1173  }
1174  }
1175 };
1176 
1177 /// Factory initialisation for the IProductWRTBase_SumFac_Pyr operator
1178 OperatorKey IProductWRTBase_SumFac_Pyr::m_type = GetOperatorFactory().
1179  RegisterCreatorFunction(
1181  IProductWRTBase_SumFac_Pyr::create, "IProductWRTBase_SumFac_Pyr");
1182 
1183 
1184 }
1185 }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
Definition: ErrorUtil.hpp:209
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
Definition: ErrorUtil.hpp:250
#define OPERATOR_CREATE(cname)
Definition: Operator.h:45
Inner product operator using element-wise operation.
void operator()(const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &output1, Array< OneD, NekDouble > &output2, Array< OneD, NekDouble > &wsp) final
Perform operation.
void operator()(int dir, const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &wsp) final
IProductWRTBase_IterPerExp(vector< StdRegions::StdExpansionSharedPtr > pCollExp, CoalescedGeomDataSharedPtr pGeomData, StdRegions::FactorMap factors)
virtual void CheckFactors(StdRegions::FactorMap factors, int coll_phys_offset)
Check the validity of the supplied factor map.
Inner product operator using operator using matrix free operators.
IProductWRTBase_MatrixFree(vector< StdRegions::StdExpansionSharedPtr > pCollExp, CoalescedGeomDataSharedPtr pGeomData, StdRegions::FactorMap factors)
virtual void CheckFactors(StdRegions::FactorMap factors, int coll_phys_offset)
Check the validity of the supplied factor map.
virtual void operator()(const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &output1, Array< OneD, NekDouble > &output2, Array< OneD, NekDouble > &wsp) final
Perform operation.
void operator()(int dir, const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &wsp) final
std::shared_ptr< MatrixFree::IProduct > m_oper
Inner product operator using original MultiRegions implementation.
vector< StdRegions::StdExpansionSharedPtr > m_expList
virtual void CheckFactors(StdRegions::FactorMap factors, int coll_phys_offset)
Check the validity of the supplied factor map.
void operator()(const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &output1, Array< OneD, NekDouble > &output2, Array< OneD, NekDouble > &wsp) final
Perform operation.
IProductWRTBase_NoCollection(vector< StdRegions::StdExpansionSharedPtr > pCollExp, CoalescedGeomDataSharedPtr pGeomData, StdRegions::FactorMap factors)
void operator()(int dir, const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &wsp) final
Inner product operator using standard matrix approach.
virtual void CheckFactors(StdRegions::FactorMap factors, int coll_phys_offset)
Check the validity of the supplied factor map.
void operator()(int dir, const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &wsp) final
void operator()(const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &output1, Array< OneD, NekDouble > &output2, Array< OneD, NekDouble > &wsp) final
Perform operation.
IProductWRTBase_StdMat(vector< StdRegions::StdExpansionSharedPtr > pCollExp, CoalescedGeomDataSharedPtr pGeomData, StdRegions::FactorMap factors)
Inner Product operator using sum-factorisation (Hex)
void operator()(int dir, const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &wsp) final
void operator()(const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &output1, Array< OneD, NekDouble > &output2, Array< OneD, NekDouble > &wsp) final
Perform operation.
IProductWRTBase_SumFac_Hex(vector< StdRegions::StdExpansionSharedPtr > pCollExp, CoalescedGeomDataSharedPtr pGeomData, StdRegions::FactorMap factors)
virtual void CheckFactors(StdRegions::FactorMap factors, int coll_phys_offset)
Check the validity of the supplied factor map.
Inner Product operator using sum-factorisation (Prism)
virtual void CheckFactors(StdRegions::FactorMap factors, int coll_phys_offset)
Check the validity of the supplied factor map.
void operator()(const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &output1, Array< OneD, NekDouble > &output2, Array< OneD, NekDouble > &wsp) final
Perform operation.
void operator()(int dir, const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &wsp) final
IProductWRTBase_SumFac_Prism(vector< StdRegions::StdExpansionSharedPtr > pCollExp, CoalescedGeomDataSharedPtr pGeomData, StdRegions::FactorMap factors)
Inner Product operator using sum-factorisation (Pyr)
virtual void CheckFactors(StdRegions::FactorMap factors, int coll_phys_offset)
Check the validity of the supplied factor map.
void operator()(const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &output1, Array< OneD, NekDouble > &output2, Array< OneD, NekDouble > &wsp) final
Perform operation.
IProductWRTBase_SumFac_Pyr(vector< StdRegions::StdExpansionSharedPtr > pCollExp, CoalescedGeomDataSharedPtr pGeomData, StdRegions::FactorMap factors)
void operator()(int dir, const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &wsp) final
Inner product operator using sum-factorisation (Quad)
IProductWRTBase_SumFac_Quad(vector< StdRegions::StdExpansionSharedPtr > pCollExp, CoalescedGeomDataSharedPtr pGeomData, StdRegions::FactorMap factors)
virtual void CheckFactors(StdRegions::FactorMap factors, int coll_phys_offset)
Check the validity of the supplied factor map.
void operator()(int dir, const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &wsp) final
void operator()(const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &output1, Array< OneD, NekDouble > &output2, Array< OneD, NekDouble > &wsp) final
Perform operation.
Inner product operator using sum-factorisation (Segment)
void operator()(const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &output1, Array< OneD, NekDouble > &output2, Array< OneD, NekDouble > &wsp) final
Perform operation.
void operator()(int dir, const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &wsp) final
IProductWRTBase_SumFac_Seg(vector< StdRegions::StdExpansionSharedPtr > pCollExp, CoalescedGeomDataSharedPtr pGeomData, StdRegions::FactorMap factors)
virtual void CheckFactors(StdRegions::FactorMap factors, int coll_phys_offset)
Check the validity of the supplied factor map.
Inner product operator using sum-factorisation (Tet)
virtual void CheckFactors(StdRegions::FactorMap factors, int coll_phys_offset)
Check the validity of the supplied factor map.
IProductWRTBase_SumFac_Tet(vector< StdRegions::StdExpansionSharedPtr > pCollExp, CoalescedGeomDataSharedPtr pGeomData, StdRegions::FactorMap factors)
void operator()(const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &output1, Array< OneD, NekDouble > &output2, Array< OneD, NekDouble > &wsp) final
Perform operation.
void operator()(int dir, const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &wsp) final
Inner product operator using sum-factorisation (Tri)
void operator()(int dir, const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &wsp) final
IProductWRTBase_SumFac_Tri(vector< StdRegions::StdExpansionSharedPtr > pCollExp, CoalescedGeomDataSharedPtr pGeomData, StdRegions::FactorMap factors)
void operator()(const Array< OneD, const NekDouble > &input, Array< OneD, NekDouble > &output, Array< OneD, NekDouble > &output1, Array< OneD, NekDouble > &output2, Array< OneD, NekDouble > &wsp) final
Perform operation.
virtual void CheckFactors(StdRegions::FactorMap factors, int coll_phys_offset)
Check the validity of the supplied factor map.
Base class for operators on a collection of elements.
Definition: Operator.h:115
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
Definition: NekFactory.hpp:200
static void Dgemm(const char &transa, const char &transb, const int &m, const int &n, const int &k, const double &alpha, const double *a, const int &lda, const double *b, const int &ldb, const double &beta, double *c, const int &ldc)
BLAS level 3: Matrix-matrix multiply C = A x B where op(A)[m x k], op(B)[k x n], C[m x n] DGEMM perfo...
Definition: Blas.hpp:394
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)
Definition: IProduct.cpp:522
void PyrIProduct(bool sortTopVert, 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: IProduct.cpp:427
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)
Definition: IProduct.cpp:134
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)
Definition: IProduct.cpp:48
std::tuple< LibUtilities::ShapeType, OperatorType, ImplementationType, ExpansionIsNodal > OperatorKey
Key for describing an Operator.
Definition: Operator.h:181
std::shared_ptr< CoalescedGeomData > CoalescedGeomDataSharedPtr
OperatorFactory & GetOperatorFactory()
Returns the singleton Operator factory object.
Definition: Operator.cpp:121
void PrismIProduct(bool sortTopVert, 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: IProduct.cpp:355
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)
Definition: IProduct.cpp:178
std::vector< PointsKey > PointsKeyVector
Definition: Points.h:246
@ eModified_A
Principle Modified Functions .
Definition: BasisType.h:48
ConstFactorMap FactorMap
Definition: StdRegions.hpp:318
The above copyright notice and this permission notice shall be included.
Definition: CoupledSolver.h:1
std::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:69
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:192
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*x.
Definition: Vmath.cpp:225
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1199