Commit 550d3cff authored by BRAMAS Berenger's avatar BRAMAS Berenger

Make it compile for the new FREal

parent 2533757d
...@@ -51,7 +51,7 @@ private: ...@@ -51,7 +51,7 @@ private:
//Typedef on Octree Arranger, in order to clarify following code //Typedef on Octree Arranger, in order to clarify following code
typedef FBasicParticleContainerIndexedMover<OctreeClass, ContainerClass> MoverClass; typedef FBasicParticleContainerIndexedMover<OctreeClass, ContainerClass> MoverClass;
typedef FOctreeArranger<OctreeClass, ContainerClass, MoverClass> ArrangerClass; typedef FOctreeArranger<FReal,OctreeClass, ContainerClass, MoverClass> ArrangerClass;
typedef FArrangerPeriodic<OctreeClass, ContainerClass, MoverClass> ArrangerClassPeriodic; typedef FArrangerPeriodic<OctreeClass, ContainerClass, MoverClass> ArrangerClassPeriodic;
//Pointer to the kernel to be executed //Pointer to the kernel to be executed
...@@ -553,7 +553,7 @@ public: ...@@ -553,7 +553,7 @@ public:
} }
case 2: case 2:
{ {
typedef FFmmAlgorithmPeriodic<OctreeClass,InterCell,ContainerClass,InterKernel,LeafClass> AlgoClassPeriodic; typedef FFmmAlgorithmPeriodic<FReal,OctreeClass,InterCell,ContainerClass,InterKernel,LeafClass> AlgoClassPeriodic;
AlgoClassPeriodic algoPeriod(octree,2); AlgoClassPeriodic algoPeriod(octree,2);
algoPeriod.setKernel(kernel); algoPeriod.setKernel(kernel);
algoPeriod.execute(); algoPeriod.execute();
......
...@@ -210,7 +210,7 @@ private: ...@@ -210,7 +210,7 @@ private:
//For arranger classes //For arranger classes
typedef FBasicParticleContainerIndexedMover<OctreeClass, ContainerClass> MoverClass; typedef FBasicParticleContainerIndexedMover<OctreeClass, ContainerClass> MoverClass;
typedef FOctreeArranger<OctreeClass, ContainerClass, MoverClass> ArrangerClass; typedef FOctreeArranger<FReal,OctreeClass, ContainerClass, MoverClass> ArrangerClass;
typedef FArrangerPeriodic<OctreeClass, ContainerClass, MoverClass> ArrangerClassPeriodic; typedef FArrangerPeriodic<OctreeClass, ContainerClass, MoverClass> ArrangerClassPeriodic;
...@@ -479,7 +479,7 @@ public: ...@@ -479,7 +479,7 @@ public:
} }
case 2: case 2:
{ {
typedef FFmmAlgorithmPeriodic<OctreeClass,CoreCell,ContainerClass,CoreKernelClass,LeafClass> AlgoClassPeriodic; typedef FFmmAlgorithmPeriodic<FReal,OctreeClass,CoreCell,ContainerClass,CoreKernelClass,LeafClass> AlgoClassPeriodic;
AlgoClassPeriodic algoPeriod(octree,2); AlgoClassPeriodic algoPeriod(octree,2);
algoPeriod.setKernel(kernel); algoPeriod.setKernel(kernel);
algoPeriod.execute(); algoPeriod.execute();
......
...@@ -98,11 +98,11 @@ int main(int argc, char* argv[]) ...@@ -98,11 +98,11 @@ int main(int argc, char* argv[])
// open particle file // open particle file
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// //
typedef double FReal;
FFmaGenericLoader<FReal> loader(filename); FFmaGenericLoader<FReal> loader(filename);
// //
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// begin Lagrange kernel // begin Lagrange kernel
typedef double FReal;
// accuracy // accuracy
const unsigned int ORDER = 7; const unsigned int ORDER = 7;
// typedefs // typedefs
...@@ -216,7 +216,7 @@ int main(int argc, char* argv[]) ...@@ -216,7 +216,7 @@ int main(int argc, char* argv[])
// ----------------------------------------------------- // -----------------------------------------------------
if(FParameters::existParameter(argc, argv, FParameterDefinitions::OutputFile.options)){ if(FParameters::existParameter(argc, argv, FParameterDefinitions::OutputFile.options)){
std::string name(FParameters::getStr(argc,argv,FParameterDefinitions::OutputFile.options, "output.fma")); std::string name(FParameters::getStr(argc,argv,FParameterDefinitions::OutputFile.options, "output.fma"));
FFmaGenericWriter writer(name) ; FFmaGenericWriter<FReal> writer(name) ;
// //
int NbPoints = loader.getNumberOfParticles(); int NbPoints = loader.getNumberOfParticles();
FReal * particles ; FReal * particles ;
......
...@@ -169,7 +169,7 @@ void adaptiveTreeBuildLists(OctreeClass & tree) { ...@@ -169,7 +169,7 @@ void adaptiveTreeBuildLists(OctreeClass & tree) {
} }
}; };
///////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////
//! \fn setGlobalID(FOctree< FAdaptCell, FBasicParticleContainer<0> , FSimpleLeaf<FReal, FBasicParticleContainer<0>> > & tree) { //! \fn setGlobalID(FOctree< FAdaptCell, FBasicParticleContainer<FReal,0,FReal> , FSimpleLeaf<FReal, FBasicParticleContainer<FReal,0,FReal>> > & tree) {
///////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////
......
...@@ -135,10 +135,10 @@ public: ...@@ -135,10 +135,10 @@ public:
// //
// // set child info // // set child info
// FPoint<FReal> ChildRoots[nnodes], localChildRoots[nnodes]; // FPoint<FReal> ChildRoots[nnodes], localChildRoots[nnodes];
// FUnifTensor<ORDER>::setRoots(subCellCenter, subCellWidth, ChildRoots); // FUnifTensor<FReal,ORDER>::setRoots(subCellCenter, subCellWidth, ChildRoots);
// //
// // map global position of roots to local position in parent cell // // map global position of roots to local position in parent cell
// const map_glob_loc map(poleCellCenter, poleCellWidth); // const map_glob_loc<FReal> map(poleCellCenter, poleCellWidth);
// for (unsigned int n=0; n<nnodes; ++n) // for (unsigned int n=0; n<nnodes; ++n)
// map(ChildRoots[n], localChildRoots[n]); // map(ChildRoots[n], localChildRoots[n]);
// //
...@@ -151,11 +151,11 @@ public: ...@@ -151,11 +151,11 @@ public:
// Set sub-child coords // Set sub-child coords
FReal globalChildCoords[3][ORDER]; FReal globalChildCoords[3][ORDER];
FUnifTensor<order>::setPolynomialsRoots(subCellCenter, subCellWidth, globalChildCoords); FUnifTensor<FReal,order>::setPolynomialsRoots(subCellCenter, subCellWidth, globalChildCoords);
// Map global position of sub-child nodes to [-1,1] // Map global position of sub-child nodes to [-1,1]
FReal localChildCoords[3][ORDER]; FReal localChildCoords[3][ORDER];
const map_glob_loc map(poleCellCenter, poleCellWidth); const map_glob_loc<FReal> map(poleCellCenter, poleCellWidth);
FPoint<FReal> localChildPoints; FPoint<FReal> localChildPoints;
for (unsigned int n=0; n<ORDER; ++n) { for (unsigned int n=0; n<ORDER; ++n) {
map(FPoint<FReal>(globalChildCoords[0][n],globalChildCoords[1][n],globalChildCoords[2][n]), localChildPoints); map(FPoint<FReal>(globalChildCoords[0][n],globalChildCoords[1][n],globalChildCoords[2][n]), localChildPoints);
...@@ -225,7 +225,7 @@ public: ...@@ -225,7 +225,7 @@ public:
// std::cout << " call P2L localLevel "<< localLevel << " localCellCenter "<< localCellCenter <<std::endl; // std::cout << " call P2L localLevel "<< localLevel << " localCellCenter "<< localCellCenter <<std::endl;
// interpolation points of target (X) cell // interpolation points of target (X) cell
FPoint<FReal> X[nnodes]; FPoint<FReal> X[nnodes];
FUnifTensor<order>::setRoots(localCellCenter, localCellWidth, X); FUnifTensor<FReal,order>::setRoots(localCellCenter, localCellWidth, X);
// read positions // read positions
const FReal*const positionsX = particles->getPositions()[0]; const FReal*const positionsX = particles->getPositions()[0];
...@@ -265,8 +265,8 @@ public: ...@@ -265,8 +265,8 @@ public:
// interpolation points of source (Y) and target (X) cell // interpolation points of source (Y) and target (X) cell
FPoint<FReal> X[nnodes], Y[nnodes]; FPoint<FReal> X[nnodes], Y[nnodes];
FUnifTensor<order>::setRoots(poleCellCenter, poleCellWidth, Y); FUnifTensor<FReal,order>::setRoots(poleCellCenter, poleCellWidth, Y);
FUnifTensor<order>::setRoots(localCellCenter, localCellWidth, X); FUnifTensor<FReal,order>::setRoots(localCellCenter, localCellWidth, X);
for(int idxRhs = 0 ; idxRhs < NVALS ; ++idxRhs){ for(int idxRhs = 0 ; idxRhs < NVALS ; ++idxRhs){
...@@ -290,7 +290,7 @@ public: ...@@ -290,7 +290,7 @@ public:
// interpolation points of source (Y) cell // interpolation points of source (Y) cell
FPoint<FReal> Y[nnodes]; FPoint<FReal> Y[nnodes];
FUnifTensor<order>::setRoots(poleCellCenter, poleCellWidth, Y); FUnifTensor<FReal,order>::setRoots(poleCellCenter, poleCellWidth, Y);
// read positions // read positions
const FReal*const positionsX = particles->getPositions()[0]; const FReal*const positionsX = particles->getPositions()[0];
...@@ -347,10 +347,10 @@ public: ...@@ -347,10 +347,10 @@ public:
// //
// // set child info // // set child info
// FPoint<FReal> ChildRoots[nnodes], localChildRoots[nnodes]; // FPoint<FReal> ChildRoots[nnodes], localChildRoots[nnodes];
// FUnifTensor<ORDER>::setRoots(subCellCenter, subCellWidth, ChildRoots); // FUnifTensor<FReal,ORDER>::setRoots(subCellCenter, subCellWidth, ChildRoots);
// //
// // map global position of roots to local position in parent cell // // map global position of roots to local position in parent cell
// const map_glob_loc map(localCenter, localWidth); // const map_glob_loc<FReal> map(localCenter, localWidth);
// for (unsigned int n=0; n<nnodes; ++n) // for (unsigned int n=0; n<nnodes; ++n)
// map(ChildRoots[n], localChildRoots[n]); // map(ChildRoots[n], localChildRoots[n]);
// //
...@@ -361,11 +361,11 @@ public: ...@@ -361,11 +361,11 @@ public:
/// p^4 version /// p^4 version
// Set sub-child coords // Set sub-child coords
FReal globalChildCoords[3][ORDER]; FReal globalChildCoords[3][ORDER];
FUnifTensor<order>::setPolynomialsRoots(subCellCenter, subCellWidth, globalChildCoords); FUnifTensor<FReal,order>::setPolynomialsRoots(subCellCenter, subCellWidth, globalChildCoords);
// Map global position of sub-child nodes to [-1,1] // Map global position of sub-child nodes to [-1,1]
FReal localChildCoords[3][ORDER]; FReal localChildCoords[3][ORDER];
const map_glob_loc map(localCenter, localWidth); const map_glob_loc<FReal> map(localCenter, localWidth);
FPoint<FReal> localChildPoints; FPoint<FReal> localChildPoints;
for (unsigned int n=0; n<ORDER; ++n) { for (unsigned int n=0; n<ORDER; ++n) {
map(FPoint<FReal>(globalChildCoords[0][n],globalChildCoords[1][n],globalChildCoords[2][n]), localChildPoints); map(FPoint<FReal>(globalChildCoords[0][n],globalChildCoords[1][n],globalChildCoords[2][n]), localChildPoints);
...@@ -448,7 +448,7 @@ public: ...@@ -448,7 +448,7 @@ public:
void P2P(ContainerClass* target, const ContainerClass* sources) override { void P2P(ContainerClass* target, const ContainerClass* sources) override {
ContainerClass* sourcesArray[27] = { const_cast<ContainerClass*> (sources) }; ContainerClass* sourcesArray[27] = { const_cast<ContainerClass*> (sources) };
DirectInteractionComputer<MatrixKernelClass::NCMP, NVALS>::template P2PRemote(target,sourcesArray,1,MatrixKernel); DirectInteractionComputer<FReal,MatrixKernelClass::NCMP, NVALS>::template P2PRemote(target,sourcesArray,1,MatrixKernel);
} }
bool preferP2M(const ContainerClass* const particles) override { bool preferP2M(const ContainerClass* const particles) override {
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#ifndef FABSTRACTLEAFINTERFACE_HPP #ifndef FABSTRACTLEAFINTERFACE_HPP
#define FABSTRACTLEAFINTERFACE_HPP #define FABSTRACTLEAFINTERFACE_HPP
template<class OctreeClass,class ParticleClass> template<class FReal,class OctreeClass,class ParticleClass>
class FAbstractMover{ class FAbstractMover{
public: public:
virtual void getParticlePosition(ParticleClass* lf, const int idxPart, FPoint<FReal>* particlePos) = 0; virtual void getParticlePosition(ParticleClass* lf, const int idxPart, FPoint<FReal>* particlePos) = 0;
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include "Arranger/FOctreeArranger.hpp" #include "Arranger/FOctreeArranger.hpp"
template <class FReal, class OctreeClass, class ContainerClass, class LeafInterface > template <class FReal, class OctreeClass, class ContainerClass, class LeafInterface >
class FArrangerPeriodic : public FOctreeArranger<OctreeClass,ContainerClass,LeafInterface>{ class FArrangerPeriodic : public FOctreeArranger<FReal,OctreeClass,ContainerClass,LeafInterface>{
FReal getPeriodicPos(FReal pos, PeriodicCondition periodicPlus, PeriodicCondition periodicMinus,FReal maxDir,FReal minDir,const int dir){ FReal getPeriodicPos(FReal pos, PeriodicCondition periodicPlus, PeriodicCondition periodicMinus,FReal maxDir,FReal minDir,const int dir){
FReal res = pos; FReal res = pos;
...@@ -41,7 +41,7 @@ class FArrangerPeriodic : public FOctreeArranger<OctreeClass,ContainerClass,Leaf ...@@ -41,7 +41,7 @@ class FArrangerPeriodic : public FOctreeArranger<OctreeClass,ContainerClass,Leaf
public: public:
FArrangerPeriodic(OctreeClass * octree) : FOctreeArranger<OctreeClass,ContainerClass,LeafInterface>(octree){ FArrangerPeriodic(OctreeClass * octree) : FOctreeArranger<FReal,OctreeClass,ContainerClass,LeafInterface>(octree){
} }
// To put in inhereed class // To put in inhereed class
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
* This class should be use with the octree arrange to move particles * This class should be use with the octree arrange to move particles
* that are stored in a FBasicParticleContainer * that are stored in a FBasicParticleContainer
*/ */
template<class OctreeClass, class ContainerClass > template<class FReal, class OctreeClass, class ContainerClass >
class FBasicParticleContainerIndexedMover : public FAbstractMover<OctreeClass, ContainerClass>{ class FBasicParticleContainerIndexedMover : public FAbstractMover<FReal,OctreeClass, ContainerClass>{
private: private:
ContainerClass toStoreRemovedParts; ContainerClass toStoreRemovedParts;
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
* This class should be use with the octree arrange to move particles * This class should be use with the octree arrange to move particles
* that are typed (src/tgt) and stored in a FBasicParticleContainer * that are typed (src/tgt) and stored in a FBasicParticleContainer
*/ */
template<class OctreeClass, class ContainerClass > template<class FReal, class OctreeClass, class ContainerClass >
class FParticleTypedIndexedMover : public FAbstractMover<OctreeClass, ContainerClass>{ class FParticleTypedIndexedMover : public FAbstractMover<FReal, OctreeClass, ContainerClass>{
private: private:
ContainerClass toStoreRemovedSourceParts; ContainerClass toStoreRemovedSourceParts;
ContainerClass toStoreRemovedTargetParts; ContainerClass toStoreRemovedTargetParts;
......
...@@ -15,7 +15,7 @@ namespace FParForEachOctree { ...@@ -15,7 +15,7 @@ namespace FParForEachOctree {
* @brief forEachLeaf iterate on the leaf and apply the function * @brief forEachLeaf iterate on the leaf and apply the function
* @param function * @param function
*/ */
template< template< class CellClass, class ContainerClass, class LeafClass, class CellAllocatorClass > class FOctree, template< class FReal, template<class FReal, class CellClass, class ContainerClass, class LeafClass, class CellAllocatorClass > class FOctree,
class CellClass, class ContainerClass, class LeafClass, class CellAllocatorClass, class CellClass, class ContainerClass, class LeafClass, class CellAllocatorClass,
class FunctionTemplate> class FunctionTemplate>
void forEachLeaf(FOctree<FReal, CellClass,ContainerClass,LeafClass,CellAllocatorClass>* tree, FunctionTemplate function){ void forEachLeaf(FOctree<FReal, CellClass,ContainerClass,LeafClass,CellAllocatorClass>* tree, FunctionTemplate function){
...@@ -43,7 +43,7 @@ void forEachLeaf(FOctree<FReal, CellClass,ContainerClass,LeafClass,CellAllocator ...@@ -43,7 +43,7 @@ void forEachLeaf(FOctree<FReal, CellClass,ContainerClass,LeafClass,CellAllocator
* @brief forEachLeaf iterate on the cell and apply the function * @brief forEachLeaf iterate on the cell and apply the function
* @param function * @param function
*/ */
template< template< class CellClass, class ContainerClass, class LeafClass, class CellAllocatorClass > class FOctree, template< class FReal, template<class FReal, class CellClass, class ContainerClass, class LeafClass, class CellAllocatorClass > class FOctree,
class CellClass, class ContainerClass, class LeafClass, class CellAllocatorClass, class CellClass, class ContainerClass, class LeafClass, class CellAllocatorClass,
class FunctionTemplate> class FunctionTemplate>
void forEachCell(FOctree<FReal, CellClass,ContainerClass,LeafClass,CellAllocatorClass>* tree, FunctionTemplate function){ void forEachCell(FOctree<FReal, CellClass,ContainerClass,LeafClass,CellAllocatorClass>* tree, FunctionTemplate function){
...@@ -77,7 +77,7 @@ void forEachCell(FOctree<FReal, CellClass,ContainerClass,LeafClass,CellAllocator ...@@ -77,7 +77,7 @@ void forEachCell(FOctree<FReal, CellClass,ContainerClass,LeafClass,CellAllocator
* @brief forEachLeaf iterate on the cell and apply the function * @brief forEachLeaf iterate on the cell and apply the function
* @param function * @param function
*/ */
template< template< class CellClass, class ContainerClass, class LeafClass, class CellAllocatorClass > class FOctree, template< class FReal, template<class FReal, class CellClass, class ContainerClass, class LeafClass, class CellAllocatorClass > class FOctree,
class CellClass, class ContainerClass, class LeafClass, class CellAllocatorClass, class CellClass, class ContainerClass, class LeafClass, class CellAllocatorClass,
class FunctionTemplate> class FunctionTemplate>
void forEachCellWithLevel(FOctree<FReal, CellClass,ContainerClass,LeafClass,CellAllocatorClass>* tree, FunctionTemplate function){ void forEachCellWithLevel(FOctree<FReal, CellClass,ContainerClass,LeafClass,CellAllocatorClass>* tree, FunctionTemplate function){
...@@ -111,7 +111,7 @@ void forEachCellWithLevel(FOctree<FReal, CellClass,ContainerClass,LeafClass,Cell ...@@ -111,7 +111,7 @@ void forEachCellWithLevel(FOctree<FReal, CellClass,ContainerClass,LeafClass,Cell
* @brief forEachLeaf iterate on the cell and apply the function * @brief forEachLeaf iterate on the cell and apply the function
* @param function * @param function
*/ */
template< template< class CellClass, class ContainerClass, class LeafClass, class CellAllocatorClass > class FOctree, template< class FReal, template<class FReal, class CellClass, class ContainerClass, class LeafClass, class CellAllocatorClass > class FOctree,
class CellClass, class ContainerClass, class LeafClass, class CellAllocatorClass, class CellClass, class ContainerClass, class LeafClass, class CellAllocatorClass,
class FunctionTemplate> class FunctionTemplate>
void forEachCellLeaf(FOctree<FReal, CellClass,ContainerClass,LeafClass,CellAllocatorClass>* tree, FunctionTemplate function){ void forEachCellLeaf(FOctree<FReal, CellClass,ContainerClass,LeafClass,CellAllocatorClass>* tree, FunctionTemplate function){
......
...@@ -91,7 +91,7 @@ public: ...@@ -91,7 +91,7 @@ public:
return new FFmmAlgorithmThreadProc<OctreeClass, CellClass, ContainerClass, KernelClass, LeafClass>(FMpi::FComm(mpiComm), tree, kernel); return new FFmmAlgorithmThreadProc<OctreeClass, CellClass, ContainerClass, KernelClass, LeafClass>(FMpi::FComm(mpiComm), tree, kernel);
} }
else{ else{
auto algo = new FFmmAlgorithmThreadProcPeriodic<OctreeClass, CellClass, ContainerClass, KernelClass, LeafClass>(FMpi::FComm(mpiComm), tree, periodicUpperlevel); auto algo = new FFmmAlgorithmThreadProcPeriodic<FReal, OctreeClass, CellClass, ContainerClass, KernelClass, LeafClass>(FMpi::FComm(mpiComm), tree, periodicUpperlevel);
algo->setKernel(kernel); algo->setKernel(kernel);
return algo; return algo;
} }
...@@ -100,7 +100,7 @@ public: ...@@ -100,7 +100,7 @@ public:
return new FFmmAlgorithmThread<OctreeClass, CellClass, ContainerClass, KernelClass, LeafClass>(tree, kernel); return new FFmmAlgorithmThread<OctreeClass, CellClass, ContainerClass, KernelClass, LeafClass>(tree, kernel);
} }
else{ else{
auto algo = new FFmmAlgorithmPeriodic<OctreeClass, CellClass, ContainerClass, KernelClass, LeafClass>(tree, periodicUpperlevel); auto algo = new FFmmAlgorithmPeriodic<FReal,OctreeClass, CellClass, ContainerClass, KernelClass, LeafClass>(tree, periodicUpperlevel);
algo->setKernel(kernel); algo->setKernel(kernel);
return algo; return algo;
} }
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
* @endcode * @endcode
*/ */
template <class FReal> template <class FReal>
class FBasicLoader : public FAbstractLoader { class FBasicLoader : public FAbstractLoader<FReal> {
protected: protected:
std::ifstream file; //< The file to read std::ifstream file; //< The file to read
FPoint<FReal> centerOfBox; //< The center of box read from file FPoint<FReal> centerOfBox; //< The center of box read from file
......
...@@ -511,7 +511,7 @@ private: ...@@ -511,7 +511,7 @@ private:
* *
* \code * \code
* // Instanciate the writer with a binary fma file (extension .bfma). * // Instanciate the writer with a binary fma file (extension .bfma).
* FFmaGenericWriter writer ("data.bfma"); * FFmaGenericWriter<FReal> writer ("data.bfma");
* *
* // Write the header of the file. * // Write the header of the file.
* writer.writeHeader(loader.getCenterOfBox(), loader.getBoxWidth(), NbPoints, sizeof(FReal), nbData); * writer.writeHeader(loader.getCenterOfBox(), loader.getBoxWidth(), NbPoints, sizeof(FReal), nbData);
...@@ -678,7 +678,7 @@ public: ...@@ -678,7 +678,7 @@ public:
* FmaRParticle * particles = new FmaRParticle[nbParticles]; * FmaRParticle * particles = new FmaRParticle[nbParticles];
* memset(particles, 0, sizeof(FmaRParticle) * nbParticles) ; * memset(particles, 0, sizeof(FmaRParticle) * nbParticles) ;
* ... * ...
* FFmaGenericWriter writer(filenameOut) ; * FFmaGenericWriter<FReal> writer(filenameOut) ;
* Fwriter.writeHeader(Centre,BoxWith, nbParticles,*particles) ; * Fwriter.writeHeader(Centre,BoxWith, nbParticles,*particles) ;
* Fwriter.writeArrayOfParticles(particles, nbParticles); * Fwriter.writeArrayOfParticles(particles, nbParticles);
* \endcode * \endcode
...@@ -689,7 +689,7 @@ public: ...@@ -689,7 +689,7 @@ public:
* memset(particles, 0, sizeof(FmaRParticle) * nbParticles) ; * memset(particles, 0, sizeof(FmaRParticle) * nbParticles) ;
* ... * ...
* FmaBasicParticle *ppart = (FmaBasicParticle*)(&particles[0]); * FmaBasicParticle *ppart = (FmaBasicParticle*)(&particles[0]);
* FFmaGenericWriter writer(filenameOut) ; * FFmaGenericWriter<FReal> writer(filenameOut) ;
* writer.writeHeader(Centre,BoxWith, nbParticles,*particles) ; * writer.writeHeader(Centre,BoxWith, nbParticles,*particles) ;
* writer.writeArrayOfParticles(particles, nbParticles); * writer.writeArrayOfParticles(particles, nbParticles);
* \endcode * \endcode
...@@ -748,7 +748,7 @@ public: ...@@ -748,7 +748,7 @@ public:
* FmaRParticle * const particles = new FmaRParticle[nbParticles]; * FmaRParticle * const particles = new FmaRParticle[nbParticles];
* memset(particles, 0, sizeof(FmaRParticle) * nbParticles) ; * memset(particles, 0, sizeof(FmaRParticle) * nbParticles) ;
* ... * ...
* FFmaGenericWriter writer(filenameOut) ; * FFmaGenericWriter<FReal> writer(filenameOut) ;
* Fwriter.writeHeader(Centre,BoxWith, nbParticles,*particles) ; * Fwriter.writeHeader(Centre,BoxWith, nbParticles,*particles) ;
* Fwriter.writeArrayOfReal(particles, nbParticles); * Fwriter.writeArrayOfReal(particles, nbParticles);
* \endcode * \endcode
......
...@@ -83,7 +83,7 @@ public: ...@@ -83,7 +83,7 @@ public:
/** Should be used to insert a FBasicParticleContainer class */ /** Should be used to insert a FBasicParticleContainer class */
template < unsigned NbAttributes, class AttributeClass> template < unsigned NbAttributes, class AttributeClass>
static void BuildTreeFromArray(OctreeClass*const tree, const FBasicParticleContainer<NbAttributes, AttributeClass>& particlesContainers, static void BuildTreeFromArray(OctreeClass*const tree, const FBasicParticleContainer<FReal, NbAttributes, AttributeClass>& particlesContainers,
bool isAlreadySorted=false){ bool isAlreadySorted=false){
const FSize numberOfParticle = particlesContainers.getNbParticles(); const FSize numberOfParticle = particlesContainers.getNbParticles();
// If the parts are already sorted, no need to sort again // If the parts are already sorted, no need to sort again
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include "../../Kernels/Uniform//FUnifTensor.hpp" #include "../../Kernels/Uniform//FUnifTensor.hpp"
#include "../../Utils/FComplex.hpp" #include "../../Utils/FComplex.hpp"
typedef FBasicCellPOD FTestCellPODCore; typedef FBasicCellPOD FUnifCellPODCore;
template <class FReal, int ORDER, int NRHS = 1, int NLHS = 1, int NVALS = 1> template <class FReal, int ORDER, int NRHS = 1, int NLHS = 1, int NVALS = 1>
struct alignas(FStarPUDefaultAlign::StructAlign) FUnifCellPODPole { struct alignas(FStarPUDefaultAlign::StructAlign) FUnifCellPODPole {
......
...@@ -279,11 +279,11 @@ public: ...@@ -279,11 +279,11 @@ public:
* Handler to deal with all symmetries: Stores permutation indices and vectors * Handler to deal with all symmetries: Stores permutation indices and vectors
* to reduce 343 different interactions to 16 only. * to reduce 343 different interactions to 16 only.
*/ */
template < class CellClass, template <class FReal, class CellClass,
class ContainerClass, class ContainerClass,
class MatrixKernelClass, class MatrixKernelClass,
int ORDER> int ORDER>
struct FChebFlopsSymKernel<CellClass, ContainerClass, MatrixKernelClass, ORDER> struct FChebFlopsSymKernel<FReal, CellClass, ContainerClass, MatrixKernelClass, ORDER>
::SymmetryHandler ::SymmetryHandler
{ {
// M2L operators // M2L operators
......
...@@ -1632,7 +1632,7 @@ inline void FChebInterpolator<FReal, ORDER,MatrixKernelClass,NVALS>::applyL2PTot ...@@ -1632,7 +1632,7 @@ inline void FChebInterpolator<FReal, ORDER,MatrixKernelClass,NVALS>::applyL2PTot
//FReal T_of_y[ORDER * (ORDER-1)]; //FReal T_of_y[ORDER * (ORDER-1)];
//for (unsigned int o=1; o<ORDER; ++o) //for (unsigned int o=1; o<ORDER; ++o)
// for (unsigned int j=0; j<ORDER; ++j) // for (unsigned int j=0; j<ORDER; ++j)
// T_of_y[(o-1)*ORDER + j] = FReal(FChebRoots<ORDER>::T(o, FReal(FChebRoots<ORDER>::roots[j]))); // T_of_y[(o-1)*ORDER + j] = FReal(FChebRoots<FReal,ORDER>::T(o, FReal(FChebRoots<FReal,ORDER>::roots[j])));
//struct SumP2M { //struct SumP2M {
// unsigned int f2[3][nnodes], f4[3][nnodes]; // unsigned int f2[3][nnodes], f4[3][nnodes];
......
...@@ -229,14 +229,14 @@ public: ...@@ -229,14 +229,14 @@ public:
ContainerClass* const NeighborSourceParticles[27], ContainerClass* const NeighborSourceParticles[27],
const int /* size */) const int /* size */)
{ {
DirectInteractionComputer<MatrixKernelClass::NCMP, NVALS>::P2P(TargetParticles,NeighborSourceParticles,MatrixKernel); DirectInteractionComputer<FReal, MatrixKernelClass::NCMP, NVALS>::P2P(TargetParticles,NeighborSourceParticles,MatrixKernel);
} }
void P2PRemote(const FTreeCoordinate& /*inPosition*/, void P2PRemote(const FTreeCoordinate& /*inPosition*/,
ContainerClass* const FRestrict inTargets, const ContainerClass* const FRestrict /*inSources*/, ContainerClass* const FRestrict inTargets, const ContainerClass* const FRestrict /*inSources*/,
ContainerClass* const inNeighbors[27], const int /*inSize*/){ ContainerClass* const inNeighbors[27], const int /*inSize*/){
DirectInteractionComputer<MatrixKernelClass::NCMP, NVALS>::P2PRemote(inTargets,inNeighbors,27,MatrixKernel); DirectInteractionComputer<FReal, MatrixKernelClass::NCMP, NVALS>::P2PRemote(inTargets,inNeighbors,27,MatrixKernel);
} }
}; };
......
...@@ -194,8 +194,8 @@ public: ...@@ -194,8 +194,8 @@ public:
}; };
template <int ORDER, class MatrixKernelClass> template <class FReal, int ORDER, class MatrixKernelClass>
class FChebTensorialM2LHandler<ORDER,MatrixKernelClass,NON_HOMOGENEOUS> : FNoCopyable class FChebTensorialM2LHandler<FReal,ORDER,MatrixKernelClass,NON_HOMOGENEOUS> : FNoCopyable
{ {
enum {order = ORDER,