Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PrismExp.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File PrismExp.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 // License for the specific language governing rights and limitations under
14 // Permission is hereby granted, free of charge, to any person obtaining a
15 // copy of this software and associated documentation files (the "Software"),
16 // to deal in the Software without restriction, including without limitation
17 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
18 // and/or sell copies of the Software, and to permit persons to whom the
19 // Software is furnished to do so, subject to the following conditions:
20 //
21 // The above copyright notice and this permission notice shall be included
22 // in all copies or substantial portions of the Software.
23 //
24 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
25 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
27 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
30 // DEALINGS IN THE SOFTWARE.
31 //
32 // Description: Header file for PrismExp routines
33 //
34 ///////////////////////////////////////////////////////////////////////////////
35 
36 #ifndef PRISMEXP_H
37 #define PRISMEXP_H
38 
39 #include <StdRegions/StdPrismExp.h>
41 #include <LocalRegions/MatrixKey.h>
45 
46 namespace Nektar
47 {
48  namespace LocalRegions
49  {
50  class PrismExp : virtual public StdRegions::StdPrismExp,
51  virtual public Expansion3D
52  {
53  public:
54  /// \brief Constructor using BasisKey class for quadrature
55  /// points and order definition
57  const LibUtilities::BasisKey &Bb,
58  const LibUtilities::BasisKey &Bc,
60 
61  LOCAL_REGIONS_EXPORT PrismExp(const PrismExp &T);
62 
64 
65  protected:
66  //-------------------------------
67  // Integration Methods
68  //-------------------------------
70  const Array<OneD, const NekDouble>& inarray);
71 
72 
73  //----------------------------
74  // Differentiation Methods
75  //----------------------------
76  LOCAL_REGIONS_EXPORT virtual void v_PhysDeriv(
77  const Array<OneD, const NekDouble>& inarray,
78  Array<OneD, NekDouble>& out_d0,
79  Array<OneD, NekDouble>& out_d1,
80  Array<OneD, NekDouble>& out_d2);
81 
82 
83  //---------------------------------------
84  // Transforms
85  //---------------------------------------
86  LOCAL_REGIONS_EXPORT virtual void v_FwdTrans(
87  const Array<OneD, const NekDouble> &inarray,
88  Array<OneD, NekDouble> &outarray);
89 
90 
91  //---------------------------------------
92  // Inner product functions
93  //---------------------------------------
95  const Array<OneD, const NekDouble>& inarray,
96  Array<OneD, NekDouble>& outarray);
98  const Array<OneD, const NekDouble>& inarray,
99  Array<OneD, NekDouble>& outarray,
100  bool multiplybyweights = true);
102  const int dir,
103  const Array<OneD, const NekDouble>& inarray,
104  Array<OneD, NekDouble>& outarray);
106  const int dir,
107  const Array<OneD, const NekDouble>& inarray,
108  Array<OneD, NekDouble>& outarray);
109 
110 
111  //---------------------------------------
112  // Evaluation functions
113  //---------------------------------------
114  LOCAL_REGIONS_EXPORT virtual void v_GetCoord(
115  const Array<OneD, const NekDouble> &Lcoords,
116  Array<OneD, NekDouble> &coords);
117 
118  LOCAL_REGIONS_EXPORT virtual void v_GetCoords(
119  Array<OneD, NekDouble> &coords_1,
120  Array<OneD, NekDouble> &coords_2,
121  Array<OneD, NekDouble> &coords_3);
122 
124  const Array<OneD, const NekDouble> &Lcoord,
125  const Array<OneD, const NekDouble> &physvals);
126 
128  const Array<OneD, const NekDouble>& coord,
129  const Array<OneD, const NekDouble>& physvals);
130 
131 
132  //---------------------------------------
133  // Helper functions
134  //---------------------------------------
135 
136  LOCAL_REGIONS_EXPORT virtual
138 
139  LOCAL_REGIONS_EXPORT virtual
141 
142  LOCAL_REGIONS_EXPORT virtual int v_GetCoordim();
144  const NekDouble *data,
145  const std::vector<unsigned int > &nummodes,
146  const int mode_offset,
147  NekDouble * coeffs,
148  std::vector<LibUtilities::BasisType> &fromType);
149 
151  const int face,
152  Array<OneD, int> &outarray);
153 
154  LOCAL_REGIONS_EXPORT void v_ComputeFaceNormal(const int face);
155 
156  //---------------------------------------
157  // Operator creation functions
158  //---------------------------------------
160  const Array<OneD, const NekDouble> &inarray,
161  Array<OneD,NekDouble> &outarray,
162  const StdRegions::StdMatrixKey &mkey);
164  const Array<OneD, const NekDouble> &inarray,
165  Array<OneD,NekDouble> &outarray,
166  const StdRegions::StdMatrixKey &mkey);
168  const int k1,
169  const int k2,
170  const Array<OneD, const NekDouble> &inarray,
171  Array<OneD,NekDouble> &outarray,
172  const StdRegions::StdMatrixKey &mkey);
174  const Array<OneD, const NekDouble> &inarray,
175  Array<OneD, NekDouble> &outarray,
176  const StdRegions::StdMatrixKey &mkey);
178  const Array<OneD, const NekDouble> &inarray,
179  Array<OneD,NekDouble> &outarray,
180  const StdRegions::StdMatrixKey &mkey);
181 
183  Array<OneD, NekDouble> &array,
184  const StdRegions::StdMatrixKey &mkey);
185  //---------------------------------------
186  // Matrix creation functions
187  //---------------------------------------
189  const StdRegions::StdMatrixKey &mkey);
191  const StdRegions::StdMatrixKey &mkey);
193  const MatrixKey &mkey);
195  const MatrixKey &mkey);
197  const MatrixKey &mkey);
199  const MatrixKey &mkey);
201  const MatrixKey &mkey);
202 
205  Array<OneD, int> &conn,
206  bool standard = true);
207 
208 
209  private:
214 
216  const Array<OneD, const NekDouble> &inarray,
217  Array<OneD, NekDouble> &outarray,
219  };
220 
221  // type defines for use of PrismExp in a boost vector
222  typedef boost::shared_ptr<PrismExp> PrismExpSharedPtr;
223  typedef std::vector<PrismExpSharedPtr> PrismExpVector;
225  } //end of namespace
226 } //end of namespace
227 
228 #define H_PRISMEXP
229 #endif
virtual void v_HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
Definition: PrismExp.cpp:998
LibUtilities::NekManager< MatrixKey, DNekScalMat, MatrixKey::opLess > m_matrixManager
Definition: PrismExp.h:211
virtual void v_GetCoord(const Array< OneD, const NekDouble > &Lcoords, Array< OneD, NekDouble > &coords)
Get the coordinates #coords at the local coordinates #Lcoords.
Definition: PrismExp.cpp:476
virtual void v_GetCoords(Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3)
Definition: PrismExp.cpp:494
void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Calculates the inner product .
Definition: PrismExp.cpp:344
virtual void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Calculate the inner product of inarray with respect to the basis B=base0*base1*base2 and put into out...
Definition: PrismExp.cpp:272
virtual void v_GeneralMatrixOp_MatOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
Definition: PrismExp.cpp:1006
virtual void v_ExtractDataToCoeffs(const NekDouble *data, const std::vector< unsigned int > &nummodes, const int mode_offset, NekDouble *coeffs, std::vector< LibUtilities::BasisType > &fromType)
Definition: PrismExp.cpp:537
virtual void v_GetSimplexEquiSpacedConnectivity(Array< OneD, int > &conn, bool standard=true)
Definition: PrismExp.cpp:1716
virtual DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix(const MatrixKey &mkey)
Definition: PrismExp.cpp:1101
virtual void v_MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
Definition: PrismExp.cpp:972
boost::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:70
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)
Calculate the derivative of the physical points.
Definition: PrismExp.cpp:137
virtual void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Forward transform from physical quadrature space stored in inarray and evaluate the expansion coeffic...
Definition: PrismExp.cpp:217
boost::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
virtual void v_GetFacePhysMap(const int face, Array< OneD, int > &outarray)
Definition: PrismExp.cpp:598
DNekScalMatSharedPtr CreateMatrix(const MatrixKey &mkey)
Definition: PrismExp.cpp:1111
virtual NekDouble v_Integral(const Array< OneD, const NekDouble > &inarray)
Integrate the physical point list inarray over prismatic region and return the value.
Definition: PrismExp.cpp:111
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdRegions::StdMatrixKey &mkey)
Definition: PrismExp.cpp:1085
virtual NekDouble v_StdPhysEvaluate(const Array< OneD, const NekDouble > &Lcoord, const Array< OneD, const NekDouble > &physvals)
Definition: PrismExp.cpp:507
virtual void v_LaplacianMatrixOp_MatFree_Kernel(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp)
Calculate the Laplacian multiplication in a matrix-free manner.
Definition: PrismExp.cpp:1560
LibUtilities::NekManager< MatrixKey, DNekScalBlkMat, MatrixKey::opLess > m_staticCondMatrixManager
Definition: PrismExp.h:213
virtual DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey)
Definition: PrismExp.cpp:1062
std::vector< PrismExpSharedPtr >::iterator PrismExpVectorIter
Definition: PrismExp.h:224
NekMatrix< NekMatrix< NekMatrix< NekDouble, StandardMatrixTag >, ScaledMatrixTag >, BlockMatrixTag > DNekScalBlkMat
Definition: NekTypeDefs.hpp:66
virtual void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
Definition: PrismExp.cpp:279
std::vector< PrismExpSharedPtr > PrismExpVector
Definition: PrismExp.h:223
boost::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
Definition: NekTypeDefs.hpp:74
PrismExp(const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb, const LibUtilities::BasisKey &Bc, const SpatialDomains::PrismGeomSharedPtr &geom)
Constructor using BasisKey class for quadrature points and order definition.
Definition: PrismExp.cpp:49
virtual void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdRegions::StdMatrixKey &mkey)
Definition: PrismExp.cpp:1028
void v_DropLocStaticCondMatrix(const MatrixKey &mkey)
Definition: PrismExp.cpp:1106
void v_ComputeFaceNormal(const int face)
Get the normals along specficied face Get the face normals interplated to a points0 x points 0 type d...
Definition: PrismExp.cpp:702
Class representing a prismatic element in reference space.
Definition: StdPrismExp.h:49
double NekDouble
boost::shared_ptr< PrismExp > PrismExpSharedPtr
Definition: PrismExp.h:222
virtual StdRegions::StdExpansionSharedPtr v_GetLinStdExp(void) const
Definition: PrismExp.cpp:459
virtual DNekScalMatSharedPtr v_GetLocMatrix(const MatrixKey &mkey)
Definition: PrismExp.cpp:1096
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
boost::shared_ptr< PrismGeom > PrismGeomSharedPtr
Definition: PrismGeom.h:109
virtual NekDouble v_PhysEvaluate(const Array< OneD, const NekDouble > &coord, const Array< OneD, const NekDouble > &physvals)
This function evaluates the expansion at a single (arbitrary) point of the domain.
Definition: PrismExp.cpp:515
void v_IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: PrismExp.cpp:352
Used to lookup the create function in NekManager.
Definition: MatrixKey.h:68
#define LOCAL_REGIONS_EXPORT
boost::shared_ptr< StdExpansion > StdExpansionSharedPtr
virtual void v_LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
Definition: PrismExp.cpp:980
NekMatrix< NekMatrix< NekDouble, StandardMatrixTag >, ScaledMatrixTag > DNekScalMat
virtual StdRegions::StdExpansionSharedPtr v_GetStdExp(void) const
Definition: PrismExp.cpp:451
DNekScalBlkMatSharedPtr CreateStaticCondMatrix(const MatrixKey &mkey)
Definition: PrismExp.cpp:1428
Describes the specification for a Basis.
Definition: Basis.h:50