29 #if defined(_MSC_VER) && !defined(_USE_MATH_DEFINES) 30 # define _USE_MATH_DEFINES 37 #include <vtkCellIterator.h> 38 #include <vtkCellTypes.h> 39 #include <vtkCharArray.h> 40 #include <vtkDoubleArray.h> 41 #include <vtkFloatArray.h> 42 #include <vtkIdTypeArray.h> 43 #include <vtkIntArray.h> 44 #include <vtkLongArray.h> 45 #include <vtkLongLongArray.h> 46 #include <vtkShortArray.h> 47 #include <vtkSignedCharArray.h> 48 #include <vtkTypeFloat64Array.h> 49 #include <vtkTypeInt32Array.h> 50 #include <vtkTypeInt64Array.h> 51 #include <vtkTypeInt8Array.h> 52 #include <Omega_h_align.hpp> 53 #include <Omega_h_build.hpp> 54 #include <Omega_h_class.hpp> 55 #include <Omega_h_element.hpp> 56 #include <Omega_h_file.hpp> 57 #include <Omega_h_mesh.hpp> 76 Omega_h::Library *lib) {
80 Omega_h::Mesh oshMesh = Omega_h::read_mesh_file(fileName, lib->world());
90 std::cout <<
"oshGeoMesh constructed" << std::endl;
91 _oshMesh = std::unique_ptr<Omega_h::Mesh>(
92 oshMesh ?
new Omega_h::Mesh(*oshMesh) :
new Omega_h::Mesh());
101 if (fileExt ==
".osh") {
102 Omega_h::binary::write(fileName,
_oshMesh.get());
103 }
else if (fileExt ==
".msh") {
104 Omega_h::gmsh::write(fileName,
_oshMesh.get());
105 }
else if (fileExt ==
".pvtu") {
106 Omega_h::vtk::write_parallel(fileName,
_oshMesh.get());
107 }
else if (fileExt ==
".vtu") {
108 Omega_h::vtk::write_vtu(fileName,
_oshMesh.get());
110 std::cerr <<
"Omega_h library does not support writing " << fileExt
111 <<
" format." << std::endl;
118 << (
_oshMesh->family() == OMEGA_H_SIMPLEX ?
"SIMPLEX" :
"HYPERCUBE")
120 out <<
"Dim:\t" <<
_oshMesh->dim() <<
'\n';
124 auto otherOshGM =
dynamic_cast<oshGeoMesh *
>(otherGeoMesh);
127 otherOshGM->setGeoMesh(
129 _oshMesh = std::move(otherOshGM->_oshMesh);
130 otherOshGM->resetNative();
141 auto oshFamily =
_oshMesh->family();
143 if (sideSet.sides && sideSet.sides->GetNumberOfCells() > 0) {
144 for (
int i = 0; i <= oshDim; ++i) {
145 if (
_oshMesh->has_tag(i,
"class_dim")) {
146 _oshMesh->remove_tag(i,
"class_dim");
148 if (
_oshMesh->has_tag(i,
"class_id")) {
149 _oshMesh->remove_tag(i,
"class_id");
153 Omega_h::HostWrite<Omega_h::ClassId> h_class_id(
mesh->GetNumberOfCells());
154 auto linkArr =
mesh->GetCellData()->GetArray(link.c_str());
156 for (Omega_h::LO i = 0; i < h_class_id.size(); ++i) {
158 static_cast<Omega_h::ClassId
>(linkArr->GetComponent(i, 0));
163 auto dummyEqv2v = Omega_h::LOs(
164 mesh->GetNumberOfCells() *
165 Omega_h::element_degree(oshFamily, oshDim, Omega_h::VERT),
167 Omega_h::classify_equal_order(
_oshMesh.get(), oshDim, dummyEqv2v,
172 auto it = vtkSmartPointer<vtkCellIterator>::Take(
173 sideSet.sides->NewCellIterator());
175 Omega_h::element_degree(oshFamily, oshDim - 1, Omega_h::VERT);
176 Omega_h::HostWrite<Omega_h::LO> ev2v(numNodes *
177 sideSet.sides->GetNumberOfCells());
178 for (
int i = (it->InitTraversal(), 0); !it->IsDoneWithTraversal();
179 it->GoToNextCell(), ++i) {
180 auto ids = it->GetPointIds();
181 for (Omega_h::Int d = 0; d < numNodes; ++d) {
182 ev2v[numNodes * i + d] = ids->GetId(d);
185 Omega_h::LOs eqv2v(ev2v);
188 Omega_h::HostWrite<Omega_h::LO> h_class_id(
189 sideSet.sides->GetNumberOfCells());
190 auto geoEntArr = sideSet.getGeoEntArr();
191 for (Omega_h::LO i = 0; i < h_class_id.size(); ++i) {
192 h_class_id[i] = geoEntArr->GetValue(i);
194 Omega_h::classify_equal_order(
_oshMesh.get(), oshDim - 1, eqv2v,
198 Omega_h::finalize_classification(
_oshMesh.get());
204 family == OMEGA_H_SIMPLEX
205 ? (dim == 3 ? VTK_TETRA
206 : (dim == 2 ? VTK_TRIANGLE
207 : (dim == 1 ? VTK_LINE
208 : (dim == 0 ? VTK_VERTEX
210 : (dim == 3 ? VTK_HEXAHEDRON
211 : (dim == 2 ? VTK_QUAD
212 : (dim == 1 ? VTK_LINE
213 : (dim == 0 ? VTK_VERTEX
214 : VTK_EMPTY_CELL)))));
218 switch (vtkCellType) {
223 case VTK_TETRA:
return OMEGA_H_SIMPLEX;
226 case VTK_HEXAHEDRON:
return OMEGA_H_HYPERCUBE;
229 std::cerr <<
"Omega_h supports only linear simplices and hypercubes. " 231 << vtkCellType <<
" is not supported." << std::endl;
238 switch (vtkCellType) {
240 case VTK_HEXAHEDRON:
return 3;
243 case VTK_QUAD:
return 2;
245 case VTK_LINE:
return 1;
247 case VTK_VERTEX:
return 0;
250 std::cerr <<
"Omega_h supports only linear simplices and hypercubes. " 252 << vtkCellType <<
" is not supported." << std::endl;
258 template <
typename OT,
typename VT>
260 const Omega_h::Tag<OT> *tag = Omega_h::as<OT>(tagBase);
261 Omega_h::Int ncomps = tagBase->ncomps();
262 Omega_h::HostRead<OT> tagArray(tag->array());
264 vtkArray->SetName(tagBase->name().c_str());
265 vtkArray->SetNumberOfComponents(ncomps);
266 vtkArray->SetNumberOfValues(tagArray.size());
268 for (Omega_h::LO i = 0; i < tagArray.size(); ++i)
269 vtkArray->SetValue(i, tagArray.get(i));
273 vtkSmartPointer<vtkDataArray> &vtkArray) {
274 switch (tagBase->type()) {
276 vtkSmartPointer<vtkTypeInt8Array> vtkArray_tmp =
278 Otag2Varray<Omega_h::I8, vtkTypeInt8Array>(tagBase, vtkArray_tmp);
279 vtkArray = vtkArray_tmp;
283 vtkSmartPointer<vtkTypeInt32Array> vtkArray_tmp =
285 Otag2Varray<Omega_h::I32, vtkTypeInt32Array>(tagBase, vtkArray_tmp);
286 vtkArray = vtkArray_tmp;
290 vtkSmartPointer<vtkTypeInt64Array> vtkArray_tmp =
292 Otag2Varray<Omega_h::I64, vtkTypeInt64Array>(tagBase, vtkArray_tmp);
293 vtkArray = vtkArray_tmp;
297 vtkSmartPointer<vtkTypeFloat64Array> vtkArray_tmp =
299 Otag2Varray<Omega_h::Real, vtkTypeFloat64Array>(tagBase, vtkArray_tmp);
300 vtkArray = vtkArray_tmp;
307 Omega_h::Int oshDim) {
309 case 2:
return oshFace;
312 case OMEGA_H_SIMPLEX:
return (oshFace + 3) % 4;
313 case OMEGA_H_HYPERCUBE:
329 const std::string &geo,
330 const std::string &link) {
333 if (!oshMesh || !oshMesh->is_valid())
return {
vtkMesh,
"",
"", {}};
344 Omega_h::Int dim = oshMesh->dim();
349 Omega_h_Family family = oshMesh->family();
352 auto linkName = link;
356 bool validSideSet =
true;
359 vtkSmartPointer<vtkPoints>
points =
361 points->Allocate(oshMesh->nverts());
362 std::vector<double>
nodes;
364 Omega_h::HostRead<Omega_h::Real> h_coord(oshMesh->coords());
366 for (Omega_h::LO i = 0; i < oshMesh->nverts(); ++i) {
367 points->InsertNextPoint(h_coord[i * dim + 0], h_coord[i * dim + 1],
368 dim == 2 ? 0 : h_coord[i * dim + 2]);
372 std::vector<size_t> nodeTags;
376 Omega_h::Int deg = Omega_h::element_degree(family, dim, OMEGA_H_VERT);
377 Omega_h::HostRead<Omega_h::LO> h_ev2v(oshMesh->ask_elem_verts());
379 vtkMesh->Allocate(oshMesh->nelems());
381 for (Omega_h::LO nelem = 0; nelem < oshMesh->nelems(); ++nelem) {
383 ptIds->Allocate(deg);
385 for (Omega_h::Int nvert = 0; nvert < deg; ++nvert)
386 ptIds->InsertNextId(h_ev2v[nelem * deg + nvert]);
388 vtkMesh->InsertNextCell(vtk_type, ptIds);
393 for (Omega_h::Int itag = 0; itag < oshMesh->ntags(Omega_h::VERT); ++itag) {
394 vtkSmartPointer<vtkDataArray> vtkArray;
395 auto oshTagName = oshMesh->get_tag(Omega_h::VERT, itag)->name();
396 if (oshTagName !=
"class_dim" && oshTagName !=
"class_id" &&
397 oshTagName !=
"coordinates" && oshTagName !=
"global" &&
398 oshTagName !=
"local") {
403 vtkMesh->GetPointData()->AddArray(vtkArray);
408 for (Omega_h::Int itag = 0; itag < oshMesh->ntags(dim); ++itag) {
409 vtkSmartPointer<vtkDataArray> vtkArray;
410 auto oshTagName = oshMesh->get_tag(dim, itag)->name();
411 if (oshTagName !=
"class_dim" && oshTagName !=
"class_id" &&
412 oshTagName !=
"global" && oshTagName !=
"local") {
414 vtkMesh->GetCellData()->AddArray(vtkArray);
422 sideSetPD->SetPoints(
vtkMesh->GetPoints());
423 sideSetPD->Allocate();
426 sideSetOrigCellId->SetNumberOfComponents(2);
428 sideSetCellFaceId->SetNumberOfComponents(2);
431 std::map<Omega_h::ClassId, std::set<Omega_h::ClassId>> entities;
433 std::vector<Omega_h::ClassId> entities_boundary;
434 Omega_h::HostRead<Omega_h::ClassId> arr_id;
436 if (oshMesh->has_tag(dim,
"class_id")) {
437 arr_id = oshMesh->get_array<Omega_h::ClassId>(dim,
"class_id");
439 validSideSet =
false;
444 if (validSideSet && oshMesh->has_tag(dim - 1,
"class_id") &&
445 oshMesh->has_tag(dim - 1,
"class_dim")) {
446 Omega_h::HostRead<Omega_h::ClassId> arr_id_boundary =
447 oshMesh->get_array<Omega_h::ClassId>(dim - 1,
"class_id");
448 Omega_h::HostRead<Omega_h::I8> arr_dim =
449 oshMesh->get_array<Omega_h::I8>(dim - 1,
"class_dim");
450 auto parent = oshMesh->ask_up(dim - 1, dim);
451 Omega_h::HostRead<Omega_h::LO> parent_a2ab = parent.a2ab;
452 Omega_h::HostRead<Omega_h::LO> parent_ab2b = parent.ab2b;
453 Omega_h::HostRead<Omega_h::I8> parent_codes = parent.codes;
454 for (Omega_h::LO i = 0; i < arr_dim.size(); ++i) {
455 if (arr_dim[i] == dim - 1) {
456 bool newEntityBoundary =
false;
457 auto oshEntity = arr_id_boundary[i];
458 auto entityIter = std::find(entities_boundary.begin(),
459 entities_boundary.end(), oshEntity);
460 if (entityIter == entities_boundary.end()) {
461 entities_boundary.emplace_back(oshEntity);
462 newEntityBoundary =
true;
464 std::array<vtkIdType, 2> origCell{-1, -1};
465 std::array<int, 2> cellFace{-1, -1};
466 Omega_h::ClassId firstParentEnt = -1;
467 for (
int j = 0; j < parent_a2ab[i + 1] - parent_a2ab[i]; ++j) {
468 auto ab = parent_ab2b[i + j];
469 auto b = parent_ab2b[ab];
471 firstParentEnt = arr_id[b];
473 if (newEntityBoundary) {
474 entities[arr_id[b]].emplace(oshEntity);
476 auto code = parent_codes[ab];
477 auto oshFace = Omega_h::code_which_down(code);
478 if (j == 0 || (j == 1 && arr_id[b] < firstParentEnt)) {
479 origCell[1] = origCell[0];
480 cellFace[1] = cellFace[0];
489 ?
vtkMesh->GetCell(origCell[0])->GetEdge(cellFace[0])
490 :
vtkMesh->GetCell(origCell[0])->GetFace(cellFace[0]);
491 sideSetPD->InsertNextCell(side->GetCellType(), side->GetPointIds());
492 sideSetOrigCellId->InsertNextTypedTuple(origCell.data());
493 sideSetCellFaceId->InsertNextTypedTuple(cellFace.data());
494 sideSetEntities->InsertNextValue(oshEntity);
497 Omega_h::HostRead<Omega_h::LO> point_id = oshMesh->ask_verts_of(dim - 1);
501 vtkEntities->SetName(linkName.c_str());
502 vtkEntities->SetNumberOfValues(
vtkMesh->GetNumberOfCells());
503 for (vtkIdType i = 0; i <
vtkMesh->GetNumberOfCells(); ++i) {
505 vtkEntities->SetValue(i, arr_id[i]);
507 vtkMesh->GetCellData()->AddArray(vtkEntities);
511 {sideSetPD, sideSetEntities, sideSetOrigCellId, sideSetCellFaceId}};
517 template <
typename VT,
typename OT>
518 void Varray2Otag(Omega_h::Mesh *oshMesh, VT *vtkArray, Omega_h::Int oshDim) {
519 Omega_h::HostWrite<OT> h_oshArray;
520 h_oshArray = Omega_h::HostWrite<OT>(vtkArray->GetNumberOfValues(),
521 vtkArray->GetClassName());
523 for (vtkIdType i = 0; i < vtkArray->GetNumberOfValues(); ++i)
524 h_oshArray.set(i, vtkArray->GetValue(i));
526 Omega_h::Read<OT> oshArray(h_oshArray);
528 oshMesh->add_tag(oshDim, vtkArray->GetName(),
529 vtkArray->GetNumberOfComponents(), oshArray);
532 template <
typename VT>
533 void Varray2Otag2(Omega_h::Mesh *oshMesh, VT *vtkArray, Omega_h::Int oshDim) {
535 VT,
typename std::conditional<
536 sizeof(
typename VT::ValueType) <= 1, Omega_h::I8,
537 typename std::conditional<
538 sizeof(
typename VT::ValueType) <= 4, Omega_h::I32,
539 typename std::enable_if<
sizeof(
typename VT::ValueType) <= 8,
540 Omega_h::I64>::type>::type>::type>(
541 oshMesh, vtkArray, oshDim);
545 vtkSmartPointer<vtkDataArray> &vtkArray,
546 Omega_h::Int oshDim) {
547 switch (vtkArray->GetDataType()) {
549 vtkSmartPointer<vtkFloatArray> vtkArray_tmp =
550 vtkFloatArray::FastDownCast(vtkArray);
551 Varray2Otag<vtkFloatArray, Omega_h::Real>(oshMesh, vtkArray_tmp, oshDim);
552 vtkArray = vtkArray_tmp;
556 vtkSmartPointer<vtkDoubleArray> vtkArray_tmp =
557 vtkDoubleArray::FastDownCast(vtkArray);
558 Varray2Otag<vtkDoubleArray, Omega_h::Real>(oshMesh, vtkArray_tmp, oshDim);
559 vtkArray = vtkArray_tmp;
563 vtkSmartPointer<vtkCharArray> vtkArray_tmp =
564 vtkCharArray::FastDownCast(vtkArray);
565 Varray2Otag2<vtkCharArray>(oshMesh, vtkArray_tmp, oshDim);
566 vtkArray = vtkArray_tmp;
569 case VTK_SIGNED_CHAR: {
570 vtkSmartPointer<vtkSignedCharArray> vtkArray_tmp =
571 vtkSignedCharArray::FastDownCast(vtkArray);
572 Varray2Otag2<vtkSignedCharArray>(oshMesh, vtkArray_tmp, oshDim);
573 vtkArray = vtkArray_tmp;
577 vtkSmartPointer<vtkShortArray> vtkArray_tmp =
578 vtkShortArray::FastDownCast(vtkArray);
579 Varray2Otag2<vtkShortArray>(oshMesh, vtkArray_tmp, oshDim);
580 vtkArray = vtkArray_tmp;
584 vtkSmartPointer<vtkIntArray> vtkArray_tmp =
585 vtkIntArray::FastDownCast(vtkArray);
586 Varray2Otag2<vtkIntArray>(oshMesh, vtkArray_tmp, oshDim);
587 vtkArray = vtkArray_tmp;
591 vtkSmartPointer<vtkLongArray> vtkArray_tmp =
592 vtkLongArray::FastDownCast(vtkArray);
593 Varray2Otag2<vtkLongArray>(oshMesh, vtkArray_tmp, oshDim);
594 vtkArray = vtkArray_tmp;
598 vtkSmartPointer<vtkIdTypeArray> vtkArray_tmp =
599 vtkIdTypeArray::FastDownCast(vtkArray);
600 Varray2Otag2<vtkIdTypeArray>(oshMesh, vtkArray_tmp, oshDim);
601 vtkArray = vtkArray_tmp;
604 case VTK_LONG_LONG: {
605 vtkSmartPointer<vtkLongLongArray> vtkArray_tmp =
606 vtkLongLongArray::FastDownCast(vtkArray);
607 Varray2Otag2<vtkLongLongArray>(oshMesh, vtkArray_tmp, oshDim);
608 vtkArray = vtkArray_tmp;
628 std::cerr <<
"VTK type " << vtkArray->GetDataTypeAsString()
629 <<
" is not supported as an Omega_h type." << std::endl;
636 Omega_h::Library *lib) {
640 auto *oshMesh =
new Omega_h::Mesh(lib);
643 if (
vtkMesh->GetNumberOfCells() == 0) {
646 auto link = geoMesh.
link;
647 auto sideSet = geoMesh.
sideSet;
650 if (ct->GetNumberOfTypes() != 1) {
651 std::cerr <<
"Error: Omega_h mesh does not support mixed meshes. Received " 653 << ct->GetNumberOfTypes() <<
" different cell types." 657 Omega_h_Family oshFamily =
659 Omega_h::Int oshDim =
664 Omega_h::HostWrite<Omega_h::Real> h_oshCoords(oshDim *
666 vtkSmartPointer<vtkPoints> vtkPoints =
vtkMesh->GetPoints();
668 std::array<double, 3> point{};
669 for (vtkIdType i = 0; i < vtkPoints->GetNumberOfPoints(); ++i) {
670 vtkPoints->GetPoint(i, point.data());
672 h_oshCoords[i * oshDim] = point[0];
673 h_oshCoords[i * oshDim + 1] = point[1];
674 if (oshDim >= 3) h_oshCoords[i * oshDim + 2] = point[2];
677 Omega_h::Reals oshCoords(h_oshCoords);
680 auto it =
vtkMesh->NewCellIterator();
681 auto numNodes = Omega_h::element_degree(oshFamily, oshDim, Omega_h::VERT);
682 Omega_h::HostWrite<Omega_h::LO> ev2v(numNodes *
685 for (it->InitTraversal(); !it->IsDoneWithTraversal();
686 it->GoToNextCell()) {
687 auto ids = it->GetPointIds();
688 for (Omega_h::Int d = 0; d < numNodes; ++d) {
689 ev2v[numNodes * i + d] = ids->GetId(d);
694 Omega_h::LOs eqv2v(ev2v);
695 Omega_h::build_from_elems_and_coords(oshMesh, oshFamily, oshDim, eqv2v,
696 Omega_h::Reals(h_oshCoords));
698 Omega_h::HostWrite<Omega_h::ClassId> h_class_id(
700 auto linkArr =
vtkMesh->GetCellData()->GetArray(link.c_str());
702 for (i = 0; i < h_class_id.size(); ++i) {
704 static_cast<Omega_h::ClassId
>(linkArr->GetComponent(i, 0));
706 Omega_h::classify_equal_order(oshMesh, oshDim, eqv2v,
712 if (sideSet.sides && sideSet.sides->GetNumberOfCells() > 0) {
713 auto it = sideSet.sides->NewCellIterator();
715 Omega_h::element_degree(oshFamily, oshDim - 1, Omega_h::VERT);
716 Omega_h::HostWrite<Omega_h::LO> ev2v(numNodes *
717 sideSet.sides->GetNumberOfCells());
719 for (it->InitTraversal(); !it->IsDoneWithTraversal();
720 it->GoToNextCell()) {
721 auto ids = it->GetPointIds();
722 for (Omega_h::Int d = 0; d < numNodes; ++d) {
723 ev2v[numNodes * i + d] = ids->GetId(d);
728 Omega_h::LOs eqv2v(ev2v);
731 Omega_h::HostWrite<Omega_h::LO> h_class_id(
732 sideSet.sides->GetNumberOfCells());
734 for (i = 0; i < h_class_id.size(); ++i) {
735 h_class_id[i] = geoEntArr->GetValue(i);
737 Omega_h::classify_equal_order(oshMesh, oshDim - 1, eqv2v,
743 for (
int a = 0; a <
vtkMesh->GetPointData()->GetNumberOfArrays(); ++a) {
744 vtkSmartPointer<vtkDataArray> da =
vtkMesh->GetPointData()->GetArray(a);
752 for (
int a = 0; a <
vtkMesh->GetCellData()->GetNumberOfArrays(); ++a) {
753 vtkSmartPointer<vtkDataArray> da =
vtkMesh->GetCellData()->GetArray(a);
754 if (da && strcmp(da->GetName(), link.c_str()) != 0) {
759 Omega_h::finalize_classification(oshMesh);
765 _oshMesh = std::unique_ptr<Omega_h::Mesh>(
new Omega_h::Mesh(*oshMesh));
A concrete implementation of geoMeshBase representing a Omega_h::Mesh.
int oshFace2vtkFace(int oshFace, Omega_h_Family oshFamily, Omega_h::Int oshDim)
void setOshMesh(Omega_h::Mesh *oshMesh)
Set the mesh to an existing Omega_h::Mesh.
virtual void report(std::ostream &out) const =0
Print a report about the mesh.
static std::shared_ptr< Omega_h::Library > GetLibrary()
Initialize Omega_h.
std::vector< std::pair< vtkIdType, std::vector< double > > > nodes
Each entry stores (node ID in .inp file, coordinates)
Omega_h_Family getOmega_hFamilyFromVTKType(VTKCellType vtkCellType)
vtkSmartPointer< vtkUnstructuredGrid > mesh
void Otag2Varray(const Omega_h::TagBase *tagBase, VT *vtkArray)
geoMeshBase * Read(const std::string &fileName)
Read a mesh from file.
std::unique_ptr< Omega_h::Mesh > _oshMesh
virtual void reconstructGeo()
Construct the geometry from the mesh alone.
static constexpr auto GEO_ENT_DEFAULT_NAME
geoMeshBase * New(MeshType meshType)
Create a new mesh object.
void reconstructGeo() override
Construct the geometry from the mesh alone.
void write(const std::string &fileName) override
Write mesh to file.
void resetNative() override
static GeoMesh osh2GM(Omega_h::Mesh *oshMesh, const std::string &geo="", const std::string &link="")
void setGeoMesh(const geoMeshBase::GeoMesh &geoMesh)
Set the underlying geometry object.
std::string find_ext(const std::string &fname)
static std::shared_ptr< OmegaHInterface > instance
void getVtkDataArrayFromOmega_hTag(const Omega_h::TagBase *tagBase, vtkSmartPointer< vtkDataArray > &vtkArray)
void takeGeoMesh(geoMeshBase *otherGeoMesh) override
Take the GeoMesh of another geoMeshBase.
void getOmega_hArrayFromVtkDataArray(Omega_h::Mesh *oshMesh, vtkSmartPointer< vtkDataArray > &vtkArray, Omega_h::Int oshDim)
std::shared_ptr< meshBase > mesh
oshGeoMesh()
Create a oshGeoMesh from a file.
VTKCellType getVTKTypeFromOmega_hFamilyDim(Omega_h_Family family, Omega_h::Int dim)
std::vector< vtkIdType > points
points given by id in .inp file
void report(std::ostream &out) const override
Print a report about the mesh.
vtkSmartPointer< vtkIntArray > getGeoEntArr() const
static Omega_h::Mesh * GM2osh(const GeoMesh &geoMesh, Omega_h::Library *lib=nullptr)
vtkStandardNewMacro(exoGeoMesh)
std::shared_ptr< Omega_h::Library > library
Omega_h::Int getOmega_hDimFromVTKType(VTKCellType vtkCellType)
void Varray2Otag2(Omega_h::Mesh *oshMesh, VT *vtkArray, Omega_h::Int oshDim)
management class for Omega_h::Library
abstract class to specify geometry and mesh data
void Varray2Otag(Omega_h::Mesh *oshMesh, VT *vtkArray, Omega_h::Int oshDim)
const GeoMesh & getGeoMesh() const
Get the underlying geometry object.
virtual void takeGeoMesh(geoMeshBase *otherGeoMesh)
Take the GeoMesh of another geoMeshBase.