DFT-FE 1.1.0-pre
Density Functional Theory With Finite-Elements
Loading...
Searching...
No Matches
TransferBetweenMeshesIncompatiblePartitioning.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (c) 2017-2025 The Regents of the University of Michigan and DFT-FE
4// authors.
5//
6// This file is part of the DFT-FE code.
7//
8// The DFT-FE code is free software; you can use it, redistribute
9// it, and/or modify it under the terms of the GNU Lesser General
10// Public License as published by the Free Software Foundation; either
11// version 2.1 of the License, or (at your option) any later version.
12// The full text of the license can be found in the file LICENSE at
13// the top level of the DFT-FE distribution.
14//
15// ---------------------------------------------------------------------
16//
17
18#ifndef DFTFE_TRANSFERDATABETWEENMESHESINCOMPATIBLEPARTITIONING_H
19#define DFTFE_TRANSFERDATABETWEENMESHESINCOMPATIBLEPARTITIONING_H
20
21
23#include "headers.h"
26#include "vectorUtilities.h"
27
28
29namespace dftfe
30{
31 /**
32 * @brief This class provides the interface for the transfer between the meshes
33 *
34 * @tparam memorySpace
35 */
36 template <dftfe::utils::MemorySpace memorySpace>
38 {
39 public:
41 const dealii::MatrixFree<3, double> &matrixFreeMesh1,
42 const dftfe::uInt matrixFreeMesh1VectorComponent,
43 const dftfe::uInt matrixFreeMesh1QuadratureComponent,
44 const dealii::MatrixFree<3, double> &matrixFreeMesh2,
45 const dftfe::uInt matrixFreeMesh2VectorComponent,
46 const dftfe::uInt matrixFreeMesh2QuadratureComponent,
47 const dftfe::uInt verbosity,
48 const MPI_Comm &mpiComm,
49 const bool useMemOptForCellWiseInterpolation = false);
50
51 void
54 &BLASWrapperPtr,
56 memorySpace> &inputVec,
57 const dftfe::uInt numberOfVectors,
59 &fullFlattenedArrayCellLocalProcIndexIdMapMesh1,
61 &outputQuadData,
62 const dftfe::uInt blockSizeOfInputData,
63 const dftfe::uInt blockSizeOfOutputData,
64 const dftfe::uInt startIndexOfInputData,
65 bool resizeOutputVec); // override;
66
67 void
70 &BLASWrapperPtr,
72 memorySpace> &inputVec,
73 const dftfe::uInt numberOfVectors,
75 &fullFlattenedArrayCellLocalProcIndexIdMapMesh1,
77 &outputQuadData,
78 const dftfe::uInt blockSizeOfInputData,
79 const dftfe::uInt blockSizeOfOutputData,
80 const dftfe::uInt startIndexOfInputData,
81 bool resizeOutputVec); // override;
82
83
84 void
86 const std::shared_ptr<
88 &BLASWrapperPtr,
90 const dftfe::uInt numberOfVectors,
93 &fullFlattenedArrayCellLocalProcIndexIdMapParent,
96 &outputQuadData,
97 const dftfe::uInt blockSizeOfInputData,
98 const dftfe::uInt blockSizeOfOutputData,
99 const dftfe::uInt startIndexOfInputData,
100 bool resizeOutputVec); // override;
101
102 void
104 const std::shared_ptr<
106 &BLASWrapperPtr,
108 const dftfe::uInt numberOfVectors,
111 &mapVecToCells,
114 &outputQuadData,
115 const dftfe::uInt blockSizeOfInputData,
116 const dftfe::uInt blockSizeOfOutputData,
117 const dftfe::uInt startIndexOfInputData,
118 bool resizeOutputVec); // override;
119
120 private:
121 const dealii::MatrixFree<3, double> *d_matrixFreeMesh1Ptr;
122 const dealii::MatrixFree<3, double> *d_matrixFreeMesh2Ptr;
123
126
129
130 std::shared_ptr<
133 std::shared_ptr<
136
137 const MPI_Comm d_mpiComm;
138 };
139} // namespace dftfe
140#endif // DFTFE_TRANSFERDATABETWEENMESHESINCOMPATIBLEPARTITIONING_H
This class forms the interface for interpolating data to an arbitrary set of points....
Definition InterpolateCellWiseDataToPoints.h:46
const dealii::MatrixFree< 3, double > * d_matrixFreeMesh1Ptr
Definition TransferBetweenMeshesIncompatiblePartitioning.h:121
TransferDataBetweenMeshesIncompatiblePartitioning(const dealii::MatrixFree< 3, double > &matrixFreeMesh1, const dftfe::uInt matrixFreeMesh1VectorComponent, const dftfe::uInt matrixFreeMesh1QuadratureComponent, const dealii::MatrixFree< 3, double > &matrixFreeMesh2, const dftfe::uInt matrixFreeMesh2VectorComponent, const dftfe::uInt matrixFreeMesh2QuadratureComponent, const dftfe::uInt verbosity, const MPI_Comm &mpiComm, const bool useMemOptForCellWiseInterpolation=false)
const MPI_Comm d_mpiComm
Definition TransferBetweenMeshesIncompatiblePartitioning.h:137
void interpolateMesh1DataToMesh2QuadPoints(const std::shared_ptr< dftfe::linearAlgebra::BLASWrapper< dftfe::utils::MemorySpace::HOST > > &BLASWrapperPtr, const distributedCPUVec< dftfe::dataTypes::number > &inputVec, const dftfe::uInt numberOfVectors, const dftfe::utils::MemoryStorage< dftfe::uInt, dftfe::utils::MemorySpace::HOST > &fullFlattenedArrayCellLocalProcIndexIdMapParent, dftfe::utils::MemoryStorage< dftfe::dataTypes::number, dftfe::utils::MemorySpace::HOST > &outputQuadData, const dftfe::uInt blockSizeOfInputData, const dftfe::uInt blockSizeOfOutputData, const dftfe::uInt startIndexOfInputData, bool resizeOutputVec)
const dealii::MatrixFree< 3, double > * d_matrixFreeMesh2Ptr
Definition TransferBetweenMeshesIncompatiblePartitioning.h:122
void interpolateMesh2DataToMesh1QuadPoints(const std::shared_ptr< dftfe::linearAlgebra::BLASWrapper< dftfe::utils::MemorySpace::HOST > > &BLASWrapperPtr, const distributedCPUVec< dftfe::dataTypes::number > &inputVec, const dftfe::uInt numberOfVectors, const dftfe::utils::MemoryStorage< dftfe::uInt, dftfe::utils::MemorySpace::HOST > &mapVecToCells, dftfe::utils::MemoryStorage< dftfe::dataTypes::number, dftfe::utils::MemorySpace::HOST > &outputQuadData, const dftfe::uInt blockSizeOfInputData, const dftfe::uInt blockSizeOfOutputData, const dftfe::uInt startIndexOfInputData, bool resizeOutputVec)
dftfe::uInt d_matrixFreeMesh1QuadratureComponent
Definition TransferBetweenMeshesIncompatiblePartitioning.h:125
void interpolateMesh1DataToMesh2QuadPoints(const std::shared_ptr< dftfe::linearAlgebra::BLASWrapper< memorySpace > > &BLASWrapperPtr, const dftfe::linearAlgebra::MultiVector< dftfe::dataTypes::number, memorySpace > &inputVec, const dftfe::uInt numberOfVectors, const dftfe::utils::MemoryStorage< dftfe::uInt, memorySpace > &fullFlattenedArrayCellLocalProcIndexIdMapMesh1, dftfe::utils::MemoryStorage< dftfe::dataTypes::number, memorySpace > &outputQuadData, const dftfe::uInt blockSizeOfInputData, const dftfe::uInt blockSizeOfOutputData, const dftfe::uInt startIndexOfInputData, bool resizeOutputVec)
std::shared_ptr< InterpolateCellWiseDataToPoints< dftfe::dataTypes::number, memorySpace > > d_mesh1toMesh2
Definition TransferBetweenMeshesIncompatiblePartitioning.h:132
dftfe::uInt d_matrixFreeMesh1VectorComponent
Definition TransferBetweenMeshesIncompatiblePartitioning.h:124
std::shared_ptr< InterpolateCellWiseDataToPoints< dftfe::dataTypes::number, memorySpace > > d_mesh2toMesh1
Definition TransferBetweenMeshesIncompatiblePartitioning.h:135
dftfe::uInt d_matrixFreeMesh2QuadratureComponent
Definition TransferBetweenMeshesIncompatiblePartitioning.h:128
void interpolateMesh2DataToMesh1QuadPoints(const std::shared_ptr< dftfe::linearAlgebra::BLASWrapper< memorySpace > > &BLASWrapperPtr, const dftfe::linearAlgebra::MultiVector< dftfe::dataTypes::number, memorySpace > &inputVec, const dftfe::uInt numberOfVectors, const dftfe::utils::MemoryStorage< dftfe::uInt, memorySpace > &fullFlattenedArrayCellLocalProcIndexIdMapMesh1, dftfe::utils::MemoryStorage< dftfe::dataTypes::number, memorySpace > &outputQuadData, const dftfe::uInt blockSizeOfInputData, const dftfe::uInt blockSizeOfOutputData, const dftfe::uInt startIndexOfInputData, bool resizeOutputVec)
dftfe::uInt d_matrixFreeMesh2VectorComponent
Definition TransferBetweenMeshesIncompatiblePartitioning.h:127
Definition BLASWrapper.h:35
An class template to encapsulate a MultiVector. A MultiVector is a collection of vectors belonging t...
Definition MultiVector.h:127
Definition MemoryStorage.h:33
double number
Definition dftfeDataTypes.h:42
@ 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