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

Aeras_ComputeBasisFunctions.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 
00007 #ifndef AERAS_COMPUTEBASISFUNCTIONS_HPP
00008 #define AERAS_COMPUTEBASISFUNCTIONS_HPP
00009 
00010 #include "Phalanx_ConfigDefs.hpp"
00011 #include "Phalanx_Evaluator_WithBaseImpl.hpp"
00012 #include "Phalanx_Evaluator_Derived.hpp"
00013 #include "Phalanx_MDField.hpp"
00014 
00015 #include "Albany_Layouts.hpp"
00016 
00017 #include "Intrepid_CellTools.hpp"
00018 #include "Intrepid_Cubature.hpp"
00019 
00020 namespace Aeras {
00021 
00028 template<typename EvalT, typename Traits>
00029 class ComputeBasisFunctions : public PHX::EvaluatorWithBaseImpl<Traits>,
00030        public PHX::EvaluatorDerived<EvalT, Traits>  {
00031 
00032 public:
00033 
00034   ComputeBasisFunctions(const Teuchos::ParameterList& p,
00035                               const Teuchos::RCP<Albany::Layouts>& dl);
00036 
00037   void postRegistrationSetup(typename Traits::SetupData d,
00038                       PHX::FieldManager<Traits>& vm);
00039 
00040   void evaluateFields(typename Traits::EvalData d);
00041 
00042 private:
00043 
00044   typedef typename EvalT::MeshScalarT MeshScalarT;
00045   int  numVertices, numDims, numNodes, numQPs;
00046 
00047   // Input:
00049   PHX::MDField<MeshScalarT,Cell,Vertex,Dim> coordVec;
00050   Teuchos::RCP<Intrepid::Cubature<RealType> > cubature;
00051   Teuchos::RCP<Intrepid::Basis<RealType, Intrepid::FieldContainer<RealType> > > intrepidBasis;
00052   Teuchos::RCP<shards::CellTopology> cellType;
00053 
00054   // Temporary FieldContainers
00055   Intrepid::FieldContainer<RealType>    val_at_cub_points;
00056   Intrepid::FieldContainer<RealType>    grad_at_cub_points;
00057   Intrepid::FieldContainer<RealType>    refPoints;
00058   Intrepid::FieldContainer<RealType>    refWeights;
00059 
00060   // Output:
00062   PHX::MDField<MeshScalarT,Cell,QuadPoint> weighted_measure;
00063   PHX::MDField<RealType,Cell,Node,QuadPoint> BF;
00064   PHX::MDField<MeshScalarT,Cell,QuadPoint,Dim>   sphere_coord; 
00065   PHX::MDField<MeshScalarT,Cell,QuadPoint>     jacobian_det; 
00066   PHX::MDField<MeshScalarT,Cell,QuadPoint,Dim,Dim> jacobian_inv;
00067   PHX::MDField<MeshScalarT,Cell,QuadPoint,Dim,Dim> jacobian;
00068   PHX::MDField<MeshScalarT,Cell,Node,QuadPoint> wBF;
00069   PHX::MDField<MeshScalarT,Cell,Node,QuadPoint,Dim> GradBF;
00070   PHX::MDField<MeshScalarT,Cell,Node,QuadPoint,Dim> wGradBF;
00071 
00072   void div_check(const int spatialDim, const int numelements) const;
00073   void spherical_divergence(Intrepid::FieldContainer<MeshScalarT> &,
00074                             const Intrepid::FieldContainer<MeshScalarT> &,
00075                             const int e,
00076                             const double rrearth=1) const;
00077   void initialize_grad(Intrepid::FieldContainer<RealType> &) const;
00078 
00079 };
00080 }
00081 
00082 #endif

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