Commit 40f46768 authored by PIACIBELLO Cyrille's avatar PIACIBELLO Cyrille

Change FComplexe to FComplex in all files and name of files

parent 077ce97b
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include "../../Components/FBasicCell.hpp" #include "../../Components/FBasicCell.hpp"
#include "../../Extensions/FExtendCellType.hpp" #include "../../Extensions/FExtendCellType.hpp"
#include "../../Utils/FComplexe.hpp" #include "../../Utils/FComplex.hpp"
/** /**
* @author Pierre Blanchard (pierre.blanchard@inria.fr) * @author Pierre Blanchard (pierre.blanchard@inria.fr)
...@@ -51,17 +51,17 @@ class FInterpCell : public FBasicCell ...@@ -51,17 +51,17 @@ class FInterpCell : public FBasicCell
FReal multipole_exp[NRHS * NVALS * VectorSize]; //< Multipole expansion FReal multipole_exp[NRHS * NVALS * VectorSize]; //< Multipole expansion
FReal local_exp[NLHS * NVALS * VectorSize]; //< Local expansion FReal local_exp[NLHS * NVALS * VectorSize]; //< Local expansion
// PB: Store multipole and local expansion in Fourier space // PB: Store multipole and local expansion in Fourier space
FComplexe transformed_multipole_exp[NRHS * NVALS * TransformedVectorSize]; FComplex transformed_multipole_exp[NRHS * NVALS * TransformedVectorSize];
FComplexe transformed_local_exp[NLHS * NVALS * TransformedVectorSize]; FComplex transformed_local_exp[NLHS * NVALS * TransformedVectorSize];
public: public:
FInterpCell(){ FInterpCell(){
memset(multipole_exp, 0, sizeof(FReal) * NRHS * NVALS * VectorSize); memset(multipole_exp, 0, sizeof(FReal) * NRHS * NVALS * VectorSize);
memset(local_exp, 0, sizeof(FReal) * NLHS * NVALS * VectorSize); memset(local_exp, 0, sizeof(FReal) * NLHS * NVALS * VectorSize);
memset(transformed_multipole_exp, 0, memset(transformed_multipole_exp, 0,
sizeof(FComplexe) * NRHS * NVALS * TransformedVectorSize); sizeof(FComplex) * NRHS * NVALS * TransformedVectorSize);
memset(transformed_local_exp, 0, memset(transformed_local_exp, 0,
sizeof(FComplexe) * NLHS * NVALS * TransformedVectorSize); sizeof(FComplex) * NLHS * NVALS * TransformedVectorSize);
} }
~FInterpCell() {} ~FInterpCell() {}
...@@ -90,20 +90,20 @@ public: ...@@ -90,20 +90,20 @@ public:
} }
/** Get Transformed Multipole */ /** Get Transformed Multipole */
const FComplexe* getTransformedMultipole(const int inRhs) const{ const FComplex* getTransformedMultipole(const int inRhs) const{
return this->transformed_multipole_exp + inRhs*TransformedVectorSize; return this->transformed_multipole_exp + inRhs*TransformedVectorSize;
} }
/** Get Transformed Local */ /** Get Transformed Local */
const FComplexe* getTransformedLocal(const int inRhs) const{ const FComplex* getTransformedLocal(const int inRhs) const{
return this->transformed_local_exp + inRhs*TransformedVectorSize; return this->transformed_local_exp + inRhs*TransformedVectorSize;
} }
/** Get Transformed Multipole */ /** Get Transformed Multipole */
FComplexe* getTransformedMultipole(const int inRhs){ FComplex* getTransformedMultipole(const int inRhs){
return this->transformed_multipole_exp + inRhs*TransformedVectorSize; return this->transformed_multipole_exp + inRhs*TransformedVectorSize;
} }
/** Get Transformed Local */ /** Get Transformed Local */
FComplexe* getTransformedLocal(const int inRhs){ FComplex* getTransformedLocal(const int inRhs){
return this->transformed_local_exp + inRhs*TransformedVectorSize; return this->transformed_local_exp + inRhs*TransformedVectorSize;
} }
...@@ -117,9 +117,9 @@ public: ...@@ -117,9 +117,9 @@ public:
memset(multipole_exp, 0, sizeof(FReal) * NRHS * NVALS * VectorSize); memset(multipole_exp, 0, sizeof(FReal) * NRHS * NVALS * VectorSize);
memset(local_exp, 0, sizeof(FReal) * NLHS * NVALS * VectorSize); memset(local_exp, 0, sizeof(FReal) * NLHS * NVALS * VectorSize);
memset(transformed_multipole_exp, 0, memset(transformed_multipole_exp, 0,
sizeof(FComplexe) * NRHS * NVALS * TransformedVectorSize); sizeof(FComplex) * NRHS * NVALS * TransformedVectorSize);
memset(transformed_local_exp, 0, memset(transformed_local_exp, 0,
sizeof(FComplexe) * NLHS * NVALS * TransformedVectorSize); sizeof(FComplex) * NLHS * NVALS * TransformedVectorSize);
} }
/////////////////////////////////////////////////////// ///////////////////////////////////////////////////////
...@@ -171,7 +171,7 @@ public: ...@@ -171,7 +171,7 @@ public:
} }
static constexpr int GetSize(){ static constexpr int GetSize(){
return (NRHS+NLHS)*NVALS*VectorSize * (int) sizeof(FReal) + (NRHS+NLHS)*NVALS*TransformedVectorSize * (int) sizeof(FComplexe); return (NRHS+NLHS)*NVALS*VectorSize * (int) sizeof(FReal) + (NRHS+NLHS)*NVALS*TransformedVectorSize * (int) sizeof(FComplex);
} }
......
This diff is collapsed.
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#ifndef FROTATIONCELL_HPP #ifndef FROTATIONCELL_HPP
#define FROTATIONCELL_HPP #define FROTATIONCELL_HPP
#include "../../Utils/FComplexe.hpp" #include "../../Utils/FComplex.hpp"
#include "../../Utils/FMemUtils.hpp" #include "../../Utils/FMemUtils.hpp"
#include "../../Extensions/FExtendCellType.hpp" #include "../../Extensions/FExtendCellType.hpp"
...@@ -43,9 +43,9 @@ protected: ...@@ -43,9 +43,9 @@ protected:
static const int LocalSize = ((P+2)*(P+1))/2; // Artimethique suite (n+1)*n/2 static const int LocalSize = ((P+2)*(P+1))/2; // Artimethique suite (n+1)*n/2
//< Multipole vector (static memory) //< Multipole vector (static memory)
FComplexe multipole_exp[MultipoleSize]; //< For multipole extenssion FComplex multipole_exp[MultipoleSize]; //< For multipole extenssion
//< Local vector (static memory) //< Local vector (static memory)
FComplexe local_exp[LocalSize]; //< For local extenssion FComplex local_exp[LocalSize]; //< For local extenssion
public: public:
/** Default constructor /** Default constructor
...@@ -75,20 +75,20 @@ public: ...@@ -75,20 +75,20 @@ public:
} }
/** Get Multipole array */ /** Get Multipole array */
const FComplexe* getMultipole() const { const FComplex* getMultipole() const {
return multipole_exp; return multipole_exp;
} }
/** Get Local array */ /** Get Local array */
const FComplexe* getLocal() const { const FComplex* getLocal() const {
return local_exp; return local_exp;
} }
/** Get Multipole array */ /** Get Multipole array */
FComplexe* getMultipole() { FComplex* getMultipole() {
return multipole_exp; return multipole_exp;
} }
/** Get Local array */ /** Get Local array */
FComplexe* getLocal() { FComplex* getLocal() {
return local_exp; return local_exp;
} }
...@@ -145,7 +145,7 @@ public: ...@@ -145,7 +145,7 @@ public:
buffer.fillArray(local_exp, LocalSize); buffer.fillArray(local_exp, LocalSize);
} }
static constexpr int GetSize(){ static constexpr int GetSize(){
return ((int) sizeof(FComplexe)) * (MultipoleSize + LocalSize); return ((int) sizeof(FComplex)) * (MultipoleSize + LocalSize);
} }
}; };
......
This diff is collapsed.
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include "../../Components/FAbstractKernels.hpp" #include "../../Components/FAbstractKernels.hpp"
#include "../../Utils/FSmartPointer.hpp" #include "../../Utils/FSmartPointer.hpp"
#include "../../Utils/FComplexe.hpp" #include "../../Utils/FComplex.hpp"
#include "../../Utils/FMemUtils.hpp" #include "../../Utils/FMemUtils.hpp"
#include "../../Utils/FSpherical.hpp" #include "../../Utils/FSpherical.hpp"
...@@ -192,12 +192,12 @@ class FRotationOriginalKernel : public FAbstractKernels<CellClass,ContainerClass ...@@ -192,12 +192,12 @@ class FRotationOriginalKernel : public FAbstractKernels<CellClass,ContainerClass
* The computation is simply a multiplication per a complex number \f$ e^{-i \phi m} \f$ * The computation is simply a multiplication per a complex number \f$ e^{-i \phi m} \f$
* Phi should be in [0,2pi] * Phi should be in [0,2pi]
*/ */
void rotateMultipoleAroundZ(FComplexe vec[], const FReal phi){ void rotateMultipoleAroundZ(FComplex vec[], const FReal phi){
FComplexe cell_rotate[SizeArray]; FComplex cell_rotate[SizeArray];
for(int l = 0 ; l <= P ; ++l){ for(int l = 0 ; l <= P ; ++l){
for(int m = 0 ; m <= l ; ++m ){ for(int m = 0 ; m <= l ; ++m ){
// O_{l,m}( \alpha, \beta + \phi ) = e^{-i \phi m} O_{l,m}( \alpha, \beta ) // O_{l,m}( \alpha, \beta + \phi ) = e^{-i \phi m} O_{l,m}( \alpha, \beta )
const FComplexe exp_minus_imphi(FMath::Cos(-phi * FReal(m)), FMath::Sin(-phi * FReal(m))); const FComplex exp_minus_imphi(FMath::Cos(-phi * FReal(m)), FMath::Sin(-phi * FReal(m)));
cell_rotate[atLm(l,m)].equalMul(exp_minus_imphi , vec[atLm(l,m)]); cell_rotate[atLm(l,m)].equalMul(exp_minus_imphi , vec[atLm(l,m)]);
} }
} }
...@@ -214,12 +214,12 @@ class FRotationOriginalKernel : public FAbstractKernels<CellClass,ContainerClass ...@@ -214,12 +214,12 @@ class FRotationOriginalKernel : public FAbstractKernels<CellClass,ContainerClass
* The computation is simply a multiplication per a complex number \f$ e^{i \phi m} \f$ * The computation is simply a multiplication per a complex number \f$ e^{i \phi m} \f$
* Phi should be in [0,2pi] * Phi should be in [0,2pi]
*/ */
void rotateTaylorAroundZ(FComplexe vec[], const FReal phi){ void rotateTaylorAroundZ(FComplex vec[], const FReal phi){
FComplexe cell_rotate[SizeArray]; FComplex cell_rotate[SizeArray];
for(int l = 0 ; l <= P ; ++l){ for(int l = 0 ; l <= P ; ++l){
for(int m = 0 ; m <= l ; ++m ){ for(int m = 0 ; m <= l ; ++m ){
// M_{l,m}( \alpha, \beta + \phi ) = e^{i \phi m} M_{l,m}( \alpha, \beta ) // M_{l,m}( \alpha, \beta + \phi ) = e^{i \phi m} M_{l,m}( \alpha, \beta )
const FComplexe exp_imphi(FMath::Cos(phi * FReal(m)), FMath::Sin(phi * FReal(m))); const FComplex exp_imphi(FMath::Cos(phi * FReal(m)), FMath::Sin(phi * FReal(m)));
cell_rotate[atLm(l,m)].equalMul(exp_imphi , vec[atLm(l,m)]); cell_rotate[atLm(l,m)].equalMul(exp_imphi , vec[atLm(l,m)]);
} }
} }
...@@ -238,8 +238,8 @@ class FRotationOriginalKernel : public FAbstractKernels<CellClass,ContainerClass ...@@ -238,8 +238,8 @@ class FRotationOriginalKernel : public FAbstractKernels<CellClass,ContainerClass
* \f$ O_{l,-m} = \bar{ O_{l,m} } (-1)^m \f$ * \f$ O_{l,-m} = \bar{ O_{l,m} } (-1)^m \f$
* Theta should be in [0,pi] * Theta should be in [0,pi]
*/ */
void rotateMultipoleAroundY(FComplexe vec[], const FReal theta){ void rotateMultipoleAroundY(FComplex vec[], const FReal theta){
FComplexe cell_rotate[SizeArray]; FComplex cell_rotate[SizeArray];
for(int l = 0 ; l <= P ; ++l){ for(int l = 0 ; l <= P ; ++l){
for(int m = 0 ; m <= l ; ++m ){ for(int m = 0 ; m <= l ; ++m ){
FReal w_lkm_real = 0.0; FReal w_lkm_real = 0.0;
...@@ -278,8 +278,8 @@ class FRotationOriginalKernel : public FAbstractKernels<CellClass,ContainerClass ...@@ -278,8 +278,8 @@ class FRotationOriginalKernel : public FAbstractKernels<CellClass,ContainerClass
* \f$ M_{l,-m} = \bar{ M_{l,m} } (-1)^m \f$ * \f$ M_{l,-m} = \bar{ M_{l,m} } (-1)^m \f$
* Theta should be in [0,pi] * Theta should be in [0,pi]
*/ */
void rotateTaylorAroundY(FComplexe vec[], const FReal theta){ void rotateTaylorAroundY(FComplex vec[], const FReal theta){
FComplexe cell_rotate[SizeArray]; FComplex cell_rotate[SizeArray];
for(int l = 0 ; l <= P ; ++l){ for(int l = 0 ; l <= P ; ++l){
for(int m = 0 ; m <= l ; ++m ){ for(int m = 0 ; m <= l ; ++m ){
FReal w_lkm_real = 0.0; FReal w_lkm_real = 0.0;
...@@ -313,7 +313,7 @@ class FRotationOriginalKernel : public FAbstractKernels<CellClass,ContainerClass ...@@ -313,7 +313,7 @@ class FRotationOriginalKernel : public FAbstractKernels<CellClass,ContainerClass
* *
* Rotation are not commutative so we have to do it in the right order * Rotation are not commutative so we have to do it in the right order
*/ */
void rotateMultipole(FComplexe vec[], const FReal azimuth, const FReal inclination){ void rotateMultipole(FComplex vec[], const FReal azimuth, const FReal inclination){
rotateMultipoleAroundZ(vec,(FMath::FPiDiv2 + azimuth)); rotateMultipoleAroundZ(vec,(FMath::FPiDiv2 + azimuth));
rotateMultipoleAroundY(vec,inclination); rotateMultipoleAroundY(vec,inclination);
} }
...@@ -324,7 +324,7 @@ class FRotationOriginalKernel : public FAbstractKernels<CellClass,ContainerClass ...@@ -324,7 +324,7 @@ class FRotationOriginalKernel : public FAbstractKernels<CellClass,ContainerClass
* *
* Rotation are not commutative so we have to do it in the right order * Rotation are not commutative so we have to do it in the right order
*/ */
void deRotateMultipole(FComplexe vec[], const FReal azimuth, const FReal inclination){ void deRotateMultipole(FComplex vec[], const FReal azimuth, const FReal inclination){
rotateMultipoleAroundY(vec,-inclination); rotateMultipoleAroundY(vec,-inclination);
rotateMultipoleAroundZ(vec,-(FMath::FPiDiv2 + azimuth)); rotateMultipoleAroundZ(vec,-(FMath::FPiDiv2 + azimuth));
} }
...@@ -336,7 +336,7 @@ class FRotationOriginalKernel : public FAbstractKernels<CellClass,ContainerClass ...@@ -336,7 +336,7 @@ class FRotationOriginalKernel : public FAbstractKernels<CellClass,ContainerClass
* *
* Rotation are not commutative so we have to do it in the right order * Rotation are not commutative so we have to do it in the right order
*/ */
void rotateTaylor(FComplexe vec[], const FReal azimuth, const FReal inclination){ void rotateTaylor(FComplex vec[], const FReal azimuth, const FReal inclination){
rotateTaylorAroundZ(vec,(FMath::FPiDiv2 + azimuth)); rotateTaylorAroundZ(vec,(FMath::FPiDiv2 + azimuth));
rotateTaylorAroundY(vec,inclination); rotateTaylorAroundY(vec,inclination);
} }
...@@ -347,7 +347,7 @@ class FRotationOriginalKernel : public FAbstractKernels<CellClass,ContainerClass ...@@ -347,7 +347,7 @@ class FRotationOriginalKernel : public FAbstractKernels<CellClass,ContainerClass
* *
* Rotation are not commutative so we have to do it in the right order * Rotation are not commutative so we have to do it in the right order
*/ */
void deRotateTaylor(FComplexe vec[], const FReal azimuth, const FReal inclination){ void deRotateTaylor(FComplex vec[], const FReal azimuth, const FReal inclination){
rotateTaylorAroundY(vec,-inclination); rotateTaylorAroundY(vec,-inclination);
rotateTaylorAroundZ(vec,-(FMath::FPiDiv2 + azimuth)); rotateTaylorAroundZ(vec,-(FMath::FPiDiv2 + azimuth));
} }
...@@ -446,7 +446,7 @@ public: ...@@ -446,7 +446,7 @@ public:
void P2M(CellClass* const inPole, const ContainerClass* const inParticles ) { void P2M(CellClass* const inPole, const ContainerClass* const inParticles ) {
const FReal i_pow_m[4] = {0, FMath::FPiDiv2, FMath::FPi, -FMath::FPiDiv2}; const FReal i_pow_m[4] = {0, FMath::FPiDiv2, FMath::FPi, -FMath::FPiDiv2};
// w is the multipole moment // w is the multipole moment
FComplexe* FRestrict const w = inPole->getMultipole(); FComplex* FRestrict const w = inPole->getMultipole();
// Copying the position is faster than using cell position // Copying the position is faster than using cell position
const FPoint cellPosition = getLeafCenter(inPole->getCoordinate()); const FPoint cellPosition = getLeafCenter(inPole->getCoordinate());
...@@ -498,7 +498,7 @@ public: ...@@ -498,7 +498,7 @@ public:
*/ */
void M2M(CellClass* const FRestrict inPole, const CellClass*const FRestrict *const FRestrict inChildren, const int inLevel) { void M2M(CellClass* const FRestrict inPole, const CellClass*const FRestrict *const FRestrict inChildren, const int inLevel) {
// A buffer to copy the source w allocated once // A buffer to copy the source w allocated once
FComplexe source_w[SizeArray]; FComplex source_w[SizeArray];
// For all children // For all children
for(int idxChild = 0 ; idxChild < 8 ; ++idxChild){ for(int idxChild = 0 ; idxChild < 8 ; ++idxChild){
// if child exists // if child exists
...@@ -512,7 +512,7 @@ public: ...@@ -512,7 +512,7 @@ public:
const FReal b = -sph.getR(); const FReal b = -sph.getR();
// Translate it // Translate it
FComplexe target_w[SizeArray]; FComplex target_w[SizeArray];
for(int l = 0 ; l <= P ; ++l ){ for(int l = 0 ; l <= P ; ++l ){
for(int m = 0 ; m <= l ; ++m ){ for(int m = 0 ; m <= l ; ++m ){
// w{l,m}(a+b) = sum(j=m:l, b^(l-j)/(l-j)! w{j,m}(a) // w{l,m}(a+b) = sum(j=m:l, b^(l-j)/(l-j)! w{j,m}(a)
...@@ -549,7 +549,7 @@ public: ...@@ -549,7 +549,7 @@ public:
*/ */
void M2L(CellClass* const FRestrict inLocal, const CellClass* inInteractions[], const int /*inSize*/, const int inLevel) { void M2L(CellClass* const FRestrict inLocal, const CellClass* inInteractions[], const int /*inSize*/, const int inLevel) {
// To copy the multipole data allocated once // To copy the multipole data allocated once
FComplexe source_w[SizeArray]; FComplex source_w[SizeArray];
// For all children // For all children
for(int idxNeigh = 0 ; idxNeigh < 343 ; ++idxNeigh){ for(int idxNeigh = 0 ; idxNeigh < 343 ; ++idxNeigh){
// if interaction exits // if interaction exits
...@@ -563,7 +563,7 @@ public: ...@@ -563,7 +563,7 @@ public:
const FReal b = sph.getR(); const FReal b = sph.getR();
// Transfer to u // Transfer to u
FComplexe target_u[SizeArray]; FComplex target_u[SizeArray];
for(int l = 0 ; l <= P ; ++l ){ for(int l = 0 ; l <= P ; ++l ){
for(int m = 0 ; m <= l ; ++m ){ for(int m = 0 ; m <= l ; ++m ){
// u{l,m}(a-b) = sum(j=|m|:P-l, (j+l)!/b^(j+l+1) w{j,-m}(a) // u{l,m}(a-b) = sum(j=|m|:P-l, (j+l)!/b^(j+l+1) w{j,-m}(a)
...@@ -601,7 +601,7 @@ public: ...@@ -601,7 +601,7 @@ public:
*/ */
void L2L(const CellClass* const FRestrict inLocal, CellClass* FRestrict *const FRestrict inChildren, const int inLevel) { void L2L(const CellClass* const FRestrict inLocal, CellClass* FRestrict *const FRestrict inChildren, const int inLevel) {
// To copy the source local allocated once // To copy the source local allocated once
FComplexe source_u[SizeArray]; FComplex source_u[SizeArray];
// For all children // For all children
for(int idxChild = 0 ; idxChild < 8 ; ++idxChild){ for(int idxChild = 0 ; idxChild < 8 ; ++idxChild){
// if child exists // if child exists
...@@ -615,7 +615,7 @@ public: ...@@ -615,7 +615,7 @@ public:
const FReal b = sph.getR(); const FReal b = sph.getR();
// Translate // Translate
FComplexe target_u[SizeArray]; FComplex target_u[SizeArray];
for(int l = 0 ; l <= P ; ++l ){ for(int l = 0 ; l <= P ; ++l ){
for(int m = 0 ; m <= l ; ++m ){ for(int m = 0 ; m <= l ; ++m ){
// u{l,m}(r-b) = sum(j=0:P, b^(j-l)/(j-l)! u{j,m}(r); // u{l,m}(r-b) = sum(j=0:P, b^(j-l)/(j-l)! u{j,m}(r);
...@@ -660,7 +660,7 @@ public: ...@@ -660,7 +660,7 @@ public:
void L2P(const CellClass* const inLocal, ContainerClass* const inParticles){ void L2P(const CellClass* const inLocal, ContainerClass* const inParticles){
const FReal i_pow_m[4] = {0, FMath::FPiDiv2, FMath::FPi, -FMath::FPiDiv2}; const FReal i_pow_m[4] = {0, FMath::FPiDiv2, FMath::FPi, -FMath::FPiDiv2};
// Take the local value from the cell // Take the local value from the cell
const FComplexe* FRestrict const u = inLocal->getLocal(); const FComplex* FRestrict const u = inLocal->getLocal();
// Copying the position is faster than using cell position // Copying the position is faster than using cell position
const FPoint cellPosition = getLeafCenter(inLocal->getCoordinate()); const FPoint cellPosition = getLeafCenter(inLocal->getCoordinate());
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#define FHARMONIC_HPP #define FHARMONIC_HPP
#include "../../Utils/FGlobal.hpp" #include "../../Utils/FGlobal.hpp"
#include "../../Utils/FComplexe.hpp" #include "../../Utils/FComplex.hpp"
#include "../../Utils/FSpherical.hpp" #include "../../Utils/FSpherical.hpp"
#include "../../Utils/FNoCopyable.hpp" #include "../../Utils/FNoCopyable.hpp"
...@@ -30,11 +30,11 @@ class FHarmonic : public FNoAssignement { ...@@ -30,11 +30,11 @@ class FHarmonic : public FNoAssignement {
const int expSize; //< Number of elements in the expansion expSize = (p+1)^2 const int expSize; //< Number of elements in the expansion expSize = (p+1)^2
const int nExpSize; //< const int nExpSize; //<
FComplexe* harmonic;//< Harmonic Result FComplex* harmonic;//< Harmonic Result
FComplexe* cosSin; //< Cos/Sin precomputed values FComplex* cosSin; //< Cos/Sin precomputed values
FReal* legendre;//< Legendre results FReal* legendre;//< Legendre results
FComplexe* thetaDerivatedResult; //< the theta derivated result FComplex* thetaDerivatedResult; //< the theta derivated result
FReal* sphereHarmoInnerCoef; //< sphere innter pre computed coefficients FReal* sphereHarmoInnerCoef; //< sphere innter pre computed coefficients
FReal* sphereHarmoOuterCoef; //< sphere outer pre computed coefficients FReal* sphereHarmoOuterCoef; //< sphere outer pre computed coefficients
//! //!
...@@ -45,10 +45,10 @@ class FHarmonic : public FNoAssignement { ...@@ -45,10 +45,10 @@ class FHarmonic : public FNoAssignement {
/** Allocate and init */ /** Allocate and init */
void allocAndInit(){ void allocAndInit(){
harmonic = new FComplexe[expSize]; harmonic = new FComplex[expSize];
cosSin = new FComplexe[devP + 1]; cosSin = new FComplex[devP + 1];
legendre = new FReal[expSize]; legendre = new FReal[expSize];
thetaDerivatedResult = new FComplexe[expSize]; thetaDerivatedResult = new FComplex[expSize];
// Pre compute coef // Pre compute coef
sphereHarmoOuterCoef = new FReal[devP + 1]; sphereHarmoOuterCoef = new FReal[devP + 1];
...@@ -176,35 +176,35 @@ public: ...@@ -176,35 +176,35 @@ public:
return nExpSize; return nExpSize;
} }
FComplexe* result(){ FComplex* result(){
return harmonic; return harmonic;
} }
const FComplexe* result() const { const FComplex* result() const {
return harmonic; return harmonic;
} }
FComplexe& result(const int index){ FComplex& result(const int index){
return harmonic[index]; return harmonic[index];
} }
const FComplexe& result(const int index) const{ const FComplex& result(const int index) const{
return harmonic[index]; return harmonic[index];
} }
FComplexe* resultThetaDerivated(){ FComplex* resultThetaDerivated(){
return thetaDerivatedResult; return thetaDerivatedResult;
} }
const FComplexe* resultThetaDerivated() const { const FComplex* resultThetaDerivated() const {
return thetaDerivatedResult; return thetaDerivatedResult;
} }
FComplexe& resultThetaDerivated(const int index){ FComplex& resultThetaDerivated(const int index){
return thetaDerivatedResult[index]; return thetaDerivatedResult[index];
} }
const FComplexe& resultThetaDerivated(const int index) const{ const FComplex& resultThetaDerivated(const int index) const{
return thetaDerivatedResult[index]; return thetaDerivatedResult[index];
} }
......
...@@ -33,9 +33,9 @@ protected: ...@@ -33,9 +33,9 @@ protected:
/** A interaction properties */ /** A interaction properties */
struct ComputationPair { struct ComputationPair {
const FComplexe* FRestrict pole; const FComplex* FRestrict pole;
FComplexe* FRestrict local; FComplex* FRestrict local;
explicit ComputationPair(const FComplexe* const inPole = 0, FComplexe*const inLocal = 0) explicit ComputationPair(const FComplex* const inPole = 0, FComplex*const inLocal = 0)
: pole(inPole), local(inLocal) {} : pole(inPole), local(inLocal) {}
}; };
...@@ -45,9 +45,9 @@ protected: ...@@ -45,9 +45,9 @@ protected:
const int BlockSize; //< The size of a block const int BlockSize; //< The size of a block
FComplexe*const multipoleMatrix; //< To copy all the multipole vectors FComplex*const multipoleMatrix; //< To copy all the multipole vectors
FComplexe*const localMatrix; //< To save all the local vectors result FComplex*const localMatrix; //< To save all the local vectors result
FSmartPointer<FComplexe**> preM2LTransitions; //< The pre-computation for the M2L based on the level and the 189 possibilities FSmartPointer<FComplex**> preM2LTransitions; //< The pre-computation for the M2L based on the level and the 189 possibilities
FVector<ComputationPair> interactions[343]; //< All the current interaction FVector<ComputationPair> interactions[343]; //< All the current interaction
...@@ -63,17 +63,17 @@ protected: ...@@ -63,17 +63,17 @@ protected:
FHarmonic blasHarmonic(Parent::devP * 2); FHarmonic blasHarmonic(Parent::devP * 2);
// Matrix to fill and then transposed // Matrix to fill and then transposed
FComplexe*const workMatrix = new FComplexe[FF_MATRIX_SIZE]; FComplex*const workMatrix = new FComplex[FF_MATRIX_SIZE];
// M2L transfer, there is a maximum of 3 neighbors in each direction, // M2L transfer, there is a maximum of 3 neighbors in each direction,
// so 6 in each dimension // so 6 in each dimension
FReal treeWidthAtLevel = Parent::boxWidth; FReal treeWidthAtLevel = Parent::boxWidth;
preM2LTransitions = new FComplexe**[Parent::treeHeight]; preM2LTransitions = new FComplex**[Parent::treeHeight];
memset(preM2LTransitions.getPtr(), 0, sizeof(FComplexe**) * (Parent::treeHeight)); memset(preM2LTransitions.getPtr(), 0, sizeof(FComplex**) * (Parent::treeHeight));
for(int idxLevel = 0 ; idxLevel < Parent::treeHeight ; ++idxLevel ){ for(int idxLevel = 0 ; idxLevel < Parent::treeHeight ; ++idxLevel ){
preM2LTransitions[idxLevel] = new FComplexe*[(7 * 7 * 7)]; preM2LTransitions[idxLevel] = new FComplex*[(7 * 7 * 7)];
memset(preM2LTransitions[idxLevel], 0, sizeof(FComplexe*) * (7*7*7)); memset(preM2LTransitions[idxLevel], 0, sizeof(FComplex*) * (7*7*7));
for(int idxX = -3 ; idxX <= 3 ; ++idxX ){ for(int idxX = -3 ; idxX <= 3 ; ++idxX ){
for(int idxY = -3 ; idxY <= 3 ; ++idxY ){ for(int idxY = -3 ; idxY <= 3 ; ++idxY ){
...@@ -84,8 +84,8 @@ protected: ...@@ -84,8 +84,8 @@ protected:
blasHarmonic.computeOuter(FSpherical(relativePos)); blasHarmonic.computeOuter(FSpherical(relativePos));
// Reset Matrix // Reset Matrix
FMemUtils::setall<FComplexe>(workMatrix, FComplexe(), FF_MATRIX_SIZE); FMemUtils::setall<FComplex>(workMatrix, FComplex(), FF_MATRIX_SIZE);
FComplexe* FRestrict fillTransfer = workMatrix; FComplex* FRestrict fillTransfer = workMatrix;
for(int M = 0 ; M <= Parent::devP ; ++M){ for(int M = 0 ; M <= Parent::devP ; ++M){
for (int m = 0 ; m <= M ; ++m){ for (int m = 0 ; m <= M ; ++m){
...@@ -107,7 +107,7 @@ protected: ...@@ -107,7 +107,7 @@ protected:
} }
// Transpose and copy result // Transpose and copy result
FComplexe*const matrix = new FComplexe[FF_MATRIX_SIZE]; FComplex*const matrix = new FComplex[FF_MATRIX_SIZE];
for(int idxRow = 0 ; idxRow < FF_MATRIX_ROW_DIM ; ++idxRow){ for(int idxRow = 0 ; idxRow < FF_MATRIX_ROW_DIM ; ++idxRow){
for(int idxCol = 0 ; idxCol < FF_MATRIX_COLUMN_DIM ; ++idxCol){ for(int idxCol = 0 ; idxCol < FF_MATRIX_COLUMN_DIM ; ++idxCol){
matrix[idxCol * FF_MATRIX_ROW_DIM + idxRow] = workMatrix[idxCol + idxRow * FF_MATRIX_COLUMN_DIM]; matrix[idxCol * FF_MATRIX_ROW_DIM + idxRow] = workMatrix[idxCol + idxRow * FF_MATRIX_COLUMN_DIM];
...@@ -138,8 +138,8 @@ public: ...@@ -138,8 +138,8 @@ public:
FF_MATRIX_ROW_DIM(Parent::harmonic.getExpSize()), FF_MATRIX_COLUMN_DIM(Parent::harmonic.getNExpSize()), FF_MATRIX_ROW_DIM(Parent::harmonic.getExpSize()), FF_MATRIX_COLUMN_DIM(Parent::harmonic.getNExpSize()),
FF_MATRIX_SIZE(FF_MATRIX_ROW_DIM * FF_MATRIX_COLUMN_DIM), FF_MATRIX_SIZE(FF_MATRIX_ROW_DIM * FF_MATRIX_COLUMN_DIM),
BlockSize(inBlockSize), BlockSize(inBlockSize),
multipoleMatrix(new FComplexe[inBlockSize * FF_MATRIX_COLUMN_DIM]), multipoleMatrix(new FComplex[inBlockSize * FF_MATRIX_COLUMN_DIM]),
localMatrix(new FComplexe[inBlockSize * FF_MATRIX_ROW_DIM]), localMatrix(new FComplex[inBlockSize * FF_MATRIX_ROW_DIM]),
preM2LTransitions(nullptr){ preM2LTransitions(nullptr){
allocAndInit(); allocAndInit();
} }
...@@ -150,8 +150,8 @@ public: ...@@ -150,8 +150,8 @@ public:
FF_MATRIX_ROW_DIM(other.FF_MATRIX_ROW_DIM), FF_MATRIX_COLUMN_DIM(other.FF_MATRIX_COLUMN_DIM), FF_MATRIX_ROW_DIM(other.FF_MATRIX_ROW_DIM), FF_MATRIX_COLUMN_DIM(other.FF_MATRIX_COLUMN_DIM),
FF_MATRIX_SIZE(other.FF_MATRIX_SIZE), FF_MATRIX_SIZE(other.FF_MATRIX_SIZE),
BlockSize(other.BlockSize), BlockSize(other.BlockSize),
multipoleMatrix(new FComplexe[other.BlockSize * FF_MATRIX_COLUMN_DIM]), multipoleMatrix(new FComplex[other.BlockSize * FF_MATRIX_COLUMN_DIM]),
localMatrix(new FComplexe[other.BlockSize * FF_MATRIX_ROW_DIM]), localMatrix(new FComplex[other.BlockSize * FF_MATRIX_ROW_DIM]),
preM2LTransitions(other.preM2LTransitions) { preM2LTransitions(other.preM2LTransitions) {
} }
...@@ -201,7 +201,7 @@ public: ...@@ -201,7 +201,7 @@ public:
/** preExpNExp /** preExpNExp
* @param exp an exponent vector to create an computable vector * @param exp an exponent vector to create an computable vector
*/ */
void preExpNExp(FComplexe* const exp) const { void preExpNExp(FComplex* const exp) const {
for(int j = Parent::devP;