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

PHAL_MapToPhysicalFrame_Def.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 #include "Teuchos_TestForException.hpp"
00008 #include "Phalanx_DataLayout.hpp"
00009 
00010 #include "Intrepid_FunctionSpaceTools.hpp"
00011 
00012 namespace PHAL {
00013 
00014 //**********************************************************************
00015 template<typename EvalT, typename Traits>
00016 MapToPhysicalFrame<EvalT, Traits>::
00017 MapToPhysicalFrame(const Teuchos::ParameterList& p,
00018                               const Teuchos::RCP<Albany::Layouts>& dl) :
00019   coords_vertices  (p.get<std::string>  ("Coordinate Vector Name"), dl->vertices_vector),
00020   cubature         (p.get<Teuchos::RCP <Intrepid::Cubature<RealType> > >("Cubature")),
00021   cellType         (p.get<Teuchos::RCP <shards::CellTopology> > ("Cell Type")),
00022   coords_qp        (p.get<std::string>  ("Coordinate Vector Name"), dl->qp_gradient)
00023 {
00024   this->addDependentField(coords_vertices);
00025   this->addEvaluatedField(coords_qp);
00026 
00027   // Get Dimensions
00028   std::vector<PHX::DataLayout::size_type> dims;
00029   dl->qp_gradient->dimensions(dims);
00030 
00031   // Compute cubature points in reference elements
00032   refPoints.resize(dims[1],dims[2]);
00033   refWeights.resize(dims[1]);
00034   cubature->getCubature(refPoints, refWeights); 
00035 
00036   this->setName("MapToPhysicalFrame"+PHX::TypeString<EvalT>::value);
00037 }
00038 
00039 //**********************************************************************
00040 template<typename EvalT, typename Traits>
00041 void MapToPhysicalFrame<EvalT, Traits>::
00042 postRegistrationSetup(typename Traits::SetupData d,
00043                       PHX::FieldManager<Traits>& fm)
00044 {
00045   this->utils.setFieldData(coords_vertices,fm);
00046   this->utils.setFieldData(coords_qp,fm);
00047 
00048 }
00049 
00050 //**********************************************************************
00051 template<typename EvalT, typename Traits>
00052 void MapToPhysicalFrame<EvalT, Traits>::
00053 evaluateFields(typename Traits::EvalData workset)
00054 {
00055   
00056   Intrepid::CellTools<RealType>::mapToPhysicalFrame
00057        (coords_qp, refPoints, coords_vertices, *cellType);
00058 }
00059 
00060 //**********************************************************************
00061 }
00062 

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