Intrepid
http://trilinos.sandia.gov/packages/docs/r10.12/packages/intrepid/src/Discretization/TensorProductSpaceTools/Intrepid_TensorProductSpaceTools.hpp
Go to the documentation of this file.
00001 // @HEADER
00002 // ************************************************************************
00003 //
00004 //                           Intrepid Package
00005 //                 Copytest (2007) Sandia Corporation
00006 //
00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00008 // license for use of this work by or on behalf of the U.S. Government.
00009 //
00010 // This library is free software; you can redistribute it and/or modify
00011 // it under the terms of the GNU Lesser General Public License as
00012 // published by the Free Software Foundation; either version 2.1 of the
00013 // License, or (at your option) any later version.
00014 //
00015 // This library is distributed in the hope that it will be useful, but
00016 // WITHOUT ANY WARRANTY; without even the implied warranty of
00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 // Lesser General Public License for more details.
00019 //
00020 // You should have received a copy of the GNU Lesser General Public
00021 // License along with this library; if not, write to the Free Software
00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00023 // USA
00024 // Questions? Contact Pavel Bochev (pbboche@sandia.gov) or
00025 //                    Denis Ridzal (dridzal@sandia.gov).
00026 //
00027 // ************************************************************************
00028 // @HEADER
00029 
00035 #ifndef INTREPID_TENSORPRODUCTSPACETOOLS_HPP
00036 #define INTREPID_TENSORPRODUCTSPACETOOLS_HPP
00037 
00038 #include "Intrepid_Basis.hpp"
00039 #include "Intrepid_FieldContainer.hpp"
00040 #include "Teuchos_Array.hpp"
00041 #include "Teuchos_RCP.hpp"
00042 
00043 using Teuchos::Array;
00044 using Teuchos::RCP;
00045 using Intrepid::FieldContainer;
00046 
00047 namespace Intrepid {
00048 
00055 class TensorProductSpaceTools
00056 {
00057 public:
00072   template<class Scalar, class ArrayTypeOut, class ArrayTypeCoeffs,
00073            class ArrayTypeBasis>
00074   static void evaluate(  ArrayTypeOut &vals ,
00075                          const ArrayTypeCoeffs &coeffs ,
00076                          const Array<RCP<ArrayTypeBasis> > &bases );
00077 
00093   template<class Scalar, class ArrayTypeOut, class ArrayTypeCoeffs,
00094            class ArrayTypeBasis>
00095   static void evaluateGradient(  ArrayTypeOut &vals ,
00096                                  const ArrayTypeCoeffs &coeffs ,
00097                                  const Array<RCP<ArrayTypeBasis> > &bases ,
00098                                  const Array<RCP<ArrayTypeBasis> > &Dbases );
00099 
00110   template<class Scalar, class ArrayTypeOut, class ArrayTypeData,
00111            class ArrayTypeBasis, class ArrayTypeWeights>
00112   static void moments( ArrayTypeOut &vals ,
00113                        const ArrayTypeData &data ,
00114                        const Array<RCP<ArrayTypeBasis> > &basisVals ,
00115                        const Array<RCP<ArrayTypeWeights> > &wts );
00116 
00129   template<class Scalar, class ArrayTypeOut, class ArrayTypeData,
00130            class ArrayTypeBasis, class ArrayTypeWeights>
00131   static void momentsGrad( ArrayTypeOut &vals ,
00132                            const ArrayTypeData &data ,
00133                            const Array<RCP<ArrayTypeBasis> > &basisVals ,
00134                            const Array<RCP<ArrayTypeBasis> > &basisDVals ,
00135                            const Array<RCP<ArrayTypeWeights> > &wts );
00136 
00137 
00138 private:
00139   template<class Scalar, class ArrayTypeOut, class ArrayTypeCoeffs,
00140            class ArrayTypeBasis>
00141   static void evaluate2D( ArrayTypeOut &vals ,
00142                           const ArrayTypeCoeffs &coeffs ,
00143                           const Array<RCP<ArrayTypeBasis> > &basisVals );
00144 
00145   template<class Scalar, class ArrayTypeOut, class ArrayTypeCoeffs,
00146            class ArrayTypeBasis>
00147   static void evaluate3D( ArrayTypeOut &vals ,
00148                           const ArrayTypeCoeffs &coeffs ,
00149                           const Array<RCP<ArrayTypeBasis> > &basisDVals );
00150 
00151   template<class Scalar, class ArrayTypeOut, class ArrayTypeCoeffs,
00152            class ArrayTypeBasis>
00153   static void evaluateGradient2D( ArrayTypeOut &vals ,
00154                                   const ArrayTypeCoeffs &coeffs ,
00155                                   const Array<RCP<ArrayTypeBasis> > &basisVals ,
00156                                   const Array<RCP<ArrayTypeBasis> > &basisDVals );
00157 
00158   template<class Scalar, class ArrayTypeOut, class ArrayTypeCoeffs,
00159            class ArrayTypeBasis>
00160   static void evaluateGradient3D( ArrayTypeOut &vals ,
00161                                   const ArrayTypeCoeffs &coeffs ,
00162                                   const Array<RCP<ArrayTypeBasis> > &basisVals ,
00163                                   const Array<RCP<ArrayTypeBasis> > &basisDVals );
00164 
00165   template<class Scalar, class ArrayTypeOut, class ArrayTypeData,
00166            class ArrayTypeBasis, class ArrayTypeWeights>
00167   static void moments2D( ArrayTypeOut &vals ,
00168                          const ArrayTypeData &data ,
00169                          const Array<RCP<ArrayTypeBasis> > &basisVals ,
00170                          const Array<RCP<ArrayTypeWeights> > &wts );
00171 
00172   template<class Scalar, class ArrayTypeOut, class ArrayTypeData,
00173            class ArrayTypeBasis, class ArrayTypeWeights>
00174   static void moments3D( ArrayTypeOut &vals ,
00175                          const ArrayTypeData &data ,
00176                          const Array<RCP<ArrayTypeBasis> > &basisVals ,
00177                          const Array<RCP<ArrayTypeWeights> > &wts );
00178 
00179   template<class Scalar, class ArrayTypeOut, class ArrayTypeData,
00180            class ArrayTypeBasis, class ArrayTypeWeights>
00181   static void momentsGrad2D( ArrayTypeOut &vals ,
00182                              const ArrayTypeData &data ,
00183                              const Array<RCP<ArrayTypeBasis> > &basisVals ,
00184                              const Array<RCP<ArrayTypeBasis> > &basisDVals ,
00185                              const Array<RCP<ArrayTypeWeights> > &wts );
00186 
00187   template<class Scalar, class ArrayTypeOut, class ArrayTypeData,
00188            class ArrayTypeBasis, class ArrayTypeWeights>
00189   static void momentsGrad3D( ArrayTypeOut &vals ,
00190                              const ArrayTypeData &data ,
00191                              const Array<RCP<ArrayTypeBasis> > &basisVals ,
00192                              const Array<RCP<ArrayTypeBasis> > &basisDVals ,
00193                              const Array<RCP<ArrayTypeWeights> > &wts );
00194 };
00195 
00196 } //end namespace Intrepid
00197 
00198 #include "Intrepid_TensorProductSpaceToolsDef.hpp"
00199 #endif