12 #ifndef MFEM_KDTREE_PROJECTION 13 #define MFEM_KDTREE_PROJECTION 15 #include "../general/kdtree.hpp" 37 int ordering,
double lerr) = 0;
60 std::unique_ptr<KDTree<int,double,kdim>> kdt;
81 dynamic_cast<const H1_FECollection*>(
space->FEColl()) !=
nullptr ||
82 dynamic_cast<const L2_FECollection*>(
space->FEColl()) !=
nullptr,
88 MFEM_VERIFY(kdim==
dim,
"GridFunction dimension does not match!");
90 kdt=std::unique_ptr<KDTree<int,double,kdim>>(
93 std::vector<bool> indt;
94 indt.resize(
space->GetVSize()/
space->GetVDim(),
true);
108 isca=
space->GetVDim();
115 space->GetElementVDofs(0,vdofs);
117 trans->Transform(*ir,elco);
118 for (
int d=0; d<
dim; d++)
124 for (
int i=0; i<
space->GetNE(); i++)
130 space->GetElementVDofs(i,vdofs);
132 trans->Transform(*ir,elco);
136 int bind=vdofs[
p]/isca;
137 if (indt[bind]==
true)
142 for (
int d=0; d<kdim; d++)
144 if (minbb[d]>elco(d,
p)) {minbb[d]=elco(d,
p);}
145 if (maxbb[d]<elco(d,
p)) {maxbb[d]=elco(d,
p);}
177 #endif // MFEM_KDTREE_PROJECTION Abstract class for all finite elements.
virtual ~BaseKDTreeNodalProjection()
void trans(const Vector &u, Vector &x)
int GetNPoints() const
Returns the number of the points in the integration rule.
Class for an integration rule - an Array of IntegrationPoint.
Class for grid function - Vector with associated FE space.
void SetSize(int s)
Resize the vector to size s.
Data type dense matrix using column-major storage.
KDTreeNodalProjection(GridFunction &dest_)
virtual void Project(const Vector &coords, const Vector &src, int ordering, double lerr)=0
void GetColumn(int c, Vector &col) const
FiniteElementSpace * FESpace()
double p(const Vector &x, double t)
Class FiniteElementSpace - responsible for providing FEM view of the mesh, mainly managing the set of...
Base class for KDTreeNodalProjection.
int SpaceDimension() const
Dimension of the physical space containing the mesh.
void SetSize(int s)
Change the size of the DenseMatrix to s x s.
const IntegrationRule & GetNodes() const
Get a const reference to the nodes of the element.
virtual void Project(const Vector &coords, const Vector &src, int ordering=Ordering::byNODES, double lerr=1e-8)