Skip to content

Commit

Permalink
Merged in matrixFreeClassBugPR (pull request #628)
Browse files Browse the repository at this point in the history
Revert MatrixFreeClass changes

Approved-by: Sambit Das
  • Loading branch information
phanimotamarri committed Sep 18, 2024
2 parents b423e5b + 717950e commit 7dd8922
Show file tree
Hide file tree
Showing 65 changed files with 16,139 additions and 1,275 deletions.
4 changes: 1 addition & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ SET(TARGET_SRC
./src/excManager/NNLLMGGA.cpp
./src/excManager/AtomicBasisData.cpp
./src/excManager/SlaterBasis.cpp
./src/excManager/GaussianBasis.cpp
./src/excManager/GaussianBasis.cpp
./src/poisson/poissonSolverProblem.cc
./src/poisson/MultiVectorPoissonLinearSolverProblem.cpp
./src/helmholtz/kerkerSolverProblem.cc
Expand Down Expand Up @@ -224,7 +224,6 @@ SET(DEVICE_SRC
./src/helmholtz/kerkerSolverProblemDevice.cc
./utils/FEBasisOperationsKernelsInternalDevice.cc
./src/atom/AtomicCenteredNonLocalOperatorKernelsDevice.cc
./src/matrixFree/MatrixFree.cc
)

ELSEIF ("${GPU_LANG}" STREQUAL "hip")
Expand Down Expand Up @@ -253,7 +252,6 @@ SET(DEVICE_SRC
./src/helmholtz/kerkerSolverProblemDevice.cc
./utils/FEBasisOperationsKernelsInternalDevice.cc
./src/atom/AtomicCenteredNonLocalOperatorKernelsDevice.cc
./src/matrixFree/MatrixFree.cc
)

ENDIF()
Expand Down
88 changes: 0 additions & 88 deletions include/MatrixFree.h

This file was deleted.

61 changes: 0 additions & 61 deletions include/MatrixFreeBase.h

This file was deleted.

11 changes: 7 additions & 4 deletions include/kerkerSolverProblemDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
# include <MemoryStorage.h>
# include <dftUtils.h>
# include <FEBasisOperations.h>
# include <MatrixFree.h>


namespace dftfe
Expand Down Expand Up @@ -163,6 +162,13 @@ namespace dftfe


private:
/**
* @brief Sets up the matrixfree shapefunction, gradient, jacobian and map for matrixfree computeAX
*
*/
void
setupMatrixFree();

/**
* @brief Sets up the constraints matrix
*
Expand Down Expand Up @@ -195,9 +201,6 @@ namespace dftfe
// kerker mixing constant
double d_gamma;

/// pointer to MatrixFree Base object
std::unique_ptr<dftfe::MatrixFreeBase> d_matrixFreeBasePtr;

// shape function value, gradient, jacobian and map for matrixfree
dftfe::utils::MemoryStorage<double, dftfe::utils::MemorySpace::DEVICE>
d_shapeFunction, d_jacobianFactor;
Expand Down
23 changes: 19 additions & 4 deletions include/poissonSolverProblemDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
# include <headers.h>
# include "FEBasisOperations.h"
# include "BLASWrapper.h"
# include <MatrixFree.h>

namespace dftfe
{
Expand Down Expand Up @@ -160,6 +159,13 @@ namespace dftfe


private:
/**
* @brief Sets up the matrixfree shapefunction, gradient, jacobian and map for matrixfree computeAX
*
*/
void
setupMatrixFree();

/**
* @brief Sets up the constraints matrix
*
Expand Down Expand Up @@ -222,9 +228,6 @@ namespace dftfe
/// pointer to dealii MatrixFree object
const dealii::MatrixFree<3, double> *d_matrixFreeDataPtr;

/// pointer to MatrixFree Base object
std::unique_ptr<dftfe::MatrixFreeBase> d_matrixFreeBasePtr;

/// pointer to the x vector being solved for
distributedCPUVec<double> * d_xPtr;
distributedDeviceVec<double> d_xDevice;
Expand All @@ -233,6 +236,18 @@ namespace dftfe
// locally owned and total degrees of freedom including ghost
int d_nLocalCells, d_xLocalDof, d_xLen;

// shape function value, gradient, jacobian and map for matrixfree
dftfe::utils::MemoryStorage<double, dftfe::utils::MemorySpace::DEVICE>
d_shapeFunction, d_jacobianFactor;
dftfe::utils::MemoryStorage<int, dftfe::utils::MemorySpace::DEVICE> d_map;

// Pointers to shape function value, gradient, jacobian and map for
// matrixfree
double *d_shapeFunctionPtr;
double *d_jacobianFactorPtr;
int * d_mapPtr;


// constraints
dftUtils::constraintMatrixInfo<dftfe::utils::MemorySpace::DEVICE>
d_constraintsTotalPotentialInfo,
Expand Down
Loading

0 comments on commit 7dd8922

Please sign in to comment.