MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
mfem::KDTreeNodalProjection< kdim > Class Template Reference

#include <kdtree.hpp>

Inheritance diagram for mfem::KDTreeNodalProjection< kdim >:
[legend]
Collaboration diagram for mfem::KDTreeNodalProjection< kdim >:
[legend]

Public Member Functions

 KDTreeNodalProjection (GridFunction &dest_)
 
virtual void Project (const Vector &coords, const Vector &src, int ordering=Ordering::byNODES, real_t lerr=1e-8)
 
virtual void Project (const GridFunction &gf, real_t lerr=1e-8)
 
void Project (const Vector &coords, const Vector &src, int ordering, real_t lerr)
 
void Project (const Vector &coords, const Vector &src, int ordering, real_t lerr)
 
void Project (const GridFunction &gf, real_t lerr)
 
void Project (const GridFunction &gf, real_t lerr)
 
- Public Member Functions inherited from mfem::BaseKDTreeNodalProjection
virtual ~BaseKDTreeNodalProjection ()
 

Detailed Description

template<int kdim = 3>
class mfem::KDTreeNodalProjection< kdim >

The class provides methods for projecting function values evaluated on a set of points to a grid function. The values are directly copied to the nodal values of the target grid function if any of the points is matching a node of the grid function. For example, if a parallel grid function is saved in parallel, every saved chunk can be read on every other process and mapped to a local grid function that does not have the same structure as the original one. The functionality is based on a kd-tree search in a cloud of points.

Definition at line 56 of file kdtree.hpp.

Constructor & Destructor Documentation

◆ KDTreeNodalProjection()

template<int kdim = 3>
mfem::KDTreeNodalProjection< kdim >::KDTreeNodalProjection ( GridFunction & dest_)
inline

The constructor takes as input an L2 or H1 grid function (it can be a vector grid function). The Project method copies a set of values to the grid function.

Definition at line 75 of file kdtree.hpp.

Member Function Documentation

◆ Project() [1/6]

void mfem::KDTreeNodalProjection< 2 >::Project ( const GridFunction & gf,
real_t lerr )
virtual

The project method can be called as many times as necessary with different grid functions gf. A node in the target grid function is matching a node from the source grid function if the distance between them is smaller than lerr.

Implements mfem::BaseKDTreeNodalProjection.

Definition at line 153 of file kdtree.cpp.

◆ Project() [2/6]

void mfem::KDTreeNodalProjection< 3 >::Project ( const GridFunction & gf,
real_t lerr )
virtual

The project method can be called as many times as necessary with different grid functions gf. A node in the target grid function is matching a node from the source grid function if the distance between them is smaller than lerr.

Implements mfem::BaseKDTreeNodalProjection.

Definition at line 278 of file kdtree.cpp.

◆ Project() [3/6]

template<int kdim = 3>
virtual void mfem::KDTreeNodalProjection< kdim >::Project ( const GridFunction & gf,
real_t lerr = 1e-8 )
virtual

The project method can be called as many times as necessary with different grid functions gf. A node in the target grid function is matching a node from the source grid function if the distance between them is smaller than lerr.

Implements mfem::BaseKDTreeNodalProjection.

◆ Project() [4/6]

void mfem::KDTreeNodalProjection< 2 >::Project ( const Vector & coords,
const Vector & src,
int ordering,
real_t lerr )
virtual

The projection method can be called as many time as necessary with different sets of coordinates and corresponding values. For vector grid function, users have to specify the data ordering and for all cases the user can modify the error tolerance err to smaller or bigger value. A node in the target grid function is matching a point with coordinates specified in the vector coords if the distance between them is smaller than lerr.

Implements mfem::BaseKDTreeNodalProjection.

Definition at line 18 of file kdtree.cpp.

◆ Project() [5/6]

void mfem::KDTreeNodalProjection< 3 >::Project ( const Vector & coords,
const Vector & src,
int ordering,
real_t lerr )
virtual

The projection method can be called as many time as necessary with different sets of coordinates and corresponding values. For vector grid function, users have to specify the data ordering and for all cases the user can modify the error tolerance err to smaller or bigger value. A node in the target grid function is matching a point with coordinates specified in the vector coords if the distance between them is smaller than lerr.

Implements mfem::BaseKDTreeNodalProjection.

Definition at line 85 of file kdtree.cpp.

◆ Project() [6/6]

template<int kdim = 3>
virtual void mfem::KDTreeNodalProjection< kdim >::Project ( const Vector & coords,
const Vector & src,
int ordering = Ordering::byNODES,
real_t lerr = 1e-8 )
virtual

The projection method can be called as many time as necessary with different sets of coordinates and corresponding values. For vector grid function, users have to specify the data ordering and for all cases the user can modify the error tolerance err to smaller or bigger value. A node in the target grid function is matching a point with coordinates specified in the vector coords if the distance between them is smaller than lerr.

Implements mfem::BaseKDTreeNodalProjection.


The documentation for this class was generated from the following file: