FBasicCell.hpp 1.89 KB
Newer Older
1
// ===================================================================================
2 3 4 5 6 7 8 9 10 11 12 13 14
// Copyright ScalFmm 2011 INRIA, Olivier Coulaud, Bérenger Bramas, Matthias Messner
// 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".
15
// ===================================================================================
16 17
#ifndef FBASICCELL_HPP
#define FBASICCELL_HPP
18

19

20 21
#include "../Extensions/FExtendPosition.hpp"
#include "../Extensions/FExtendMortonIndex.hpp"
22
#include "../Extensions/FExtendCoordinate.hpp"
23 24 25 26 27 28 29 30 31 32 33 34

/**
* @author Berenger Bramas (berenger.bramas@inria.fr)
* @class FBasicCell
* Please read the license
*
* This class defines a basic cell used for examples. It extends
* the mininum, only what is needed by FOctree and FFmmAlgorithm
* to make the things working.
* By using this extension it will implement the FAbstractCell without
* inheriting from it.
*/
35
class FBasicCell : public FExtendMortonIndex, public FExtendCoordinate {
36 37 38 39
public:
    /** Default destructor */
    virtual ~FBasicCell(){
    }
40

41
    /** Save the current cell in a buffer */
42 43 44 45
    void save(FBufferWriter& buffer) const{
        FExtendMortonIndex::save(buffer);
        FExtendCoordinate::save(buffer);
    }
46
    /** Restore the current cell from a buffer */
47 48 49 50
    void restore(FBufferReader& buffer){
        FExtendMortonIndex::restore(buffer);
        FExtendCoordinate::restore(buffer);
    }
51 52 53 54 55
};


#endif //FBASICCELL_HPP

56