Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Panzer_STK_SquareQuadMeshFactory.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_SquareQuadMeshFactory_hpp__
12 #define __Panzer_STK_SquareQuadMeshFactory_hpp__
13 
15 #include <Panzer_STK_Interface.hpp>
16 
17 namespace panzer_stk {
18 
19 class STK_Interface;
20 
33 public:
36 
39 
41  Teuchos::RCP<STK_Interface> buildMesh(stk::ParallelMachine parallelMach) const;
42 
43  virtual Teuchos::RCP<STK_Interface> buildUncommitedMesh(stk::ParallelMachine parallelMach) const;
44  virtual void completeMeshConstruction(STK_Interface & mesh,stk::ParallelMachine parallelMach) const;
45 
48 
51 
53  Teuchos::Tuple<std::size_t,2> procRankToProcTuple(std::size_t procRank) const;
54 
55 protected:
57 
58  void buildMetaData(stk::ParallelMachine parallelMach,STK_Interface & mesh) const;
59  void buildElements(stk::ParallelMachine parallelMach,STK_Interface & mesh) const;
60  void buildBlock(stk::ParallelMachine machRank,int xBlock,int yBlock,STK_Interface & mesh) const;
61 
62  std::pair<int,int> determineXElemSizeAndStart(int xBlock,unsigned int size,unsigned int rank) const;
63  std::pair<int,int> determineYElemSizeAndStart(int yBlock,unsigned int size,unsigned int rank) const;
64 
65  void addSideSets(STK_Interface & mesh) const;
66  void addNodeSets(STK_Interface & mesh) const;
67  void addEdgeBlocks(STK_Interface & mesh) const;
68 
69  double x0_, y0_;
70  double xf_, yf_;
71 
73 
75  mutable int xProcs_, yProcs_;
76 
77  mutable unsigned int machRank_, machSize_;
79 
81 
84  mutable stk::mesh::EntityId offset_;
85 
86  std::string edgeBlockName_;
87 };
88 
89 }
90 
91 #endif
virtual Teuchos::RCP< STK_Interface > buildUncommitedMesh(stk::ParallelMachine parallelMach) const
std::pair< int, int > determineXElemSizeAndStart(int xBlock, unsigned int size, unsigned int rank) const
void buildElements(stk::ParallelMachine parallelMach, STK_Interface &mesh) const
bool offsetGIDs_
If true, offset mesh GIDs to exercise 32-bit limits.
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.
SquareQuadMeshFactory(bool enableRebalance=false)
Constructor.
void buildBlock(stk::ParallelMachine machRank, int xBlock, int yBlock, STK_Interface &mesh) const
Teuchos::Tuple< std::size_t, 2 > procRankToProcTuple(std::size_t procRank) const
what is the 2D tuple describe this processor distribution
void buildMetaData(stk::ParallelMachine parallelMach, STK_Interface &mesh) const
void enableRebalance(bool enable, const Teuchos::RCP< const Teuchos::ParameterList > &rebalanceList=Teuchos::null)
void setParameterList(const Teuchos::RCP< Teuchos::ParameterList > &paramList)
From ParameterListAcceptor.
virtual void completeMeshConstruction(STK_Interface &mesh, stk::ParallelMachine parallelMach) const
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
From ParameterListAcceptor.