hemocell
Loading...
Searching...
No Matches
hemoCellParticleDataTransfer.h
Go to the documentation of this file.
1/*
2This file is part of the HemoCell library
3
4HemoCell is developed and maintained by the Computational Science Lab
5in the University of Amsterdam. Any questions or remarks regarding this library
6can be sent to: info@hemocell.eu
7
8When using the HemoCell library in scientific work please cite the
9corresponding paper: https://doi.org/10.3389/fphys.2017.00563
10
11The HemoCell library is free software: you can redistribute it and/or
12modify it under the terms of the GNU Affero General Public License as
13published by the Free Software Foundation, either version 3 of the
14License, or (at your option) any later version.
15
16The library is distributed in the hope that it will be useful,
17but WITHOUT ANY WARRANTY; without even the implied warranty of
18MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19GNU Affero General Public License for more details.
20
21You should have received a copy of the GNU Affero General Public License
22along with this program. If not, see <http://www.gnu.org/licenses/>.
23*/
24#ifndef HEMOCELL_PARTICLE_DATA_TRANSFER_H
25#define HEMOCELL_PARTICLE_DATA_TRANSFER_H
26
27namespace hemo {
28 class HemoCellParticleDataTransfer;
29}
30
31#include "atomicBlock/atomicBlock3D.h"
33#include "constant_defaults.h"
34
35namespace hemo {
36using namespace plb;
37
38class HemoCellParticleDataTransfer : public BlockDataTransfer3D {
39public:
41 virtual plint staticCellSize() const;
42 virtual void send(Box3D domain, std::vector<char>& buffer, modif::ModifT kind) const;
43 virtual void send_preinlet(Box3D domain, std::vector<char>& buffer, modif::ModifT kind) const;
44 // Much faster since we can circumvent memcpy (twice!)
45 void receive(Box3D const & domain, char *, unsigned int size, modif::ModifT);
46 void receive(Box3D const & domain, char *, unsigned int size, modif::ModifT, Dot3D absoluteOffset);
47 void receive(char *, unsigned int size, modif::ModifT);
48 void receive(char *, unsigned int size, modif::ModifT, Dot3D absoluteOffset);
49 void receivePreInlet(char *, unsigned int size, modif::ModifT, Dot3D absoluteOffset);
50
51 virtual void receive(Box3D domain, std::vector<NoInitChar> const& buffer);
52 virtual void receive(Box3D domain, std::vector<NoInitChar> const& buffer, Dot3D absoluteOffset);
53 virtual void receive(Box3D domain, std::vector<char> const& buffer, modif::ModifT kind);
54 virtual void receive(Box3D domain, std::vector<char> const& buffer, modif::ModifT kind, Dot3D absoluteOffset);
55 virtual void receive( Box3D domain, std::vector<char> const& buffer,
56 modif::ModifT kind, std::map<int,std::string> const& foreignIds )
57 {
58 receive(domain, buffer, kind);
59 }
60 virtual void setBlock(AtomicBlock3D& block);
61 virtual void setConstBlock(AtomicBlock3D const& block) ;
63 return new HemoCellParticleDataTransfer(*this);
64 }
65 virtual void attribute(Box3D toDomain, plint deltaX, plint deltaY, plint deltaZ,
66 AtomicBlock3D const& from, modif::ModifT kind);
67 virtual void attribute(Box3D toDomain, plint deltaX, plint deltaY, plint deltaZ,
68 AtomicBlock3D const& from, modif::ModifT kind, Dot3D absoluteOffset);
69 plint getOffset(Dot3D const&);
70private:
73};
74}
75#endif
Definition hemoCellParticleDataTransfer.h:38
virtual void receive(Box3D domain, std::vector< char > const &buffer, modif::ModifT kind, std::map< int, std::string > const &foreignIds)
Definition hemoCellParticleDataTransfer.h:55
void receive(Box3D const &domain, char *, unsigned int size, modif::ModifT)
Definition hemoCellParticleDataTransfer.cpp:202
HemoCellParticleDataTransfer()
Definition hemoCellParticleDataTransfer.cpp:67
void receivePreInlet(char *, unsigned int size, modif::ModifT, Dot3D absoluteOffset)
Definition hemoCellParticleDataTransfer.cpp:229
virtual void setConstBlock(AtomicBlock3D const &block)
Definition hemoCellParticleDataTransfer.cpp:374
virtual HemoCellParticleDataTransfer * clone() const
Definition hemoCellParticleDataTransfer.h:62
virtual void send_preinlet(Box3D domain, std::vector< char > &buffer, modif::ModifT kind) const
Definition hemoCellParticleDataTransfer.cpp:99
plint getOffset(Dot3D const &)
Definition hemoCellParticleDataTransfer.cpp:33
HemoCellParticleField const * constParticleField
Definition hemoCellParticleDataTransfer.h:72
virtual void send(Box3D domain, std::vector< char > &buffer, modif::ModifT kind) const
Definition hemoCellParticleDataTransfer.cpp:74
virtual plint staticCellSize() const
Definition hemoCellParticleDataTransfer.cpp:69
HemoCellParticleField * particleField
Definition hemoCellParticleDataTransfer.h:71
virtual void setBlock(AtomicBlock3D &block)
Definition hemoCellParticleDataTransfer.cpp:367
virtual void attribute(Box3D toDomain, plint deltaX, plint deltaY, plint deltaZ, AtomicBlock3D const &from, modif::ModifT kind)
Definition hemoCellParticleDataTransfer.cpp:379
Definition hemoCellParticleField.h:39
long int plint
Definition constant_defaults.h:127
Definition config.cpp:34
Definition meshGeneratingFunctions.cpp:28