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<unsigned int> & numDofsPerElem,
77 const unsigned int verbosity,
78 const MPI_Comm & mpiComm);
110 const unsigned int numberOfVectors,
114 const unsigned int blockSizeOfInputData,
115 const unsigned int blockSizeOfOutputData,
116 const unsigned int startIndexOfInputData,
117 bool resizeData =
false);
142 const std::shared_ptr<
146 const unsigned int numberOfVectors,
152 const unsigned int blockSizeOfInputData,
153 const unsigned int blockSizeOfOutputData,
154 const unsigned int startIndexOfInputData,
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< std::vector< size_type > > d_mapCellLocalToProcLocal
Definition InterpolateCellWiseDataToPoints.h:197
void interpolateSrcDataToTargetPoints(const std::shared_ptr< dftfe::linearAlgebra::BLASWrapper< memorySpace > > &BLASWrapperPtr, const dftfe::linearAlgebra::MultiVector< T, memorySpace > &inputVec, const unsigned int numberOfVectors, const dftfe::utils::MemoryStorage< dftfe::global_size_type, memorySpace > &mapVecToCells, dftfe::utils::MemoryStorage< T, memorySpace > &outputData, const unsigned int blockSizeOfInputData, const unsigned int blockSizeOfOutputData, const unsigned int startIndexOfInputData, bool resizeData=false)
This function interpolates from the data to the points passed to the constructor. The function copies...
dftfe::utils::MemoryStorage< dataTypes::number, memorySpace > d_tempOutputMemSpace
Definition InterpolateCellWiseDataToPoints.h:208
dftfe::utils::MapPointsToCells< 3, 8 > d_mapPoints
Definition InterpolateCellWiseDataToPoints.h:163
size_type d_numLocalPtsSze
Definition InterpolateCellWiseDataToPoints.h:200
std::vector< size_type > d_cellPointStartIndex
TODO check if M=8 is optimal.
Definition InterpolateCellWiseDataToPoints.h:165
size_type totalDofsInCells
Definition InterpolateCellWiseDataToPoints.h:193
std::vector< unsigned int > d_cumulativeDofs
Definition InterpolateCellWiseDataToPoints.h:192
dftfe::utils::MemoryStorage< global_size_type, memorySpace > d_mapPointToProcLocalMemSpace
Definition InterpolateCellWiseDataToPoints.h:183
std::pair< global_size_type, global_size_type > d_localRange
Definition InterpolateCellWiseDataToPoints.h:205
unsigned int d_verbosity
Definition InterpolateCellWiseDataToPoints.h:212
size_type d_numCells
Definition InterpolateCellWiseDataToPoints.h:190
void interpolateSrcDataToTargetPoints(const std::shared_ptr< dftfe::linearAlgebra::BLASWrapper< dftfe::utils::MemorySpace::HOST > > &BLASWrapperPtr, const distributedCPUVec< T > &inputVec, const unsigned int numberOfVectors, const dftfe::utils::MemoryStorage< dftfe::global_size_type, dftfe::utils::MemorySpace::HOST > &mapVecToCells, dftfe::utils::MemoryStorage< T, dftfe::utils::MemorySpace::HOST > &outputData, const unsigned int blockSizeOfInputData, const unsigned int blockSizeOfOutputData, const unsigned int startIndexOfInputData, bool resizeData=false)
The function is same as above but set to dealii:distributed::Vector.
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
const MPI_Comm d_mpiComm
Definition InterpolateCellWiseDataToPoints.h:166
size_type d_pointsFoundInProc
Definition InterpolateCellWiseDataToPoints.h:202
std::unique_ptr< dftfe::utils::mpi::MPICommunicatorP2P< T, memorySpace > > d_mpiCommPtrMemSpace
Definition InterpolateCellWiseDataToPoints.h:179
std::vector< size_type > d_cellShapeFuncStartIndex
Definition InterpolateCellWiseDataToPoints.h:165
std::vector< size_type > d_numPointsInCell
Definition InterpolateCellWiseDataToPoints.h:195
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< unsigned int > &numDofsPerElem, const unsigned int verbosity, const MPI_Comm &mpiComm)
This constructor computes the mapping between the targetPts and srcCells. In case of incompatible par...
std::vector< unsigned int > d_numDofsPerElement
Definition InterpolateCellWiseDataToPoints.h:191
std::shared_ptr< dftfe::utils::mpi::MPIPatternP2P< dftfe::utils::MemorySpace::HOST > > d_mpiPatternP2PPtr
Definition InterpolateCellWiseDataToPoints.h:170
size_type d_numPointsLocal
Definition InterpolateCellWiseDataToPoints.h:189
std::shared_ptr< dftfe::utils::mpi::MPICommunicatorP2P< T, dftfe::utils::MemorySpace::HOST > > d_mpiCommP2PPtr
Definition InterpolateCellWiseDataToPoints.h:174
void checkIfAllPointsAreFound(const std::vector< std::vector< double > > &targetPts)
std::vector< global_size_type > d_ghostGlobalIds
Definition InterpolateCellWiseDataToPoints.h:204
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
unsigned int size_type
Definition TypeConfig.h:6
unsigned long int global_size_type
Definition TypeConfig.h:7
dealii::LinearAlgebra::distributed::Vector< elem_type, dealii::MemorySpace::Host > distributedCPUVec
Definition headers.h:92