Nektar++
ExpList.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File ExpList.h
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: Expansion list top class definition
32 //
33 ///////////////////////////////////////////////////////////////////////////////
34 
35 #ifndef NEKTAR_LIBS_MULTIREGIONS_EXPLIST_H
36 #define NEKTAR_LIBS_MULTIREGIONS_EXPLIST_H
37 
38 #include <boost/core/ignore_unused.hpp>
39 
44 #include <LocalRegions/Expansion.h>
45 #include <Collections/Collection.h>
53 #include <tinyxml.h>
54 
55 namespace Nektar
56 {
57  namespace MultiRegions
58  {
59  // Forward declarations
60  class GlobalLinSys;
61  class AssemblyMapDG;
62 
63  class AssemblyMapCG;
64  class GlobalLinSysKey;
65  class GlobalMatrix;
66 
67  enum Direction
68  {
69  eX,
70  eY,
71  eZ,
72  eS,
74  };
75 
77  {
78  e0D,
79  e1D,
80  e2D,
84  e3D,
86  };
87 
89  {
90  eX,
91  eY,
92  eZ
93  };
94 
95  /// A map between global matrix keys and their associated block
96  /// matrices.
97  typedef std::map<GlobalMatrixKey,DNekScalBlkMatSharedPtr> BlockMatrixMap;
98  /// A shared pointer to a BlockMatrixMap.
99  typedef std::shared_ptr<BlockMatrixMap> BlockMatrixMapShPtr;
100 
101 
102  /// Base class for all multi-elemental spectral/hp expansions.
103  class ExpList: public std::enable_shared_from_this<ExpList>
104  {
105  public:
106  /// The default constructor.
108 
109  /// The default constructor.
111  const LibUtilities::SessionReaderSharedPtr &pSession);
112 
113  /// The default constructor.
115  const LibUtilities::SessionReaderSharedPtr &pSession,
116  const SpatialDomains::MeshGraphSharedPtr &pGraph);
117 
118  /// Constructor copying only elements defined in eIds.
120  const ExpList &in,
121  const std::vector<unsigned int> &eIDs,
122  const bool DeclareCoeffPhysArrays = true);
123 
124  /// The copy constructor.
126  const ExpList &in,
127  const bool DeclareCoeffPhysArrays = true);
128 
129  /// The default destructor.
130  MULTI_REGIONS_EXPORT virtual ~ExpList();
131 
132  /// Returns the total number of local degrees of freedom
133  /// \f$N_{\mathrm{eof}}=\sum_{e=1}^{{N_{\mathrm{el}}}}N^{e}_m\f$.
134  inline int GetNcoeffs(void) const;
135 
136  /// Returns the total number of local degrees of freedom
137  /// for element eid
138  MULTI_REGIONS_EXPORT int GetNcoeffs(const int eid) const;
139 
140  /// Returns the type of the expansion
142 
143  /// Returns the type of the expansion
145 
146  /// Evaulates the maximum number of modes in the elemental basis
147  /// order over all elements
148  inline int EvalBasisNumModesMax(void) const;
149 
150  /// Returns the vector of the number of modes in the elemental
151  /// basis order over all elements.
153  EvalBasisNumModesMaxPerExp(void) const;
154 
155  /// Returns the total number of quadrature points #m_npoints
156  /// \f$=Q_{\mathrm{tot}}\f$.
157  inline int GetTotPoints(void) const;
158 
159  /// Returns the total number of quadrature points for eid's element
160  /// \f$=Q_{\mathrm{tot}}\f$.
161  inline int GetTotPoints(const int eid) const;
162 
163  /// Returns the total number of quadrature points #m_npoints
164  /// \f$=Q_{\mathrm{tot}}\f$.
165  inline int GetNpoints(void) const;
166 
167 
168  /// Returns the total number of qudature points scaled by
169  /// the factor scale on each 1D direction
170  inline int Get1DScaledTotPoints(const NekDouble scale) const;
171 
172  /// Sets the wave space to the one of the possible configuration
173  /// true or false
174  inline void SetWaveSpace(const bool wavespace);
175 
176 
177  ///Set Modified Basis for the stability analysis
178  inline void SetModifiedBasis(const bool modbasis);
179 
180  /// Set the \a i th value of \a m_phys to value \a val
181  inline void SetPhys(int i, NekDouble val);
182 
183  /// This function returns the third direction expansion condition,
184  /// which can be in wave space (coefficient) or not
185  /// It is stored in the variable m_WaveSpace.
186  inline bool GetWaveSpace(void) const;
187 
188  /// Fills the array #m_phys
189  inline void SetPhys(const Array<OneD, const NekDouble> &inarray);
190 
191  /// Sets the array #m_phys
192  inline void SetPhysArray(Array<OneD, NekDouble> &inarray);
193 
194  /// This function manually sets whether the array of physical
195  /// values \f$\boldsymbol{u}_l\f$ (implemented as #m_phys) is
196  /// filled or not.
197  inline void SetPhysState(const bool physState);
198 
199  /// This function indicates whether the array of physical values
200  /// \f$\boldsymbol{u}_l\f$ (implemented as #m_phys) is filled or
201  /// not.
202  inline bool GetPhysState(void) const;
203 
204  /// This function integrates a function \f$f(\boldsymbol{x})\f$
205  /// over the domain consisting of all the elements of the expansion.
207 
208  /// This function integrates a function \f$f(\boldsymbol{x})\f$
209  /// over the domain consisting of all the elements of the expansion.
211  const Array<OneD,
212  const NekDouble> &inarray);
213 
214  /// This function calculates the inner product of a function
215  /// \f$f(\boldsymbol{x})\f$ with respect to all \em local
216  /// expansion modes \f$\phi_n^e(\boldsymbol{x})\f$.
217  inline void IProductWRTBase_IterPerExp(
218  const Array<OneD, const NekDouble> &inarray,
219  Array<OneD, NekDouble> &outarray);
220 
221  ///
222  inline void IProductWRTBase(
223  const Array<OneD, const NekDouble> &inarray,
224  Array<OneD, NekDouble> &outarray,
225  CoeffState coeffstate = eLocal);
226 
227  /// This function calculates the inner product of a function
228  /// \f$f(\boldsymbol{x})\f$ with respect to the derivative (in
229  /// direction \param dir) of all \em local expansion modes
230  /// \f$\phi_n^e(\boldsymbol{x})\f$.
232  const int dir,
233  const Array<OneD, const NekDouble> &inarray,
234  Array<OneD, NekDouble> &outarray);
235 
237  const Array<OneD, const NekDouble> &direction,
238  const Array<OneD, const NekDouble> &inarray,
239  Array<OneD, NekDouble> &outarray);
240 
241  /// This function calculates the inner product of a function
242  /// \f$f(\boldsymbol{x})\f$ with respect to the derivative (in
243  /// direction \param dir) of all \em local expansion modes
244  /// \f$\phi_n^e(\boldsymbol{x})\f$.
246  (const Array<OneD, const Array<OneD, NekDouble> > &inarray,
247  Array<OneD, NekDouble> &outarray);
248 
249  /// This function elementally evaluates the forward transformation
250  /// of a function \f$u(\boldsymbol{x})\f$ onto the global
251  /// spectral/hp expansion.
252  inline void FwdTrans_IterPerExp (
253  const Array<OneD,
254  const NekDouble> &inarray,
255  Array<OneD,NekDouble> &outarray);
256 
257  ///
258  inline void FwdTrans(
259  const Array<OneD,
260  const NekDouble> &inarray,
261  Array<OneD, NekDouble> &outarray,
262  CoeffState coeffstate = eLocal);
263 
265  Array<OneD, NekDouble> &array,
266  const NekDouble alpha,
267  const NekDouble exponent,
268  const NekDouble cutoff);
269 
270  /// This function elementally mulplies the coefficient space of
271  /// Sin my the elemental inverse of the mass matrix.
273  const Array<OneD,
274  const NekDouble> &inarray,
275  Array<OneD, NekDouble> &outarray);
276 
277  ///
278  inline void MultiplyByInvMassMatrix(
279  const Array<OneD,const NekDouble> &inarray,
280  Array<OneD, NekDouble> &outarray,
281  CoeffState coeffstate = eLocal);
282 
283  /// Smooth a field across elements
284  inline void SmoothField(Array<OneD,NekDouble> &field);
285 
286  /// Solve helmholtz problem
287  inline void HelmSolve(
288  const Array<OneD, const NekDouble> &inarray,
289  Array<OneD, NekDouble> &outarray,
290  const FlagList &flags,
291  const StdRegions::ConstFactorMap &factors,
292  const StdRegions::VarCoeffMap &varcoeff =
294  const MultiRegions::VarFactorsMap &varfactors =
296  const Array<OneD, const NekDouble> &dirForcing =
298  const bool PhysSpaceForcing = true);
299 
300  /// Solve Advection Diffusion Reaction
302  const Array<OneD, Array<OneD, NekDouble> > &velocity,
303  const Array<OneD, const NekDouble> &inarray,
304  Array<OneD, NekDouble> &outarray,
305  const NekDouble lambda,
306  CoeffState coeffstate = eLocal,
308  dirForcing = NullNekDouble1DArray);
309 
310 
311  /// Solve Advection Diffusion Reaction
312  inline void LinearAdvectionReactionSolve(
313  const Array<OneD, Array<OneD, NekDouble> > &velocity,
314  const Array<OneD, const NekDouble> &inarray,
315  Array<OneD, NekDouble> &outarray,
316  const NekDouble lambda,
317  CoeffState coeffstate = eLocal,
319  dirForcing = NullNekDouble1DArray);
320 
321  ///
323  const Array<OneD, const NekDouble> &inarray,
324  Array<OneD, NekDouble> &outarray);
325 
326 
327  /// This function elementally evaluates the backward transformation
328  /// of the global spectral/hp element expansion.
329  inline void BwdTrans_IterPerExp (
330  const Array<OneD, const NekDouble> &inarray,
331  Array<OneD,NekDouble> &outarray);
332 
333  ///
334  inline void BwdTrans (
335  const Array<OneD,
336  const NekDouble> &inarray,
337  Array<OneD,NekDouble> &outarray,
338  CoeffState coeffstate = eLocal);
339 
340  /// This function calculates the coordinates of all the elemental
341  /// quadrature points \f$\boldsymbol{x}_i\f$.
342  inline void GetCoords(
343  Array<OneD, NekDouble> &coord_0,
346 
347  // Homogeneous transforms
348  inline void HomogeneousFwdTrans(
349  const Array<OneD, const NekDouble> &inarray,
350  Array<OneD, NekDouble> &outarray,
351  CoeffState coeffstate = eLocal,
352  bool Shuff = true,
353  bool UnShuff = true);
354 
355  inline void HomogeneousBwdTrans(
356  const Array<OneD, const NekDouble> &inarray,
357  Array<OneD, NekDouble> &outarray,
358  CoeffState coeffstate = eLocal,
359  bool Shuff = true,
360  bool UnShuff = true);
361 
362  inline void DealiasedProd(
363  const Array<OneD, NekDouble> &inarray1,
364  const Array<OneD, NekDouble> &inarray2,
365  Array<OneD, NekDouble> &outarray,
366  CoeffState coeffstate = eLocal);
367 
368  inline void DealiasedDotProd(
369  const Array<OneD, Array<OneD, NekDouble> > &inarray1,
370  const Array<OneD, Array<OneD, NekDouble> > &inarray2,
371  Array<OneD, Array<OneD, NekDouble> > &outarray,
372  CoeffState coeffstate = eLocal);
373 
374  inline void GetBCValues(
375  Array<OneD, NekDouble> &BndVals,
376  const Array<OneD, NekDouble> &TotField,
377  int BndID);
378 
379  inline void NormVectorIProductWRTBase(
382  Array<OneD, NekDouble> &outarray,
383  int BndID);
384 
385  inline void NormVectorIProductWRTBase(
387  Array<OneD, NekDouble> &outarray);
388 
389  /// Apply geometry information to each expansion.
391 
392  /// Reset geometry information and reset matrices
394  {
395  v_Reset();
396  }
397 
398  void WriteTecplotHeader(std::ostream &outfile,
399  std::string var = "")
400  {
401  v_WriteTecplotHeader(outfile, var);
402  }
403 
405  std::ostream &outfile,
406  int expansion = -1)
407  {
408  v_WriteTecplotZone(outfile, expansion);
409  }
410 
411  void WriteTecplotField(std::ostream &outfile,
412  int expansion = -1)
413  {
414  v_WriteTecplotField(outfile, expansion);
415  }
416 
417  void WriteTecplotConnectivity(std::ostream &outfile,
418  int expansion = -1)
419  {
420  v_WriteTecplotConnectivity(outfile, expansion);
421  }
422 
423  MULTI_REGIONS_EXPORT void WriteVtkHeader(std::ostream &outfile);
424  MULTI_REGIONS_EXPORT void WriteVtkFooter(std::ostream &outfile);
425 
426  void WriteVtkPieceHeader(std::ostream &outfile, int expansion,
427  int istrip = 0)
428  {
429  v_WriteVtkPieceHeader(outfile, expansion, istrip);
430  }
431 
433  std::ostream &outfile,
434  int expansion);
435 
437  std::ostream &outfile,
438  int expansion,
439  std::string var = "v")
440  {
441  v_WriteVtkPieceData(outfile, expansion, var);
442  }
443 
444  /// This function returns the dimension of the coordinates of the
445  /// element \a eid.
446  // inline
447  MULTI_REGIONS_EXPORT int GetCoordim(int eid);
448 
449  /// Set the \a i th coefficiient in \a m_coeffs to value \a val
450  inline void SetCoeff(int i, NekDouble val);
451 
452  /// Set the \a i th coefficiient in #m_coeffs to value \a val
453  inline void SetCoeffs(int i, NekDouble val);
454 
455  /// Set the #m_coeffs array to inarray
456  inline void SetCoeffsArray(Array<OneD, NekDouble> &inarray);
457 
458  /// This function returns the dimension of the shape of the
459  /// element \a eid.
460  // inline
462 
463  /// This function returns (a reference to) the array
464  /// \f$\boldsymbol{\hat{u}}_l\f$ (implemented as #m_coeffs)
465  /// containing all local expansion coefficients.
466  inline const Array<OneD, const NekDouble> &GetCoeffs() const;
467 
468  /// Impose Dirichlet Boundary Conditions onto Array
469  inline void ImposeDirichletConditions(
470  Array<OneD,NekDouble>& outarray);
471 
472 
473  /// Fill Bnd Condition expansion from the values stored in expansion
474  inline void FillBndCondFromField(void);
475 
476  /// Fill Bnd Condition expansion in nreg from the values stored in expansion
477  inline void FillBndCondFromField(const int nreg);
478 
479  /// Gathers the global coefficients \f$\boldsymbol{\hat{u}}_g\f$
480  /// from the local coefficients \f$\boldsymbol{\hat{u}}_l\f$.
481  // inline
482  MULTI_REGIONS_EXPORT inline void LocalToGlobal(bool useComm = true);
483 
485  const Array<OneD, const NekDouble> &inarray,
486  Array<OneD,NekDouble> &outarray,
487  bool useComm = true);
488 
489  /// Scatters from the global coefficients
490  /// \f$\boldsymbol{\hat{u}}_g\f$ to the local coefficients
491  /// \f$\boldsymbol{\hat{u}}_l\f$.
492  // inline
493  MULTI_REGIONS_EXPORT inline void GlobalToLocal(void);
494 
495  /**
496  * This operation is evaluated as:
497  * \f{tabbing}
498  * \hspace{1cm} \= Do \= $e=$ $1, N_{\mathrm{el}}$ \\
499  * > > Do \= $i=$ $0,N_m^e-1$ \\
500  * > > > $\boldsymbol{\hat{u}}^{e}[i] = \mbox{sign}[e][i] \cdot
501  * \boldsymbol{\hat{u}}_g[\mbox{map}[e][i]]$ \\
502  * > > continue \\
503  * > continue
504  * \f}
505  * where \a map\f$[e][i]\f$ is the mapping array and \a
506  * sign\f$[e][i]\f$ is an array of similar dimensions ensuring the
507  * correct modal connectivity between the different elements (both
508  * these arrays are contained in the data member #m_locToGloMap). This
509  * operation is equivalent to the scatter operation
510  * \f$\boldsymbol{\hat{u}}_l=\mathcal{A}\boldsymbol{\hat{u}}_g\f$,
511  * where \f$\mathcal{A}\f$ is the
512  * \f$N_{\mathrm{eof}}\times N_{\mathrm{dof}}\f$ permutation matrix.
513  *
514  * @param inarray An array of size \f$N_\mathrm{dof}\f$
515  * containing the global degrees of freedom
516  * \f$\boldsymbol{x}_g\f$.
517  * @param outarray The resulting local degrees of freedom
518  * \f$\boldsymbol{x}_l\f$ will be stored in this
519  * array of size \f$N_\mathrm{eof}\f$.
520  */
522  const Array<OneD, const NekDouble> &inarray,
523  Array<OneD,NekDouble> &outarray);
524 
525  /// Get the \a i th value (coefficient) of #m_coeffs
526  inline NekDouble GetCoeff(int i);
527 
528  /// Get the \a i th value (coefficient) of #m_coeffs
529  inline NekDouble GetCoeffs(int i);
530 
531  /// This function returns (a reference to) the array
532  /// \f$\boldsymbol{u}_l\f$ (implemented as #m_phys) containing the
533  /// function \f$u^{\delta}(\boldsymbol{x})\f$ evaluated at the
534  /// quadrature points.
535  // inline
537  &GetPhys() const;
538 
539  /// This function calculates the \f$L_\infty\f$ error of the global
540  /// spectral/hp element approximation.
542  const Array<OneD, const NekDouble> &inarray,
544 
545  /// This function calculates the \f$L_2\f$ error with
546  /// respect to soln of the global
547  /// spectral/hp element approximation.
549  const Array<OneD, const NekDouble> &inarray,
551  {
552  return v_L2(inarray, soln);
553  }
554 
555  /// Calculates the \f$H^1\f$ error of the global spectral/hp
556  /// element approximation.
558  const Array<OneD, const NekDouble> &inarray,
560 
562  {
563  return v_Integral(inarray);
564  }
565 
567  {
568  return v_VectorFlux(inarray);
569  }
570 
571  /// This function calculates the energy associated with
572  /// each one of the modesof a 3D homogeneous nD expansion
574  {
575  return v_HomogeneousEnergy();
576  }
577 
578  /// This function sets the Spectral Vanishing Viscosity
579  /// in homogeneous1D expansion.
581  {
583  }
584 
585  /// This function returns a vector containing the wave
586  /// numbers in z-direction associated
587  /// with the 3D homogenous expansion. Required if a
588  /// parellelisation is applied in the Fourier direction
590  {
591  return v_GetZIDs();
592  }
593 
594  /// This function returns the transposition class
595  /// associaed with the homogeneous expansion.
597  {
598  return v_GetTransposition();
599  }
600 
601  /// This function returns the Width of homogeneous direction
602  /// associaed with the homogeneous expansion.
604  {
605  return v_GetHomoLen();
606  }
607 
608  /// This function sets the Width of homogeneous direction
609  /// associaed with the homogeneous expansion.
610  void SetHomoLen(const NekDouble lhom)
611  {
612  return v_SetHomoLen(lhom);
613  }
614 
615  /// This function returns a vector containing the wave
616  /// numbers in y-direction associated
617  /// with the 3D homogenous expansion. Required if a
618  /// parellelisation is applied in the Fourier direction
620  {
621  return v_GetYIDs();
622  }
623 
624  /// This function interpolates the physical space points in
625  /// \a inarray to \a outarray using the same points defined in the
626  /// expansion but where the number of points are rescaled
627  /// by \a 1DScale
629  const NekDouble scale,
630  const Array<OneD, NekDouble> &inarray,
631  Array<OneD, NekDouble> &outarray)
632  {
633  v_PhysInterp1DScaled(scale, inarray,outarray);
634  }
635 
636  /// This function Galerkin projects the physical space points in
637  /// \a inarray to \a outarray where inarray is assumed to
638  /// be defined in the expansion but where the number of
639  /// points are rescaled by \a 1DScale
641  const NekDouble scale,
642  const Array<OneD, NekDouble> &inarray,
643  Array<OneD, NekDouble> &outarray)
644  {
645  v_PhysGalerkinProjection1DScaled(scale, inarray, outarray);
646  }
647 
648  /// This function returns the number of elements in the expansion.
649  inline int GetExpSize(void);
650 
651 
652  /// This function returns the number of elements in the
653  /// expansion which may be different for a homogeoenous extended
654  /// expansionp.
655  inline int GetNumElmts(void)
656  {
657  return v_GetNumElmts();
658  }
659 
660  /// This function returns the vector of elements in the expansion.
661  inline const std::shared_ptr<LocalRegions::ExpansionVector>
662  GetExp() const;
663 
664  /// This function returns (a shared pointer to) the local elemental
665  /// expansion of the \f$n^{\mathrm{th}}\f$ element.
666  inline LocalRegions::ExpansionSharedPtr& GetExp(int n) const;
667 
668  /// This function returns (a shared pointer to) the local elemental
669  /// expansion containing the arbitrary point given by \a gloCoord.
671  const Array<OneD, const NekDouble> &gloCoord);
672 
673  /** This function returns the index of the local elemental
674  * expansion containing the arbitrary point given by \a gloCoord.
675  **/
677  const Array<OneD, const NekDouble> &gloCoord,
678  NekDouble tol = 0.0,
679  bool returnNearestElmt = false);
680 
681  /** This function returns the index and the Local
682  * Cartesian Coordinates \a locCoords of the local
683  * elemental expansion containing the arbitrary point
684  * given by \a gloCoords.
685  **/
687  const Array<OneD, const NekDouble> &gloCoords,
688  Array<OneD, NekDouble> &locCoords,
689  NekDouble tol = 0.0,
690  bool returnNearestElmt = false);
691 
692  /** This function return the expansion field value
693  * at the coordinates given as input.
694  **/
696  const Array<OneD, const NekDouble> &coords,
697  const Array<OneD, const NekDouble> &phys);
698 
699  /// Get the start offset position for a global list of #m_coeffs
700  /// correspoinding to element n.
701  inline int GetCoeff_Offset(int n) const;
702 
703  /// Get the start offset position for a global list of m_phys
704  /// correspoinding to element n.
705  inline int GetPhys_Offset(int n) const;
706 
707  /// This function returns (a reference to) the array
708  /// \f$\boldsymbol{\hat{u}}_l\f$ (implemented as #m_coeffs)
709  /// containing all local expansion coefficients.
711 
712  /// This function returns (a reference to) the array
713  /// \f$\boldsymbol{u}_l\f$ (implemented as #m_phys) containing the
714  /// function \f$u^{\delta}(\boldsymbol{x})\f$ evaluated at the
715  /// quadrature points.
717 
718  inline void PhysDeriv(
719  Direction edir,
720  const Array<OneD, const NekDouble> &inarray,
721  Array<OneD, NekDouble> &out_d);
722 
723  /// This function discretely evaluates the derivative of a function
724  /// \f$f(\boldsymbol{x})\f$ on the domain consisting of all
725  /// elements of the expansion.
726  inline void PhysDeriv(
727  const Array<OneD, const NekDouble> &inarray,
728  Array<OneD, NekDouble> &out_d0,
731 
732  inline void PhysDeriv(
733  const int dir,
734  const Array<OneD, const NekDouble> &inarray,
735  Array<OneD, NekDouble> &out_d);
736 
737  inline void CurlCurl(
740 
741  inline void PhysDirectionalDeriv(
742  const Array<OneD, const NekDouble> &direction,
743  const Array<OneD, const NekDouble> &inarray,
744  Array<OneD, NekDouble> &outarray);
745 
746  inline void GetMovingFrames(
747  const SpatialDomains::GeomMMF MMFdir,
748  const Array<OneD, const NekDouble> &CircCentre,
749  Array<OneD, Array<OneD, NekDouble> > &outarray);
750 
751  // functions associated with DisContField
754 
755  inline std::shared_ptr<ExpList> &UpdateBndCondExpansion(int i);
756 
757  inline void Upwind(
758  const Array<OneD, const Array<OneD, NekDouble> > &Vec,
759  const Array<OneD, const NekDouble> &Fwd,
760  const Array<OneD, const NekDouble> &Bwd,
762 
763  inline void Upwind(
765  const Array<OneD, const NekDouble> &Fwd,
766  const Array<OneD, const NekDouble> &Bwd,
767  Array<OneD, NekDouble> &Upwind);
768 
769  /**
770  * Return a reference to the trace space associated with this
771  * expansion list.
772  */
773  inline std::shared_ptr<ExpList> &GetTrace();
774 
775  inline std::shared_ptr<AssemblyMapDG> &GetTraceMap(void);
776 
777  inline const Array<OneD, const int> &GetTraceBndMap(void);
778 
779  inline void GetNormals(Array<OneD, Array<OneD, NekDouble> > &normals);
780 
781  inline void AddTraceIntegral(
784  Array<OneD, NekDouble> &outarray);
785 
786  inline void AddTraceIntegral(
788  Array<OneD, NekDouble> &outarray);
789 
790  inline void AddFwdBwdTraceIntegral(
791  const Array<OneD, const NekDouble> &Fwd,
792  const Array<OneD, const NekDouble> &Bwd,
793  Array<OneD, NekDouble> &outarray);
794 
795  inline void GetFwdBwdTracePhys(
797  Array<OneD,NekDouble> &Bwd);
798 
799  inline void GetFwdBwdTracePhys(
800  const Array<OneD,const NekDouble> &field,
802  Array<OneD,NekDouble> &Bwd);
803 
804  inline const std::vector<bool> &GetLeftAdjacentFaces(void) const;
805 
806  inline void ExtractTracePhys(Array<OneD,NekDouble> &outarray);
807 
808  inline void ExtractTracePhys(
809  const Array<OneD, const NekDouble> &inarray,
810  Array<OneD,NekDouble> &outarray);
811 
812  inline const Array<OneD, const SpatialDomains::
813  BoundaryConditionShPtr>& GetBndConditions();
814 
815  inline Array<OneD, SpatialDomains::
816  BoundaryConditionShPtr>& UpdateBndConditions();
817 
818  inline void EvaluateBoundaryConditions(
819  const NekDouble time = 0.0,
820  const std::string varName = "",
823 
824  // Routines for continous matrix solution
825  /// This function calculates the result of the multiplication of a
826  /// matrix of type specified by \a mkey with a vector given by \a
827  /// inarray.
828  inline void GeneralMatrixOp(
829  const GlobalMatrixKey &gkey,
830  const Array<OneD,const NekDouble> &inarray,
831  Array<OneD, NekDouble> &outarray,
832  CoeffState coeffstate = eLocal);
833 
835  const GlobalMatrixKey &gkey,
836  const Array<OneD,const NekDouble> &inarray,
837  Array<OneD, NekDouble> &outarray);
838 
839  inline void SetUpPhysNormals();
840 
841  inline void GetBoundaryToElmtMap(Array<OneD, int> &ElmtID,
842  Array<OneD,int> &EdgeID);
843 
844  inline void GetBndElmtExpansion(int i,
845  std::shared_ptr<ExpList> &result,
846  const bool DeclareCoeffPhysArrays = true);
847 
848  inline void ExtractElmtToBndPhys(int i,
849  const Array<OneD, NekDouble> &elmt,
850  Array<OneD, NekDouble> &boundary);
851 
852  inline void ExtractPhysToBndElmt(int i,
853  const Array<OneD, const NekDouble> &phys,
854  Array<OneD, NekDouble> &bndElmt);
855 
856  inline void ExtractPhysToBnd(int i,
857  const Array<OneD, const NekDouble> &phys,
859 
860  inline void GetBoundaryNormals(int i,
861  Array<OneD, Array<OneD, NekDouble> > &normals);
862 
864  std::vector<LibUtilities::FieldDefinitionsSharedPtr> &fielddef,
865  int NumHomoDir = 0,
868  std::vector<NekDouble> &HomoLen =
870  bool homoStrips = false,
871  std::vector<unsigned int> &HomoSIDs =
873  std::vector<unsigned int> &HomoZIDs =
875  std::vector<unsigned int> &HomoYIDs =
877 
878 
880  {
881  return m_globalOptParam;
882  }
883 
884  std::map<int, RobinBCInfoSharedPtr> GetRobinBCInfo()
885  {
886  return v_GetRobinBCInfo();
887  }
888 
890  PeriodicMap &periodicVerts,
891  PeriodicMap &periodicEdges,
892  PeriodicMap &periodicFaces = NullPeriodicMap)
893  {
894  v_GetPeriodicEntities(periodicVerts, periodicEdges, periodicFaces);
895  }
896 
897  std::vector<LibUtilities::FieldDefinitionsSharedPtr>
899  {
900  return v_GetFieldDefinitions();
901  }
902 
903 
904  void GetFieldDefinitions(std::vector<LibUtilities::FieldDefinitionsSharedPtr> &fielddef)
905  {
906  v_GetFieldDefinitions(fielddef);
907  }
908 
909 
910 
911  /// Append the element data listed in elements
912  /// fielddef->m_ElementIDs onto fielddata
915  std::vector<NekDouble> &fielddata)
916  {
917  v_AppendFieldData(fielddef,fielddata);
918  }
919 
920 
921  /// Append the data in coeffs listed in elements
922  /// fielddef->m_ElementIDs onto fielddata
925  std::vector<NekDouble> &fielddata,
926  Array<OneD, NekDouble> &coeffs)
927  {
928  v_AppendFieldData(fielddef,fielddata,coeffs);
929  }
930 
931 
932  /** \brief Extract the data in fielddata into the coeffs
933  * using the basic ExpList Elemental expansions rather
934  * than planes in homogeneous case
935  */
938  std::vector<NekDouble> &fielddata,
939  std::string &field,
940  Array<OneD, NekDouble> &coeffs);
941 
942 
943  /** \brief Extract the data from fromField using
944  * fromExpList the coeffs using the basic ExpList
945  * Elemental expansions rather than planes in homogeneous
946  * case
947  */
949  const std::shared_ptr<ExpList> &fromExpList,
950  const Array<OneD, const NekDouble> &fromCoeffs,
951  Array<OneD, NekDouble> &toCoeffs);
952 
953 
954  //Extract data in fielddata into the m_coeffs_list for the 3D stability analysis (base flow is 2D)
957  std::vector<NekDouble> &fielddata,
958  std::string &field,
959  Array<OneD, NekDouble> &coeffs);
960 
962  const int ElementID,
963  const NekDouble scalar1,
964  const NekDouble scalar2,
965  Array<OneD, NekDouble> &outarray);
966 
967  /// Returns a shared pointer to the current object.
968  std::shared_ptr<ExpList> GetSharedThisPtr()
969  {
970  return shared_from_this();
971  }
972 
973  /// Returns the session object
974  std::shared_ptr<LibUtilities::SessionReader> GetSession() const
975  {
976  return m_session;
977  }
978 
979  /// Returns the comm object
980  std::shared_ptr<LibUtilities::Comm> GetComm()
981  {
982  return m_comm;
983  }
984 
986  {
987  return m_graph;
988  }
989 
990  // Wrapper functions for Homogeneous Expansions
992  {
993  return v_GetHomogeneousBasis();
994  }
995 
996  std::shared_ptr<ExpList> &GetPlane(int n)
997  {
998  return v_GetPlane(n);
999  }
1000 
1001  //expansion type
1003 
1007 
1009 
1010  protected:
1011  /// Definition of the total number of degrees of freedom and
1012  /// quadrature points and offsets to access data
1013  void SetCoeffPhysOffsets();
1014 
1015  std::shared_ptr<DNekMat> GenGlobalMatrixFull(
1016  const GlobalLinSysKey &mkey,
1017  const std::shared_ptr<AssemblyMapCG> &locToGloMap);
1018 
1019  /// Communicator
1021 
1022  /// Session
1024 
1025  /// Mesh associated with this expansion list.
1027 
1028  /// The total number of local degrees of freedom. #m_ncoeffs
1029  /// \f$=N_{\mathrm{eof}}=\sum_{e=1}^{{N_{\mathrm{el}}}}N^{e}_l\f$
1031 
1032  /** The total number of quadrature points. #m_npoints
1033  *\f$=Q_{\mathrm{tot}}=\sum_{e=1}^{{N_{\mathrm{el}}}}N^{e}_Q\f$
1034  **/
1036 
1037  /**
1038  * \brief Concatenation of all local expansion coefficients.
1039  *
1040  * The array of length #m_ncoeffs\f$=N_{\mathrm{eof}}\f$ which is
1041  * the concatenation of the local expansion coefficients
1042  * \f$\hat{u}_n^e\f$ over all \f$N_{\mathrm{el}}\f$ elements
1043  * \f[\mathrm{\texttt{m\_coeffs}}=\boldsymbol{\hat{u}}_{l} =
1044  * \underline{\boldsymbol{\hat{u}}}^e = \left [ \begin{array}{c}
1045  * \boldsymbol{\hat{u}}^{1} \ \
1046  * \boldsymbol{\hat{u}}^{2} \ \
1047  * \vdots \ \
1048  * \boldsymbol{\hat{u}}^{{{N_{\mathrm{el}}}}} \end{array} \right ],
1049  * \quad
1050  * \mathrm{where}\quad \boldsymbol{\hat{u}}^{e}[n]=\hat{u}_n^{e}\f]
1051  */
1053 
1054  /**
1055  * \brief The global expansion evaluated at the quadrature points
1056  *
1057  * The array of length #m_npoints\f$=Q_{\mathrm{tot}}\f$ containing
1058  * the evaluation of \f$u^{\delta}(\boldsymbol{x})\f$ at the
1059  * quadrature points \f$\boldsymbol{x}_i\f$.
1060  * \f[\mathrm{\texttt{m\_phys}}=\boldsymbol{u}_{l} =
1061  * \underline{\boldsymbol{u}}^e = \left [ \begin{array}{c}
1062  * \boldsymbol{u}^{1} \ \
1063  * \boldsymbol{u}^{2} \ \
1064  * \vdots \ \
1065  * \boldsymbol{u}^{{{N_{\mathrm{el}}}}} \end{array} \right ],\quad
1066  * \mathrm{where}\quad
1067  * \boldsymbol{u}^{e}[i]=u^{\delta}(\boldsymbol{x}_i)\f]
1068  */
1070 
1071  /**
1072  * \brief The state of the array #m_phys.
1073  *
1074  * Indicates whether the array #m_phys, created to contain the
1075  * evaluation of \f$u^{\delta}(\boldsymbol{x})\f$ at the quadrature
1076  * points \f$\boldsymbol{x}_i\f$, is filled with these values.
1077  */
1079 
1080  /**
1081  * \brief The list of local expansions.
1082  *
1083  * The (shared pointer to the) vector containing (shared pointers
1084  * to) all local expansions. The fact that the local expansions are
1085  * all stored as a (pointer to a) #StdExpansion, the abstract base
1086  * class for all local expansions, allows a general implementation
1087  * where most of the routines for the derived classes are defined
1088  * in the #ExpList base class.
1089  */
1090  std::shared_ptr<LocalRegions::ExpansionVector> m_exp;
1091 
1093 
1094  /// Offset of elemental data into the array #m_coeffs
1095  std::vector<int> m_coll_coeff_offset;
1096 
1097  /// Offset of elemental data into the array #m_phys
1098  std::vector<int> m_coll_phys_offset;
1099 
1100  /// Offset of elemental data into the array #m_coeffs
1102 
1103  /// Offset of elemental data into the array #m_phys
1105 
1107 
1108  BlockMatrixMapShPtr m_blockMat;
1109 
1110  //@todo should this be in ExpList or ExpListHomogeneous1D.cpp
1111  // it's a bool which determine if the expansion is in the wave space (coefficient space)
1112  // or not
1114 
1115  /// Mapping from geometry ID of element to index inside #m_exp
1116  std::unordered_map<int, int> m_elmtToExpId;
1117 
1118  /// This function assembles the block diagonal matrix of local
1119  /// matrices of the type \a mtype.
1121  const GlobalMatrixKey &gkey);
1122 
1124  const GlobalMatrixKey &gkey);
1125 
1126  void MultiplyByBlockMatrix(
1127  const GlobalMatrixKey &gkey,
1128  const Array<OneD,const NekDouble> &inarray,
1129  Array<OneD, NekDouble> &outarray);
1130 
1131  /// Generates a global matrix from the given key and map.
1132  std::shared_ptr<GlobalMatrix> GenGlobalMatrix(
1133  const GlobalMatrixKey &mkey,
1134  const std::shared_ptr<AssemblyMapCG> &locToGloMap);
1135 
1136 
1137  void GlobalEigenSystem(
1138  const std::shared_ptr<DNekMat> &Gmat,
1139  Array<OneD, NekDouble> &EigValsReal,
1140  Array<OneD, NekDouble> &EigValsImag,
1141  Array<OneD, NekDouble> &EigVecs
1143 
1144 
1145  /// This operation constructs the global linear system of type \a
1146  /// mkey.
1147  std::shared_ptr<GlobalLinSys> GenGlobalLinSys(
1148  const GlobalLinSysKey &mkey,
1149  const std::shared_ptr<AssemblyMapCG> &locToGloMap);
1150 
1151  /// Generate a GlobalLinSys from information provided by the key
1152  /// "mkey" and the mapping provided in LocToGloBaseMap.
1153  std::shared_ptr<GlobalLinSys> GenGlobalBndLinSys(
1154  const GlobalLinSysKey &mkey,
1155  const AssemblyMapSharedPtr &locToGloMap);
1156 
1158  {
1160  }
1161 
1162  // Virtual prototypes
1163 
1164  virtual int v_GetNumElmts(void)
1165  {
1166  return (*m_exp).size();
1167  }
1168 
1170  &v_GetBndCondExpansions(void);
1171 
1172  virtual std::shared_ptr<ExpList> &v_UpdateBndCondExpansion(int i);
1173 
1174  virtual void v_Upwind(
1175  const Array<OneD, const Array<OneD, NekDouble> > &Vec,
1176  const Array<OneD, const NekDouble> &Fwd,
1177  const Array<OneD, const NekDouble> &Bwd,
1178  Array<OneD, NekDouble> &Upwind);
1179 
1180  virtual void v_Upwind(
1181  const Array<OneD, const NekDouble> &Vn,
1182  const Array<OneD, const NekDouble> &Fwd,
1183  const Array<OneD, const NekDouble> &Bwd,
1184  Array<OneD, NekDouble> &Upwind);
1185 
1186  virtual std::shared_ptr<ExpList> &v_GetTrace();
1187 
1188  virtual std::shared_ptr<AssemblyMapDG> &v_GetTraceMap();
1189 
1190  virtual const Array<OneD, const int> &v_GetTraceBndMap();
1191 
1192  virtual void v_GetNormals(
1193  Array<OneD, Array<OneD, NekDouble> > &normals);
1194 
1195  virtual void v_AddTraceIntegral(
1196  const Array<OneD, const NekDouble> &Fx,
1197  const Array<OneD, const NekDouble> &Fy,
1198  Array<OneD, NekDouble> &outarray);
1199 
1200  virtual void v_AddTraceIntegral(
1201  const Array<OneD, const NekDouble> &Fn,
1202  Array<OneD, NekDouble> &outarray);
1203 
1204  virtual void v_AddFwdBwdTraceIntegral(
1205  const Array<OneD, const NekDouble> &Fwd,
1206  const Array<OneD, const NekDouble> &Bwd,
1207  Array<OneD, NekDouble> &outarray);
1208 
1209  virtual void v_GetFwdBwdTracePhys(
1210  Array<OneD,NekDouble> &Fwd,
1211  Array<OneD,NekDouble> &Bwd);
1212 
1213  virtual void v_GetFwdBwdTracePhys(
1214  const Array<OneD,const NekDouble> &field,
1215  Array<OneD,NekDouble> &Fwd,
1216  Array<OneD,NekDouble> &Bwd);
1217 
1218  virtual const std::vector<bool> &v_GetLeftAdjacentFaces(void) const;
1219 
1220  virtual void v_ExtractTracePhys(
1221  Array<OneD,NekDouble> &outarray);
1222 
1223  virtual void v_ExtractTracePhys(
1224  const Array<OneD, const NekDouble> &inarray,
1225  Array<OneD,NekDouble> &outarray);
1226 
1227  virtual void v_MultiplyByInvMassMatrix(
1228  const Array<OneD,const NekDouble> &inarray,
1229  Array<OneD, NekDouble> &outarray,
1230  CoeffState coeffstate);
1231 
1232  virtual void v_HelmSolve(
1233  const Array<OneD, const NekDouble> &inarray,
1234  Array<OneD, NekDouble> &outarray,
1235  const FlagList &flags,
1236  const StdRegions::ConstFactorMap &factors,
1237  const StdRegions::VarCoeffMap &varcoeff,
1238  const MultiRegions::VarFactorsMap &varfactors,
1239  const Array<OneD, const NekDouble> &dirForcing,
1240  const bool PhysSpaceForcing);
1241 
1243  const Array<OneD, Array<OneD, NekDouble> > &velocity,
1244  const Array<OneD, const NekDouble> &inarray,
1245  Array<OneD, NekDouble> &outarray,
1246  const NekDouble lambda,
1247  CoeffState coeffstate = eLocal,
1249  dirForcing = NullNekDouble1DArray);
1250 
1251  virtual void v_LinearAdvectionReactionSolve(
1252  const Array<OneD, Array<OneD, NekDouble> > &velocity,
1253  const Array<OneD, const NekDouble> &inarray,
1254  Array<OneD, NekDouble> &outarray,
1255  const NekDouble lambda,
1256  CoeffState coeffstate = eLocal,
1258  dirForcing = NullNekDouble1DArray);
1259 
1260  // wrapper functions about virtual functions
1261  virtual void v_ImposeDirichletConditions(Array<OneD,NekDouble>& outarray);
1262 
1263  virtual void v_FillBndCondFromField();
1264 
1265  virtual void v_FillBndCondFromField(const int nreg);
1266 
1267  virtual void v_Reset();
1268 
1269  virtual void v_LocalToGlobal(bool UseComm);
1270 
1271  virtual void v_LocalToGlobal(
1272  const Array<OneD, const NekDouble> &inarray,
1273  Array<OneD,NekDouble> &outarray,
1274  bool UseComm);
1275 
1276  virtual void v_GlobalToLocal(void);
1277 
1278  virtual void v_GlobalToLocal(
1279  const Array<OneD, const NekDouble> &inarray,
1280  Array<OneD,NekDouble> &outarray);
1281 
1282  virtual void v_BwdTrans(
1283  const Array<OneD,const NekDouble> &inarray,
1284  Array<OneD, NekDouble> &outarray,
1285  CoeffState coeffstate);
1286 
1287  virtual void v_BwdTrans_IterPerExp(
1288  const Array<OneD,const NekDouble> &inarray,
1289  Array<OneD,NekDouble> &outarray);
1290 
1291  virtual void v_FwdTrans(
1292  const Array<OneD,const NekDouble> &inarray,
1293  Array<OneD, NekDouble> &outarray,
1294  CoeffState coeffstate);
1295 
1296  virtual void v_FwdTrans_IterPerExp(
1297  const Array<OneD,const NekDouble> &inarray,
1298  Array<OneD,NekDouble> &outarray);
1299 
1300  virtual void v_FwdTrans_BndConstrained(
1301  const Array<OneD,const NekDouble> &inarray,
1302  Array<OneD,NekDouble> &outarray);
1303 
1304  virtual void v_SmoothField(Array<OneD,NekDouble> &field);
1305 
1306  virtual void v_IProductWRTBase(
1307  const Array<OneD, const NekDouble> &inarray,
1308  Array<OneD, NekDouble> &outarray,
1309  CoeffState coeffstate);
1310 
1311  virtual void v_IProductWRTBase_IterPerExp(
1312  const Array<OneD,const NekDouble> &inarray,
1313  Array<OneD, NekDouble> &outarray);
1314 
1315  virtual void v_GeneralMatrixOp(
1316  const GlobalMatrixKey &gkey,
1317  const Array<OneD,const NekDouble> &inarray,
1318  Array<OneD, NekDouble> &outarray,
1319  CoeffState coeffstate);
1320 
1321  virtual void v_GetCoords(
1322  Array<OneD, NekDouble> &coord_0,
1323  Array<OneD, NekDouble> &coord_1,
1325 
1326  virtual void v_PhysDeriv(
1327  const Array<OneD, const NekDouble> &inarray,
1328  Array<OneD, NekDouble> &out_d0,
1329  Array<OneD, NekDouble> &out_d1,
1330  Array<OneD, NekDouble> &out_d2);
1331 
1332  virtual void v_PhysDeriv(
1333  const int dir,
1334  const Array<OneD, const NekDouble> &inarray,
1335  Array<OneD, NekDouble> &out_d);
1336 
1337  virtual void v_PhysDeriv(
1338  Direction edir,
1339  const Array<OneD, const NekDouble> &inarray,
1340  Array<OneD, NekDouble> &out_d);
1341 
1342  virtual void v_CurlCurl(
1343  Array<OneD, Array<OneD, NekDouble> > &Vel,
1344  Array<OneD, Array<OneD, NekDouble> > &Q);
1345 
1346  virtual void v_PhysDirectionalDeriv(
1347  const Array<OneD, const NekDouble> &direction,
1348  const Array<OneD, const NekDouble> &inarray,
1349  Array<OneD, NekDouble> &outarray);
1350 
1351  virtual void v_GetMovingFrames(
1352  const SpatialDomains::GeomMMF MMFdir,
1353  const Array<OneD, const NekDouble> &CircCentre,
1354  Array<OneD, Array<OneD, NekDouble> > &outarray);
1355 
1356  virtual void v_HomogeneousFwdTrans(
1357  const Array<OneD, const NekDouble> &inarray,
1358  Array<OneD, NekDouble> &outarray,
1359  CoeffState coeffstate = eLocal,
1360  bool Shuff = true,
1361  bool UnShuff = true);
1362 
1363  virtual void v_HomogeneousBwdTrans(
1364  const Array<OneD, const NekDouble> &inarray,
1365  Array<OneD, NekDouble> &outarray,
1366  CoeffState coeffstate = eLocal,
1367  bool Shuff = true,
1368  bool UnShuff = true);
1369 
1370  virtual void v_DealiasedProd(
1371  const Array<OneD, NekDouble> &inarray1,
1372  const Array<OneD, NekDouble> &inarray2,
1373  Array<OneD, NekDouble> &outarray,
1374  CoeffState coeffstate = eLocal);
1375 
1376  virtual void v_DealiasedDotProd(
1377  const Array<OneD, Array<OneD, NekDouble> > &inarray1,
1378  const Array<OneD, Array<OneD, NekDouble> > &inarray2,
1379  Array<OneD, Array<OneD, NekDouble> > &outarray,
1380  CoeffState coeffstate = eLocal);
1381 
1382  virtual void v_GetBCValues(
1383  Array<OneD, NekDouble> &BndVals,
1384  const Array<OneD, NekDouble> &TotField,
1385  int BndID);
1386 
1387  virtual void v_NormVectorIProductWRTBase(
1390  Array<OneD, NekDouble> &outarray,
1391  int BndID);
1392 
1393  virtual void v_NormVectorIProductWRTBase(
1394  Array<OneD, Array<OneD, NekDouble> > &V,
1395  Array<OneD, NekDouble> &outarray);
1396 
1397  virtual void v_SetUpPhysNormals();
1398 
1399  virtual void v_GetBoundaryToElmtMap(Array<OneD, int> &ElmtID,
1400  Array<OneD,int> &EdgeID);
1401 
1402  virtual void v_GetBndElmtExpansion(int i,
1403  std::shared_ptr<ExpList> &result,
1404  const bool DeclareCoeffPhysArrays);
1405 
1406  virtual void v_ExtractElmtToBndPhys( const int i,
1407  const Array<OneD, NekDouble> & elmt,
1408  Array<OneD, NekDouble> & boundary );
1409 
1410  virtual void v_ExtractPhysToBndElmt( const int i,
1411  const Array<OneD, const NekDouble> & phys,
1412  Array<OneD, NekDouble> & bndElmt );
1413 
1414  virtual void v_ExtractPhysToBnd( const int i,
1415  const Array<OneD, const NekDouble> & phys,
1416  Array<OneD, NekDouble> & bnd );
1417 
1418  virtual void v_GetBoundaryNormals(int i,
1419  Array<OneD, Array<OneD, NekDouble> > &normals);
1420 
1421  virtual void v_ReadGlobalOptimizationParameters();
1422 
1423  virtual std::vector<LibUtilities::FieldDefinitionsSharedPtr>
1424  v_GetFieldDefinitions(void);
1425 
1426  virtual void v_GetFieldDefinitions(
1427  std::vector<LibUtilities::FieldDefinitionsSharedPtr> &fielddef);
1428 
1429  virtual void v_AppendFieldData(
1431  std::vector<NekDouble> &fielddata);
1432 
1433  virtual void v_AppendFieldData(
1435  std::vector<NekDouble> &fielddata,
1436  Array<OneD, NekDouble> &coeffs);
1437 
1438  virtual void v_ExtractDataToCoeffs(
1440  std::vector<NekDouble> &fielddata, std::string &field,
1441  Array<OneD, NekDouble> &coeffs);
1442 
1443  virtual void v_ExtractCoeffsToCoeffs(const std::shared_ptr<ExpList> &fromExpList, const Array<OneD, const NekDouble> &fromCoeffs, Array<OneD, NekDouble> &toCoeffs);
1444 
1445  virtual void v_WriteTecplotHeader(std::ostream &outfile,
1446  std::string var = "");
1447  virtual void v_WriteTecplotZone(std::ostream &outfile,
1448  int expansion);
1449  virtual void v_WriteTecplotField(std::ostream &outfile,
1450  int expansion);
1451  virtual void v_WriteTecplotConnectivity(std::ostream &outfile,
1452  int expansion);
1453  virtual void v_WriteVtkPieceHeader(
1454  std::ostream &outfile,
1455  int expansion,
1456  int istrip);
1457 
1458  virtual void v_WriteVtkPieceData(
1459  std::ostream &outfile,
1460  int expansion,
1461  std::string var);
1462 
1463  virtual NekDouble v_L2(
1464  const Array<OneD, const NekDouble> &phys,
1466 
1467  virtual NekDouble v_Integral (
1468  const Array<OneD, const NekDouble> &inarray);
1469  virtual NekDouble v_VectorFlux (
1470  const Array<OneD, Array<OneD, NekDouble> > &inarray);
1471 
1474  virtual NekDouble v_GetHomoLen(void);
1475  virtual void v_SetHomoLen(const NekDouble lhom);
1478 
1479  // 1D Scaling and projection
1480  virtual void v_PhysInterp1DScaled(
1481  const NekDouble scale, const Array<OneD, NekDouble> &inarray,
1482  Array<OneD, NekDouble> &outarray);
1483 
1484  virtual void v_PhysGalerkinProjection1DScaled(
1485  const NekDouble scale,
1486  const Array<OneD, NekDouble> &inarray,
1487  Array<OneD, NekDouble> &outarray);
1488 
1489  virtual void v_ClearGlobalLinSysManager(void);
1490 
1491  void ExtractFileBCs(const std::string &fileName,
1493  const std::string &varName,
1494  const std::shared_ptr<ExpList> locExpList);
1495 
1496  // Utility function for a common case of retrieving a
1497  // BoundaryCondition from a boundary condition collection.
1500  GetBoundaryCondition(const SpatialDomains::
1501  BoundaryConditionCollection& collection,
1502  unsigned int index, const std::string& variable);
1503 
1504 
1505  private:
1507 
1510 
1511  virtual void v_EvaluateBoundaryConditions(
1512  const NekDouble time = 0.0,
1513  const std::string varName = "",
1516 
1517  virtual std::map<int, RobinBCInfoSharedPtr> v_GetRobinBCInfo(void);
1518 
1519 
1520  virtual void v_GetPeriodicEntities(
1521  PeriodicMap &periodicVerts,
1522  PeriodicMap &periodicEdges,
1523  PeriodicMap &periodicFaces);
1524 
1525  // Homogeneous direction wrapper functions.
1527  {
1529  "This method is not defined or valid for this class type");
1531  }
1532 
1533  // wrapper function to set viscosity for Homo1D expansion
1535  {
1536  boost::ignore_unused(visc);
1538  "This method is not defined or valid for this class type");
1539  }
1540 
1541 
1542  virtual std::shared_ptr<ExpList> &v_GetPlane(int n);
1543  };
1544 
1545 
1546  /// Shared pointer to an ExpList object.
1547  typedef std::shared_ptr<ExpList> ExpListSharedPtr;
1548  /// An empty ExpList object.
1550  static ExpListSharedPtr NullExpListSharedPtr;
1551 
1552  // Inline routines follow.
1553 
1554  /**
1555  * Returns the total number of local degrees of freedom
1556  * \f$N_{\mathrm{eof}}=\sum_{e=1}^{{N_{\mathrm{el}}}}N^{e}_m\f$.
1557  */
1558  inline int ExpList::GetNcoeffs() const
1559  {
1560  return m_ncoeffs;
1561  }
1562 
1563  inline int ExpList::GetNcoeffs(const int eid) const
1564  {
1565  return (*m_exp)[eid]->GetNcoeffs();
1566  }
1567 
1568  /**
1569  * Evaulates the maximum number of modes in the elemental basis
1570  * order over all elements
1571  */
1573  {
1574  unsigned int i;
1575  int returnval = 0;
1576 
1577  for(i= 0; i < (*m_exp).size(); ++i)
1578  {
1579  returnval = (std::max)(returnval,
1580  (*m_exp)[i]->EvalBasisNumModesMax());
1581  }
1582 
1583  return returnval;
1584  }
1585 
1586  /**
1587  *
1588  */
1590  const
1591  {
1592  unsigned int i;
1593  Array<OneD,int> returnval((*m_exp).size(),0);
1594 
1595  for(i= 0; i < (*m_exp).size(); ++i)
1596  {
1597  returnval[i]
1598  = (std::max)(returnval[i],(*m_exp)[i]->EvalBasisNumModesMax());
1599  }
1600 
1601  return returnval;
1602  }
1603 
1604 
1605  /**
1606  *
1607  */
1608  inline int ExpList::GetTotPoints() const
1609  {
1610  return m_npoints;
1611  }
1612 
1613  inline int ExpList::GetTotPoints(const int eid) const
1614  {
1615  return (*m_exp)[eid]->GetTotPoints();
1616  }
1617 
1618 
1619  inline int ExpList::Get1DScaledTotPoints(const NekDouble scale) const
1620  {
1621  int returnval = 0;
1622  int cnt;
1623  int nbase = (*m_exp)[0]->GetNumBases();
1624 
1625  for(int i = 0; i < (*m_exp).size(); ++i)
1626  {
1627  cnt = 1;
1628  for(int j = 0; j < nbase; ++j)
1629  {
1630  cnt *= (int)(scale*((*m_exp)[i]->GetNumPoints(j)));
1631  }
1632  returnval += cnt;
1633  }
1634  return returnval;
1635  }
1636 
1637  /**
1638  *
1639  */
1640  inline int ExpList::GetNpoints() const
1641  {
1642  return m_npoints;
1643  }
1644 
1645 
1646  /**
1647  *
1648  */
1649  inline void ExpList::SetWaveSpace(const bool wavespace)
1650  {
1651  m_WaveSpace = wavespace;
1652  }
1653 
1654  /**
1655  *
1656  */
1657  inline bool ExpList::GetWaveSpace() const
1658  {
1659  return m_WaveSpace;
1660  }
1661 
1662  /// Set the \a i th value of\a m_phys to value \a val
1663  inline void ExpList::SetPhys(int i, NekDouble val)
1664  {
1665  m_phys[i] = val;
1666  }
1667 
1668 
1669  /**
1670  * This function fills the array \f$\boldsymbol{u}_l\f$, the evaluation
1671  * of the expansion at the quadrature points (implemented as #m_phys),
1672  * with the values of the array \a inarray.
1673  *
1674  * @param inarray The array containing the values where
1675  * #m_phys should be filled with.
1676  */
1677  inline void ExpList::SetPhys(
1678  const Array<OneD, const NekDouble> &inarray)
1679  {
1680  ASSERTL0(inarray.num_elements() == m_npoints,
1681  "Input array does not have correct number of elements.");
1682 
1683  Vmath::Vcopy(m_npoints,&inarray[0],1,&m_phys[0],1);
1684  m_physState = true;
1685  }
1686 
1687 
1689  {
1690  m_phys = inarray;
1691  }
1692 
1693 
1694  /**
1695  * @param physState \a true (=filled) or \a false (=not filled).
1696  */
1697  inline void ExpList::SetPhysState(const bool physState)
1698  {
1699  m_physState = physState;
1700  }
1701 
1702 
1703  /**
1704  * @return physState \a true (=filled) or \a false (=not filled).
1705  */
1706  inline bool ExpList::GetPhysState() const
1707  {
1708  return m_physState;
1709  }
1710 
1711  /**
1712  *
1713  */
1715  const Array<OneD, const NekDouble> &inarray,
1716  Array<OneD, NekDouble> &outarray,
1717  CoeffState coeffstate)
1718  {
1719  v_IProductWRTBase(inarray,outarray, coeffstate);
1720  }
1721 
1722  /**
1723  *
1724  */
1726  const Array<OneD, const NekDouble> &inarray,
1727  Array<OneD, NekDouble> &outarray)
1728  {
1729  v_IProductWRTBase_IterPerExp(inarray,outarray);
1730  }
1731 
1732  /**
1733  *
1734  */
1735  inline void ExpList::FwdTrans(
1736  const Array<OneD, const NekDouble> &inarray,
1737  Array<OneD, NekDouble> &outarray,
1738  CoeffState coeffstate)
1739  {
1740  v_FwdTrans(inarray,outarray,coeffstate);
1741  }
1742 
1743  /**
1744  *
1745  */
1747  const Array<OneD, const NekDouble> &inarray,
1748  Array<OneD,NekDouble> &outarray)
1749  {
1750  v_FwdTrans_IterPerExp(inarray,outarray);
1751  }
1752 
1753  /**
1754  *
1755  */
1757  const Array<OneD, const NekDouble> &inarray,
1758  Array<OneD,NekDouble> &outarray)
1759  {
1760  v_FwdTrans_BndConstrained(inarray,outarray);
1761  }
1762 
1763 
1764  /**
1765  *
1766  */
1768  {
1769  v_SmoothField(field);
1770  }
1771 
1772  /**
1773  *
1774  */
1775  inline void ExpList::BwdTrans (
1776  const Array<OneD, const NekDouble> &inarray,
1777  Array<OneD, NekDouble> &outarray,
1778  CoeffState coeffstate)
1779  {
1780  v_BwdTrans(inarray,outarray,coeffstate);
1781  }
1782 
1783  /**
1784  *
1785  */
1787  const Array<OneD, const NekDouble> &inarray,
1788  Array<OneD, NekDouble> &outarray)
1789  {
1790  v_BwdTrans_IterPerExp(inarray,outarray);
1791  }
1792 
1793 
1794  /**
1795  *
1796  */
1798  const Array<OneD,const NekDouble> &inarray,
1799  Array<OneD, NekDouble> &outarray,
1800  CoeffState coeffstate)
1801  {
1802  v_MultiplyByInvMassMatrix(inarray,outarray,coeffstate);
1803  }
1804 
1805  /**
1806  *
1807  */
1808  inline void ExpList::HelmSolve(
1809  const Array<OneD, const NekDouble> &inarray,
1810  Array<OneD, NekDouble> &outarray,
1811  const FlagList &flags,
1812  const StdRegions::ConstFactorMap &factors,
1813  const StdRegions::VarCoeffMap &varcoeff,
1814  const MultiRegions::VarFactorsMap &varfactors,
1815  const Array<OneD, const NekDouble> &dirForcing,
1816  const bool PhysSpaceForcing)
1817 
1818  {
1819  v_HelmSolve(inarray, outarray, flags, factors, varcoeff,
1820  varfactors, dirForcing, PhysSpaceForcing);
1821  }
1822 
1823 
1824  /**
1825  *
1826  */
1828  const Array<OneD, Array<OneD, NekDouble> > &velocity,
1829  const Array<OneD, const NekDouble> &inarray,
1830  Array<OneD, NekDouble> &outarray,
1831  const NekDouble lambda,
1832  CoeffState coeffstate,
1833  const Array<OneD, const NekDouble>& dirForcing)
1834  {
1835  v_LinearAdvectionDiffusionReactionSolve(velocity,inarray, outarray,
1836  lambda, coeffstate,dirForcing);
1837  }
1838 
1840  const Array<OneD, Array<OneD, NekDouble> > &velocity,
1841  const Array<OneD, const NekDouble> &inarray,
1842  Array<OneD, NekDouble> &outarray,
1843  const NekDouble lambda,
1844  CoeffState coeffstate,
1845  const Array<OneD, const NekDouble>& dirForcing)
1846  {
1847  v_LinearAdvectionReactionSolve(velocity,inarray, outarray,
1848  lambda, coeffstate,dirForcing);
1849  }
1850 
1851  /**
1852  *
1853  */
1855  Array<OneD, NekDouble> &coord_1,
1856  Array<OneD, NekDouble> &coord_2)
1857 
1858  {
1859  v_GetCoords(coord_0,coord_1,coord_2);
1860  }
1861 
1862 
1863  /**
1864  *
1865  */
1867  const SpatialDomains::GeomMMF MMFdir,
1868  const Array<OneD, const NekDouble> &CircCentre,
1869  Array<OneD, Array<OneD, NekDouble> > &outarray)
1870  {
1871  v_GetMovingFrames(MMFdir,CircCentre,outarray);
1872  }
1873 
1874 
1875  /**
1876  *
1877  */
1879  Array<OneD, NekDouble> &out_d0,
1880  Array<OneD, NekDouble> &out_d1,
1881  Array<OneD, NekDouble> &out_d2)
1882  {
1883  v_PhysDeriv(inarray,out_d0,out_d1,out_d2);
1884  }
1885 
1886  /**
1887  *
1888  */
1889  inline void ExpList::PhysDeriv(
1890  const int dir,
1891  const Array<OneD, const NekDouble> &inarray,
1892  Array<OneD, NekDouble> &out_d)
1893  {
1894  v_PhysDeriv(dir,inarray,out_d);
1895  }
1896 
1897  inline void ExpList::PhysDeriv(
1898  Direction edir,
1899  const Array<OneD, const NekDouble> &inarray,
1900  Array<OneD, NekDouble> &out_d)
1901  {
1902  v_PhysDeriv(edir, inarray,out_d);
1903  }
1904 
1905 
1906  /**
1907  *
1908  */
1910  const Array<OneD, const NekDouble> &direction,
1911  const Array<OneD, const NekDouble> &inarray,
1912  Array<OneD, NekDouble> &outarray)
1913  {
1914  v_PhysDirectionalDeriv(direction, inarray, outarray);
1915  }
1916 
1917 
1918  /**
1919  *
1920  */
1921 
1922  inline void ExpList::CurlCurl(
1925  {
1926  v_CurlCurl(Vel, Q);
1927  }
1928 
1929  /**
1930  *
1931  */
1933  const Array<OneD, const NekDouble> &inarray,
1934  Array<OneD, NekDouble> &outarray,
1935  CoeffState coeffstate,
1936  bool Shuff,
1937  bool UnShuff)
1938  {
1939  v_HomogeneousFwdTrans(inarray,outarray,coeffstate,Shuff,UnShuff);
1940  }
1941 
1942  /**
1943  *
1944  */
1946  const Array<OneD, const NekDouble> &inarray,
1947  Array<OneD, NekDouble> &outarray,
1948  CoeffState coeffstate,
1949  bool Shuff,
1950  bool UnShuff)
1951  {
1952  v_HomogeneousBwdTrans(inarray,outarray,coeffstate,Shuff,UnShuff);
1953  }
1954 
1955  /**
1956  *
1957  */
1959  const Array<OneD, NekDouble> &inarray1,
1960  const Array<OneD, NekDouble> &inarray2,
1961  Array<OneD, NekDouble> &outarray,
1962  CoeffState coeffstate)
1963  {
1964  v_DealiasedProd(inarray1,inarray2,outarray,coeffstate);
1965  }
1966 
1967  /**
1968  *
1969  */
1971  const Array<OneD, Array<OneD, NekDouble> > &inarray1,
1972  const Array<OneD, Array<OneD, NekDouble> > &inarray2,
1973  Array<OneD, Array<OneD, NekDouble> > &outarray,
1974  CoeffState coeffstate)
1975  {
1976  v_DealiasedDotProd(inarray1,inarray2,outarray,coeffstate);
1977  }
1978 
1979  /**
1980  *
1981  */
1983  Array<OneD, NekDouble> &BndVals,
1984  const Array<OneD, NekDouble> &TotField,
1985  int BndID)
1986  {
1987  v_GetBCValues(BndVals,TotField,BndID);
1988  }
1989 
1990  /**
1991  *
1992  */
1996  Array<OneD, NekDouble> &outarray,
1997  int BndID)
1998  {
1999  v_NormVectorIProductWRTBase(V1,V2,outarray,BndID);
2000  }
2001 
2004  Array<OneD, NekDouble> &outarray)
2005  {
2006  v_NormVectorIProductWRTBase(V, outarray);
2007  }
2008 
2009  /**
2010  * @param eid The index of the element to be checked.
2011  * @return The dimension of the coordinates of the specific element.
2012  */
2013  inline int ExpList::GetCoordim(int eid)
2014  {
2015  ASSERTL2(eid <= (*m_exp).size(),
2016  "eid is larger than number of elements");
2017  return (*m_exp)[eid]->GetCoordim();
2018  }
2019 
2020  /**
2021  * @param eid The index of the element to be checked.
2022  * @return The dimension of the shape of the specific element.
2023  */
2025  {
2026  return (*m_exp)[0]->GetShapeDimension();
2027  }
2028 
2029  /**
2030  * @param i The index of m_coeffs to be set
2031  * @param val The value which m_coeffs[i] is to be set to.
2032  */
2033  inline void ExpList::SetCoeff(int i, NekDouble val)
2034  {
2035  m_coeffs[i] = val;
2036  }
2037 
2038 
2039  /**
2040  * @param i The index of #m_coeffs to be set.
2041  * @param val The value which #m_coeffs[i] is to be set to.
2042  */
2043  inline void ExpList::SetCoeffs(int i, NekDouble val)
2044  {
2045  m_coeffs[i] = val;
2046  }
2047 
2048 
2050  {
2051  m_coeffs = inarray;
2052  }
2053 
2054  /**
2055  * As the function returns a constant reference to a
2056  * <em>const Array</em>, it is not possible to modify the
2057  * underlying data of the array #m_coeffs. In order to do
2058  * so, use the function #UpdateCoeffs instead.
2059  *
2060  * @return (A constant reference to) the array #m_coeffs.
2061  */
2063  {
2064  return m_coeffs;
2065  }
2066 
2068  Array<OneD,NekDouble>& outarray)
2069  {
2070  v_ImposeDirichletConditions(outarray);
2071  }
2072 
2074  {
2076  }
2077 
2078  inline void ExpList::FillBndCondFromField(const int nreg)
2079  {
2080  v_FillBndCondFromField(nreg);
2081  }
2082 
2083  inline void ExpList::LocalToGlobal(bool useComm)
2084  {
2085  v_LocalToGlobal(useComm);
2086  }
2087 
2089  const Array<OneD, const NekDouble> &inarray,
2090  Array<OneD,NekDouble> &outarray,
2091  bool useComm)
2092  {
2093  v_LocalToGlobal(inarray, outarray,useComm);
2094  }
2095 
2096  inline void ExpList::GlobalToLocal(void)
2097  {
2098  v_GlobalToLocal();
2099  }
2100 
2101  /**
2102  * This operation is evaluated as:
2103  * \f{tabbing}
2104  * \hspace{1cm} \= Do \= $e=$ $1, N_{\mathrm{el}}$ \\
2105  * > > Do \= $i=$ $0,N_m^e-1$ \\
2106  * > > > $\boldsymbol{\hat{u}}^{e}[i] = \mbox{sign}[e][i] \cdot
2107  * \boldsymbol{\hat{u}}_g[\mbox{map}[e][i]]$ \\
2108  * > > continue \\
2109  * > continue
2110  * \f}
2111  * where \a map\f$[e][i]\f$ is the mapping array and \a
2112  * sign\f$[e][i]\f$ is an array of similar dimensions ensuring the
2113  * correct modal connectivity between the different elements (both
2114  * these arrays are contained in the data member #m_locToGloMap). This
2115  * operation is equivalent to the scatter operation
2116  * \f$\boldsymbol{\hat{u}}_l=\mathcal{A}\boldsymbol{\hat{u}}_g\f$, where
2117  * \f$\mathcal{A}\f$ is the
2118  * \f$N_{\mathrm{eof}}\times N_{\mathrm{dof}}\f$ permutation matrix.
2119  *
2120  * @param inarray An array of size \f$N_\mathrm{dof}\f$
2121  * containing the global degrees of freedom
2122  * \f$\boldsymbol{x}_g\f$.
2123  * @param outarray The resulting local degrees of freedom
2124  * \f$\boldsymbol{x}_l\f$ will be stored in this
2125  * array of size \f$N_\mathrm{eof}\f$.
2126  */
2128  const Array<OneD, const NekDouble> &inarray,
2129  Array<OneD,NekDouble> &outarray)
2130  {
2131  v_GlobalToLocal(inarray, outarray);
2132  }
2133 
2134 
2135  /**
2136  * @param i The index of #m_coeffs to be returned
2137  * @return The NekDouble held in #m_coeffs[i].
2138  */
2140  {
2141  return m_coeffs[i];
2142  }
2143 
2144  /**
2145  * @param i The index of #m_coeffs to be returned
2146  * @return The NekDouble held in #m_coeffs[i].
2147  */
2149  {
2150  return m_coeffs[i];
2151  }
2152 
2153  /**
2154  * As the function returns a constant reference to a
2155  * <em>const Array</em> it is not possible to modify the
2156  * underlying data of the array #m_phys. In order to do
2157  * so, use the function #UpdatePhys instead.
2158  *
2159  * @return (A constant reference to) the array #m_phys.
2160  */
2162  {
2163  return m_phys;
2164  }
2165 
2166  /**
2167  * @return \f$N_{\mathrm{el}}\f$, the number of elements in the
2168  * expansion.
2169  */
2170  inline int ExpList::GetExpSize(void)
2171  {
2172  return (*m_exp).size();
2173  }
2174 
2175 
2176  /**
2177  * @param n The index of the element concerned.
2178  *
2179  * @return (A shared pointer to) the local expansion of the
2180  * \f$n^{\mathrm{th}}\f$ element.
2181  */
2183  {
2184  return (*m_exp)[n];
2185  }
2186 
2187  /**
2188  * @return (A const shared pointer to) the local expansion vector #m_exp
2189  */
2190  inline const std::shared_ptr<LocalRegions::ExpansionVector>
2191  ExpList::GetExp(void) const
2192  {
2193  return m_exp;
2194  }
2195 
2196 
2197  /**
2198  *
2199  */
2200  inline int ExpList::GetCoeff_Offset(int n) const
2201  {
2202  return m_coeff_offset[n];
2203  }
2204 
2205  /**
2206  *
2207  */
2208  inline int ExpList::GetPhys_Offset(int n) const
2209  {
2210  return m_phys_offset[n];
2211  }
2212 
2213  /**
2214  * If one wants to get hold of the underlying data without modifying
2215  * them, rather use the function #GetCoeffs instead.
2216  *
2217  * @return (A reference to) the array #m_coeffs.
2218  */
2220  {
2221  return m_coeffs;
2222  }
2223 
2224  /**
2225  * If one wants to get hold of the underlying data without modifying
2226  * them, rather use the function #GetPhys instead.
2227  *
2228  * @return (A reference to) the array #m_phys.
2229  */
2231  {
2232  m_physState = true;
2233  return m_phys;
2234  }
2235 
2236 
2237  // functions associated with DisContField
2240  {
2241  return v_GetBndCondExpansions();
2242  }
2243 
2244  inline std::shared_ptr<ExpList> &ExpList::UpdateBndCondExpansion(int i)
2245  {
2246  return v_UpdateBndCondExpansion(i);
2247  }
2248 
2249  inline void ExpList::Upwind(
2250  const Array<OneD, const Array<OneD, NekDouble> > &Vec,
2251  const Array<OneD, const NekDouble> &Fwd,
2252  const Array<OneD, const NekDouble> &Bwd,
2254  {
2255  v_Upwind(Vec, Fwd, Bwd, Upwind);
2256  }
2257 
2258  inline void ExpList::Upwind(
2259  const Array<OneD, const NekDouble> &Vn,
2260  const Array<OneD, const NekDouble> &Fwd,
2261  const Array<OneD, const NekDouble> &Bwd,
2263  {
2264  v_Upwind(Vn, Fwd, Bwd, Upwind);
2265  }
2266 
2267  inline std::shared_ptr<ExpList> &ExpList::GetTrace()
2268  {
2269  return v_GetTrace();
2270  }
2271 
2272  inline std::shared_ptr<AssemblyMapDG> &ExpList::GetTraceMap()
2273  {
2274  return v_GetTraceMap();
2275  }
2276 
2278  {
2279  return v_GetTraceBndMap();
2280  }
2281 
2282  inline void ExpList::GetNormals(
2283  Array<OneD, Array<OneD, NekDouble> > &normals)
2284  {
2285  v_GetNormals(normals);
2286  }
2287 
2289  const Array<OneD, const NekDouble> &Fx,
2290  const Array<OneD, const NekDouble> &Fy,
2291  Array<OneD, NekDouble> &outarray)
2292  {
2293  v_AddTraceIntegral(Fx,Fy,outarray);
2294  }
2295 
2297  const Array<OneD, const NekDouble> &Fn,
2298  Array<OneD, NekDouble> &outarray)
2299  {
2300  v_AddTraceIntegral(Fn,outarray);
2301  }
2302 
2304  const Array<OneD, const NekDouble> &Fwd,
2305  const Array<OneD, const NekDouble> &Bwd,
2306  Array<OneD, NekDouble> &outarray)
2307  {
2308  v_AddFwdBwdTraceIntegral(Fwd,Bwd,outarray);
2309  }
2310 
2312  Array<OneD,NekDouble> &Fwd,
2313  Array<OneD,NekDouble> &Bwd)
2314  {
2315  v_GetFwdBwdTracePhys(Fwd,Bwd);
2316  }
2317 
2319  const Array<OneD,const NekDouble> &field,
2320  Array<OneD,NekDouble> &Fwd,
2321  Array<OneD,NekDouble> &Bwd)
2322  {
2323  v_GetFwdBwdTracePhys(field,Fwd,Bwd);
2324  }
2325 
2326  inline const std::vector<bool> &ExpList::GetLeftAdjacentFaces(void) const
2327  {
2328  return v_GetLeftAdjacentFaces();
2329  }
2330 
2332  {
2333  v_ExtractTracePhys(outarray);
2334  }
2335 
2336 
2338  const Array<OneD, const NekDouble> &inarray,
2339  Array<OneD,NekDouble> &outarray)
2340  {
2341  v_ExtractTracePhys(inarray,outarray);
2342  }
2343 
2346  {
2347  return v_GetBndConditions();
2348  }
2349 
2352  {
2353  return v_UpdateBndConditions();
2354  }
2355 
2357  const NekDouble time,
2358  const std::string varName,
2359  const NekDouble x2_in,
2360  const NekDouble x3_in)
2361  {
2362  v_EvaluateBoundaryConditions(time, varName, x2_in, x3_in);
2363  }
2364 
2365  // Routines for continous matrix solution
2366  /**
2367  * This operation is equivalent to the evaluation of
2368  * \f$\underline{\boldsymbol{M}}^e\boldsymbol{\hat{u}}_l\f$, that is,
2369  * \f[ \left[
2370  * \begin{array}{cccc}
2371  * \boldsymbol{M}^1 & 0 & \hspace{3mm}0 \hspace{3mm}& 0 \\
2372  * 0 & \boldsymbol{M}^2 & 0 & 0 \\
2373  * 0 & 0 & \ddots & 0 \\
2374  * 0 & 0 & 0 & \boldsymbol{M}^{N_{\mathrm{el}}} \end{array} \right]
2375  *\left [ \begin{array}{c}
2376  * \boldsymbol{\hat{u}}^{1} \\
2377  * \boldsymbol{\hat{u}}^{2} \\
2378  * \vdots \\
2379  * \boldsymbol{\hat{u}}^{{{N_{\mathrm{el}}}}} \end{array} \right ]\f]
2380  * where \f$\boldsymbol{M}^e\f$ are the local matrices of type
2381  * specified by the key \a mkey. The decoupling of the local matrices
2382  * allows for a local evaluation of the operation. However, rather than
2383  * a local matrix-vector multiplication, the local operations are
2384  * evaluated as implemented in the function
2385  * StdRegions#StdExpansion#GeneralMatrixOp.
2386  *
2387  * @param mkey This key uniquely defines the type matrix
2388  * required for the operation.
2389  * @param inarray The vector \f$\boldsymbol{\hat{u}}_l\f$ of
2390  * size \f$N_{\mathrm{eof}}\f$.
2391  * @param outarray The resulting vector of size
2392  * \f$N_{\mathrm{eof}}\f$.
2393  */
2395  const GlobalMatrixKey &gkey,
2396  const Array<OneD,const NekDouble> &inarray,
2397  Array<OneD, NekDouble> &outarray,
2398  CoeffState coeffstate)
2399  {
2400  v_GeneralMatrixOp(gkey,inarray,outarray,coeffstate);
2401  }
2402 
2403 
2405  {
2407  }
2408 
2410  Array<OneD,int> &EdgeID)
2411  {
2412  v_GetBoundaryToElmtMap(ElmtID,EdgeID);
2413  }
2414 
2415  inline void ExpList::GetBndElmtExpansion(int i,
2416  std::shared_ptr<ExpList> &result,
2417  const bool DeclareCoeffPhysArrays)
2418  {
2419  v_GetBndElmtExpansion(i, result, DeclareCoeffPhysArrays);
2420  }
2421 
2423  const Array<OneD, NekDouble> &elmt,
2424  Array<OneD, NekDouble> &boundary)
2425  {
2426  v_ExtractElmtToBndPhys(i, elmt, boundary);
2427  }
2428 
2430  const Array<OneD, const NekDouble> &phys,
2431  Array<OneD, NekDouble> &bndElmt)
2432  {
2433  v_ExtractPhysToBndElmt(i, phys, bndElmt);
2434  }
2435 
2436  inline void ExpList::ExtractPhysToBnd(int i,
2437  const Array<OneD, const NekDouble> &phys,
2439  {
2440  v_ExtractPhysToBnd(i, phys, bnd);
2441  }
2442 
2443  inline void ExpList::GetBoundaryNormals(int i,
2444  Array<OneD, Array<OneD, NekDouble> > &normals)
2445  {
2446  v_GetBoundaryNormals(i, normals);
2447  }
2448 
2450 
2451  } //end of namespace
2452 } //end of namespace
2453 
2454 #endif // EXPLIST_H
2455 
virtual NekDouble v_L2(const Array< OneD, const NekDouble > &phys, const Array< OneD, const NekDouble > &soln=NullNekDouble1DArray)
Definition: ExpList.cpp:1958
virtual void v_GlobalToLocal(void)
Definition: ExpList.cpp:2885
const Array< OneD, const NekDouble > & GetPhys() const
This function returns (a reference to) the array (implemented as m_phys) containing the function ev...
Definition: ExpList.h:2161
virtual void v_AddFwdBwdTraceIntegral(const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2629
virtual void v_SmoothField(Array< OneD, NekDouble > &field)
Definition: ExpList.cpp:826
virtual void v_PhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2)
Definition: ExpList.cpp:553
void AddTraceIntegral(const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, Array< OneD, NekDouble > &outarray)
Definition: ExpList.h:2288
void GenerateElementVector(const int ElementID, const NekDouble scalar1, const NekDouble scalar2, Array< OneD, NekDouble > &outarray)
Generate vector v such that v[i] = scalar1 if i is in the element < ElementID. Otherwise, v[i] = scalar2.
Definition: ExpList.cpp:2511
virtual void v_GeneralMatrixOp(const GlobalMatrixKey &gkey, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
Definition: ExpList.cpp:2933
std::shared_ptr< BlockMatrixMap > BlockMatrixMapShPtr
A shared pointer to a BlockMatrixMap.
Definition: ExpList.h:99
const DNekScalBlkMatSharedPtr & GetBlockMatrix(const GlobalMatrixKey &gkey)
Definition: ExpList.cpp:1004
void SetModifiedBasis(const bool modbasis)
Set Modified Basis for the stability analysis.
virtual void v_ExtractDataToCoeffs(LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata, std::string &field, Array< OneD, NekDouble > &coeffs)
Extract data from raw field data into expansion list.
Definition: ExpList.cpp:2346
void SmoothField(Array< OneD, NekDouble > &field)
Smooth a field across elements.
Definition: ExpList.h:1767
void IProductWRTDirectionalDerivBase(const Array< OneD, const NekDouble > &direction, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Directional derivative along a given direction.
Definition: ExpList.cpp:429
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
int GetExpIndex(const Array< OneD, const NekDouble > &gloCoord, NekDouble tol=0.0, bool returnNearestElmt=false)
Definition: ExpList.cpp:1442
virtual void v_Reset()
Reset geometry information, metrics, matrix managers and geometry information.
Definition: ExpList.cpp:1583
void ExtractCoeffsToCoeffs(const std::shared_ptr< ExpList > &fromExpList, const Array< OneD, const NekDouble > &fromCoeffs, Array< OneD, NekDouble > &toCoeffs)
Extract the data from fromField using fromExpList the coeffs using the basic ExpList Elemental expans...
Definition: ExpList.cpp:2333
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
Definition: MeshGraph.h:163
static VarFactorsMap NullVarFactorsMap
virtual void v_SetHomo1DSpecVanVisc(Array< OneD, NekDouble > visc)
Definition: ExpList.h:1534
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209
virtual void v_GetBoundaryNormals(int i, Array< OneD, Array< OneD, NekDouble > > &normals)
Definition: ExpList.cpp:3143
void LocalToGlobal(bool useComm=true)
Gathers the global coefficients from the local coefficients .
Definition: ExpList.h:2083
virtual std::shared_ptr< ExpList > & v_GetTrace()
Definition: ExpList.cpp:2581
void GeneralMatrixOp_IterPerExp(const GlobalMatrixKey &gkey, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:1019
void ExtractPhysToBnd(int i, const Array< OneD, const NekDouble > &phys, Array< OneD, NekDouble > &bnd)
Definition: ExpList.h:2436
ExpList()
The default constructor.
Definition: ExpList.cpp:96
Local coefficients.
static ExpListSharedPtr NullExpListSharedPtr
Definition: ExpList.h:1550
static Array< OneD, NekDouble > NullNekDouble1DArray
std::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1090
int Get1DScaledTotPoints(const NekDouble scale) const
Returns the total number of qudature points scaled by the factor scale on each 1D direction...
Definition: ExpList.h:1619
void EvaluateBoundaryConditions(const NekDouble time=0.0, const std::string varName="", const NekDouble=NekConstants::kNekUnsetDouble, const NekDouble=NekConstants::kNekUnsetDouble)
Definition: ExpList.h:2356
virtual void v_PhysDirectionalDeriv(const Array< OneD, const NekDouble > &direction, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:697
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
NekOptimize::GlobalOptParamSharedPtr m_globalOptParam
Definition: ExpList.h:1106
LibUtilities::TranspositionSharedPtr GetTransposition(void)
This function returns the transposition class associaed with the homogeneous expansion.
Definition: ExpList.h:596
void MultiplyByInvMassMatrix(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal)
Definition: ExpList.h:1797
std::shared_ptr< GlobalOptParam > GlobalOptParamSharedPtr
Pointer to a GlobalOptParam object.
std::shared_ptr< ExpList > GetSharedThisPtr()
Returns a shared pointer to the current object.
Definition: ExpList.h:968
std::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
Definition: NekTypeDefs.hpp:73
Array< OneD, NekDouble > & UpdateCoeffs()
This function returns (a reference to) the array (implemented as m_coeffs) containing all local expa...
Definition: ExpList.h:2219
virtual void v_FillBndCondFromField()
Definition: ExpList.cpp:2852
std::vector< Collection > CollectionVector
Definition: Collection.h:95
std::shared_ptr< ExpList > & GetPlane(int n)
Definition: ExpList.h:996
void ExponentialFilter(Array< OneD, NekDouble > &array, const NekDouble alpha, const NekDouble exponent, const NekDouble cutoff)
Definition: ExpList.cpp:729
const Array< OneD, const NekDouble > & GetCoeffs() const
This function returns (a reference to) the array (implemented as m_coeffs) containing all local expa...
Definition: ExpList.h:2062
NekDouble PhysIntegral(void)
This function integrates a function over the domain consisting of all the elements of the expansion...
Definition: ExpList.cpp:304
virtual void v_WriteTecplotZone(std::ostream &outfile, int expansion)
Definition: ExpList.cpp:1649
ExpansionType GetExpType(void)
Returns the type of the expansion.
Definition: ExpList.cpp:271
int GetNpoints(void) const
Returns the total number of quadrature points m_npoints .
Definition: ExpList.h:1640
const Array< OneD, const int > & GetTraceBndMap(void)
Definition: ExpList.h:2277
std::shared_ptr< Comm > CommSharedPtr
Pointer to a Communicator object.
Definition: Comm.h:53
virtual void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
Definition: ExpList.cpp:2917
std::vector< LibUtilities::FieldDefinitionsSharedPtr > GetFieldDefinitions()
Definition: ExpList.h:898
virtual void v_BwdTrans_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:1418
void GeneralGetFieldDefinitions(std::vector< LibUtilities::FieldDefinitionsSharedPtr > &fielddef, int NumHomoDir=0, Array< OneD, LibUtilities::BasisSharedPtr > &HomoBasis=LibUtilities::NullBasisSharedPtr1DArray, std::vector< NekDouble > &HomoLen=LibUtilities::NullNekDoubleVector, bool homoStrips=false, std::vector< unsigned int > &HomoSIDs=LibUtilities::NullUnsignedIntVector, std::vector< unsigned int > &HomoZIDs=LibUtilities::NullUnsignedIntVector, std::vector< unsigned int > &HomoYIDs=LibUtilities::NullUnsignedIntVector)
Definition: ExpList.cpp:2174
static BasisSharedPtr NullBasisSharedPtr
Definition: Basis.h:365
#define MULTI_REGIONS_EXPORT
void GetMovingFrames(const SpatialDomains::GeomMMF MMFdir, const Array< OneD, const NekDouble > &CircCentre, Array< OneD, Array< OneD, NekDouble > > &outarray)
Definition: ExpList.h:1866
void BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal)
Definition: ExpList.h:1775
virtual void v_GetNormals(Array< OneD, Array< OneD, NekDouble > > &normals)
Definition: ExpList.cpp:2602
Array< OneD, const unsigned int > GetZIDs(void)
This function returns a vector containing the wave numbers in z-direction associated with the 3D homo...
Definition: ExpList.h:589
std::map< ConstFactorType, NekDouble > ConstFactorMap
Definition: StdRegions.hpp:294
void ImposeDirichletConditions(Array< OneD, NekDouble > &outarray)
Impose Dirichlet Boundary Conditions onto Array.
Definition: ExpList.h:2067
void GetBoundaryToElmtMap(Array< OneD, int > &ElmtID, Array< OneD, int > &EdgeID)
Definition: ExpList.h:2409
BlockMatrixMapShPtr m_blockMat
Definition: ExpList.h:1108
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:1069
void LinearAdvectionDiffusionReactionSolve(const Array< OneD, Array< OneD, NekDouble > > &velocity, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const NekDouble lambda, CoeffState coeffstate=eLocal, const Array< OneD, const NekDouble > &dirForcing=NullNekDouble1DArray)
Solve Advection Diffusion Reaction.
Definition: ExpList.h:1827
GeomMMF
Principle direction for MMF.
void LinearAdvectionReactionSolve(const Array< OneD, Array< OneD, NekDouble > > &velocity, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const NekDouble lambda, CoeffState coeffstate=eLocal, const Array< OneD, const NekDouble > &dirForcing=NullNekDouble1DArray)
Solve Advection Diffusion Reaction.
Definition: ExpList.h:1839
void ApplyGeomInfo()
Apply geometry information to each expansion.
Definition: ExpList.cpp:1570
std::shared_ptr< Basis > BasisSharedPtr
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:1052
virtual void v_WriteVtkPieceHeader(std::ostream &outfile, int expansion, int istrip)
Definition: ExpList.cpp:1868
NekDouble Integral(const Array< OneD, const NekDouble > &inarray)
Definition: ExpList.h:561
virtual void v_NormVectorIProductWRTBase(Array< OneD, const NekDouble > &V1, Array< OneD, const NekDouble > &V2, Array< OneD, NekDouble > &outarray, int BndID)
Definition: ExpList.cpp:2787
virtual LibUtilities::TranspositionSharedPtr v_GetTransposition(void)
Definition: ExpList.cpp:2029
int GetExpSize(void)
This function returns the number of elements in the expansion.
Definition: ExpList.h:2170
void GetBndElmtExpansion(int i, std::shared_ptr< ExpList > &result, const bool DeclareCoeffPhysArrays=true)
Definition: ExpList.h:2415
virtual void v_FwdTrans_BndConstrained(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:804
void PhysDeriv(Direction edir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d)
Definition: ExpList.h:1897
const std::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
Definition: ExpList.h:2191
std::shared_ptr< GlobalLinSys > GenGlobalBndLinSys(const GlobalLinSysKey &mkey, const AssemblyMapSharedPtr &locToGloMap)
Generate a GlobalLinSys from information provided by the key "mkey" and the mapping provided in LocTo...
Definition: ExpList.cpp:1381
void ExtractElmtDataToCoeffs(LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata, std::string &field, Array< OneD, NekDouble > &coeffs)
Extract the data in fielddata into the coeffs using the basic ExpList Elemental expansions rather tha...
void PhysGalerkinProjection1DScaled(const NekDouble scale, const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
This function Galerkin projects the physical space points in inarray to outarray where inarray is ass...
Definition: ExpList.h:640
virtual void v_ExtractPhysToBndElmt(const int i, const Array< OneD, const NekDouble > &phys, Array< OneD, NekDouble > &bndElmt)
Definition: ExpList.cpp:3065
void MultiplyByElmtInvMass(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
This function elementally mulplies the coefficient space of Sin my the elemental inverse of the mass ...
Definition: ExpList.cpp:755
virtual void v_WriteTecplotHeader(std::ostream &outfile, std::string var="")
Definition: ExpList.cpp:1610
virtual NekDouble v_GetHomoLen(void)
Definition: ExpList.cpp:2037
virtual void v_ExtractPhysToBnd(const int i, const Array< OneD, const NekDouble > &phys, Array< OneD, NekDouble > &bnd)
Definition: ExpList.cpp:3105
void WriteVtkFooter(std::ostream &outfile)
Definition: ExpList.cpp:1862
bool GetWaveSpace(void) const
This function returns the third direction expansion condition, which can be in wave space (coefficien...
Definition: ExpList.h:1657
void SetCoeffs(int i, NekDouble val)
Set the i th coefficiient in m_coeffs to value val.
Definition: ExpList.h:2043
virtual void v_GetCoords(Array< OneD, NekDouble > &coord_0, Array< OneD, NekDouble > &coord_1, Array< OneD, NekDouble > &coord_2=NullNekDouble1DArray)
Definition: ExpList.cpp:2954
std::shared_ptr< AssemblyMap > AssemblyMapSharedPtr
Definition: AssemblyMap.h:52
void WriteTecplotField(std::ostream &outfile, int expansion=-1)
Definition: ExpList.h:411
void Upwind(const Array< OneD, const Array< OneD, NekDouble > > &Vec, const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &Upwind)
Definition: ExpList.h:2249
virtual Array< OneD, const NekDouble > v_HomogeneousEnergy(void)
Definition: ExpList.cpp:2021
virtual const Array< OneD, const int > & v_GetTraceBndMap()
Definition: ExpList.cpp:2597
virtual void v_WriteVtkPieceData(std::ostream &outfile, int expansion, std::string var)
Definition: ExpList.cpp:1882
static std::vector< NekDouble > NullNekDoubleVector
void ExtractPhysToBndElmt(int i, const Array< OneD, const NekDouble > &phys, Array< OneD, NekDouble > &bndElmt)
Definition: ExpList.h:2429
void GeneralMatrixOp(const GlobalMatrixKey &gkey, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal)
This function calculates the result of the multiplication of a matrix of type specified by mkey with ...
Definition: ExpList.h:2394
virtual void v_GetBndElmtExpansion(int i, std::shared_ptr< ExpList > &result, const bool DeclareCoeffPhysArrays)
Definition: ExpList.cpp:3015
void NormVectorIProductWRTBase(Array< OneD, const NekDouble > &V1, Array< OneD, const NekDouble > &V2, Array< OneD, NekDouble > &outarray, int BndID)
Definition: ExpList.h:1993
virtual void v_GetBCValues(Array< OneD, NekDouble > &BndVals, const Array< OneD, NekDouble > &TotField, int BndID)
Definition: ExpList.cpp:2778
virtual NekDouble v_VectorFlux(const Array< OneD, Array< OneD, NekDouble > > &inarray)
Definition: ExpList.cpp:2002
void GetNormals(Array< OneD, Array< OneD, NekDouble > > &normals)
Definition: ExpList.h:2282
virtual void v_LocalToGlobal(bool UseComm)
Definition: ExpList.cpp:2867
void Reset()
Reset geometry information and reset matrices.
Definition: ExpList.h:393
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1101
LibUtilities::BasisSharedPtr GetHomogeneousBasis(void)
Definition: ExpList.h:991
const NekOptimize::GlobalOptParamSharedPtr & GetGlobalOptParam(void)
Definition: ExpList.h:879
int GetNumElmts(void)
This function returns the number of elements in the expansion which may be different for a homogeoeno...
Definition: ExpList.h:655
Base class for all multi-elemental spectral/hp expansions.
Definition: ExpList.h:103
bool GetPhysState(void) const
This function indicates whether the array of physical values (implemented as m_phys) is filled or no...
Definition: ExpList.h:1706
std::shared_ptr< AssemblyMapDG > & GetTraceMap(void)
Definition: ExpList.h:2272
void GetCoords(Array< OneD, NekDouble > &coord_0, Array< OneD, NekDouble > &coord_1=NullNekDouble1DArray, Array< OneD, NekDouble > &coord_2=NullNekDouble1DArray)
This function calculates the coordinates of all the elemental quadrature points . ...
Definition: ExpList.h:1854
virtual void v_ImposeDirichletConditions(Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2843
virtual LibUtilities::BasisSharedPtr v_GetHomogeneousBasis(void)
Definition: ExpList.h:1526
virtual void v_Upwind(const Array< OneD, const Array< OneD, NekDouble > > &Vec, const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &Upwind)
Definition: ExpList.cpp:2559
NekDouble Linf(const Array< OneD, const NekDouble > &inarray, const Array< OneD, const NekDouble > &soln=NullNekDouble1DArray)
This function calculates the error of the global spectral/hp element approximation.
Definition: ExpList.cpp:1919
void HelmSolve(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const FlagList &flags, const StdRegions::ConstFactorMap &factors, const StdRegions::VarCoeffMap &varcoeff=StdRegions::NullVarCoeffMap, const MultiRegions::VarFactorsMap &varfactors=MultiRegions::NullVarFactorsMap, const Array< OneD, const NekDouble > &dirForcing=NullNekDouble1DArray, const bool PhysSpaceForcing=true)
Solve helmholtz problem.
Definition: ExpList.h:1808
std::shared_ptr< ExpList > & UpdateBndCondExpansion(int i)
Definition: ExpList.h:2244
std::shared_ptr< GlobalMatrix > GenGlobalMatrix(const GlobalMatrixKey &mkey, const std::shared_ptr< AssemblyMapCG > &locToGloMap)
Generates a global matrix from the given key and map.
Definition: ExpList.cpp:1086
void BwdTrans_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
This function elementally evaluates the backward transformation of the global spectral/hp element exp...
Definition: ExpList.h:1786
virtual void v_FwdTrans_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:794
virtual ~ExpList()
The default destructor.
Definition: ExpList.cpp:284
void IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
This function calculates the inner product of a function with respect to the derivative (in directio...
Definition: ExpList.cpp:409
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
Definition: StdRegions.hpp:264
int GetNcoeffs(void) const
Returns the total number of local degrees of freedom .
Definition: ExpList.h:1558
void CurlCurl(Array< OneD, Array< OneD, NekDouble > > &Vel, Array< OneD, Array< OneD, NekDouble > > &Q)
Definition: ExpList.h:1922
void WriteVtkPieceData(std::ostream &outfile, int expansion, std::string var="v")
Definition: ExpList.h:436
void GlobalEigenSystem(const std::shared_ptr< DNekMat > &Gmat, Array< OneD, NekDouble > &EigValsReal, Array< OneD, NekDouble > &EigValsImag, Array< OneD, NekDouble > &EigVecs=NullNekDouble1DArray)
void AddFwdBwdTraceIntegral(const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &outarray)
Definition: ExpList.h:2303
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1104
void FillBndCondFromField(void)
Fill Bnd Condition expansion from the values stored in expansion.
Definition: ExpList.h:2073
void IProductWRTBase_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
This function calculates the inner product of a function with respect to all local expansion modes ...
Definition: ExpList.h:1725
void ExtractElmtToBndPhys(int i, const Array< OneD, NekDouble > &elmt, Array< OneD, NekDouble > &boundary)
Definition: ExpList.h:2422
NekDouble GetHomoLen(void)
This function returns the Width of homogeneous direction associaed with the homogeneous expansion...
Definition: ExpList.h:603
const std::vector< bool > & GetLeftAdjacentFaces(void) const
Definition: ExpList.h:2326
virtual NekDouble v_Integral(const Array< OneD, const NekDouble > &inarray)
Definition: ExpList.cpp:1988
virtual std::vector< LibUtilities::FieldDefinitionsSharedPtr > v_GetFieldDefinitions(void)
Definition: ExpList.cpp:2282
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:1078
virtual void v_WriteTecplotConnectivity(std::ostream &outfile, int expansion)
Definition: ExpList.cpp:1743
static PeriodicMap NullPeriodicMap
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:1030
void WriteTecplotConnectivity(std::ostream &outfile, int expansion=-1)
Definition: ExpList.h:417
void ExtractTracePhys(Array< OneD, NekDouble > &outarray)
Definition: ExpList.h:2331
NekDouble VectorFlux(const Array< OneD, Array< OneD, NekDouble > > &inarray)
Definition: ExpList.h:566
static std::vector< unsigned int > NullUnsignedIntVector
virtual void v_HomogeneousFwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal, bool Shuff=true, bool UnShuff=true)
Definition: ExpList.cpp:2735
void SetWaveSpace(const bool wavespace)
Sets the wave space to the one of the possible configuration true or false.
Definition: ExpList.h:1649
void SetCoeffPhysOffsets()
Definition of the total number of degrees of freedom and quadrature points and offsets to access data...
Definition: ExpList.cpp:249
void SetHomo1DSpecVanVisc(Array< OneD, NekDouble > visc)
This function sets the Spectral Vanishing Viscosity in homogeneous1D expansion.
Definition: ExpList.h:580
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:1026
virtual void v_EvaluateBoundaryConditions(const NekDouble time=0.0, const std::string varName="", const NekDouble x2_in=NekConstants::kNekUnsetDouble, const NekDouble x3_in=NekConstants::kNekUnsetDouble)
Definition: ExpList.cpp:3228
NekDouble PhysEvaluate(const Array< OneD, const NekDouble > &coords, const Array< OneD, const NekDouble > &phys)
Definition: ExpList.cpp:1545
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:1023
virtual void v_ExtractCoeffsToCoeffs(const std::shared_ptr< ExpList > &fromExpList, const Array< OneD, const NekDouble > &fromCoeffs, Array< OneD, NekDouble > &toCoeffs)
Definition: ExpList.cpp:2435
virtual void v_GetMovingFrames(const SpatialDomains::GeomMMF MMFdir, const Array< OneD, const NekDouble > &CircCentre, Array< OneD, Array< OneD, NekDouble > > &outarray)
Definition: ExpList.cpp:2459
SpatialDomains::MeshGraphSharedPtr GetGraph()
Definition: ExpList.h:985
virtual std::shared_ptr< AssemblyMapDG > & v_GetTraceMap()
Definition: ExpList.cpp:2589
double NekDouble
void WriteTecplotHeader(std::ostream &outfile, std::string var="")
Definition: ExpList.h:398
virtual void v_SetHomoLen(const NekDouble lhom)
Definition: ExpList.cpp:2045
const DNekScalBlkMatSharedPtr GenBlockMatrix(const GlobalMatrixKey &gkey)
This function assembles the block diagonal matrix of local matrices of the type mtype.
Definition: ExpList.cpp:869
Defines a list of flags.
std::map< int, BoundaryConditionMapShPtr > BoundaryConditionCollection
Definition: Conditions.h:226
void FwdTrans_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
This function elementally evaluates the forward transformation of a function onto the global spectra...
Definition: ExpList.h:1746
void GetPeriodicEntities(PeriodicMap &periodicVerts, PeriodicMap &periodicEdges, PeriodicMap &periodicFaces=NullPeriodicMap)
Definition: ExpList.h:889
virtual const Array< OneD, const std::shared_ptr< ExpList > > & v_GetBndCondExpansions(void)
Definition: ExpList.cpp:2542
virtual Array< OneD, SpatialDomains::BoundaryConditionShPtr > & v_UpdateBndConditions()
Definition: ExpList.cpp:3218
void ExtractFileBCs(const std::string &fileName, LibUtilities::CommSharedPtr comm, const std::string &varName, const std::shared_ptr< ExpList > locExpList)
Definition: ExpList.cpp:2095
std::map< int, std::vector< PeriodicEntity > > PeriodicMap
virtual void v_ClearGlobalLinSysManager(void)
Definition: ExpList.cpp:2089
static const NekDouble kNekUnsetDouble
Describe a linear system.
void FwdTrans_BndConstrained(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.h:1756
void HomogeneousFwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal, bool Shuff=true, bool UnShuff=true)
Definition: ExpList.h:1932
std::shared_ptr< BoundaryConditionBase > BoundaryConditionShPtr
Definition: Conditions.h:219
virtual void v_DealiasedProd(const Array< OneD, NekDouble > &inarray1, const Array< OneD, NekDouble > &inarray2, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal)
Definition: ExpList.cpp:2757
int EvalBasisNumModesMax(void) const
Evaulates the maximum number of modes in the elemental basis order over all elements.
Definition: ExpList.h:1572
virtual std::shared_ptr< ExpList > & v_GetPlane(int n)
Definition: ExpList.cpp:3283
void PhysDirectionalDeriv(const Array< OneD, const NekDouble > &direction, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.h:1909
Describes a matrix with ordering defined by a local to global map.
static ExpList NullExpList
An empty ExpList object.
Definition: ExpList.h:1549
std::map< int, RobinBCInfoSharedPtr > GetRobinBCInfo()
Definition: ExpList.h:884
Array< OneD, SpatialDomains::BoundaryConditionShPtr > & UpdateBndConditions()
Definition: ExpList.h:2351
virtual void v_GetPeriodicEntities(PeriodicMap &periodicVerts, PeriodicMap &periodicEdges, PeriodicMap &periodicFaces)
Definition: ExpList.cpp:3251
virtual void v_PhysInterp1DScaled(const NekDouble scale, const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2069
const Array< OneD, const std::shared_ptr< ExpList > > & GetBndCondExpansions()
Definition: ExpList.h:2239
std::shared_ptr< Expansion > ExpansionSharedPtr
Definition: Expansion.h:65
Array< OneD, NekDouble > & UpdatePhys()
This function returns (a reference to) the array (implemented as m_phys) containing the function ev...
Definition: ExpList.h:2230
MultiRegions::Direction const DirCartesianMap[]
Definition: ExpList.h:88
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:1020
virtual void v_AddTraceIntegral(const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2610
void SetHomoLen(const NekDouble lhom)
This function sets the Width of homogeneous direction associaed with the homogeneous expansion...
Definition: ExpList.h:610
void GetFieldDefinitions(std::vector< LibUtilities::FieldDefinitionsSharedPtr > &fielddef)
Definition: ExpList.h:904
Array< OneD, const NekDouble > HomogeneousEnergy(void)
This function calculates the energy associated with each one of the modesof a 3D homogeneous nD expan...
Definition: ExpList.h:573
virtual void v_CurlCurl(Array< OneD, Array< OneD, NekDouble > > &Vel, Array< OneD, Array< OneD, NekDouble > > &Q)
Definition: ExpList.cpp:625
virtual void v_LinearAdvectionReactionSolve(const Array< OneD, Array< OneD, NekDouble > > &velocity, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const NekDouble lambda, CoeffState coeffstate=eLocal, const Array< OneD, const NekDouble > &dirForcing=NullNekDouble1DArray)
Definition: ExpList.cpp:2721
virtual Array< OneD, const unsigned int > v_GetZIDs(void)
Definition: ExpList.cpp:2052
std::map< GlobalMatrixKey, DNekScalBlkMatSharedPtr > BlockMatrixMap
A map between global matrix keys and their associated block matrices.
Definition: ExpList.h:97
void DealiasedProd(const Array< OneD, NekDouble > &inarray1, const Array< OneD, NekDouble > &inarray2, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal)
Definition: ExpList.h:1958
static const Array< OneD, ExpListSharedPtr > NullExpListSharedPtrArray
Definition: ExpList.h:2449
void FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal)
Definition: ExpList.h:1735
virtual std::map< int, RobinBCInfoSharedPtr > v_GetRobinBCInfo(void)
Definition: ExpList.cpp:3241
static Array< OneD, BasisSharedPtr > NullBasisSharedPtr1DArray
Definition: Basis.h:366
#define ASSERTL2(condition, msg)
Assert Level 2 – Debugging which is used FULLDEBUG compilation mode. This level assert is designed t...
Definition: ErrorUtil.hpp:274
virtual void v_DealiasedDotProd(const Array< OneD, Array< OneD, NekDouble > > &inarray1, const Array< OneD, Array< OneD, NekDouble > > &inarray2, Array< OneD, Array< OneD, NekDouble > > &outarray, CoeffState coeffstate=eLocal)
Definition: ExpList.cpp:2767
NekDouble GetCoeff(int i)
Get the i th value (coefficient) of m_coeffs.
Definition: ExpList.h:2139
NekDouble H1(const Array< OneD, const NekDouble > &inarray, const Array< OneD, const NekDouble > &soln=NullNekDouble1DArray)
Calculates the error of the global spectral/hp element approximation.
Definition: ExpList.cpp:2155
void SetCoeff(int i, NekDouble val)
Set the i th coefficiient in m_coeffs to value val.
Definition: ExpList.h:2033
const Array< OneD, int > EvalBasisNumModesMaxPerExp(void) const
Returns the vector of the number of modes in the elemental basis order over all elements.
Definition: ExpList.h:1589
virtual void v_IProductWRTBase_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:382
Array< OneD, const unsigned int > GetYIDs(void)
This function returns a vector containing the wave numbers in y-direction associated with the 3D homo...
Definition: ExpList.h:619
void IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal)
Definition: ExpList.h:1714
void SetPhysState(const bool physState)
This function manually sets whether the array of physical values (implemented as m_phys) is filled o...
Definition: ExpList.h:1697
void WriteVtkPieceFooter(std::ostream &outfile, int expansion)
Definition: ExpList.cpp:1875
std::shared_ptr< FieldDefinitions > FieldDefinitionsSharedPtr
Definition: FieldIO.h:179
void AppendFieldData(LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata)
Append the element data listed in elements fielddef->m_ElementIDs onto fielddata. ...
Definition: ExpList.h:913
virtual const std::vector< bool > & v_GetLeftAdjacentFaces(void) const
Definition: ExpList.cpp:2657
virtual void v_LinearAdvectionDiffusionReactionSolve(const Array< OneD, Array< OneD, NekDouble > > &velocity, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const NekDouble lambda, CoeffState coeffstate=eLocal, const Array< OneD, const NekDouble > &dirForcing=NullNekDouble1DArray)
Definition: ExpList.cpp:2707
std::shared_ptr< GlobalLinSys > GenGlobalLinSys(const GlobalLinSysKey &mkey, const std::shared_ptr< AssemblyMapCG > &locToGloMap)
This operation constructs the global linear system of type mkey.
Definition: ExpList.cpp:1362
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1098
virtual void v_AppendFieldData(LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata)
Definition: ExpList.cpp:2296
static SpatialDomains::BoundaryConditionShPtr GetBoundaryCondition(const SpatialDomains::BoundaryConditionCollection &collection, unsigned int index, const std::string &variable)
Definition: ExpList.cpp:3261
void CreateCollections(Collections::ImplementationType ImpType=Collections::eNoImpType)
Construct collections of elements containing a single element type and polynomial order from the list...
Definition: ExpList.cpp:3295
std::shared_ptr< DNekMat > GenGlobalMatrixFull(const GlobalLinSysKey &mkey, const std::shared_ptr< AssemblyMapCG > &locToGloMap)
Definition: ExpList.cpp:1222
const Array< OneD, const SpatialDomains::BoundaryConditionShPtr > & GetBndConditions()
Definition: ExpList.h:2345
void WriteVtkPieceHeader(std::ostream &outfile, int expansion, int istrip=0)
Definition: ExpList.h:426
void MultiplyByBlockMatrix(const GlobalMatrixKey &gkey, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:352
void SetCoeffsArray(Array< OneD, NekDouble > &inarray)
Set the m_coeffs array to inarray.
Definition: ExpList.h:2049
virtual void v_MultiplyByInvMassMatrix(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
Definition: ExpList.cpp:2682
void DealiasedDotProd(const Array< OneD, Array< OneD, NekDouble > > &inarray1, const Array< OneD, Array< OneD, NekDouble > > &inarray2, Array< OneD, Array< OneD, NekDouble > > &outarray, CoeffState coeffstate=eLocal)
Definition: ExpList.h:1970
void GetBoundaryNormals(int i, Array< OneD, Array< OneD, NekDouble > > &normals)
Definition: ExpList.h:2443
std::unordered_map< int, int > m_elmtToExpId
Mapping from geometry ID of element to index inside m_exp.
Definition: ExpList.h:1116
void PhysInterp1DScaled(const NekDouble scale, const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
This function interpolates the physical space points in inarray to outarray using the same points def...
Definition: ExpList.h:628
virtual void v_GetBoundaryToElmtMap(Array< OneD, int > &ElmtID, Array< OneD, int > &EdgeID)
Definition: ExpList.cpp:3188
int GetShapeDimension()
This function returns the dimension of the shape of the element eid.
Definition: ExpList.h:2024
virtual Array< OneD, const unsigned int > v_GetYIDs(void)
Definition: ExpList.cpp:2060
virtual void v_SetUpPhysNormals()
Definition: ExpList.cpp:3007
std::shared_ptr< Transposition > TranspositionSharedPtr
void GetBCValues(Array< OneD, NekDouble > &BndVals, const Array< OneD, NekDouble > &TotField, int BndID)
Definition: ExpList.h:1982
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:2013
void AppendFieldData(LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata, Array< OneD, NekDouble > &coeffs)
Append the data in coeffs listed in elements fielddef->m_ElementIDs onto fielddata.
Definition: ExpList.h:923
virtual const Array< OneD, const SpatialDomains::BoundaryConditionShPtr > & v_GetBndConditions()
Definition: ExpList.cpp:3207
virtual std::shared_ptr< ExpList > & v_UpdateBndCondExpansion(int i)
Definition: ExpList.cpp:2550
void SetExpType(ExpansionType Type)
Returns the type of the expansion.
Definition: ExpList.cpp:279
virtual void v_ExtractElmtToBndPhys(const int i, const Array< OneD, NekDouble > &elmt, Array< OneD, NekDouble > &boundary)
Definition: ExpList.cpp:3026
int GetCoeff_Offset(int n) const
Get the start offset position for a global list of m_coeffs correspoinding to element n...
Definition: ExpList.h:2200
void SetPhysArray(Array< OneD, NekDouble > &inarray)
Sets the array m_phys.
Definition: ExpList.h:1688
void WriteTecplotZone(std::ostream &outfile, int expansion=-1)
Definition: ExpList.h:404
int GetTotPoints(void) const
Returns the total number of quadrature points m_npoints .
Definition: ExpList.h:1608
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1095
void WriteVtkHeader(std::ostream &outfile)
Definition: ExpList.cpp:1854
virtual void v_ExtractTracePhys(Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2666
virtual void v_PhysGalerkinProjection1DScaled(const NekDouble scale, const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2079
void GlobalToLocal(void)
Scatters from the global coefficients to the local coefficients .
Definition: ExpList.h:2096
std::shared_ptr< LibUtilities::Comm > GetComm()
Returns the comm object.
Definition: ExpList.h:980
int GetPhys_Offset(int n) const
Get the start offset position for a global list of m_phys correspoinding to element n...
Definition: ExpList.h:2208
NekDouble L2(const Array< OneD, const NekDouble > &inarray, const Array< OneD, const NekDouble > &soln=NullNekDouble1DArray)
This function calculates the error with respect to soln of the global spectral/hp element approximat...
Definition: ExpList.h:548
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1064
virtual void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
Definition: ExpList.cpp:2901
void GetFwdBwdTracePhys(Array< OneD, NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd)
Definition: ExpList.h:2311
virtual void v_GetFwdBwdTracePhys(Array< OneD, NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd)
Definition: ExpList.cpp:2639
void ExtractDataToCoeffs(LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata, std::string &field, Array< OneD, NekDouble > &coeffs)
Extract the data in fielddata into the coeffs.
Definition: ExpList.cpp:2324
std::shared_ptr< SessionReader > SessionReaderSharedPtr
void HomogeneousBwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal, bool Shuff=true, bool UnShuff=true)
Definition: ExpList.h:1945
void SetPhys(int i, NekDouble val)
Set the i th value of m_phys to value val.
Definition: ExpList.h:1663
virtual void v_WriteTecplotField(std::ostream &outfile, int expansion)
Definition: ExpList.cpp:1820
virtual int v_GetNumElmts(void)
Definition: ExpList.h:1164
std::shared_ptr< ExpList > & GetTrace()
Definition: ExpList.h:2267
Collections::CollectionVector m_collections
Definition: ExpList.h:1092
virtual void v_ReadGlobalOptimizationParameters()
Definition: ExpList.cpp:3198
static VarCoeffMap NullVarCoeffMap
Definition: StdRegions.hpp:265
std::map< StdRegions::ConstFactorType, Array< OneD, NekDouble > > VarFactorsMap
virtual void v_HomogeneousBwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal, bool Shuff=true, bool UnShuff=true)
Definition: ExpList.cpp:2746
virtual void v_HelmSolve(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const FlagList &flags, const StdRegions::ConstFactorMap &factors, const StdRegions::VarCoeffMap &varcoeff, const MultiRegions::VarFactorsMap &varfactors, const Array< OneD, const NekDouble > &dirForcing, const bool PhysSpaceForcing)
Definition: ExpList.cpp:2692
std::shared_ptr< LibUtilities::SessionReader > GetSession() const
Returns the session object.
Definition: ExpList.h:974
virtual void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
Definition: ExpList.cpp:2909