Panzer Version of the Day
Loading...
Searching...
No Matches
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
17
18namespace panzer_stk {
19
20class STK_Interface;
21
28public:
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
42 void setParameterList(const Teuchos::RCP<Teuchos::ParameterList> & paramList);
43
45 Teuchos::RCP<const Teuchos::ParameterList> getValidParameters() const;
46
48 Teuchos::Tuple<std::size_t,3> procRankToProcTuple(std::size_t procRank) const;
49
50protected:
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
83 mutable Teuchos::Tuple<std::size_t,3> procTuple_;
84
85 std::string edgeBlockName_;
86 std::string faceBlockName_;
87};
88
89}
90
91#endif
void buildElements(stk::ParallelMachine parallelMach, STK_Interface &mesh) const
virtual Teuchos::RCP< STK_Interface > buildUncommitedMesh(stk::ParallelMachine parallelMach) const
std::pair< panzer::GlobalOrdinal, panzer::GlobalOrdinal > determineZElemSizeAndStart(int zBlock, unsigned int size, unsigned int rank) const
void buildMetaData(stk::ParallelMachine parallelMach, 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
std::pair< panzer::GlobalOrdinal, panzer::GlobalOrdinal > determineYElemSizeAndStart(int yBlock, unsigned int size, unsigned int rank) const
std::pair< panzer::GlobalOrdinal, panzer::GlobalOrdinal > determineXElemSizeAndStart(int xBlock, unsigned int size, unsigned int rank) const
void addNodeSets(STK_Interface &mesh) const
Teuchos::Tuple< std::size_t, 3 > procTuple_
void addEdgeBlocks(STK_Interface &mesh) const
void buildBlock(stk::ParallelMachine machRank, int xBlock, int yBlock, int zBlock, STK_Interface &mesh) const
Teuchos::RCP< STK_Interface > buildMesh(stk::ParallelMachine parallelMach) const
Build the mesh object.
void addFaceBlocks(STK_Interface &mesh) const
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
From ParameterListAcceptor.
void addSideSets(STK_Interface &mesh) const
virtual void completeMeshConstruction(STK_Interface &mesh, stk::ParallelMachine parallelMach) const
void setParameterList(const Teuchos::RCP< Teuchos::ParameterList > &paramList)
From ParameterListAcceptor.