• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

FaceAverage.hpp

Go to the documentation of this file.
00001 //*****************************************************************//
00002 //    Albany 2.0:  Copyright 2012 Sandia Corporation               //
00003 //    This Software is released under the BSD license detailed     //
00004 //    in the file "license.txt" in the top-level Albany directory  //
00005 //*****************************************************************//
00006 #ifndef FACE_AVERAGE_HPP_
00007 #define FACE_AVERAGE_HPP_
00008 
00009 #include "Phalanx_ConfigDefs.hpp"
00010 #include "Phalanx_Evaluator_WithBaseImpl.hpp"
00011 #include "Phalanx_Evaluator_Derived.hpp"
00012 #include "Phalanx_MDField.hpp"
00013 
00014 #include "Intrepid_CellTools.hpp"
00015 #include "Intrepid_Cubature.hpp"
00016 
00017 namespace LCM {
00024 template<typename EvalT, typename Traits>
00025 class FaceAverage : public PHX::EvaluatorWithBaseImpl<Traits>,
00026   public PHX::EvaluatorDerived<EvalT, Traits>  {
00027 
00028   public:
00029 
00030       FaceAverage(const Teuchos::ParameterList& p);
00031 
00032       void postRegistrationSetup(typename Traits::SetupData d,
00033                         PHX::FieldManager<Traits>& vm);
00034 
00035       void evaluateFields(typename Traits::EvalData d);
00036 
00037     private:
00038 
00039       typedef typename EvalT::ScalarT ScalarT;
00040       typedef typename EvalT::MeshScalarT MeshScalarT;
00041 
00042       unsigned int numNodes;
00043       unsigned int numDims;
00044       unsigned int numFaces;
00045       unsigned int numComp; // length of the vector
00046       unsigned int worksetSize;
00047       unsigned int faceDim;
00048       unsigned int numFaceNodes;
00049       unsigned int numQPs;
00050 
00051       // Input:
00052       // Coordinates in the reference configuration
00053       PHX::MDField<ScalarT,Cell,Vertex,Dim> coordinates;
00054 
00055       // The field that was projected to the nodes
00056       PHX::MDField<ScalarT,Cell,Node,VecDim> projected;
00057       //Numerical integration rule
00058       Teuchos::RCP<Intrepid::Cubature<RealType> > cubature;
00059       // FE basis
00060       Teuchos::RCP<Intrepid::Basis<RealType, Intrepid::FieldContainer<RealType> > > intrepidBasis;
00061       // The cell type
00062       Teuchos::RCP<shards::CellTopology> cellType;
00063 
00064       //Output:
00065       // As a test, output the face average of the nodal field
00066       PHX::MDField<ScalarT,Cell,Face,VecDim> faceAve;
00067 
00068       // This is in here to trick the code to run the evaluator - does absolutely nothing
00069       PHX::MDField<ScalarT,Cell> temp;
00070 
00071       // For creating the quadrature weights
00072       Intrepid::FieldContainer<RealType> refPoints;
00073       Intrepid::FieldContainer<RealType> refWeights;
00074       Intrepid::FieldContainer<RealType> refValues;
00075 
00076       // Face topology data
00077       const struct CellTopologyData_Subcell * sides;
00078 
00079 };
00080 
00081 } // namespace LCM
00082 
00083 
00084 #endif /* FACEAVERAGE_HPP_ */

Generated on Wed Mar 26 2014 18:36:38 for Albany: a Trilinos-based PDE code by  doxygen 1.7.1