Loading...
Searching...
No Matches
PABLO_userDataLB.hpp
1/*---------------------------------------------------------------------------*\
2 *
3 * bitpit
4 *
5 * Copyright (C) 2015-2021 OPTIMAD engineering Srl
6 *
7 * -------------------------------------------------------------------------
8 * License
9 * This file is part of bitpit.
10 *
11 * bitpit is free software: you can redistribute it and/or modify it
12 * under the terms of the GNU Lesser General Public License v3 (LGPL)
13 * as published by the Free Software Foundation.
14 *
15 * bitpit is distributed in the hope that it will be useful, but WITHOUT
16 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
18 * License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with bitpit. If not, see <http://www.gnu.org/licenses/>.
22 *
23\*---------------------------------------------------------------------------*/
24
25/*
26 * User_data_LB.hpp
27 *
28 * Created on: 27/mar/2014
29 * Author: Marco Cisternino
30 */
31
32#ifndef __BITPIT_USER_DATA_LB_HPP__
33#define __BITPIT_USER_DATA_LB_HPP__
37#include "DataCommInterface.hpp"
38template <class D>
39class UserDataLB : public bitpit::DataLBInterface<UserDataLB<D> >{
40public:
41
42 typedef D Data;
43
44 Data& data;
45 Data& ghostdata;
46
47 size_t fixedSize() const;
48 size_t size(const uint32_t e) const;
49 void move(const uint32_t from, const uint32_t to);
50
51 template<class Buffer>
52 void gather(Buffer & buff, const uint32_t e);
53
54 template<class Buffer>
55 void scatter(Buffer & buff, const uint32_t e);
56
57 void assign(uint32_t stride, uint32_t length);
58 void resize(uint32_t newSize);
59 void resizeGhost(uint32_t newSize);
60 void shrink();
61
62 UserDataLB(Data& data_, Data& ghostdata_);
63 ~UserDataLB();
64};
65
66#include "PABLO_userDataLB.tpp"
67/*
68 \endcond
69 */
70#endif /* __BITPIT_USER_DATA_LB_HPP__ */
Base class for data communications.
void gather(Buffer &buff, const uint32_t e)
void assign(uint32_t stride, uint32_t length)
void move(const uint32_t from, const uint32_t to)
void scatter(Buffer &buff, const uint32_t e)
size_t size(const uint32_t e) const
void resizeGhost(uint32_t newSize)
void resize(uint32_t newSize)
--- layout: doxygen_footer ---