Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Panzer_STK_CubeTetMeshFactory.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_CubeTetMeshFactory_hpp__
12 #define __Panzer_STK_CubeTetMeshFactory_hpp__
13 
15 #include <Panzer_STK_Interface.hpp>
16 
17 namespace panzer_stk {
18 
19 class STK_Interface;
20 
27 public:
30 
32  virtual ~CubeTetMeshFactory();
33 
35  Teuchos::RCP<STK_Interface> buildMesh(stk::ParallelMachine parallelMach) const;
36 
37  virtual Teuchos::RCP<STK_Interface> buildUncommitedMesh(stk::ParallelMachine parallelMach) const;
38  virtual void completeMeshConstruction(STK_Interface & mesh,stk::ParallelMachine parallelMach) const;
39 
42 
45 
47  Teuchos::Tuple<std::size_t,3> procRankToProcTuple(std::size_t procRank) const;
48 
49 protected:
51 
52  void buildMetaData(stk::ParallelMachine parallelMach,STK_Interface & mesh) const;
53  void buildElements(stk::ParallelMachine parallelMach,STK_Interface & mesh) const;
54  void buildBlock(stk::ParallelMachine machRank,int xBlock,int yBlock,int zBlock,STK_Interface & mesh) const;
55 
56  std::pair<int,int> determineXElemSizeAndStart(int xBlock,unsigned int size,unsigned int rank) const;
57  std::pair<int,int> determineYElemSizeAndStart(int yBlock,unsigned int size,unsigned int rank) const;
58  std::pair<int,int> determineZElemSizeAndStart(int zBlock,unsigned int size,unsigned int rank) const;
59 
60  void addSideSets(STK_Interface & mesh) const;
61  void addNodeSets(STK_Interface & mesh) const;
62  void addEdgeBlocks(STK_Interface & mesh) const;
63  void addFaceBlocks(STK_Interface & mesh) const;
64 
65  void buildTetsOnHex(const Teuchos::Tuple<int,3> & meshDesc,
66  const Teuchos::Tuple<int,3> & element,
67  stk::mesh::Part * block,
68  const std::vector<stk::mesh::EntityId> & h_nodes,
69  STK_Interface & mesh) const;
70 
71  double x0_, y0_, z0_;
72  double xf_, yf_, zf_;
73 
75 
77 
78  mutable int xProcs_, yProcs_, zProcs_;
79 
80  mutable unsigned int machRank_, machSize_;
81 
83 
86 
87  std::string edgeBlockName_;
88  std::string faceBlockName_;
89 };
90 
91 }
92 
93 #endif
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
From ParameterListAcceptor.
std::pair< int, int > determineYElemSizeAndStart(int yBlock, unsigned int size, unsigned int rank) const
Teuchos::RCP< STK_Interface > buildMesh(stk::ParallelMachine parallelMach) const
Build the mesh object.
void addFaceBlocks(STK_Interface &mesh) const
std::pair< int, int > determineZElemSizeAndStart(int zBlock, unsigned int size, unsigned int rank) const
virtual Teuchos::RCP< STK_Interface > buildUncommitedMesh(stk::ParallelMachine parallelMach) 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 setParameterList(const Teuchos::RCP< Teuchos::ParameterList > &paramList)
From ParameterListAcceptor.
std::pair< int, int > determineXElemSizeAndStart(int xBlock, unsigned int size, unsigned int rank) const
void addEdgeBlocks(STK_Interface &mesh) const
Teuchos::Tuple< std::size_t, 3 > procRankToProcTuple(std::size_t procRank) const
what is the 3D tuple describe this processor distribution
void buildMetaData(stk::ParallelMachine parallelMach, STK_Interface &mesh) const
void buildTetsOnHex(const Teuchos::Tuple< int, 3 > &meshDesc, const Teuchos::Tuple< int, 3 > &element, stk::mesh::Part *block, const std::vector< stk::mesh::EntityId > &h_nodes, STK_Interface &mesh) const
virtual void completeMeshConstruction(STK_Interface &mesh, stk::ParallelMachine parallelMach) const
Teuchos::Tuple< std::size_t, 3 > procTuple_
void addNodeSets(STK_Interface &mesh) const