Intrepid
http://trilinos.sandia.gov/packages/docs/r11.0/packages/intrepid/src/Discretization/FunctionSpaceTools/Intrepid_FunctionSpaceTools.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 // Redistribution and use in source and binary forms, with or without
00011 // modification, are permitted provided that the following conditions are
00012 // met:
00013 //
00014 // 1. Redistributions of source code must retain the above copyright
00015 // notice, this list of conditions and the following disclaimer.
00016 //
00017 // 2. Redistributions in binary form must reproduce the above copyright
00018 // notice, this list of conditions and the following disclaimer in the
00019 // documentation and/or other materials provided with the distribution.
00020 //
00021 // 3. Neither the name of the Corporation nor the names of the
00022 // contributors may be used to endorse or promote products derived from
00023 // this software without specific prior written permission.
00024 //
00025 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
00026 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00027 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00028 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
00029 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00030 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00031 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00032 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
00033 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00034 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00035 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00036 //
00037 // Questions? Contact Pavel Bochev  (pbboche@sandia.gov)
00038 //                    Denis Ridzal  (dridzal@sandia.gov), or
00039 //                    Kara Peterson (kjpeter@sandia.gov)
00040 //
00041 // ************************************************************************
00042 // @HEADER
00043 
00049 #ifndef INTREPID_FUNCTIONSPACETOOLS_HPP
00050 #define INTREPID_FUNCTIONSPACETOOLS_HPP
00051 
00052 #include "Intrepid_ConfigDefs.hpp"
00053 #include "Intrepid_ArrayTools.hpp"
00054 #include "Intrepid_RealSpaceTools.hpp"
00055 #include "Intrepid_FieldContainer.hpp"
00056 #include "Intrepid_CellTools.hpp"
00057 
00058 
00059 namespace Intrepid {
00060 
00067 class FunctionSpaceTools {
00068   public:
00104   template<class Scalar, class ArrayTypeOut, class ArrayTypeIn>
00105   static void HGRADtransformVALUE(ArrayTypeOut       & outVals,
00106                                   const ArrayTypeIn  & inVals);
00107 
00144   template<class Scalar, class ArrayTypeOut, class ArrayTypeJac, class ArrayTypeIn>
00145   static void HGRADtransformGRAD(ArrayTypeOut       & outVals,
00146                                  const ArrayTypeJac & jacobianInverse,
00147                                  const ArrayTypeIn  & inVals,
00148                                  const char           transpose = 'T');
00149 
00185   template<class Scalar, class ArrayTypeOut, class ArrayTypeJac, class ArrayTypeIn>
00186   static void HCURLtransformVALUE(ArrayTypeOut        & outVals,
00187                                   const ArrayTypeJac  & jacobianInverse,
00188                                   const ArrayTypeIn   & inVals,
00189                                   const char            transpose = 'T');
00190 
00228   template<class Scalar, class ArrayTypeOut, class ArrayTypeJac, class ArrayTypeDet, class ArrayTypeIn>
00229   static void HCURLtransformCURL(ArrayTypeOut        & outVals,
00230                                  const ArrayTypeJac  & jacobian,
00231                                  const ArrayTypeDet  & jacobianDet,
00232                                  const ArrayTypeIn   & inVals,
00233                                  const char            transpose = 'N');
00234 
00272   template<class Scalar, class ArrayTypeOut, class ArrayTypeJac, class ArrayTypeDet, class ArrayTypeIn>
00273   static void HDIVtransformVALUE(ArrayTypeOut        & outVals,
00274                                  const ArrayTypeJac  & jacobian,
00275                                  const ArrayTypeDet  & jacobianDet,
00276                                  const ArrayTypeIn   & inVals,
00277                                  const char            transpose = 'N');
00278 
00315   template<class Scalar, class ArrayTypeOut, class ArrayTypeDet, class ArrayTypeIn>
00316   static void HDIVtransformDIV(ArrayTypeOut        & outVals,
00317                                const ArrayTypeDet  & jacobianDet,
00318                                const ArrayTypeIn   & inVals);
00319 
00356   template<class Scalar, class ArrayTypeOut, class ArrayTypeDet, class ArrayTypeIn>
00357   static void HVOLtransformVALUE(ArrayTypeOut        & outVals,
00358                                  const ArrayTypeDet  & jacobianDet,
00359                                  const ArrayTypeIn   & inVals);
00360 
00375   template<class Scalar, class ArrayOut, class ArrayInLeft, class ArrayInRight>
00376   static void integrate(ArrayOut            & outputValues,
00377                         const ArrayInLeft   & leftValues,
00378                         const ArrayInRight  & rightValues,
00379                         const ECompEngine     compEngine,
00380                         const bool            sumInto = false);
00381 
00405   template<class Scalar, class ArrayOutFields, class ArrayInFieldsLeft, class ArrayInFieldsRight>
00406   static void operatorIntegral(ArrayOutFields &            outputFields,
00407                                const ArrayInFieldsLeft &   leftFields,
00408                                const ArrayInFieldsRight &  rightFields,
00409                                const ECompEngine           compEngine,
00410                                const bool                  sumInto = false);
00411 
00434   template<class Scalar, class ArrayOutFields, class ArrayInData, class ArrayInFields>
00435   static void functionalIntegral(ArrayOutFields &       outputFields,
00436                                  const ArrayInData &    inputData,
00437                                  const ArrayInFields &  inputFields,
00438                                  const ECompEngine      compEngine,
00439                                  const bool             sumInto = false);
00440 
00460   template<class Scalar, class ArrayOutData, class ArrayInDataLeft, class ArrayInDataRight>
00461   static void dataIntegral(ArrayOutData &            outputData,
00462                            const ArrayInDataLeft &   inputDataLeft,
00463                            const ArrayInDataRight &  inputDataRight,
00464                            const ECompEngine         compEngine,
00465                            const bool                sumInto = false);
00466 
00497   template<class Scalar, class ArrayOut, class ArrayDet, class ArrayWeights>
00498   static void computeCellMeasure(ArrayOut             & outVals,
00499                                  const ArrayDet       & inDet,
00500                                  const ArrayWeights   & inWeights);
00501 
00546   template<class Scalar, class ArrayOut, class ArrayJac, class ArrayWeights>
00547   static void computeFaceMeasure(ArrayOut                   & outVals,
00548                                  const ArrayJac             & inJac,
00549                                  const ArrayWeights         & inWeights,
00550                                  const int                    whichFace,
00551                                  const shards::CellTopology & parentCell);
00552 
00595   template<class Scalar, class ArrayOut, class ArrayJac, class ArrayWeights>
00596   static void computeEdgeMeasure(ArrayOut                   & outVals,
00597                                  const ArrayJac             & inJac,
00598                                  const ArrayWeights         & inWeights,
00599                                  const int                    whichEdge,
00600                                  const shards::CellTopology & parentCell);
00601 
00610   template<class Scalar, class ArrayTypeOut, class ArrayTypeMeasure, class ArrayTypeIn>
00611   static void multiplyMeasure(ArrayTypeOut             & outVals,
00612                               const ArrayTypeMeasure   & inMeasure,
00613                               const ArrayTypeIn        & inVals);
00614 
00648   template<class Scalar, class ArrayOutFields, class ArrayInData, class ArrayInFields>
00649   static void scalarMultiplyDataField(ArrayOutFields &     outputFields,
00650                                       ArrayInData &        inputData,
00651                                       ArrayInFields &      inputFields,
00652                                       const bool           reciprocal = false);
00653 
00686   template<class Scalar, class ArrayOutData, class ArrayInDataLeft, class ArrayInDataRight>
00687   static void scalarMultiplyDataData(ArrayOutData &           outputData,
00688                                      ArrayInDataLeft &        inputDataLeft,
00689                                      ArrayInDataRight &       inputDataRight,
00690                                      const bool               reciprocal = false);
00691 
00723   template<class Scalar, class ArrayOutFields, class ArrayInData, class ArrayInFields>
00724   static void dotMultiplyDataField(ArrayOutFields &       outputFields,
00725                                    const ArrayInData &    inputData,
00726                                    const ArrayInFields &  inputFields);
00727 
00758   template<class Scalar, class ArrayOutData, class ArrayInDataLeft, class ArrayInDataRight>
00759   static void dotMultiplyDataData(ArrayOutData &            outputData,
00760                                   const ArrayInDataLeft &   inputDataLeft,
00761                                   const ArrayInDataRight &  inputDataRight);
00762 
00797   template<class Scalar, class ArrayOutFields, class ArrayInData, class ArrayInFields>
00798   static void vectorMultiplyDataField(ArrayOutFields &       outputFields,
00799                                       const ArrayInData &    inputData,
00800                                       const ArrayInFields &  inputFields);
00801 
00835   template<class Scalar, class ArrayOutData, class ArrayInDataLeft, class ArrayInDataRight>
00836   static void vectorMultiplyDataData(ArrayOutData &            outputData,
00837                                      const ArrayInDataLeft &   inputDataLeft,
00838                                      const ArrayInDataRight &  inputDataRight);
00839 
00890   template<class Scalar, class ArrayOutFields, class ArrayInData, class ArrayInFields>
00891   static void tensorMultiplyDataField(ArrayOutFields &       outputFields,
00892                                       const ArrayInData &    inputData,
00893                                       const ArrayInFields &  inputFields,
00894                                       const char             transpose = 'N');
00895 
00945   template<class Scalar, class ArrayOutData, class ArrayInDataLeft, class ArrayInDataRight>
00946   static void tensorMultiplyDataData(ArrayOutData &            outputData,
00947                                      const ArrayInDataLeft &   inputDataLeft,
00948                                      const ArrayInDataRight &  inputDataRight,
00949                                      const char                transpose = 'N');
00950 
00951 
00978   template<class Scalar, class ArrayTypeInOut, class ArrayTypeSign>
00979   static void applyLeftFieldSigns(ArrayTypeInOut        & inoutOperator,
00980                                   const ArrayTypeSign   & fieldSigns);
00981 
01008   template<class Scalar, class ArrayTypeInOut, class ArrayTypeSign>
01009   static void applyRightFieldSigns(ArrayTypeInOut        & inoutOperator,
01010                                    const ArrayTypeSign   & fieldSigns);
01011 
01034   template<class Scalar, class ArrayTypeInOut, class ArrayTypeSign>
01035   static void applyFieldSigns(ArrayTypeInOut        & inoutFunction,
01036                               const ArrayTypeSign   & fieldSigns);
01037 
01038 
01074   template<class Scalar, class ArrayOutPointVals, class ArrayInCoeffs, class ArrayInFields>
01075   static void evaluate(ArrayOutPointVals     & outPointVals,
01076                        const ArrayInCoeffs   & inCoeffs,
01077                        const ArrayInFields   & inFields);
01078   
01079 };  // end FunctionSpaceTools
01080 
01081 } // end namespace Intrepid
01082 
01083 // include templated definitions
01084 #include <Intrepid_FunctionSpaceToolsDef.hpp>
01085 
01086 #endif
01087 
01088 /***************************************************************************************************
01089  **                                                                                               **
01090  **                           D O C U M E N T A T I O N   P A G E S                               **
01091  **                                                                                               **
01092  **************************************************************************************************/
01093