Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Panzer_STK_SculptMeshFactory.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_SculptMeshFactory_hpp__
12 #define __Panzer_STK_SculptMeshFactory_hpp__
13 
15 #include <Panzer_STK_Interface.hpp>
16 
17 
18 namespace panzer_stk {
19 
20 class STK_Interface;
21 
29 public:
32 
35 
37  Teuchos::RCP<STK_Interface> buildMesh(stk::ParallelMachine parallelMach) const;
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,2> procRankToProcTuple(std::size_t procRank) const;
49 
50 protected:
52 
53  int callSculptor(stk::ParallelMachine parallelMach, char *diatom_file )const ;
54  int writeDiatomFile( std::string stl_path, std::string stl_filename, char *diatom_file ) const;
55 
56  void buildNodes(stk::ParallelMachine parallelMach, STK_Interface &mesh ) const;
57  void buildMetaData(stk::ParallelMachine parallelMach,STK_Interface & mesh) const;
58  void buildElements(stk::ParallelMachine parallelMach,STK_Interface & mesh) const;
59  void buildBlock(stk::ParallelMachine parallelMach,STK_Interface & mesh, int block_index, int *block_id, int elem_start, int *elements, int *nodes_per_elem, int *elem_attributes, int **elm_node_linkage ) const;
60 
61  std::pair<int,int> determineXElemSizeAndStart(int xBlock,unsigned int size,unsigned int rank) const;
62 
63  void addSideSets(STK_Interface & mesh) const;
64  void addNodeSets(STK_Interface & mesh) const;
65  void addEdgeBlocks(STK_Interface & mesh) const;
66  void addFaceBlocks(STK_Interface & mesh) const;
67 
68  // search through relations for the one matching the ID
69  const stk::mesh::Relation * getRelationByID(unsigned ID,stk::mesh::PairIterRelation edges) const;
70 
71  std::string stlFileName_, stlFileDir_;
73  double xMin_, yMin_, zMin_;
74  double xMax_, yMax_, zMax_;
75 
76  mutable unsigned int machRank_, machSize_;
78 
79 };
80 
81 }
82 
83 #endif
void buildMetaData(stk::ParallelMachine parallelMach, STK_Interface &mesh) const
void addFaceBlocks(STK_Interface &mesh) const
void buildElements(stk::ParallelMachine parallelMach, STK_Interface &mesh) const
int callSculptor(stk::ParallelMachine parallelMach, char *diatom_file) const
Teuchos::RCP< STK_Interface > buildMesh(stk::ParallelMachine parallelMach) const
Build the mesh object.
virtual void completeMeshConstruction(STK_Interface &mesh, stk::ParallelMachine parallelMach) const
std::pair< int, int > determineXElemSizeAndStart(int xBlock, unsigned int size, unsigned int rank) const
Teuchos::Tuple< std::size_t, 2 > procRankToProcTuple(std::size_t procRank) const
what is the 2D tuple describe this processor distribution
Teuchos::Tuple< std::size_t, 2 > procTuple_
void buildNodes(stk::ParallelMachine parallelMach, STK_Interface &mesh) const
const stk::mesh::Relation * getRelationByID(unsigned ID, stk::mesh::PairIterRelation edges) const
void addNodeSets(STK_Interface &mesh) const
virtual Teuchos::RCP< STK_Interface > buildUncommitedMesh(stk::ParallelMachine parallelMach) const
void buildBlock(stk::ParallelMachine parallelMach, STK_Interface &mesh, int block_index, int *block_id, int elem_start, int *elements, int *nodes_per_elem, int *elem_attributes, int **elm_node_linkage) const
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
From ParameterListAcceptor.
void setParameterList(const Teuchos::RCP< Teuchos::ParameterList > &paramList)
From ParameterListAcceptor.
int writeDiatomFile(std::string stl_path, std::string stl_filename, char *diatom_file) const
void addEdgeBlocks(STK_Interface &mesh) const
void addSideSets(STK_Interface &mesh) const