Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Panzer_STK_SculptMeshFactory.cpp
Go to the documentation of this file.
1 // @HEADER
2 // ***********************************************************************
3 //
4 // Panzer: A partial differential equation assembly
5 // engine for strongly coupled complex multiphysics systems
6 // Copyright (2011) Sandia Corporation
7 //
8 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
9 // the U.S. Government retains certain rights in this software.
10 //
11 // Redistribution and use in source and binary forms, with or without
12 // modification, are permitted provided that the following conditions are
13 // met:
14 //
15 // 1. Redistributions of source code must retain the above copyright
16 // notice, this list of conditions and the following disclaimer.
17 //
18 // 2. Redistributions in binary form must reproduce the above copyright
19 // notice, this list of conditions and the following disclaimer in the
20 // documentation and/or other materials provided with the distribution.
21 //
22 // 3. Neither the name of the Corporation nor the names of the
23 // contributors may be used to endorse or promote products derived from
24 // this software without specific prior written permission.
25 //
26 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
27 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
30 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 //
38 // Questions? Contact Roger P. Pawlowski (rppawlo@sandia.gov) and
39 // Eric C. Cyr (eccyr@sandia.gov)
40 // ***********************************************************************
41 // @HEADER
42 
44 #include <Teuchos_TimeMonitor.hpp>
45 #include <PanzerAdaptersSTK_config.hpp>
46 
47 #include "elsa.h"
48 using Teuchos::RCP;
49 using Teuchos::rcp;
50 
51 
52 
53 namespace panzer_stk {
54 
56 {
58 }
59 
62 {
63 }
64 
66 Teuchos::RCP<STK_Interface> SculptMeshFactory::buildMesh(stk::ParallelMachine parallelMach) const
67 {
68  PANZER_FUNC_TIME_MONITOR("panzer::SculptMeshFactory::buildMesh()");
69 
70  RCP<STK_Interface> mesh = buildUncommitedMesh(parallelMach);
71 
72  // commit meta data
73  mesh->initialize(parallelMach);
74 
75  // build bulk data
76  completeMeshConstruction(*mesh,parallelMach);
77 
78  // wrtie exodus file
79  //mesh->writeToExodus("STKSculptMesh.exo");
80 
81  return mesh;
82 }
83 
85 {
86  PANZER_FUNC_TIME_MONITOR("panzer::SculptMeshFactory::buildUncomittedMesh()");
87 
88  RCP<STK_Interface> mesh = rcp(new STK_Interface(3));
89 
90  machRank_ = stk::parallel_machine_rank(parallelMach);
91  machSize_ = stk::parallel_machine_size(parallelMach);
92 
94 
95  //if( machRank_ == 0 )
96  {
97  // call Sculptor
98  char diatom_file[1000];
99  writeDiatomFile( stlFileDir_, stlFileName_, diatom_file );
100 
101  callSculptor( parallelMach, diatom_file );
102 
103  // build meta information: blocks and side set setups
104  buildMetaData(parallelMach,*mesh);
105 
106  mesh->addPeriodicBCs(periodicBCVec_);
107 
108  }
109 
110 // if( machRank_ == 0 )
111 // if(mesh->isWritable())
112 // mesh->writeToExodus("STKSculptMesh.exo");
113 
114 
115  return mesh;
116 }
117 
118 int SculptMeshFactory::writeDiatomFile( std::string stl_path, std::string stl_filename, char *diatom_file ) const
119 {
120 
121  strcpy( diatom_file, stl_path.c_str() );
122  strcat( diatom_file, "stl.diatom" );
123  FILE *fp = fopen( diatom_file, "w" );
124  if ( !fp )
125  {
126  printf( "ERROR: Unable to open %s for writing\n", diatom_file );
127  return 0;
128  }
129 
130  char stl_fullfile[1000];
131  strcpy( stl_fullfile, stl_path.c_str() );
132  strcat( stl_fullfile, stl_filename.c_str() );
133 
134  fprintf( fp, " diatom\n" );
135  fprintf( fp, " package \'box\'\n" );
136  fprintf( fp, " material 1\n" );
137  fprintf( fp, " insert stl\n" );
138  fprintf( fp, " FILE = \'%s\'\n", stl_fullfile );
139  fprintf( fp, " endinsert\n" );
140  fprintf( fp, " endpackage\n" );
141  fprintf( fp, " enddiatom\n" );
142  fclose( fp );
143 
144  return 1;
145 
146 }
147 int SculptMeshFactory::callSculptor(stk::ParallelMachine parallelMach, char *diatom_file_name ) const
148 {
149 
150  char * base_exodus_file_name = NULL;
151  char * base_vfrac_file_name = NULL;
152  int nelx, nely, nelz;
153 
154  nelx = xInterval_;
155  nely = yInterval_;
156  nelz = zInterval_;
157 
158  int mesh_void = 0;
159 
160  double gmin[3];
161  double gmax[3];
162 
163  gmin[0] = xMin_;
164  gmin[1] = yMin_;
165  gmin[2] = zMin_;
166  gmax[0] = xMax_;
167  gmax[1] = yMax_;
168  gmax[2] = zMax_;
169 
170  int stair = 0;
171  int smooth = 1;
172  int smooth_iterations = 7;
173 
174  int gen_sidesets = 4; //for stl based sidesets
175  int adaptive_grid = 0;
176  int adapt_level = 2;
177  int adapt_type = 0;
178 
179  printf("\n Sculpt BBox Min ( %lf, %lf, %lf )\n", xMin_, yMin_, zMin_ );
180  printf("\n Sculpt BBox Max ( %lf, %lf, %lf )\n", xMax_, yMax_, zMax_ );
181 
182  int cr_result = Create_Sculptor_Mesh(diatom_file_name,
183  base_exodus_file_name,
184  base_vfrac_file_name,
185  0, //vfac_input
186  machSize_, //comm.size(),
187  machRank_, //comm.rank(),
188  1,
189  nelx,
190  nely,
191  nelz,
192  gmin,
193  gmax,
194  stair,
195  smooth,
196  10,/*num_laplac_iters*/
197  0, // max opt iters
198  .4,/*opt_threshold*/
199  0, // max pcol iters
200  .4, // pcol threshold
201  mesh_void,
202  gen_sidesets,
203  adapt_type, /* adatptive type*/
204  adaptive_grid,/*adaptive_grid*/
205  adapt_level, /* adapt level */
206  0, // max deg iter
207  0.0,/*double htet_threshold*/
208  0,/*int pillow*/
209  0, // capture
210  0, //micro_expand
211  0, //align
212  0, //cell_size
213  NULL,/*char * quality_filename*/
214  NULL,/*char * comm_maps_file_name*/
215  0, // write geom
216  0/*int quiet 1 is quiet*/
217  );
218 
219 
220 
221  if (cr_result == 1){
222  if(machRank_ == 0)
223  printf("Error Generating Sculptor Mesh\n");
224  return 1;
225  }
226 
227  return 0;
228 }
229 
230 void SculptMeshFactory::completeMeshConstruction(STK_Interface & mesh,stk::ParallelMachine parallelMach) const
231 {
232  PANZER_FUNC_TIME_MONITOR("panzer::SculptMeshFactory::completeMeshConstruction()");
233 
234  if(not mesh.isInitialized())
235  mesh.initialize(parallelMach);
236 
237  buildElements(parallelMach,mesh);
238 
239  mesh.buildSubcells();
240  mesh.buildLocalElementIDs();
241 
242  addSideSets(mesh);
243  addNodeSets(mesh);
244 
245  this->rebalance(mesh);
246 }
247 
250 {
252 
253  setMyParamList(paramList);
254 
255  xInterval_ = paramList->get<int>("xInterval");
256  yInterval_ = paramList->get<int>("yInterval");
257  zInterval_ = paramList->get<int>("zInterval");
258 
259 
260  xMin_ = paramList->get<double>("xMin");
261  yMin_ = paramList->get<double>("yMin");
262  zMin_ = paramList->get<double>("zMin");
263 
264  xMax_ = paramList->get<double>("xMax");
265  yMax_ = paramList->get<double>("yMax");
266  zMax_ = paramList->get<double>("zMax");
267 
268  stlFileDir_ = paramList->get<std::string>("stlFileDir");
269  stlFileName_ = paramList->get<std::string>("stlFileName");
270 
271  // read in periodic boundary conditions
272  parsePeriodicBCList(Teuchos::rcpFromRef(paramList->sublist("Periodic BCs")),periodicBCVec_);
273 }
274 
277 {
278  static RCP<Teuchos::ParameterList> defaultParams;
279 
280  // fill with default values
281  if(defaultParams == Teuchos::null) {
282  defaultParams = rcp(new Teuchos::ParameterList);
283 
284  defaultParams->set<int>("xInterval",10);
285  defaultParams->set<int>("yInterval",10);
286  defaultParams->set<int>("zInterval",10);
287 
288  defaultParams->set<double>("xMin",0.0);
289  defaultParams->set<double>("yMin",0.0);
290  defaultParams->set<double>("zMin",0.0);
291 
292  defaultParams->set<double>("xMax",1.0);
293  defaultParams->set<double>("yMax",1.0);
294  defaultParams->set<double>("zMax",1.0);
295 
296  defaultParams->set<std::string>("stlFileDir", "NULL");
297  defaultParams->set<std::string>("stlFileName", "NULL");
298 
299  Teuchos::ParameterList & bcs = defaultParams->sublist("Periodic BCs");
300  bcs.set<int>("Count",0); // no default periodic boundary conditions
301  }
302 
303 
304  return defaultParams;
305 }
306 
308 {
309  // get valid parameters
311 
312  // set that parameter list
313  setParameterList(validParams);
314 
315 }
316 
317 void SculptMeshFactory::buildMetaData(stk::ParallelMachine parallelMach, STK_Interface & mesh) const
318 {
319  struct MeshStorageStruct *mss = get_sculpt_mesh();
320 
321  int nBlocks_ = mss->num_elem_blk;
322  int nSidesets_ = mss->num_side_sets;
323  int nNodesets_ = mss->num_node_sets;
324 
325 
326  typedef shards::Hexahedron<8> HexTopo;
327  const CellTopologyData * ctd = shards::getCellTopologyData<HexTopo>();
328  const CellTopologyData * side_ctd = shards::CellTopology(ctd).getBaseCellTopologyData(2,0);
329 
330 
331  // build meta data
332  //mesh.setDimension(3);
333  for( int b = 0; b < nBlocks_; b++){
334  std::stringstream ebPostfix;
335  ebPostfix << "-" << mss->block_id[b];
336  mesh.addElementBlock("eblock"+ebPostfix.str(),ctd);
337  }
338 
339 
340  // add sidesets
341  int side_set_id;
342  machRank_ = stk::parallel_machine_rank(parallelMach);
343  for(int ict = 0;ict < nSidesets_;ict ++){
344  std::stringstream sPostfix;
345  sPostfix << "-" << mss->side_set_id[ict];
346  mesh.addSideset("Sideset"+sPostfix.str(),side_ctd);
347  }
348 
349  // add nodesets
350  for(int nx=0;nx<nNodesets_;nx++) {
351  std::stringstream nPostfix;
352  nPostfix << "-" << nx;
353  mesh.addNodeset("Nodeset"+nPostfix.str());
354  }
355 
356 }
357 
358 void SculptMeshFactory::buildNodes( stk::ParallelMachine paralleMach, STK_Interface &mesh ) const
359 {
360  struct MeshStorageStruct *mss = get_sculpt_mesh();
361  int num_nodes = mss->num_nodes;
362 
363 
364  int dimensionality = 3;
365 
366  if (num_nodes){
367  int global_node_numbers;
368  for(int ict = 0; ict < num_nodes; ict ++){
369  global_node_numbers = mss->global_node_numbers[ict];
370  std::vector<double> coord(3, 0.0);
371  coord[0] = mss->coord[0*num_nodes+ict];
372  coord[1] = mss->coord[1*num_nodes+ict];
373  coord[2] = mss->coord[2*num_nodes+ict];
374  mesh.addNode(global_node_numbers, coord );
375 
376  //std::cout<<"Node "<<global_node_numbers<<": ( "<<coord[0]<<", "<<coord[1]<<", "<<coord[2]<<" )"<<std::endl;
377 
378  }
379  }
380 
381 
382 }
383 
384 void SculptMeshFactory::buildElements(stk::ParallelMachine parallelMach,STK_Interface & mesh) const
385 {
386  struct MeshStorageStruct *mss = get_sculpt_mesh();
387  int num_blocks = mss->num_elem_blk;
388 
389 
390  int *block_id = new int[num_blocks];
391  //char ** element_types = new std::string[num_blocks];
392  int *elements = new int[num_blocks];
393  int *nodes_per_element = new int[num_blocks];
394  int *element_attributes = new int[num_blocks];
395  int **elmt_node_linkage = new int*[num_blocks];
396 
397  for(int b = 0; b < num_blocks; b++){
398  block_id[b] = mss->block_id[b];
399  // element_types[b] = mss->element_types[b];
400  elements[b] = mss->elements[b];
401  nodes_per_element[b] = mss->nodes_per_element[b];
402  element_attributes[b] = mss->element_attributes[b];
403  }
404 
405 
406  int elm_start = 1;
407  mesh.beginModification();
408  // build each block
409  for(int ib=0;ib<num_blocks;ib++) {
410  buildBlock(parallelMach,mesh, ib, block_id, elm_start, elements, nodes_per_element, element_attributes, elmt_node_linkage );
411  elm_start += elements[ib];
412  }
413  mesh.endModification();
414 }
415 
416 void SculptMeshFactory::buildBlock(stk::ParallelMachine parallelMach,STK_Interface & mesh, int block_index, int *block_id, int elm_start, int *elements, int *nodes_per_element, int *elem_attributes, int **elmt_node_linkage ) const
417 {
418 
419  struct MeshStorageStruct *mss = get_sculpt_mesh();
420 
421  // add blocks
422  std::stringstream blockName;
423  blockName << "eblock-" << block_id[block_index];
424  stk::mesh::Part * block = mesh.getElementBlockPart(blockName.str());
425 
426 
427  buildNodes( parallelMach, mesh );
428 
429 
430  // read element block properties
431  //read element connectivity information into a temporary array
432  if(elements[block_index]) {
433  int maximum_nodes = elements[block_index] * nodes_per_element[block_index];
434  elmt_node_linkage[block_index] = new int[maximum_nodes];
435  for(int ict = 0;ict < elements[block_index]; ict ++){
436  std::vector<stk::mesh::EntityId> nodes(nodes_per_element[block_index]);
437  //std::cout<<"Element id = "<<elm_start+ ict<<std::endl;
438  //std::cout<<"Element global id = "<<mss->global_element_numbers[elm_start+ ict-1]<<std::endl;
439  for(int nct = 0; nct < nodes_per_element[block_index]; nct++){
440  elmt_node_linkage[block_index][(ict*nodes_per_element[block_index])+nct] = mss->elmt_node_linkage[block_index][(ict*nodes_per_element[block_index])+nct];
441  nodes[nct] = mss->global_node_numbers[elmt_node_linkage[block_index][(ict*nodes_per_element[block_index])+nct]-1];
442  //std::cout<<" Node linkage id = "<<elmt_node_linkage[block_index][(ict*nodes_per_element[block_index])+nct]<<std::endl;
443  //std::cout<<" Node global id = "<<nodes[nct]<<std::endl;
444  }
445 
446  stk::mesh::EntityId gid = mss->global_element_numbers[elm_start+ ict-1];
447  RCP<ElementDescriptor> ed = rcp(new ElementDescriptor(gid,nodes));
448  mesh.addElement(ed,block);
449  }
450  }
451  else {
452  elmt_node_linkage[block_index] = NULL;
453  }
454 }
455 
456 const stk::mesh::Relation * SculptMeshFactory::getRelationByID(unsigned ID,stk::mesh::PairIterRelation relations) const
457 {
458  for(std::size_t i=0;i<relations.size();i++)
459  if(relations[i].identifier()==ID)
460  return &relations[i];
461 
462  return 0;
463 }
464 
465 
466 
468 {
469  mesh.beginModification();
470 
471  struct MeshStorageStruct *mss = get_sculpt_mesh();
472  int num_side_sets = mss->num_side_sets;
473 
474  int *side_set_id = new int[num_side_sets];
475  int *num_elements_in_side_set = new int[num_side_sets];
476  int *num_nodes_in_side_set = new int[num_side_sets];
477  int *num_df_in_side_set = new int[num_side_sets];
478  int **side_set_elements = new int*[num_side_sets];
479  int **side_set_faces = new int*[num_side_sets];
480  //Element_Type **side_set_element_type = new Element_Type*[num_side_sets];
481  int **side_set_node_counter = new int*[num_side_sets];
482  int **side_set_nodes = new int*[num_side_sets];
483  double **side_set_df = new double*[num_side_sets];
484 
485  for(int ict = 0;ict < num_side_sets;ict ++){
486  side_set_id[ict] = mss->side_set_id[ict];
487  }
488 
489  for(int i = 0; i < num_side_sets; i++) {
490 
491  std::stringstream sidesetName;
492  sidesetName << "Sideset-" << mss->side_set_id[i];
493  stk::mesh::Part * sideset = mesh.getSideset(sidesetName.str());
494 
495 
496  num_elements_in_side_set[i] = mss->num_elements_in_side_set[i];
497  num_df_in_side_set[i] = mss->num_df_in_side_set[i];
498 
499  int ne = num_elements_in_side_set[i];
500  side_set_elements[i] = new int[ne];
501  side_set_faces[i] = new int[ne];
502  //side_set_element_type[i] = new Element_Type[ne];
503  side_set_node_counter[i] = new int[ne];
504  side_set_df[i] = new double[num_df_in_side_set[i]];
505 
506 
507  if(ne) {
508 
509  for(int nct = 0; nct < ne; nct ++){
510 
511  std::vector<stk::mesh::EntityId> nodes(4);
512 
513  int sculpt_elem_id = mss->global_element_numbers[ mss->side_set_elements[i][nct]-1 ];
514  int sculpt_face_id = -1 ;
515 
516  std::vector<stk::mesh::Entity> localElmts;
517  mesh.getMyElements(localElmts);
518 
519  std::vector<stk::mesh::Entity>::const_iterator itr;
520  for(itr=localElmts.begin();itr!=localElmts.end();++itr) {
521  stk::mesh::Entity element = (*itr);
522 
523  if( element->identifier() == sculpt_elem_id )
524  {
525  sculpt_face_id = mss->side_set_faces[i][nct];
526 
527  stk::mesh::EntityId gid = element->identifier();
528 
529  stk::mesh::PairIterRelation relations = element->relations(mesh.getSideRank());
530 
531  stk::mesh::Entity side = getRelationByID(sculpt_face_id-1,relations)->entity();
532 
533  if( side != NULL )
534  {
535  if(side->owner_rank()==machRank_)
536  mesh.addEntityToSideset(*side,sideset );
537  }
538  }
539  }
540 
541  if( sculpt_face_id == -1 )
542  printf(" ERROR: Could not find the element id for a sideset face \n");
543  }
544  }
545  }
546  mesh.endModification();
547 }
548 
550 {
551  mesh.beginModification();
552 
553  struct MeshStorageStruct *mss = get_sculpt_mesh();
554  int num_node_sets = mss->num_node_sets;
555 
556 
557  if (num_node_sets) {
558  int *node_set_id = new int[num_node_sets];
559  int *num_nodes_in_node_set = new int[num_node_sets];
560  int *num_df_in_node_set = new int[num_node_sets];
561  int **node_set_nodes = new int*[num_node_sets];
562  double **node_set_df = new double*[num_node_sets];
563 
564  for(int ict = 0; ict < num_node_sets; ict ++){
565  node_set_id[ict] = mss->node_set_id[ict];
566  num_nodes_in_node_set[ict] = mss->num_nodes_in_node_set[ict];
567  num_df_in_node_set[ict] = mss->num_df_in_node_set[ict];
568  }
569 
570  for(int i = 0; i < num_node_sets; i++) {
571  node_set_nodes[i] = new int[num_nodes_in_node_set[i]];
572  node_set_df[i] = NULL;
573  if(num_nodes_in_node_set[i]) {
574  for(int nct = 0; nct < num_nodes_in_node_set[i];nct ++){
575  node_set_nodes[i][nct] = mss->node_set_nodes[i][nct];
576  }
577  }
578  }
579 
580 
581  for(int i = 0; i < num_node_sets; i++) {
582 
583  std::stringstream nodesetName;
584  nodesetName << "Nodeset-" << mss->node_set_id[i];
585  stk::mesh::Part * nodeset = mesh.getNodeset(nodesetName.str());
586 
587  for( int j = 0; j < num_nodes_in_node_set[i]; j++ )
588  {
589  int node_id = node_set_nodes[i][j];
591  if(machRank_==0)
592  {
593  stk::mesh::Entity node = bulkData->get_entity(mesh.getNodeRank(),node_id);
594  mesh.addEntityToNodeset(*node, nodeset);
595  }
596  }
597  }
598 
599  }
600  mesh.endModification();
601 }
602 
603 
604 
607 {
608  std::size_t i=0,j=0;
609 
610  j = procRank/machSize_;
611  procRank = procRank % machSize_;
612  i = procRank;
613 
614  return Teuchos::tuple(i,j);
615 }
616 
617 } // end panzer_stk
void buildMetaData(stk::ParallelMachine parallelMach, STK_Interface &mesh) const
void buildElements(stk::ParallelMachine parallelMach, STK_Interface &mesh) const
void addNodeset(const std::string &name)
int callSculptor(stk::ParallelMachine parallelMach, char *diatom_file) const
void addEntityToNodeset(stk::mesh::Entity entity, stk::mesh::Part *nodeset)
T & get(const std::string &name, T def_value)
stk::mesh::Part * getElementBlockPart(const std::string &name) const
get the block count
ParameterList & set(std::string const &name, T const &value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
Teuchos::RCP< STK_Interface > buildMesh(stk::ParallelMachine parallelMach) const
Build the mesh object.
void addEntityToSideset(stk::mesh::Entity entity, stk::mesh::Part *sideset)
virtual void completeMeshConstruction(STK_Interface &mesh, stk::ParallelMachine parallelMach) const
stk::mesh::Part * getNodeset(const std::string &name) const
stk::mesh::Part * getSideset(const std::string &name) const
Teuchos::Tuple< std::size_t, 2 > procRankToProcTuple(std::size_t procRank) const
what is the 2D tuple describe this processor distribution
void addElement(const Teuchos::RCP< ElementDescriptor > &ed, stk::mesh::Part *block)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
stk::mesh::EntityRank getSideRank() const
void initialize(stk::ParallelMachine parallelMach, bool setupIO=true, const bool buildRefinementSupport=false)
void rebalance(STK_Interface &mesh) const
Teuchos::Tuple< std::size_t, 2 > procTuple_
Teuchos::RCP< stk::mesh::BulkData > getBulkData() const
void setMyParamList(const RCP< ParameterList > &paramList)
void validateParametersAndSetDefaults(ParameterList const &validParamList, int const depth=1000)
void addNode(stk::mesh::EntityId gid, const std::vector< double > &coord)
void buildNodes(stk::ParallelMachine parallelMach, STK_Interface &mesh) const
void buildSubcells()
force the mesh to build subcells: edges and faces
const stk::mesh::Relation * getRelationByID(unsigned ID, stk::mesh::PairIterRelation edges) const
void addNodeSets(STK_Interface &mesh) const
bool isInitialized() const
Has initialize been called on this mesh object?
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 addSideset(const std::string &name, const CellTopologyData *ctData)
std::vector< Teuchos::RCP< const PeriodicBC_MatcherBase > > periodicBCVec_
void setParameterList(const Teuchos::RCP< Teuchos::ParameterList > &paramList)
From ParameterListAcceptor.
int writeDiatomFile(std::string stl_path, std::string stl_filename, char *diatom_file) const
ParameterList & sublist(const std::string &name, bool mustAlreadyExist=false, const std::string &docString="")
void getMyElements(std::vector< stk::mesh::Entity > &elements) const
stk::mesh::EntityRank getNodeRank() const
void addElementBlock(const std::string &name, const CellTopologyData *ctData)
void addSideSets(STK_Interface &mesh) const
static void parsePeriodicBCList(const Teuchos::RCP< Teuchos::ParameterList > &pl, std::vector< Teuchos::RCP< const PeriodicBC_MatcherBase > > &periodicBC)