Commit 8eca7da0 authored by COULAUD Olivier's avatar COULAUD Olivier

Remove warning at the compilation

parent 30d5e4c2
// ===================================================================================
// Copyright ScalFmm 2011 INRIA, Olivier Coulaud, Bérenger Bramas, Matthias Messner
// Copyright ScalFmm 2011 INRIA, Olivier Coulaud, Berenger Bramas, Matthias Messner
// olivier.coulaud@inria.fr, berenger.bramas@inria.fr
// This software is a computer program whose purpose is to compute the FMM.
//
......@@ -20,89 +20,90 @@
#include "FBasicCell.hpp"
/**
* @author Berenger Bramas (berenger.bramas@inria.fr)
* @class FBasicCell*
* @brief This class is used in the FTestKernels, please look at this class to know how to customize a cell.
*
* This cell simply store the data when up/down.
* It also shows how to be restored and saved, etc.
*/
* @author Berenger Bramas (berenger.bramas@inria.fr)
* @class FBasicCell*
* @brief This class is used in the FTestKernels, please look at this class to know how to customize a cell.
*
* This cell simply store the data when up/down.
* It also shows how to be restored and saved, etc.
*/
class FTestCell : public FBasicCell {
protected:
// To store data during upward and downward pass
long long int dataUp, dataDown;
// To store data during upward and downward pass
long long int dataUp, dataDown;
public:
FTestCell(): dataUp(0) , dataDown(0){
}
/** Default destructor */
virtual ~FTestCell(){
}
/** When doing the upward pass */
long long int getDataUp() const {
return this->dataUp;
}
/** When doing the upward pass */
void setDataUp(const long long int inData){
this->dataUp = inData;
}
/** When doing the downard pass */
long long int getDataDown() const {
return this->dataDown;
}
/** When doing the downard pass */
void setDataDown(const long long int inData){
this->dataDown = inData;
}
FTestCell(): dataUp(0) , dataDown(0){
}
/** Default destructor */
virtual ~FTestCell(){
}
/** When doing the upward pass */
long long int getDataUp() const {
return this->dataUp;
}
/** When doing the upward pass */
void setDataUp(const long long int inData){
this->dataUp = inData;
}
/** When doing the downard pass */
long long int getDataDown() const {
return this->dataDown;
}
/** When doing the downard pass */
void setDataDown(const long long int inData){
this->dataDown = inData;
}
/** Make it like the begining */
void resetToInitialState(){
this->dataDown = 0;
this->dataUp = 0;
}
/** Make it like the begining */
void resetToInitialState(){
this->dataDown = 0;
this->dataUp = 0;
}
/////////////////////////////////////////////////
/////////////////////////////////////////////////
/** Save the current cell in a buffer */
template <class BufferWriterClass>
void save(BufferWriterClass& buffer) const{
FBasicCell::save(buffer);
buffer << dataDown << dataUp;
}
/** Save the current cell in a buffer */
template <class BufferWriterClass>
void save(BufferWriterClass& buffer) const{
FBasicCell::save(buffer);
buffer << dataDown << dataUp;
}
/** Restore the current cell from a buffer */
template <class BufferReaderClass>
void restore(BufferReaderClass& buffer){
FBasicCell::restore(buffer);
buffer >> dataDown >> dataUp;
}
/** Restore the current cell from a buffer */
template <class BufferReaderClass>
void restore(BufferReaderClass& buffer){
FBasicCell::restore(buffer);
buffer >> dataDown >> dataUp;
}
static constexpr int GetSize(){
return sizeof(long long int)*2;
}
// static constexpr int GetSize(){
static constexpr std::size_t GetSize(){
return sizeof(long long int)*2;
}
/////////////////////////////////////////////////
/////////////////////////////////////////////////
/** Serialize only up data in a buffer */
template <class BufferWriterClass>
void serializeUp(BufferWriterClass& buffer) const {
buffer << this->dataUp;
}
/** Deserialize only up data in a buffer */
template <class BufferReaderClass>
void deserializeUp(BufferReaderClass& buffer){
buffer >> this->dataUp;
}
/** Serialize only up data in a buffer */
template <class BufferWriterClass>
void serializeUp(BufferWriterClass& buffer) const {
buffer << this->dataUp;
}
/** Deserialize only up data in a buffer */
template <class BufferReaderClass>
void deserializeUp(BufferReaderClass& buffer){
buffer >> this->dataUp;
}
/** Serialize only down data in a buffer */
template <class BufferWriterClass>
void serializeDown(BufferWriterClass& buffer) const {
buffer << this->dataDown;
}
/** Deserialize only up data in a buffer */
template <class BufferReaderClass>
void deserializeDown(BufferReaderClass& buffer){
buffer >> this->dataDown;
}
/** Serialize only down data in a buffer */
template <class BufferWriterClass>
void serializeDown(BufferWriterClass& buffer) const {
buffer << this->dataDown;
}
/** Deserialize only up data in a buffer */
template <class BufferReaderClass>
void deserializeDown(BufferReaderClass& buffer){
buffer >> this->dataDown;
}
};
......
// ===================================================================================
// Copyright ScalFmm 2011 INRIA, Olivier Coulaud, Bérenger Bramas, Matthias Messner
// Copyright ScalFmm 2011 INRIA, Olivier Coulaud, Berenger Bramas, Matthias Messner
// olivier.coulaud@inria.fr, berenger.bramas@inria.fr
// This software is a computer program whose purpose is to compute the FMM.
//
......@@ -44,7 +44,6 @@ int main(int argc, char** argv){
typedef FSimpleLeaf< ContainerClass > LeafClass;
typedef FOctree<CellClass,ContainerClass,LeafClass> OctreeClass;
typedef FFmmAlgorithmPeriodic<OctreeClass, CellClass, ContainerClass, KernelClass, LeafClass > FmmClassPer;
typedef FFmmAlgorithm<OctreeClass, CellClass, ContainerClass, KernelClass, LeafClass > FmmClass;
/////////////////////////////////////////////////
// Parameters
......
// ===================================================================================
// Copyright ScalFmm 2011 INRIA, Olivier Coulaud, Bérenger Bramas, Matthias Messner
// Copyright ScalFmm 2011 INRIA, Olivier Coulaud, Berenger Bramas, Cyrille Piacibello
// olivier.coulaud@inria.fr, berenger.bramas@inria.fr
// This software is a computer program whose purpose is to compute the FMM.
//
......@@ -43,8 +43,8 @@ FPoint centerBox = FPoint(0,0,0);
typedef FTaylorCell<P,order> CellClass;
typedef FP2PParticleContainer<> ContainerClass;
typedef FTaylorKernel<CellClass,ContainerClass,P,order> KernelClass;
typedef FSimpleLeaf< ContainerClass > LeafClass;
typedef FOctree< CellClass, ContainerClass , LeafClass > OctreeClass;
//typedef FSimpleLeaf< ContainerClass > LeafClass;
//typedef FOctree< CellClass, ContainerClass , LeafClass > OctreeClass;
KernelClass kernel(9,1.0,centerBox);
......
......@@ -16,8 +16,8 @@
#include "../../Src/Containers/FOctree.hpp"
#include "../../Src/Core/FFmmAlgorithm.hpp"
#include "../../Src/Core/FFmmAlgorithmThread.hpp"
#include "../../Src/Core/FFmmAlgorithmTask.hpp"
//#include "../../Src/Core/FFmmAlgorithmThread.hpp"
//#include "../../Src/Core/FFmmAlgorithmTask.hpp"
#include "../../Src/Kernels/Taylor/FTaylorCell.hpp"
#include "../../Src/Kernels/Taylor/FTaylorKernel.hpp"
......@@ -41,8 +41,8 @@
typedef FTaylorKernel<CellClass,ContainerClass,P,order> KernelClass;
typedef FFmmAlgorithm<OctreeClass, CellClass, ContainerClass, KernelClass, LeafClass > FmmClass;
typedef FFmmAlgorithmThread<OctreeClass, CellClass, ContainerClass, KernelClass, LeafClass > FmmClassThread;
typedef FFmmAlgorithmTask<OctreeClass, CellClass, ContainerClass, KernelClass, LeafClass > FmmClassTask;
// typedef FFmmAlgorithmThread<OctreeClass, CellClass, ContainerClass, KernelClass, LeafClass > FmmClassThread;
// typedef FFmmAlgorithmTask<OctreeClass, CellClass, ContainerClass, KernelClass, LeafClass > FmmClassTask;
FTic counter;
......
// ===================================================================================
// Ce LOGICIEL "ScalFmm" est couvert par le copyright Inria 20xx-2012.
// Inria détient tous les droits de propriété sur le LOGICIEL, et souhaite que
// la communauté scientifique l'utilise afin de le tester et de l'évaluer.
// Inria donne gracieusement le droit d'utiliser ce LOGICIEL. Toute utilisation
// dans un but lucratif ou à des fins commerciales est interdite sauf autorisation
// expresse et préalable d'Inria.
// Toute utilisation hors des limites précisées ci-dessus et réalisée sans l'accord
// expresse préalable d'Inria constituerait donc le délit de contrefaçon.
// Le LOGICIEL étant un produit en cours de développement, Inria ne saurait assurer
// aucune responsabilité et notamment en aucune manière et en aucun cas, être tenu
// de répondre d'éventuels dommages directs ou indirects subits par l'utilisateur.
// Tout utilisateur du LOGICIEL s'engage à communiquer à Inria ses remarques
// relatives à l'usage du LOGICIEL
// Copyright ScalFmm 2011 INRIA,
// olivier.coulaud@inria.fr, berenger.bramas@inria.fr
// This software is a computer program whose purpose is to compute the FMM.
//
// This software is governed by the CeCILL-C and LGPL licenses and
// abiding by the rules of distribution of free software.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public and CeCILL-C Licenses for more details.
// "http://www.cecill.info".
// "http://www.gnu.org/licenses".
// ===================================================================================
// author P. Banchard
// Modifs
// O. Coulaud
// ==== CMAKE =====
// @FUSE_FFT
// ================
......@@ -98,8 +100,6 @@ int main(int argc, char* argv[])
FReal potential[NPOT];
};
const FReal FRandMax = FReal(RAND_MAX);
// open particle file
FFmaScanfLoader loader(filename);
if(!loader.isOpen()) throw std::runtime_error("Particle file couldn't be opened!");
......@@ -117,7 +117,7 @@ int main(int argc, char* argv[])
// // Either copy same physical value in each component
particles[idxPart].physicalValue[idxPV] = physicalValue;
// ... or set random value
// particles[idxPart].physicalValue[idxPV] = physicalValue*FReal(rand())/FRandMax;
// particles[idxPart].physicalValue[idxPV] = physicalValue*FReal(drand48());
}
for(unsigned idxPot = 0; idxPot<NPOT;++idxPot){
particles[idxPart].potential[idxPot] = 0.0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment