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 #if !defined(AAdapt_CopyRemesh_hpp) 00008 #define AAdapt_CopyRemesh_hpp 00009 00010 #include <Teuchos_RCP.hpp> 00011 #include <Teuchos_ParameterList.hpp> 00012 00013 #include <Phalanx.hpp> 00014 #include <PHAL_Workset.hpp> 00015 #include <PHAL_Dimension.hpp> 00016 00017 #include "AAdapt_AbstractAdapter.hpp" 00018 #include "Albany_STKDiscretization.hpp" 00019 00020 namespace AAdapt { 00021 00025 class CopyRemesh : public AbstractAdapter { 00026 public: 00027 00031 CopyRemesh(const Teuchos::RCP<Teuchos::ParameterList>& params, 00032 const Teuchos::RCP<ParamLib>& param_lib, 00033 Albany::StateManager& state_mgr, 00034 const Teuchos::RCP<const Epetra_Comm>& comm); 00035 00039 ~CopyRemesh(); 00040 00045 virtual 00046 bool 00047 queryAdaptationCriteria(); 00048 00053 virtual 00054 bool 00055 adaptMesh(const Epetra_Vector& solution, const Epetra_Vector& ovlp_solution); 00056 00060 virtual 00061 void 00062 solutionTransfer(const Epetra_Vector& oldSolution, 00063 Epetra_Vector& newSolution); 00064 00068 Teuchos::RCP<const Teuchos::ParameterList> 00069 getValidAdapterParameters() const; 00070 00071 private: 00072 00076 CopyRemesh(); 00077 00081 CopyRemesh(const CopyRemesh&); 00082 CopyRemesh& operator=(const CopyRemesh&); 00083 00084 stk::mesh::BulkData* bulk_data_; 00085 00086 Teuchos::RCP<Albany::AbstractSTKMeshStruct> stk_mesh_struct_; 00087 00088 Teuchos::RCP<Albany::AbstractDiscretization> discretization_; 00089 00090 Albany::STKDiscretization* stk_discretization_; 00091 00092 stk::mesh::fem::FEMMetaData* meta_data_; 00093 00094 stk::mesh::EntityRank node_rank_; 00095 stk::mesh::EntityRank edge_rank_; 00096 stk::mesh::EntityRank face_rank_; 00097 stk::mesh::EntityRank element_rank_; 00098 00099 int num_dim_; 00100 int remesh_file_index_; 00101 std::string base_exo_filename_; 00102 00103 }; 00104 00105 } 00106 00107 #endif //CopyRemesh_hpp