-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMPI_OneSpaceElementPos.cpp
53 lines (41 loc) · 1.07 KB
/
MPI_OneSpaceElementPos.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//
// MPI_OneSpaceElementPos.cpp
//
#include "MPI_OneSpaceElementPos.h"
#include "MPI_OneSpaceElement.h"
MPI_OneSpaceElementPos::MPI_OneSpaceElementPos( MPI_OneSpaceElement *element, float position ) :
element_( element ),
position_( position )
{
// empty
}
MPI_OneSpaceElement* MPI_OneSpaceElementPos::getElement( void ) const
{
return element_;
}
void MPI_OneSpaceElementPos::setElement( MPI_OneSpaceElement *element )
{
element_ = element;
}
float MPI_OneSpaceElementPos::getPosition( void ) const
{
return position_;
}
void MPI_OneSpaceElementPos::setPosition( float position )
{
position_ = position;
}
bool MPI_OneSpaceElementPos::operator==( MPI_OneSpaceElementPos const& elementpos ) const
{
return element_ == elementpos.element_ && position_ == elementpos.position_;
}
void MPI_OneSpaceElementPos::print( std::ostream &os ) const
{
os << *element_ << ", position: " << position_;
}
std::ostream &operator<<( std::ostream &os, MPI_OneSpaceElementPos const &elementpos )
{
elementpos.print(os);
return os;
}
// vim:sw=4:et:cindent: