NEMoSys  0.63.0
A modular, extensible resource with robust automated mesh generation, mesh quality analysis, adaptive mesh refinement, and data transfer between arbitrary meshes.
NEM::MSH::geoMeshBase::SideSet Struct Reference

Detailed Description

Definition at line 390 of file geoMeshBase.H.

Public Member Functions

 SideSet (vtkPolyData *sideSet, vtkIntArray *geoEnt, vtkIdTypeArray *origCell=nullptr, vtkIntArray *cellFace=nullptr, vtkStringArray *setNames=nullptr)
 
 SideSet ()=default
 
 SideSet (vtkPolyData *sides)
 
vtkSmartPointer< vtkIntArray > getGeoEntArr () const
 
void setGeoEntArr (vtkIntArray *arr)
 
vtkSmartPointer< vtkIdTypeArray > getOrigCellArr () const
 
void setOrigCellArr (vtkIdTypeArray *arr)
 
vtkSmartPointer< vtkIntArray > getCellFaceArr () const
 
void setCellFaceArr (vtkIntArray *arr)
 
vtkSmartPointer< vtkStringArray > getSideSetNames () const
 
void setSideSetNamesArr (vtkStringArray *arr)
 

Public Attributes

vtkSmartPointer< vtkPolyData > sides {nullptr}
 Cells represent edges/faces of some GeoMesh. More...
 

Static Private Attributes

static constexpr auto GEO_ENT_NAME = "GeoEnt"
 
static constexpr auto ORIG_CELL_NAME = "OrigCellIds"
 
static constexpr auto CELL_FACE_NAME = "CellFaceIds"
 
static constexpr auto NAME_ARR_NAME = "Side Set Names"
 

Constructor & Destructor Documentation

◆ SideSet() [1/3]

NEM::MSH::geoMeshBase::SideSet::SideSet ( vtkPolyData *  sideSet,
vtkIntArray *  geoEnt,
vtkIdTypeArray *  origCell = nullptr,
vtkIntArray *  cellFace = nullptr,
vtkStringArray *  setNames = nullptr 
)

Definition at line 239 of file geoMeshBase.C.

References GEO_ENT_NAME, setCellFaceArr(), setGeoEntArr(), setOrigCellArr(), and setSideSetNamesArr().

242  : sides(sideSet) {
243  assert(geoEnt || sideSet->GetCellData()->HasArray(GEO_ENT_NAME));
244  if (geoEnt) { setGeoEntArr(geoEnt); }
245  if (origCell) { setOrigCellArr(origCell); }
246  if (cellFace) { setCellFaceArr(cellFace); }
247  if (setNames) { setSideSetNamesArr(setNames); }
248 }
void setCellFaceArr(vtkIntArray *arr)
Definition: geoMeshBase.C:287
void setOrigCellArr(vtkIdTypeArray *arr)
Definition: geoMeshBase.C:270
void setGeoEntArr(vtkIntArray *arr)
Definition: geoMeshBase.C:258
vtkSmartPointer< vtkPolyData > sides
Cells represent edges/faces of some GeoMesh.
Definition: geoMeshBase.H:399
void setSideSetNamesArr(vtkStringArray *arr)
Definition: geoMeshBase.C:304
static constexpr auto GEO_ENT_NAME
Definition: geoMeshBase.H:411

◆ SideSet() [2/3]

NEM::MSH::geoMeshBase::SideSet::SideSet ( )
default

◆ SideSet() [3/3]

NEM::MSH::geoMeshBase::SideSet::SideSet ( vtkPolyData *  sides)
explicit

Definition at line 250 of file geoMeshBase.C.

250 : SideSet(sides, nullptr) {}
vtkSmartPointer< vtkPolyData > sides
Cells represent edges/faces of some GeoMesh.
Definition: geoMeshBase.H:399

Member Function Documentation

◆ getCellFaceArr()

vtkSmartPointer< vtkIntArray > NEM::MSH::geoMeshBase::SideSet::getCellFaceArr ( ) const

Definition at line 281 of file geoMeshBase.C.

References CELL_FACE_NAME, and sides.

281  {
282  return sides ? vtkIntArray::FastDownCast(
283  sides->GetCellData()->GetAbstractArray(CELL_FACE_NAME))
284  : nullptr;
285 }
static constexpr auto CELL_FACE_NAME
Definition: geoMeshBase.H:414
vtkSmartPointer< vtkPolyData > sides
Cells represent edges/faces of some GeoMesh.
Definition: geoMeshBase.H:399

◆ getGeoEntArr()

vtkSmartPointer< vtkIntArray > NEM::MSH::geoMeshBase::SideSet::getGeoEntArr ( ) const

Definition at line 252 of file geoMeshBase.C.

References GEO_ENT_NAME, and sides.

Referenced by NEM::MSH::exoGeoMesh::addSideSet(), NEM::MSH::gmshGeoMesh::GM2gmsh(), NEM::MSH::oshGeoMesh::GM2osh(), NEM::MSH::smeshGeoMesh::GMToSMESH(), and NEM::MSH::exoGeoMesh::stitch().

252  {
253  return sides ? vtkIntArray::FastDownCast(
254  sides->GetCellData()->GetArray(GEO_ENT_NAME))
255  : nullptr;
256 }
vtkSmartPointer< vtkPolyData > sides
Cells represent edges/faces of some GeoMesh.
Definition: geoMeshBase.H:399
static constexpr auto GEO_ENT_NAME
Definition: geoMeshBase.H:411

◆ getOrigCellArr()

vtkSmartPointer< vtkIdTypeArray > NEM::MSH::geoMeshBase::SideSet::getOrigCellArr ( ) const

Definition at line 264 of file geoMeshBase.C.

References ORIG_CELL_NAME, and sides.

264  {
265  return sides ? vtkIdTypeArray::FastDownCast(
266  sides->GetCellData()->GetAbstractArray(ORIG_CELL_NAME))
267  : nullptr;
268 }
vtkSmartPointer< vtkPolyData > sides
Cells represent edges/faces of some GeoMesh.
Definition: geoMeshBase.H:399
static constexpr auto ORIG_CELL_NAME
Definition: geoMeshBase.H:413

◆ getSideSetNames()

vtkSmartPointer< vtkStringArray > NEM::MSH::geoMeshBase::SideSet::getSideSetNames ( ) const

Definition at line 298 of file geoMeshBase.C.

References NAME_ARR_NAME, and sides.

Referenced by NEM::MSH::smeshGeoMesh::GMToSMESH().

298  {
299  return sides ? vtkStringArray::SafeDownCast(
300  sides->GetFieldData()->GetAbstractArray(NAME_ARR_NAME))
301  : nullptr;
302 }
static constexpr auto NAME_ARR_NAME
Definition: geoMeshBase.H:415
vtkSmartPointer< vtkPolyData > sides
Cells represent edges/faces of some GeoMesh.
Definition: geoMeshBase.H:399

◆ setCellFaceArr()

void NEM::MSH::geoMeshBase::SideSet::setCellFaceArr ( vtkIntArray *  arr)

Definition at line 287 of file geoMeshBase.C.

References CELL_FACE_NAME, and sides.

Referenced by SideSet().

287  {
288  if (arr) {
289  assert(arr->GetNumberOfTuples() == sides->GetNumberOfCells() &&
290  arr->GetNumberOfComponents() == 2);
291  arr->SetName(CELL_FACE_NAME);
292  sides->GetCellData()->AddArray(arr);
293  } else {
294  sides->GetCellData()->RemoveArray(CELL_FACE_NAME);
295  }
296 }
static constexpr auto CELL_FACE_NAME
Definition: geoMeshBase.H:414
vtkSmartPointer< vtkPolyData > sides
Cells represent edges/faces of some GeoMesh.
Definition: geoMeshBase.H:399

◆ setGeoEntArr()

void NEM::MSH::geoMeshBase::SideSet::setGeoEntArr ( vtkIntArray *  arr)

Definition at line 258 of file geoMeshBase.C.

References GEO_ENT_NAME, and sides.

Referenced by SideSet().

258  {
259  assert(arr);
260  arr->SetName(GEO_ENT_NAME);
261  sides->GetCellData()->AddArray(arr);
262 }
vtkSmartPointer< vtkPolyData > sides
Cells represent edges/faces of some GeoMesh.
Definition: geoMeshBase.H:399
static constexpr auto GEO_ENT_NAME
Definition: geoMeshBase.H:411

◆ setOrigCellArr()

void NEM::MSH::geoMeshBase::SideSet::setOrigCellArr ( vtkIdTypeArray *  arr)

Definition at line 270 of file geoMeshBase.C.

References ORIG_CELL_NAME, and sides.

Referenced by SideSet().

270  {
271  if (arr) {
272  assert(arr->GetNumberOfTuples() == sides->GetNumberOfCells() &&
273  arr->GetNumberOfComponents() == 2);
274  arr->SetName(ORIG_CELL_NAME);
275  sides->GetCellData()->AddArray(arr);
276  } else {
277  sides->GetCellData()->RemoveArray(ORIG_CELL_NAME);
278  }
279 }
vtkSmartPointer< vtkPolyData > sides
Cells represent edges/faces of some GeoMesh.
Definition: geoMeshBase.H:399
static constexpr auto ORIG_CELL_NAME
Definition: geoMeshBase.H:413

◆ setSideSetNamesArr()

void NEM::MSH::geoMeshBase::SideSet::setSideSetNamesArr ( vtkStringArray *  arr)

Definition at line 304 of file geoMeshBase.C.

References NAME_ARR_NAME, and sides.

Referenced by SideSet().

304  {
305  if (arr) {
306  assert(arr->GetNumberOfComponents() == 1);
307  arr->SetName(NAME_ARR_NAME);
308  sides->GetFieldData()->AddArray(arr);
309  } else {
310  sides->GetFieldData()->RemoveArray(NAME_ARR_NAME);
311  }
312 }
static constexpr auto NAME_ARR_NAME
Definition: geoMeshBase.H:415
vtkSmartPointer< vtkPolyData > sides
Cells represent edges/faces of some GeoMesh.
Definition: geoMeshBase.H:399

Member Data Documentation

◆ CELL_FACE_NAME

constexpr auto NEM::MSH::geoMeshBase::SideSet::CELL_FACE_NAME = "CellFaceIds"
staticprivate

Definition at line 414 of file geoMeshBase.H.

Referenced by getCellFaceArr(), and setCellFaceArr().

◆ GEO_ENT_NAME

constexpr auto NEM::MSH::geoMeshBase::SideSet::GEO_ENT_NAME = "GeoEnt"
staticprivate

Definition at line 411 of file geoMeshBase.H.

Referenced by getGeoEntArr(), setGeoEntArr(), and SideSet().

◆ NAME_ARR_NAME

constexpr auto NEM::MSH::geoMeshBase::SideSet::NAME_ARR_NAME = "Side Set Names"
staticprivate

Definition at line 415 of file geoMeshBase.H.

Referenced by getSideSetNames(), and setSideSetNamesArr().

◆ ORIG_CELL_NAME

constexpr auto NEM::MSH::geoMeshBase::SideSet::ORIG_CELL_NAME = "OrigCellIds"
staticprivate

Definition at line 413 of file geoMeshBase.H.

Referenced by getOrigCellArr(), and setOrigCellArr().

◆ sides


The documentation for this struct was generated from the following files: