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 unsigned int matrixFreeMesh1VectorComponent,
43 const unsigned int matrixFreeMesh1QuadratureComponent,
44 const dealii::MatrixFree<3, double> &matrixFreeMesh2,
45 const unsigned int matrixFreeMesh2VectorComponent,
46 const unsigned int matrixFreeMesh2QuadratureComponent,
47 const unsigned int verbosity,
48 const MPI_Comm & mpiComm,
49 const bool useMemOptForCellWiseInterpolation = false);
50
51 void
54 & BLASWrapperPtr,
56 memorySpace> &inputVec,
57 const unsigned int numberOfVectors,
59 &fullFlattenedArrayCellLocalProcIndexIdMapMesh1,
61 & outputQuadData,
62 const unsigned int blockSizeOfInputData,
63 const unsigned int blockSizeOfOutputData,
64 const unsigned int startIndexOfInputData,
65 bool resizeOutputVec); // override;
66
67 void
70 & BLASWrapperPtr,
72 memorySpace> &inputVec,
73 const unsigned int numberOfVectors,
75 &fullFlattenedArrayCellLocalProcIndexIdMapMesh1,
77 & outputQuadData,
78 const unsigned int blockSizeOfInputData,
79 const unsigned int blockSizeOfOutputData,
80 const unsigned int startIndexOfInputData,
81 bool resizeOutputVec); // override;
82
83
84 void
86 const std::shared_ptr<
88 & BLASWrapperPtr,
90 const unsigned int numberOfVectors,
93 &fullFlattenedArrayCellLocalProcIndexIdMapParent,
96 & outputQuadData,
97 const unsigned int blockSizeOfInputData,
98 const unsigned int blockSizeOfOutputData,
99 const unsigned int startIndexOfInputData,
100 bool resizeOutputVec); // override;
101
102 void
104 const std::shared_ptr<
106 & BLASWrapperPtr,
108 const unsigned int numberOfVectors,
111 &mapVecToCells,
114 & outputQuadData,
115 const unsigned int blockSizeOfInputData,
116 const unsigned int blockSizeOfOutputData,
117 const unsigned int 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
void interpolateMesh1DataToMesh2QuadPoints(const std::shared_ptr< dftfe::linearAlgebra::BLASWrapper< memorySpace > > &BLASWrapperPtr, const dftfe::linearAlgebra::MultiVector< dftfe::dataTypes::number, memorySpace > &inputVec, const unsigned int numberOfVectors, const dftfe::utils::MemoryStorage< dftfe::global_size_type, memorySpace > &fullFlattenedArrayCellLocalProcIndexIdMapMesh1, dftfe::utils::MemoryStorage< dftfe::dataTypes::number, memorySpace > &outputQuadData, const unsigned int blockSizeOfInputData, const unsigned int blockSizeOfOutputData, const unsigned int startIndexOfInputData, bool resizeOutputVec)
const MPI_Comm d_mpiComm
Definition TransferBetweenMeshesIncompatiblePartitioning.h:137
void interpolateMesh2DataToMesh1QuadPoints(const std::shared_ptr< dftfe::linearAlgebra::BLASWrapper< memorySpace > > &BLASWrapperPtr, const dftfe::linearAlgebra::MultiVector< dftfe::dataTypes::number, memorySpace > &inputVec, const unsigned int numberOfVectors, const dftfe::utils::MemoryStorage< dftfe::global_size_type, memorySpace > &fullFlattenedArrayCellLocalProcIndexIdMapMesh1, dftfe::utils::MemoryStorage< dftfe::dataTypes::number, memorySpace > &outputQuadData, const unsigned int blockSizeOfInputData, const unsigned int blockSizeOfOutputData, const unsigned int startIndexOfInputData, bool resizeOutputVec)
size_type d_matrixFreeMesh1QuadratureComponent
Definition TransferBetweenMeshesIncompatiblePartitioning.h:125
size_type d_matrixFreeMesh2QuadratureComponent
Definition TransferBetweenMeshesIncompatiblePartitioning.h:128
const dealii::MatrixFree< 3, double > * d_matrixFreeMesh2Ptr
Definition TransferBetweenMeshesIncompatiblePartitioning.h:122
void interpolateMesh1DataToMesh2QuadPoints(const std::shared_ptr< dftfe::linearAlgebra::BLASWrapper< dftfe::utils::MemorySpace::HOST > > &BLASWrapperPtr, const distributedCPUVec< dftfe::dataTypes::number > &inputVec, const unsigned int numberOfVectors, const dftfe::utils::MemoryStorage< dftfe::global_size_type, dftfe::utils::MemorySpace::HOST > &fullFlattenedArrayCellLocalProcIndexIdMapParent, dftfe::utils::MemoryStorage< dftfe::dataTypes::number, dftfe::utils::MemorySpace::HOST > &outputQuadData, const unsigned int blockSizeOfInputData, const unsigned int blockSizeOfOutputData, const unsigned int startIndexOfInputData, bool resizeOutputVec)
size_type d_matrixFreeMesh1VectorComponent
Definition TransferBetweenMeshesIncompatiblePartitioning.h:124
size_type d_matrixFreeMesh2VectorComponent
Definition TransferBetweenMeshesIncompatiblePartitioning.h:127
std::shared_ptr< InterpolateCellWiseDataToPoints< dftfe::dataTypes::number, memorySpace > > d_mesh1toMesh2
Definition TransferBetweenMeshesIncompatiblePartitioning.h:132
void interpolateMesh2DataToMesh1QuadPoints(const std::shared_ptr< dftfe::linearAlgebra::BLASWrapper< dftfe::utils::MemorySpace::HOST > > &BLASWrapperPtr, const distributedCPUVec< dftfe::dataTypes::number > &inputVec, const unsigned int numberOfVectors, const dftfe::utils::MemoryStorage< dftfe::global_size_type, dftfe::utils::MemorySpace::HOST > &mapVecToCells, dftfe::utils::MemoryStorage< dftfe::dataTypes::number, dftfe::utils::MemorySpace::HOST > &outputQuadData, const unsigned int blockSizeOfInputData, const unsigned int blockSizeOfOutputData, const unsigned int startIndexOfInputData, bool resizeOutputVec)
TransferDataBetweenMeshesIncompatiblePartitioning(const dealii::MatrixFree< 3, double > &matrixFreeMesh1, const unsigned int matrixFreeMesh1VectorComponent, const unsigned int matrixFreeMesh1QuadratureComponent, const dealii::MatrixFree< 3, double > &matrixFreeMesh2, const unsigned int matrixFreeMesh2VectorComponent, const unsigned int matrixFreeMesh2QuadratureComponent, const unsigned int verbosity, const MPI_Comm &mpiComm, const bool useMemOptForCellWiseInterpolation=false)
std::shared_ptr< InterpolateCellWiseDataToPoints< dftfe::dataTypes::number, memorySpace > > d_mesh2toMesh1
Definition TransferBetweenMeshesIncompatiblePartitioning.h:135
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:44
@ 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