Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F90366269
pbc_synchronizer.hh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Nov 1, 00:32
Size
3 KB
Mime Type
text/x-c++
Expires
Sun, Nov 3, 00:32 (2 d)
Engine
blob
Format
Raw Data
Handle
21714658
Attached To
rAKA akantu
pbc_synchronizer.hh
View Options
/**
* @file pbc_synchronizer.hh
*
* @author Guillaume Anciaux <guillaume.anciaux@epfl.ch>
*
* @date creation: Fri Jun 18 2010
* @date last modification: Sun Oct 19 2014
*
* @brief Dofs Synchronizer for periodic boundary condition
*
* @section LICENSE
*
* Copyright (©) 2010-2012, 2014, 2015 EPFL (Ecole Polytechnique Fédérale de
* Lausanne) Laboratory (LSMS - Laboratoire de Simulation en Mécanique des
* Solides)
*
* Akantu is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
* Akantu 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 Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Akantu. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* -------------------------------------------------------------------------- */
#ifndef __AKANTU_PBC_SYNCHRONIZER_HH__
#define __AKANTU_PBC_SYNCHRONIZER_HH__
/* -------------------------------------------------------------------------- */
#include "synchronizer.hh"
/* -------------------------------------------------------------------------- */
__BEGIN_AKANTU__
/* -------------------------------------------------------------------------- */
class
PBCSynchronizer
:
public
Synchronizer
{
/* ------------------------------------------------------------------------ */
/* Constructors/Destructors */
/* ------------------------------------------------------------------------ */
public
:
PBCSynchronizer
(
std
::
map
<
UInt
,
UInt
>
&
pairs
,
SynchronizerID
id
=
"pbc_synch"
,
MemoryID
memory_id
=
0
);
virtual
~
PBCSynchronizer
(){};
public
:
/* ------------------------------------------------------------------------ */
/* Inherited from Synchronizer */
/* ------------------------------------------------------------------------ */
/// asynchronous synchronization of ghosts
void
asynchronousSynchronize
(
DataAccessor
&
data_accessor
,
SynchronizationTag
tag
);
/// wait end of asynchronous synchronization of ghosts
void
waitEndSynchronize
(
DataAccessor
&
data_accessor
,
SynchronizationTag
tag
);
private
:
/// compute buffer size for a given tag and data accessor
void
computeBufferSize
(
DataAccessor
&
data_accessor
,
SynchronizationTag
tag
);
/* ------------------------------------------------------------------------ */
/* Accessors */
/* ------------------------------------------------------------------------ */
public
:
/* ------------------------------------------------------------------------ */
/* Class Members */
/* ------------------------------------------------------------------------ */
private
:
/// pairs of nodes slave -> master node
std
::
map
<
UInt
,
UInt
>
&
pbc_pair
;
/// size of packing buffer for each tag
std
::
map
<
SynchronizationTag
,
UInt
>
size_buffer
;
/// buffer to pack and unpack the data
CommunicationBuffer
buffer
;
};
/* -------------------------------------------------------------------------- */
/* inline functions */
/* -------------------------------------------------------------------------- */
//#include "pbc_synchronizer_inline_impl.cc"
// /// standard output stream operator
// inline std::ostream & operator <<(std::ostream & stream, const PBCSynchronizer & _this)
// {
// _this.printself(stream);
// return stream;
// }
__END_AKANTU__
#endif
/* __AKANTU_PBC_SYNCHRONIZER_HH__ */
Event Timeline
Log In to Comment