21   const int dim=dest->FESpace()->GetMesh()->SpaceDimension();
 
   22   const int vd=dest->VectorDim(); 
 
   23   const int np=src.
Size()/vd; 
 
   28   for (
int i=0; i<np; i++)
 
   30      pnd.
xx[0]=coords(i*
dim+0);
 
   31      pnd.
xx[1]=coords(i*
dim+1);
 
   34      for (
int j=0; j<
dim; j++)
 
   36         if (pnd.
xx[j]>(maxbb[j]+lerr)) {pt_inside_bbox=
false; 
break;}
 
   37         if (pnd.
xx[j]<(minbb[j]-lerr)) {pt_inside_bbox=
false; 
break;}
 
   42         kdt->FindClosestPoint(pnd,ind,dist);
 
   49                  for (
int di=0; di<vd; di++)
 
   51                     (*dest)[di*np+ind]=src[di*np+i];
 
   56                  for (
int di=0; di<vd; di++)
 
   58                     (*dest)[di*np+ind]=src[di+i*vd];
 
   66                  for (
int di=0; di<vd; di++)
 
   68                     (*dest)[di+ind*vd]=src[di*np+i];
 
   73                  for (
int di=0; di<vd; di++)
 
   75                     (*dest)[di+ind*vd]=src[di+i*vd];
 
 
   88   const int dim=dest->FESpace()->GetMesh()->SpaceDimension();
 
   89   const int vd=dest->VectorDim(); 
 
   90   const int np=src.
Size()/vd; 
 
   94   KDTree3D::PointND pnd;
 
   95   for (
int i=0; i<np; i++)
 
   97      pnd.xx[0]=coords(i*
dim+0);
 
   98      pnd.xx[1]=coords(i*
dim+1);
 
   99      pnd.xx[2]=coords(i*
dim+2);
 
  102      for (
int j=0; j<
dim; j++)
 
  104         if (pnd.xx[j]>(maxbb[j]+lerr)) {pt_inside_bbox=
false; 
break;}
 
  105         if (pnd.xx[j]<(minbb[j]-lerr)) {pt_inside_bbox=
false; 
break;}
 
  110         kdt->FindClosestPoint(pnd,ind,dist);
 
  117                  for (
int di=0; di<vd; di++)
 
  119                     (*dest)[di*np+ind]=src[di*np+i];
 
  124                  for (
int di=0; di<vd; di++)
 
  126                     (*dest)[di*np+ind]=src[di+i*vd];
 
  134                  for (
int di=0; di<vd; di++)
 
  136                     (*dest)[di+ind*vd]=src[di*np+i];
 
  141                  for (
int di=0; di<vd; di++)
 
  143                     (*dest)[di+ind*vd]=src[di+i*vd];
 
 
  159   int vd=dest->VectorDim();
 
  184      trans->Transform(*ir,elco);
 
  185      for (
int d=0; d<2; d++)
 
  187         maxbb_src(d)=elco(d,0);
 
  188         minbb_src(d)=elco(d,0);
 
  191      for (
int i=0; i<gf.
FESpace()->GetNE(); i++)
 
  199         trans->Transform(*ir,elco);
 
  202            for (
int d=0; d<2; d++)
 
  204               coo[vdofs[
p]*2/isca+d]=elco(d,
p);
 
  206               if (maxbb_src(d)<elco(d,
p)) {maxbb_src(d)=elco(d,
p);}
 
  207               if (minbb_src(d)>elco(d,
p)) {minbb_src(d)=elco(d,
p);}
 
  220      for (
int i=0; i<2; i++)
 
  222         if (minbb_src(i)>maxbb(i)) {flag=
false;}
 
  223         if (maxbb_src(i)<minbb(i)) {flag=
false;}
 
  225      if (flag==
false) {
return;}
 
  230      for (
int i=0; i<np; i++)
 
  232         pnd.
xx[0]=coo(i*2+0);
 
  233         pnd.
xx[1]=coo(i*2+1);
 
  235         kdt->FindClosestPoint(pnd,ind,dist);
 
  242                  for (
int di=0; di<vd; di++)
 
  244                     (*dest)[di*np+ind]=gf[di*np+i];
 
  249                  for (
int di=0; di<vd; di++)
 
  251                     (*dest)[di*np+ind]=gf[di+i*vd];
 
  259                  for (
int di=0; di<vd; di++)
 
  261                     (*dest)[di+ind*vd]=gf[di*np+i];
 
  266                  for (
int di=0; di<vd; di++)
 
  268                     (*dest)[di+ind*vd]=gf[di+i*vd];
 
 
  281   int dim=dest->FESpace()->GetMesh()->SpaceDimension();
 
  285   int vd=dest->VectorDim();
 
  310      trans->Transform(*ir,elco);
 
  311      for (
int d=0; d<
dim; d++)
 
  313         maxbb_src(d)=elco(d,0);
 
  314         minbb_src(d)=elco(d,0);
 
  317      for (
int i=0; i<gf.
FESpace()->GetNE(); i++)
 
  325         trans->Transform(*ir,elco);
 
  328            for (
int d=0; d<
dim; d++)
 
  330               coo[vdofs[
p]*
dim/isca+d]=elco(d,
p);
 
  332               if (maxbb_src(d)<elco(d,
p)) {maxbb_src(d)=elco(d,
p);}
 
  333               if (minbb_src(d)>elco(d,
p)) {minbb_src(d)=elco(d,
p);}
 
  346      for (
int i=0; i<
dim; i++)
 
  348         if (minbb_src(i)>maxbb(i)) {flag=
false;}
 
  349         if (maxbb_src(i)<minbb(i)) {flag=
false;}
 
  351      if (flag==
false) {
return;}
 
  355      KDTree3D::PointND pnd;
 
  356      for (
int i=0; i<np; i++)
 
  358         pnd.xx[0]=coo(i*
dim+0);
 
  359         pnd.xx[1]=coo(i*
dim+1);
 
  360         pnd.xx[2]=coo(i*
dim+2);
 
  362         kdt->FindClosestPoint(pnd,ind,dist);
 
  369                  for (
int di=0; di<vd; di++)
 
  371                     (*dest)[di*np+ind]=gf[di*np+i];
 
  376                  for (
int di=0; di<vd; di++)
 
  378                     (*dest)[di*np+ind]=gf[di+i*vd];
 
  386                  for (
int di=0; di<vd; di++)
 
  388                     (*dest)[di+ind*vd]=gf[di*np+i];
 
  393                  for (
int di=0; di<vd; di++)
 
  395                     (*dest)[di+ind*vd]=gf[di+i*vd];
 
 
Data type dense matrix using column-major storage.
void SetSize(int s)
Change the size of the DenseMatrix to s x s.
ElementTransformation * GetElementTransformation(int i) const
Returns ElementTransformation for the i-th element.
DofTransformation * GetElementVDofs(int i, Array< int > &vdofs) const
Returns indices of degrees of freedom for the i'th element. The returned indices are offsets into an ...
virtual const FiniteElement * GetFE(int i) const
Returns pointer to the FiniteElement in the FiniteElementCollection associated with i'th element in t...
Ordering::Type GetOrdering() const
Return the ordering method.
int GetVSize() const
Return the number of vector dofs, i.e. GetNDofs() x GetVDim().
int GetVDim() const
Returns the vector dimension of the finite element space.
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()
Class for an integration rule - an Array of IntegrationPoint.
int GetNPoints() const
Returns the number of the points in the integration rule.
void Project(const Vector &coords, const Vector &src, int ordering=Ordering::byNODES, real_t lerr=1e-8) override
int Size() const
Returns the size of the vector.
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)
Tfloat xx[ndim]
Coordinates of the point.