29 #ifndef NEMOSYS_MESHSRCH_H_ 30 #define NEMOSYS_MESHSRCH_H_ 34 #include <vtkCellLocator.h> 36 #include "nemosys_export.h" 51 std::shared_ptr<meshSrch> ms;
69 std::vector<std::vector<double>>
getVertCrds()
const override {
70 return std::vector<std::vector<double>>();
73 return std::map<nemId_t, std::vector<double>>();
77 return std::vector<double>();
80 return std::vector<nemId_t>();
85 bool chkDuplElm()
const;
91 void FindPntsOnTriSrf(
const std::vector<double> &crds,
92 const std::vector<nemId_t> &conn,
93 std::set<nemId_t> &ids,
double tol = 0.1e-15)
const;
96 void FindPntsOnEdge(std::vector<double> &crds, std::set<nemId_t> &ids,
97 double tol = 0.1e-15)
const;
103 void FindCellsInPolyData(vtkPolyData *polyData, std::vector<nemId_t> &ids,
104 bool query3Donly =
true,
double tol = 0.1e-15)
const;
107 void FindCellsWithinBounds(std::vector<double> &bb, std::vector<nemId_t> &ids,
108 bool fulImrsd =
true);
112 void FindCellsInTriSrf(
const std::vector<std::vector<double>> &crds,
113 const std::vector<std::vector<vtkIdType>> &conns,
114 std::vector<nemId_t> &ids,
bool query3Donly =
true,
115 double tol = 0.1e-15)
const;
118 void FindCellsInSphere(
const std::vector<double> ¢er,
double radius,
119 std::vector<nemId_t> &ids,
bool query3Donly =
true,
120 double tol = 0.1e-15)
const;
126 return vtkSmartPointer<vtkDataSet>();
129 void read(
const std::string &fname = std::string())
override {}
131 void write(
const std::string &fname)
const override {}
135 void buildCellLocator();
139 vtkSmartPointer<vtkCellLocator>
vcl;
142 #endif // NEMOSYS_MESHSRCH_H_ int getCellType() const override
get cell type as an integer assumes all elements are the same type
std::vector< nemId_t > getConnectivities() const override
get connectivities.
void read(const std::string &fname=std::string()) override
abstract read method reserved for derived classes
A brief description of meshBase.
void inspectEdges(const std::string &ofname) const override
get edge lengths of dataSet
void write(const std::string &fname) const override
write the mesh to file named fname
vtkSmartPointer< vtkDataSet > extractSurface() override
extract the surface mesh
virtual std::vector< std::vector< double > > getCellVec(nemId_t id) const =0
get vector of coords of cell with id
std::vector< double > getCellLengths() const override
get diameter of circumsphere of each cell
virtual void write() const
write the mesh to file named after the private var 'filename'.
vtkSmartPointer< vtkCellLocator > vcl
static meshSrch * Create(meshBase *mb)
virtual std::vector< double > getCellCenter(nemId_t cellID) const =0
get center of a cell
int getCellDataIdx(const std::string &name) override
<>
static std::shared_ptr< meshSrch > CreateShared(meshBase *mb)
std::vector< std::vector< double > > getVertCrds() const override
get 3 vecs with x,y and z coords
std::map< nemId_t, std::vector< double > > getCell(nemId_t id) const override
get cell with id
static std::unique_ptr< meshSrch > CreateUnique(meshBase *mb)
virtual std::vector< double > getPoint(nemId_t id) const =0
get point with id