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

AlbPUMI_FMDBMeshStruct.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 ALBPUMI_FMDBMESHSTRUCT_HPP
00008 #define ALBPUMI_FMDBMESHSTRUCT_HPP
00009 
00010 #include "Albany_AbstractMeshStruct.hpp"
00011 #include "AlbPUMI_QPData.hpp"
00012 #include "AlbPUMI_NodeData.hpp"
00013 
00014 #include "Teuchos_RCP.hpp"
00015 #include "Teuchos_ParameterList.hpp"
00016 #include "Albany_StateInfoStruct.hpp"
00017 #include "EpetraExt_MultiComm.h"
00018 #include <PHAL_Dimension.hpp>
00019 
00020 #include "pumi_mesh.h"
00021 #include "pumi_geom.h"
00022 
00023 #ifdef SCOREC_ACIS
00024 #include "pumi_geom_acis.h"
00025 #endif
00026 #ifdef SCOREC_PARASOLID
00027 #include "pumi_geom_parasolid.h"
00028 #endif
00029 
00030 #include <apf.h>
00031 #include <apfMesh2.h>
00032 #include <apfPUMI.h>
00033 
00034 #define NG_EX_ENTITY_TYPE_MAX 15
00035 #define ENT_DIMS 4
00036 
00037 namespace AlbPUMI {
00038 
00039   class FMDBMeshStruct : public Albany::AbstractMeshStruct {
00040 
00041   public:
00042 
00043     FMDBMeshStruct(
00044                   const Teuchos::RCP<Teuchos::ParameterList>& params,
00045                   const Teuchos::RCP<const Epetra_Comm>& epetra_comm);
00046 
00047     ~FMDBMeshStruct();
00048 
00049     void setFieldAndBulkData(
00050                   const Teuchos::RCP<const Epetra_Comm>& comm,
00051                   const Teuchos::RCP<Teuchos::ParameterList>& params,
00052                   const unsigned int neq_,
00053                   const Albany::AbstractFieldContainer::FieldContainerRequirements& req,
00054                   const Teuchos::RCP<Albany::StateInfoStruct>& sis,
00055                   const unsigned int worksetSize);
00056 
00057     void splitFields(Teuchos::Array<std::string> fieldLayout);
00058 
00059     Teuchos::ArrayRCP<Teuchos::RCP<Albany::MeshSpecsStruct> >& getMeshSpecs();
00060 
00061     std::vector<Teuchos::RCP<QPData<double, 1> > > scalarValue_states;
00062     std::vector<Teuchos::RCP<QPData<double, 2> > > qpscalar_states;
00063     std::vector<Teuchos::RCP<QPData<double, 3> > > qpvector_states;
00064     std::vector<Teuchos::RCP<QPData<double, 4> > > qptensor_states;
00065 
00066     std::vector<std::string> nsNames;
00067     std::vector<std::string> ssNames;
00068 
00069     msType meshSpecsType();
00070     pMeshMdl getMesh() { return mesh; }
00071     pumi::pGModel getMdl() { return model; }
00072 
00073     // Solution history
00074     int solutionFieldHistoryDepth;
00075     void loadSolutionFieldHistory(int step);
00076 
00077     bool useCompositeTet(){ return compositeTet; }
00078 
00079     const Albany::DynamicDataArray<Albany::CellSpecs>::type& getMeshDynamicData() const
00080         { return meshDynamicData; }
00081 
00083     void setupMeshBlkInfo();
00084 
00085     bool hasRestartSolution;
00086     double restartDataTime;
00087     int neq;
00088     int numDim;
00089     int cubatureDegree;
00090     bool interleavedOrdering;
00091     apf::Mesh2* apfMesh;
00092     bool solutionInitialized;
00093     bool residualInitialized;
00094 
00095     Teuchos::Array<std::string> solVectorLayout;
00096     Teuchos::Array<std::string> resVectorLayout;
00097 
00098     double time;
00099 
00100     // Info to map element block to physics set
00101     bool allElementBlocksHaveSamePhysics;
00102     std::map<std::string, int> ebNameToIndex;
00103 
00104     int worksetSize;
00105 
00106     std::string outputFileName;
00107     int outputInterval;
00108     int useDistributedMesh;
00109 
00110 private:
00111 
00112     Teuchos::RCP<const Teuchos::ParameterList>
00113       getValidDiscretizationParameters() const;
00114 
00115     const CellTopologyData *getCellTopologyData(const FMDB_EntTopo topo);
00116 
00118     int computeWorksetSize(const int worksetSizeMax, const int ebSizeMax) const;
00119 
00120     Teuchos::RCP<Teuchos::FancyOStream> out;
00121 
00122     Teuchos::ArrayRCP<Teuchos::RCP<Albany::MeshSpecsStruct> > meshSpecs;
00123 
00124     // Information that changes when the mesh adapts
00125     Albany::DynamicDataArray<Albany::CellSpecs>::type meshDynamicData;
00126 
00127     pumi::pGModel model;
00128     pMeshMdl mesh;
00129 
00130     bool compositeTet;
00131 
00132 #ifndef SCOREC_ACIS
00133     int PUMI_Geom_RegisterAcis() {
00134       fprintf(stderr,"ERROR: FMDB Discretization -> Cannot find Acis\n");
00135       exit(1);
00136     }
00137 #endif
00138 #ifndef SCOREC_PARASOLID
00139     int PUMI_Geom_RegisterParasolid() {
00140       fprintf(stderr,"ERROR: FMDB Discretization -> Cannot find Parasolid\n");
00141       exit(1);
00142     }
00143 #endif
00144 
00145   };
00146 
00147 }
00148 #endif

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