Intrepid
http://trilinos.sandia.gov/packages/docs/r10.6/packages/intrepid/src/Discretization/FunctionSpaceTools/Intrepid_FunctionSpaceTools.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_FUNCTIONSPACETOOLS_HPP
00036 #define INTREPID_FUNCTIONSPACETOOLS_HPP
00037 
00038 #include "Intrepid_ConfigDefs.hpp"
00039 #include "Intrepid_ArrayTools.hpp"
00040 #include "Intrepid_RealSpaceTools.hpp"
00041 #include "Intrepid_FieldContainer.hpp"
00042 #include "Intrepid_CellTools.hpp"
00043 
00044 
00045 namespace Intrepid {
00046 
00053 class FunctionSpaceTools {
00054   public:
00090   template<class Scalar, class ArrayTypeOut, class ArrayTypeIn>
00091   static void HGRADtransformVALUE(ArrayTypeOut       & outVals,
00092                                   const ArrayTypeIn  & inVals);
00093 
00130   template<class Scalar, class ArrayTypeOut, class ArrayTypeJac, class ArrayTypeIn>
00131   static void HGRADtransformGRAD(ArrayTypeOut       & outVals,
00132                                  const ArrayTypeJac & jacobianInverse,
00133                                  const ArrayTypeIn  & inVals,
00134                                  const char           transpose = 'T');
00135 
00171   template<class Scalar, class ArrayTypeOut, class ArrayTypeJac, class ArrayTypeIn>
00172   static void HCURLtransformVALUE(ArrayTypeOut        & outVals,
00173                                   const ArrayTypeJac  & jacobianInverse,
00174                                   const ArrayTypeIn   & inVals,
00175                                   const char            transpose = 'T');
00176 
00214   template<class Scalar, class ArrayTypeOut, class ArrayTypeJac, class ArrayTypeDet, class ArrayTypeIn>
00215   static void HCURLtransformCURL(ArrayTypeOut        & outVals,
00216                                  const ArrayTypeJac  & jacobian,
00217                                  const ArrayTypeDet  & jacobianDet,
00218                                  const ArrayTypeIn   & inVals,
00219                                  const char            transpose = 'N');
00220 
00258   template<class Scalar, class ArrayTypeOut, class ArrayTypeJac, class ArrayTypeDet, class ArrayTypeIn>
00259   static void HDIVtransformVALUE(ArrayTypeOut        & outVals,
00260                                  const ArrayTypeJac  & jacobian,
00261                                  const ArrayTypeDet  & jacobianDet,
00262                                  const ArrayTypeIn   & inVals,
00263                                  const char            transpose = 'N');
00264 
00301   template<class Scalar, class ArrayTypeOut, class ArrayTypeDet, class ArrayTypeIn>
00302   static void HDIVtransformDIV(ArrayTypeOut        & outVals,
00303                                const ArrayTypeDet  & jacobianDet,
00304                                const ArrayTypeIn   & inVals);
00305 
00342   template<class Scalar, class ArrayTypeOut, class ArrayTypeDet, class ArrayTypeIn>
00343   static void HVOLtransformVALUE(ArrayTypeOut        & outVals,
00344                                  const ArrayTypeDet  & jacobianDet,
00345                                  const ArrayTypeIn   & inVals);
00346 
00361   template<class Scalar, class ArrayOut, class ArrayInLeft, class ArrayInRight>
00362   static void integrate(ArrayOut            & outputValues,
00363                         const ArrayInLeft   & leftValues,
00364                         const ArrayInRight  & rightValues,
00365                         const ECompEngine     compEngine,
00366                         const bool            sumInto = false);
00367 
00391   template<class Scalar, class ArrayOutFields, class ArrayInFieldsLeft, class ArrayInFieldsRight>
00392   static void operatorIntegral(ArrayOutFields &            outputFields,
00393                                const ArrayInFieldsLeft &   leftFields,
00394                                const ArrayInFieldsRight &  rightFields,
00395                                const ECompEngine           compEngine,
00396                                const bool                  sumInto = false);
00397 
00420   template<class Scalar, class ArrayOutFields, class ArrayInData, class ArrayInFields>
00421   static void functionalIntegral(ArrayOutFields &       outputFields,
00422                                  const ArrayInData &    inputData,
00423                                  const ArrayInFields &  inputFields,
00424                                  const ECompEngine      compEngine,
00425                                  const bool             sumInto = false);
00426 
00446   template<class Scalar, class ArrayOutData, class ArrayInDataLeft, class ArrayInDataRight>
00447   static void dataIntegral(ArrayOutData &            outputData,
00448                            const ArrayInDataLeft &   inputDataLeft,
00449                            const ArrayInDataRight &  inputDataRight,
00450                            const ECompEngine         compEngine,
00451                            const bool                sumInto = false);
00452 
00483   template<class Scalar, class ArrayOut, class ArrayDet, class ArrayWeights>
00484   static void computeCellMeasure(ArrayOut             & outVals,
00485                                  const ArrayDet       & inDet,
00486                                  const ArrayWeights   & inWeights);
00487 
00532   template<class Scalar, class ArrayOut, class ArrayJac, class ArrayWeights>
00533   static void computeFaceMeasure(ArrayOut                   & outVals,
00534                                  const ArrayJac             & inJac,
00535                                  const ArrayWeights         & inWeights,
00536                                  const int                    whichFace,
00537                                  const shards::CellTopology & parentCell);
00538 
00581   template<class Scalar, class ArrayOut, class ArrayJac, class ArrayWeights>
00582   static void computeEdgeMeasure(ArrayOut                   & outVals,
00583                                  const ArrayJac             & inJac,
00584                                  const ArrayWeights         & inWeights,
00585                                  const int                    whichEdge,
00586                                  const shards::CellTopology & parentCell);
00587 
00596   template<class Scalar, class ArrayTypeOut, class ArrayTypeMeasure, class ArrayTypeIn>
00597   static void multiplyMeasure(ArrayTypeOut             & outVals,
00598                               const ArrayTypeMeasure   & inMeasure,
00599                               const ArrayTypeIn        & inVals);
00600 
00634   template<class Scalar, class ArrayOutFields, class ArrayInData, class ArrayInFields>
00635   static void scalarMultiplyDataField(ArrayOutFields &     outputFields,
00636                                       ArrayInData &        inputData,
00637                                       ArrayInFields &      inputFields,
00638                                       const bool           reciprocal = false);
00639 
00672   template<class Scalar, class ArrayOutData, class ArrayInDataLeft, class ArrayInDataRight>
00673   static void scalarMultiplyDataData(ArrayOutData &           outputData,
00674                                      ArrayInDataLeft &        inputDataLeft,
00675                                      ArrayInDataRight &       inputDataRight,
00676                                      const bool               reciprocal = false);
00677 
00709   template<class Scalar, class ArrayOutFields, class ArrayInData, class ArrayInFields>
00710   static void dotMultiplyDataField(ArrayOutFields &       outputFields,
00711                                    const ArrayInData &    inputData,
00712                                    const ArrayInFields &  inputFields);
00713 
00744   template<class Scalar, class ArrayOutData, class ArrayInDataLeft, class ArrayInDataRight>
00745   static void dotMultiplyDataData(ArrayOutData &            outputData,
00746                                   const ArrayInDataLeft &   inputDataLeft,
00747                                   const ArrayInDataRight &  inputDataRight);
00748 
00783   template<class Scalar, class ArrayOutFields, class ArrayInData, class ArrayInFields>
00784   static void vectorMultiplyDataField(ArrayOutFields &       outputFields,
00785                                       const ArrayInData &    inputData,
00786                                       const ArrayInFields &  inputFields);
00787 
00821   template<class Scalar, class ArrayOutData, class ArrayInDataLeft, class ArrayInDataRight>
00822   static void vectorMultiplyDataData(ArrayOutData &            outputData,
00823                                      const ArrayInDataLeft &   inputDataLeft,
00824                                      const ArrayInDataRight &  inputDataRight);
00825 
00876   template<class Scalar, class ArrayOutFields, class ArrayInData, class ArrayInFields>
00877   static void tensorMultiplyDataField(ArrayOutFields &       outputFields,
00878                                       const ArrayInData &    inputData,
00879                                       const ArrayInFields &  inputFields,
00880                                       const char             transpose = 'N');
00881 
00931   template<class Scalar, class ArrayOutData, class ArrayInDataLeft, class ArrayInDataRight>
00932   static void tensorMultiplyDataData(ArrayOutData &            outputData,
00933                                      const ArrayInDataLeft &   inputDataLeft,
00934                                      const ArrayInDataRight &  inputDataRight,
00935                                      const char                transpose = 'N');
00936 
00937 
00964   template<class Scalar, class ArrayTypeInOut, class ArrayTypeSign>
00965   static void applyLeftFieldSigns(ArrayTypeInOut        & inoutOperator,
00966                                   const ArrayTypeSign   & fieldSigns);
00967 
00994   template<class Scalar, class ArrayTypeInOut, class ArrayTypeSign>
00995   static void applyRightFieldSigns(ArrayTypeInOut        & inoutOperator,
00996                                    const ArrayTypeSign   & fieldSigns);
00997 
01020   template<class Scalar, class ArrayTypeInOut, class ArrayTypeSign>
01021   static void applyFieldSigns(ArrayTypeInOut        & inoutFunction,
01022                               const ArrayTypeSign   & fieldSigns);
01023 
01024 
01060   template<class Scalar, class ArrayOutPointVals, class ArrayInCoeffs, class ArrayInFields>
01061   static void evaluate(ArrayOutPointVals     & outPointVals,
01062                        const ArrayInCoeffs   & inCoeffs,
01063                        const ArrayInFields   & inFields);
01064   
01065 };  // end FunctionSpaceTools
01066 
01067 } // end namespace Intrepid
01068 
01069 // include templated definitions
01070 #include <Intrepid_FunctionSpaceToolsDef.hpp>
01071 
01072 #endif
01073 
01074 /***************************************************************************************************
01075  **                                                                                               **
01076  **                           D O C U M E N T A T I O N   P A G E S                               **
01077  **                                                                                               **
01078  **************************************************************************************************/
01079