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_DISCRETIZATIONFACTORY_HPP 00008 #define ALBANY_DISCRETIZATIONFACTORY_HPP 00009 00010 #include <vector> 00011 00012 #include "Teuchos_ParameterList.hpp" 00013 #include "Teuchos_RCP.hpp" 00014 #include "Epetra_Comm.h" 00015 00016 #include "Albany_AbstractDiscretization.hpp" 00017 #include "Albany_AbstractMeshStruct.hpp" 00018 #include "Albany_AbstractFieldContainer.hpp" 00019 00020 #include "Piro_NullSpaceUtils.hpp" 00021 00022 #ifdef ALBANY_CUTR 00023 #include "CUTR_CubitMeshMover.hpp" 00024 #endif 00025 00026 namespace Albany { 00027 00031 class DiscretizationFactory { 00032 public: 00033 00035 DiscretizationFactory( 00036 const Teuchos::RCP<Teuchos::ParameterList>& topLevelParams, 00037 const Teuchos::RCP<const Epetra_Comm>& epetra_comm 00038 ); 00039 00041 ~DiscretizationFactory() {} 00042 00044 #ifdef ALBANY_CUTR 00045 void setMeshMover(const Teuchos::RCP<CUTR::CubitMeshMover>& meshMover_); 00046 #endif 00047 00048 Teuchos::RCP<Albany::AbstractMeshStruct> getMeshStruct() { 00049 return meshStruct; 00050 } 00051 00052 Teuchos::ArrayRCP<Teuchos::RCP<Albany::MeshSpecsStruct> > createMeshSpecs(); 00053 00054 Teuchos::RCP<Albany::AbstractDiscretization> 00055 createDiscretization(unsigned int num_equations, 00056 const Teuchos::RCP<Albany::StateInfoStruct>& sis, 00057 const AbstractFieldContainer::FieldContainerRequirements& req, 00058 const Teuchos::RCP<Piro::MLRigidBodyModes>& rigidBodyModes = Teuchos::null); 00059 00060 void 00061 setupInternalMeshStruct( 00062 unsigned int neq, 00063 const Teuchos::RCP<Albany::StateInfoStruct>& sis, 00064 const AbstractFieldContainer::FieldContainerRequirements& req); 00065 00066 Teuchos::RCP<Albany::AbstractDiscretization> createDiscretizationFromInternalMeshStruct( 00067 const Teuchos::RCP<Piro::MLRigidBodyModes>& rigidBodyModes); 00068 00069 00070 private: 00071 00073 DiscretizationFactory(const DiscretizationFactory&); 00074 00076 DiscretizationFactory& operator=(const DiscretizationFactory&); 00077 00078 protected: 00079 00081 Teuchos::RCP<Teuchos::ParameterList> discParams; 00082 00084 Teuchos::RCP<Teuchos::ParameterList> adaptParams; 00085 00087 Teuchos::RCP<Teuchos::ParameterList> piroParams; 00088 00090 Teuchos::RCP<Teuchos::ParameterList> catalystParams; 00091 00092 Teuchos::RCP<const Epetra_Comm> epetra_comm; 00093 00094 #ifdef ALBANY_CUTR 00095 Teuchos::RCP<CUTR::CubitMeshMover> meshMover; 00096 #endif 00097 00098 Teuchos::RCP<Albany::AbstractMeshStruct> meshStruct; 00099 00100 }; 00101 00102 } 00103 00104 #endif // ALBANY_DISCRETIZATIONFACTORY_HPP