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

Albany_OrdinarySTKFieldContainer.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 ALBANY_ORDINARYSTKFIELDCONT_HPP
00008 #define ALBANY_ORDINARYSTKFIELDCONT_HPP
00009 
00010 #include "Albany_GenericSTKFieldContainer.hpp"
00011 
00012 namespace Albany {
00013 
00014 template<bool Interleaved>
00015 
00016 class OrdinarySTKFieldContainer : public GenericSTKFieldContainer<Interleaved> {
00017 
00018   public:
00019 
00020     OrdinarySTKFieldContainer(const Teuchos::RCP<Teuchos::ParameterList>& params_,
00021                               stk::mesh::fem::FEMMetaData* metaData_,
00022                               stk::mesh::BulkData* bulkData_,
00023                               const int neq_,
00024                               const AbstractFieldContainer::FieldContainerRequirements& req,
00025                               const int numDim_,
00026                               const Teuchos::RCP<Albany::StateInfoStruct>& sis);
00027 
00028     ~OrdinarySTKFieldContainer();
00029 
00030     bool hasResidualField(){ return (residual_field != NULL); }
00031     bool hasSurfaceHeightField(){ return buildSurfaceHeight; }
00032     bool hasTemperatureField(){ return buildTemperature; }
00033     bool hasBasalFrictionField(){ return buildBasalFriction; }
00034     bool hasThicknessField(){ return buildThickness; }
00035     bool hasFlowFactorField(){ return buildFlowFactor; }
00036     bool hasSurfaceVelocityField(){ return buildSurfaceVelocity; }
00037     bool hasVelocityRMSField(){ return buildVelocityRMS; }
00038 
00039     AbstractSTKFieldContainer::VectorFieldType* getSolutionField(){ return solution_field; };
00040 
00041     void fillSolnVector(Epetra_Vector& soln, stk::mesh::Selector& sel, const Teuchos::RCP<Epetra_Map>& node_map);
00042     void saveSolnVector(const Epetra_Vector& soln, stk::mesh::Selector& sel, const Teuchos::RCP<Epetra_Map>& node_map);
00043     void saveResVector(const Epetra_Vector& res, stk::mesh::Selector& sel, const Teuchos::RCP<Epetra_Map>& node_map);
00044 
00045     void transferSolutionToCoords();
00046 
00047   private:
00048 
00049     void initializeSTKAdaptation();
00050 
00051     bool buildSurfaceHeight;
00052     bool buildTemperature;
00053     bool buildBasalFriction;
00054     bool buildThickness;
00055     bool buildFlowFactor;
00056     bool buildSurfaceVelocity;
00057     bool buildVelocityRMS;
00058 
00059     AbstractSTKFieldContainer::VectorFieldType* solution_field;
00060     AbstractSTKFieldContainer::VectorFieldType* residual_field;
00061 
00062 };
00063 
00064 } // namespace Albany
00065 
00066 
00067 
00068 // Define macro for explicit template instantiation
00069 #define ORDINARYSTKFIELDCONTAINER_INSTANTIATE_TEMPLATE_CLASS_NONINTERLEAVED(name) \
00070   template class name<false>;
00071 #define ORDINARYSTKFIELDCONTAINER_INSTANTIATE_TEMPLATE_CLASS_INTERLEAVED(name) \
00072   template class name<true>;
00073 
00074 #define ORDINARYSTKFIELDCONTAINER_INSTANTIATE_TEMPLATE_CLASS(name) \
00075   ORDINARYSTKFIELDCONTAINER_INSTANTIATE_TEMPLATE_CLASS_NONINTERLEAVED(name) \
00076   ORDINARYSTKFIELDCONTAINER_INSTANTIATE_TEMPLATE_CLASS_INTERLEAVED(name)
00077 
00078 
00079 #endif

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