Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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  LOCAL_REGIONS_EXPORT virtual int v_GetCoordim();
140  const NekDouble *data,
141  const std::vector<unsigned int > &nummodes,
142  const int mode_offset,
143  NekDouble * coeffs);
144 
146  const int face,
147  Array<OneD, int> &outarray);
148 
149  LOCAL_REGIONS_EXPORT void v_ComputeFaceNormal(const int face);
150 
151  //---------------------------------------
152  // Operator creation functions
153  //---------------------------------------
155  const Array<OneD, const NekDouble> &inarray,
156  Array<OneD,NekDouble> &outarray,
157  const StdRegions::StdMatrixKey &mkey);
159  const Array<OneD, const NekDouble> &inarray,
160  Array<OneD,NekDouble> &outarray,
161  const StdRegions::StdMatrixKey &mkey);
163  const int k1,
164  const int k2,
165  const Array<OneD, const NekDouble> &inarray,
166  Array<OneD,NekDouble> &outarray,
167  const StdRegions::StdMatrixKey &mkey);
169  const Array<OneD, const NekDouble> &inarray,
170  Array<OneD, NekDouble> &outarray,
171  const StdRegions::StdMatrixKey &mkey);
173  const Array<OneD, const NekDouble> &inarray,
174  Array<OneD,NekDouble> &outarray,
175  const StdRegions::StdMatrixKey &mkey);
176 
178  Array<OneD, NekDouble> &array,
179  const StdRegions::StdMatrixKey &mkey);
180  //---------------------------------------
181  // Matrix creation functions
182  //---------------------------------------
184  const StdRegions::StdMatrixKey &mkey);
186  const StdRegions::StdMatrixKey &mkey);
188  const MatrixKey &mkey);
190  const MatrixKey &mkey);
192  const MatrixKey &mkey);
194  const MatrixKey &mkey);
196  const MatrixKey &mkey);
197 
200  Array<OneD, int> &conn,
201  bool standard = true);
202 
203 
204  private:
209 
211  const Array<OneD, const NekDouble> &inarray,
212  Array<OneD, NekDouble> &outarray,
214  };
215 
216  // type defines for use of PrismExp in a boost vector
217  typedef boost::shared_ptr<PrismExp> PrismExpSharedPtr;
218  typedef std::vector<PrismExpSharedPtr> PrismExpVector;
220  } //end of namespace
221 } //end of namespace
222 
223 #define H_PRISMEXP
224 #endif
virtual void v_HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
Definition: PrismExp.cpp:982
LibUtilities::NekManager< MatrixKey, DNekScalMat, MatrixKey::opLess > m_matrixManager
Definition: PrismExp.h:206
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:461
virtual void v_GetCoords(Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3)
Definition: PrismExp.cpp:479
void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Calculates the inner product .
Definition: PrismExp.cpp:342
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:270
virtual void v_GeneralMatrixOp_MatOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
Definition: PrismExp.cpp:990
virtual void v_GetSimplexEquiSpacedConnectivity(Array< OneD, int > &conn, bool standard=true)
Definition: PrismExp.cpp:1700
virtual DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix(const MatrixKey &mkey)
Definition: PrismExp.cpp:1085
virtual void v_MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
Definition: PrismExp.cpp:956
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:135
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:215
boost::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
virtual void v_GetFacePhysMap(const int face, Array< OneD, int > &outarray)
Definition: PrismExp.cpp:582
DNekScalMatSharedPtr CreateMatrix(const MatrixKey &mkey)
Definition: PrismExp.cpp:1095
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:109
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdRegions::StdMatrixKey &mkey)
Definition: PrismExp.cpp:1069
virtual NekDouble v_StdPhysEvaluate(const Array< OneD, const NekDouble > &Lcoord, const Array< OneD, const NekDouble > &physvals)
Definition: PrismExp.cpp:492
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:1544
LibUtilities::NekManager< MatrixKey, DNekScalBlkMat, MatrixKey::opLess > m_staticCondMatrixManager
Definition: PrismExp.h:208
virtual DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey)
Definition: PrismExp.cpp:1046
std::vector< PrismExpSharedPtr >::iterator PrismExpVectorIter
Definition: PrismExp.h:219
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:277
std::vector< PrismExpSharedPtr > PrismExpVector
Definition: PrismExp.h:218
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:47
virtual void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdRegions::StdMatrixKey &mkey)
Definition: PrismExp.cpp:1012
void v_DropLocStaticCondMatrix(const MatrixKey &mkey)
Definition: PrismExp.cpp:1090
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:686
Class representing a prismatic element in reference space.
Definition: StdPrismExp.h:49
double NekDouble
boost::shared_ptr< PrismExp > PrismExpSharedPtr
Definition: PrismExp.h:217
virtual DNekScalMatSharedPtr v_GetLocMatrix(const MatrixKey &mkey)
Definition: PrismExp.cpp:1080
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:500
virtual void v_ExtractDataToCoeffs(const NekDouble *data, const std::vector< unsigned int > &nummodes, const int mode_offset, NekDouble *coeffs)
Unpack data from input file assuming it comes from the same expansion type.
Definition: PrismExp.cpp:522
void v_IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: PrismExp.cpp:350
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:964
NekMatrix< NekMatrix< NekDouble, StandardMatrixTag >, ScaledMatrixTag > DNekScalMat
virtual StdRegions::StdExpansionSharedPtr v_GetStdExp(void) const
Definition: PrismExp.cpp:449
DNekScalBlkMatSharedPtr CreateStaticCondMatrix(const MatrixKey &mkey)
Definition: PrismExp.cpp:1412
Describes the specification for a Basis.
Definition: Basis.h:50