Intrepid
/usr/src/RPM/BUILD/trilinos10-10.6.4/packages/intrepid/src/Discretization/Basis/Intrepid_OrthogonalBases.hpp
Go to the documentation of this file.
00001 // @HEADER
00002 // ************************************************************************
00003 //
00004 //                           Intrepid Package
00005 //                 Copyright (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) or
00026 //                    Robert C. Kirby (robert.c.kirby@ttu.edu)
00027 //
00028 // ************************************************************************
00029 // @HEADER
00030 
00036 #ifndef INTREPID_ORTHOGONALBASES_HPP
00037 #define INTREPID_ORTHGONALBASES_HPP
00038 
00039 #include "Intrepid_ConfigDefs.hpp"
00040 #include "Intrepid_Types.hpp"
00041 #include "Intrepid_Utils.hpp"
00042 #include "Teuchos_Array.hpp"
00043 #include "Teuchos_RCP.hpp"
00044 #include "Teuchos_BLAS.hpp"
00045 #include "Teuchos_oblackholestream.hpp"
00046 #include "Teuchos_TestForException.hpp"
00047 
00048 namespace Intrepid {
00049   
00067   class OrthogonalBases {
00068   public:
00069     OrthogonalBases() {;}
00070     ~OrthogonalBases() {;}
00071 
00084     template<class Scalar, class ScalarArray1, class ScalarArray2>
00085     static void tabulateTriangle( const ScalarArray1& z ,
00086                                   const int n ,
00087                                   ScalarArray2 & poly_val );
00088 
00101     template<class Scalar, class ScalarArray1, class ScalarArray2>
00102     static void tabulateTetrahedron( const ScalarArray1& z ,
00103                                     const int n ,
00104                                     ScalarArray2 & poly_val );
00105     
00106   private:
00113     template<class Scalar>
00114     static void jrc( const Scalar &alpha , const Scalar &beta , const int &n ,
00115                     Scalar &an , Scalar &bn, Scalar &cn );
00116 
00119     static inline int idxtri(int p, int q)
00120     {
00121       return (p+q)*(p+q+1)/2+q;
00122     }
00123 
00126     static inline int idxtet(int p, int q, int r)
00127     {
00128       return (p+q+r)*(p+q+r+1)*(p+q+r+2)/6+(q+r)*(q+r+1)/2+r;
00129     }
00130 
00131 
00132   }; // class OrthogonalBases
00133 } // namespace Intrepid
00134 
00135 #include "Intrepid_OrthogonalBasesDef.hpp"
00136 
00137 #endif
00138 
00139     
00140 
00141 
00142 
00143