Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007 #ifndef ALBANY_MULTISTKFIELDCONT_HPP
00008 #define ALBANY_MULTISTKFIELDCONT_HPP
00009
00010 #include "Albany_GenericSTKFieldContainer.hpp"
00011 #include "Teuchos_Array.hpp"
00012
00013 namespace Albany {
00014
00015 template<bool Interleaved>
00016
00017 class MultiSTKFieldContainer : public GenericSTKFieldContainer<Interleaved> {
00018
00019 public:
00020
00021 MultiSTKFieldContainer(const Teuchos::RCP<Teuchos::ParameterList>& params_,
00022 stk::mesh::fem::FEMMetaData* metaData_,
00023 stk::mesh::BulkData* bulkData_,
00024 const int neq_,
00025 const AbstractFieldContainer::FieldContainerRequirements& req,
00026 const int numDim_,
00027 const Teuchos::RCP<Albany::StateInfoStruct>& sis,
00028 const Teuchos::Array<std::string>& solution_vector,
00029 const Teuchos::Array<std::string>& residual_vector);
00030
00031 ~MultiSTKFieldContainer();
00032
00033 bool hasResidualField(){ return haveResidual; }
00034 bool hasSurfaceHeightField(){ return false; }
00035 bool hasTemperatureField(){ return false; }
00036 bool hasBasalFrictionField(){ return false; }
00037 bool hasThicknessField(){ return false; }
00038 bool hasFlowFactorField(){ return false; }
00039 bool hasSurfaceVelocityField(){ return false; }
00040 bool hasVelocityRMSField(){ return false; }
00041
00042 void fillSolnVector(Epetra_Vector& soln, stk::mesh::Selector& sel, const Teuchos::RCP<Epetra_Map>& node_map);
00043 void saveSolnVector(const Epetra_Vector& soln, stk::mesh::Selector& sel, const Teuchos::RCP<Epetra_Map>& node_map);
00044 void saveResVector(const Epetra_Vector& res, stk::mesh::Selector& sel, const Teuchos::RCP<Epetra_Map>& node_map);
00045
00046 void transferSolutionToCoords();
00047
00048 private:
00049
00050 void initializeSTKAdaptation();
00051
00052 bool haveResidual;
00053
00054
00055
00056 std::vector<std::string> sol_vector_name;
00057 std::vector<int> sol_index;
00058
00059 std::vector<std::string> res_vector_name;
00060 std::vector<int> res_index;
00061
00062 };
00063
00064 }
00065
00066
00067
00068
00069 #define MULTISTKFIELDCONTAINER_INSTANTIATE_TEMPLATE_CLASS_NONINTERLEAVED(name) \
00070 template class name<false>;
00071 #define MULTISTKFIELDCONTAINER_INSTANTIATE_TEMPLATE_CLASS_INTERLEAVED(name) \
00072 template class name<true>;
00073
00074 #define MULTISTKFIELDCONTAINER_INSTANTIATE_TEMPLATE_CLASS(name) \
00075 MULTISTKFIELDCONTAINER_INSTANTIATE_TEMPLATE_CLASS_NONINTERLEAVED(name) \
00076 MULTISTKFIELDCONTAINER_INSTANTIATE_TEMPLATE_CLASS_INTERLEAVED(name)
00077
00078
00079 #endif