12#ifndef MFEM_KDTREE_PROJECTION
13#define MFEM_KDTREE_PROJECTION
37 int ordering,
real_t lerr) = 0;
60 std::unique_ptr<KDTree<int,real_t,kdim>> kdt;
88 MFEM_VERIFY(kdim==
dim,
"GridFunction dimension does not match!");
90 kdt=std::unique_ptr<KDTree<int,real_t,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);}
Base class for KDTreeNodalProjection.
virtual void Project(const GridFunction &gf, real_t lerr)=0
virtual ~BaseKDTreeNodalProjection()
virtual void Project(const Vector &coords, const Vector &src, int ordering, real_t lerr)=0
Data type dense matrix using column-major storage.
void SetSize(int s)
Change the size of the DenseMatrix to s x s.
void GetColumn(int c, Vector &col) const
Class FiniteElementSpace - responsible for providing FEM view of the mesh, mainly managing the set of...
Abstract class for all finite elements.
const IntegrationRule & GetNodes() const
Get a const reference to the nodes of the element.
Class for grid function - Vector with associated FE space.
FiniteElementSpace * FESpace()
Arbitrary order H1-conforming (continuous) finite elements.
Class for an integration rule - an Array of IntegrationPoint.
int GetNPoints() const
Returns the number of the points in the integration rule.
virtual void Project(const GridFunction &gf, real_t lerr=1e-8)
KDTreeNodalProjection(GridFunction &dest_)
virtual void Project(const Vector &coords, const Vector &src, int ordering=Ordering::byNODES, real_t lerr=1e-8)
Arbitrary order "L2-conforming" discontinuous finite elements.
int SpaceDimension() const
Dimension of the physical space containing the mesh.
void SetSize(int s)
Resize the vector to size s.
void trans(const Vector &u, Vector &x)
real_t p(const Vector &x, real_t t)