Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Panzer_STK_CubeHexMeshFactory.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Panzer: A partial differential equation assembly
4 // engine for strongly coupled complex multiphysics systems
5 //
6 // Copyright 2011 NTESS and the Panzer contributors.
7 // SPDX-License-Identifier: BSD-3-Clause
8 // *****************************************************************************
9 // @HEADER
10 
11 #ifndef __Panzer_STK_CubeHexMeshFactory_hpp__
12 #define __Panzer_STK_CubeHexMeshFactory_hpp__
13 
14 #include <Panzer_Traits.hpp> // for panzer::GlobalOrdinal
16 #include <Panzer_STK_Interface.hpp>
17 
18 namespace panzer_stk {
19 
20 class STK_Interface;
21 
28 public:
31 
33  virtual ~CubeHexMeshFactory();
34 
36  Teuchos::RCP<STK_Interface> buildMesh(stk::ParallelMachine parallelMach) const;
37 
38  virtual Teuchos::RCP<STK_Interface> buildUncommitedMesh(stk::ParallelMachine parallelMach) const;
39  virtual void completeMeshConstruction(STK_Interface & mesh,stk::ParallelMachine parallelMach) const;
40 
43 
46 
48  Teuchos::Tuple<std::size_t,3> procRankToProcTuple(std::size_t procRank) const;
49 
50 protected:
52 
53  void buildMetaData(stk::ParallelMachine parallelMach,STK_Interface & mesh) const;
54  void buildElements(stk::ParallelMachine parallelMach,STK_Interface & mesh) const;
55  void buildBlock(stk::ParallelMachine machRank,int xBlock,int yBlock,int zBlock,STK_Interface & mesh) const;
56 
57  std::pair<panzer::GlobalOrdinal,panzer::GlobalOrdinal> determineXElemSizeAndStart(int xBlock,unsigned int size,unsigned int rank) const;
58  std::pair<panzer::GlobalOrdinal,panzer::GlobalOrdinal> determineYElemSizeAndStart(int yBlock,unsigned int size,unsigned int rank) const;
59  std::pair<panzer::GlobalOrdinal,panzer::GlobalOrdinal> determineZElemSizeAndStart(int zBlock,unsigned int size,unsigned int rank) const;
60 
61  void addSides(STK_Interface & mesh) const; // this adds side entities only (does not inject them into side sets)
62  void addSideSets(STK_Interface & mesh) const;
63  void addNodeSets(STK_Interface & mesh) const;
64  void addEdgeBlocks(STK_Interface & mesh) const;
65  void addFaceBlocks(STK_Interface & mesh) const;
66 
67  double x0_, y0_, z0_;
68  double xf_, yf_, zf_;
69 
71 
72  panzer::GlobalOrdinal nXElems_, nYElems_, nZElems_;
73 
74  mutable int xProcs_, yProcs_, zProcs_;
75 
76  mutable unsigned int machRank_, machSize_;
77 
82 
84 
85  std::string edgeBlockName_;
86  std::string faceBlockName_;
87 };
88 
89 }
90 
91 #endif
void addSides(STK_Interface &mesh) const
void addEdgeBlocks(STK_Interface &mesh) const
void addFaceBlocks(STK_Interface &mesh) const
void buildMetaData(stk::ParallelMachine parallelMach, STK_Interface &mesh) const
void buildElements(stk::ParallelMachine parallelMach, STK_Interface &mesh) const
void addSideSets(STK_Interface &mesh) const
void buildBlock(stk::ParallelMachine machRank, int xBlock, int yBlock, int zBlock, STK_Interface &mesh) const
void addNodeSets(STK_Interface &mesh) const
void setParameterList(const Teuchos::RCP< Teuchos::ParameterList > &paramList)
From ParameterListAcceptor.
std::pair< panzer::GlobalOrdinal, panzer::GlobalOrdinal > determineZElemSizeAndStart(int zBlock, unsigned int size, unsigned int rank) const
Teuchos::Tuple< std::size_t, 3 > procTuple_
Teuchos::RCP< STK_Interface > buildMesh(stk::ParallelMachine parallelMach) const
Build the mesh object.
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
From ParameterListAcceptor.
std::pair< panzer::GlobalOrdinal, panzer::GlobalOrdinal > determineXElemSizeAndStart(int xBlock, unsigned int size, unsigned int rank) const
std::pair< panzer::GlobalOrdinal, panzer::GlobalOrdinal > determineYElemSizeAndStart(int yBlock, unsigned int size, unsigned int rank) const
virtual Teuchos::RCP< STK_Interface > buildUncommitedMesh(stk::ParallelMachine parallelMach) const
virtual void completeMeshConstruction(STK_Interface &mesh, stk::ParallelMachine parallelMach) const
Teuchos::Tuple< std::size_t, 3 > procRankToProcTuple(std::size_t procRank) const
what is the 3D tuple describe this processor distribution