22#ifndef DFTFE_INTERPOLATECELLWISEDATATOPOINTS_H
23#define DFTFE_INTERPOLATECELLWISEDATATOPOINTS_H
25#include <boost/geometry.hpp>
26#include <boost/geometry/index/rtree.hpp>
27#include <boost/range/adaptors.hpp>
44 template <
typename T, dftfe::utils::MemorySpace memorySpace>
75 const std::vector<std::vector<double>> &targetPts,
76 const std::vector<dftfe::uInt> &numDofsPerElem,
78 const MPI_Comm &mpiComm);
117 bool resizeData =
false);
142 const std::shared_ptr<
155 bool resizeData =
false);
176 std::shared_ptr<dftfe::utils::mpi::MPIPatternP2P<memorySpace>>
178 std::unique_ptr<dftfe::utils::mpi::MPICommunicatorP2P<T, memorySpace>>
210 std::vector<std::shared_ptr<InterpolateFromCellToLocalPoints<memorySpace>>>
std::vector< std::shared_ptr< InterpolateFromCellToLocalPoints< memorySpace > > > d_interpolateLocalObj
Definition InterpolateCellWiseDataToPoints.h:211
std::vector< dftfe::uInt > d_ghostGlobalIds
Definition InterpolateCellWiseDataToPoints.h:204
dftfe::utils::MemoryStorage< dataTypes::number, memorySpace > d_tempOutputMemSpace
Definition InterpolateCellWiseDataToPoints.h:208
void interpolateSrcDataToTargetPoints(const std::shared_ptr< dftfe::linearAlgebra::BLASWrapper< dftfe::utils::MemorySpace::HOST > > &BLASWrapperPtr, const distributedCPUVec< T > &inputVec, const dftfe::uInt numberOfVectors, const dftfe::utils::MemoryStorage< dftfe::uInt, dftfe::utils::MemorySpace::HOST > &mapVecToCells, dftfe::utils::MemoryStorage< T, dftfe::utils::MemorySpace::HOST > &outputData, const dftfe::uInt blockSizeOfInputData, const dftfe::uInt blockSizeOfOutputData, const dftfe::uInt startIndexOfInputData, bool resizeData=false)
The function is same as above but set to dealii:distributed::Vector.
void interpolateSrcDataToTargetPoints(const std::shared_ptr< dftfe::linearAlgebra::BLASWrapper< memorySpace > > &BLASWrapperPtr, const dftfe::linearAlgebra::MultiVector< T, memorySpace > &inputVec, const dftfe::uInt numberOfVectors, const dftfe::utils::MemoryStorage< dftfe::uInt, memorySpace > &mapVecToCells, dftfe::utils::MemoryStorage< T, memorySpace > &outputData, const dftfe::uInt blockSizeOfInputData, const dftfe::uInt blockSizeOfOutputData, const dftfe::uInt startIndexOfInputData, bool resizeData=false)
This function interpolates from the data to the points passed to the constructor. The function copies...
dftfe::utils::MapPointsToCells< 3, 8 > d_mapPoints
Definition InterpolateCellWiseDataToPoints.h:163
std::vector< dftfe::uInt > d_cellShapeFuncStartIndex
Definition InterpolateCellWiseDataToPoints.h:165
dftfe::uInt d_verbosity
Definition InterpolateCellWiseDataToPoints.h:212
std::vector< std::vector< dftfe::uInt > > d_mapCellLocalToProcLocal
Definition InterpolateCellWiseDataToPoints.h:197
dftfe::uInt d_pointsFoundInProc
Definition InterpolateCellWiseDataToPoints.h:202
InterpolateCellWiseDataToPoints(const std::vector< std::shared_ptr< const dftfe::utils::Cell< 3 > > > &srcCells, std::vector< std::shared_ptr< InterpolateFromCellToLocalPoints< memorySpace > > > interpolateLocalObj, const std::vector< std::vector< double > > &targetPts, const std::vector< dftfe::uInt > &numDofsPerElem, const dftfe::uInt verbosity, const MPI_Comm &mpiComm)
This constructor computes the mapping between the targetPts and srcCells. In case of incompatible par...
dftfe::uInt d_numLocalPtsSze
Definition InterpolateCellWiseDataToPoints.h:200
dftfe::uInt d_numPointsLocal
Definition InterpolateCellWiseDataToPoints.h:189
std::shared_ptr< dftfe::utils::mpi::MPIPatternP2P< memorySpace > > d_mpiP2PPtrMemSpace
Definition InterpolateCellWiseDataToPoints.h:177
dftfe::utils::MemoryStorage< dataTypes::number, memorySpace > d_cellLevelParentNodalMemSpace
Definition InterpolateCellWiseDataToPoints.h:187
std::pair< dftfe::uInt, dftfe::uInt > d_localRange
Definition InterpolateCellWiseDataToPoints.h:205
const MPI_Comm d_mpiComm
Definition InterpolateCellWiseDataToPoints.h:166
std::unique_ptr< dftfe::utils::mpi::MPICommunicatorP2P< T, memorySpace > > d_mpiCommPtrMemSpace
Definition InterpolateCellWiseDataToPoints.h:179
std::vector< dftfe::uInt > d_cellPointStartIndex
TODO check if M=8 is optimal.
Definition InterpolateCellWiseDataToPoints.h:165
dftfe::uInt totalDofsInCells
Definition InterpolateCellWiseDataToPoints.h:193
std::vector< dftfe::uInt > d_numDofsPerElement
Definition InterpolateCellWiseDataToPoints.h:191
std::shared_ptr< dftfe::utils::mpi::MPIPatternP2P< dftfe::utils::MemorySpace::HOST > > d_mpiPatternP2PPtr
Definition InterpolateCellWiseDataToPoints.h:170
std::vector< dftfe::uInt > d_numPointsInCell
Definition InterpolateCellWiseDataToPoints.h:195
std::vector< dftfe::uInt > d_cumulativeDofs
Definition InterpolateCellWiseDataToPoints.h:192
dftfe::uInt d_numCells
Definition InterpolateCellWiseDataToPoints.h:190
std::shared_ptr< dftfe::utils::mpi::MPICommunicatorP2P< T, dftfe::utils::MemorySpace::HOST > > d_mpiCommP2PPtr
Definition InterpolateCellWiseDataToPoints.h:174
dftfe::utils::MemoryStorage< dftfe::uInt, memorySpace > d_mapPointToProcLocalMemSpace
Definition InterpolateCellWiseDataToPoints.h:183
void checkIfAllPointsAreFound(const std::vector< std::vector< double > > &targetPts)
Definition InterpolateFromCellToLocalPoints.h:36
Definition BLASWrapper.h:35
An class template to encapsulate a MultiVector. A MultiVector is a collection of vectors belonging t...
Definition MultiVector.h:127
This class provides the interface that will be required while interpolating a nodal data to arbitrary...
Definition Cell.h:45
This class takes in a bunch of points and finds the cell (provided as input) it lies in....
Definition MapPointsToCells.h:49
Definition MemoryStorage.h:33
Definition MPICommunicatorP2P.h:63
A class template to store the communication pattern (i.e., which entries/nodes to receive from which ...
Definition MPIPatternP2P.h:57
@ HOST
Definition MemorySpaceType.h:34
Definition pseudoPotentialToDftfeConverter.cc:34
dealii::LinearAlgebra::distributed::Vector< elem_type, dealii::MemorySpace::Host > distributedCPUVec
Definition headers.h:92
std::uint32_t uInt
Definition TypeConfig.h:10