Loading...
Searching...
No Matches
PABLO_userDataComm.tpp
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 * UserDataComm.tpp
27 *
28 * Created on: 18/mar/2014
29 * Author: Marco Cisternino
30 */
31
32// #include "bitpit_common.hpp"
33
37template<class Data>
38UserDataComm<Data>::UserDataComm(Data & data_, Data & ghostData_) : data(data_), ghostData(ghostData_){};
39
40template<class Data>
41UserDataComm<Data>::~UserDataComm() {};
42
43template<class Data>
44inline size_t UserDataComm<Data>::fixedSize() const {
45 return 0;
46};
47
48template<class Data>
49inline size_t UserDataComm<Data>::size(const uint32_t e) const {
51 return sizeof(double)+sizeof(float);
52};
53
54template<class Data>
55template<class Buffer>
56inline void UserDataComm<Data>::gather(Buffer& buff, const uint32_t e) {
57 buff << data.doubleData[e];
58 buff << data.floatData[e];
59};
60
61template<class Data>
62template<class Buffer>
63inline void UserDataComm<Data>::scatter(Buffer& buff, const uint32_t e) {
64 buff >> ghostData.doubleData[e];
65 buff >> ghostData.floatData[e];
66};
67
#define BITPIT_UNUSED(variable)
Definition compiler.hpp:63
--- layout: doxygen_footer ---