OPAL (Object Oriented Parallel Accelerator Library)
2024.1
OPAL
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
ippl
src
Field
GuardCellSizes.hpp
Go to the documentation of this file.
1
// -*- C++ -*-
2
/***************************************************************************
3
*
4
* The IPPL Framework
5
*
6
* This program was prepared by PSI.
7
* All rights in the program are reserved by PSI.
8
* Neither PSI nor the author(s)
9
* makes any warranty, express or implied, or assumes any liability or
10
* responsibility for the use of this software
11
*
12
* Visit www.amas.web.psi for more details
13
*
14
***************************************************************************/
15
16
// -*- C++ -*-
17
/***************************************************************************
18
*
19
* The IPPL Framework
20
*
21
*
22
* Visit http://people.web.psi.ch/adelmann/ for more details
23
*
24
***************************************************************************/
25
26
// include files
27
#include "
Field/GuardCellSizes.h
"
28
29
30
template
<
unsigned
Dim>
31
GuardCellSizes<Dim>::GuardCellSizes
(
unsigned
s)
32
{
33
34
35
for
(
unsigned
d=0; d<
Dim
; ++d)
36
Left[d] = Right[d] = s;
37
}
38
39
template
<
unsigned
Dim>
40
GuardCellSizes<Dim>::GuardCellSizes
(
unsigned
*s)
41
{
42
43
44
for
(
unsigned
d=0; d<
Dim
; ++d)
45
Left[d] = Right[d] = s[d];
46
}
47
48
template
<
unsigned
Dim>
49
GuardCellSizes<Dim>::GuardCellSizes
(
unsigned
l,
unsigned
r)
50
{
51
52
53
for
(
unsigned
d=0; d<
Dim
; ++d) {
54
Left[d] = l;
55
Right[d] = r;
56
}
57
}
58
59
template
<
unsigned
Dim>
60
GuardCellSizes<Dim>::GuardCellSizes
(
unsigned
*l,
unsigned
*r)
61
{
62
63
64
for
(
unsigned
d=0; d<
Dim
; ++d) {
65
Left[d] = l[d];
66
Right[d] = r[d];
67
}
68
}
69
70
template
<
unsigned
Dim>
71
void
GuardCellSizes<Dim>::set_Left
(
unsigned
s)
72
{
73
74
75
for
(
unsigned
d=0; d<
Dim
; ++d)
76
Left[d] = s;
77
}
78
79
template
<
unsigned
Dim>
80
void
GuardCellSizes<Dim>::set_Left
(
unsigned
*s)
81
{
82
83
84
for
(
unsigned
d=0; d<
Dim
; ++d)
85
Left[d] = s[d];
86
}
87
88
template
<
unsigned
Dim>
89
void
GuardCellSizes<Dim>::set_Left
(
unsigned
d,
unsigned
*s)
90
{
91
92
93
Left[d] = s[d];
94
}
95
96
template
<
unsigned
Dim>
97
void
GuardCellSizes<Dim>::set_Right
(
unsigned
s)
98
{
99
100
101
for
(
unsigned
d=0; d<
Dim
; ++d)
102
Right[d] = s;
103
}
104
105
template
<
unsigned
Dim>
106
void
GuardCellSizes<Dim>::set_Right
(
unsigned
*s)
107
{
108
109
110
for
(
unsigned
d=0; d<
Dim
; ++d)
111
Right[d] = s[d];
112
}
113
114
template
<
unsigned
Dim>
115
void
GuardCellSizes<Dim>::set_Right
(
unsigned
d,
unsigned
*s)
116
{
117
118
119
Right[d] = s[d];
120
}
121
123
124
template
<
unsigned
Dim>
125
std::ostream&
126
operator<<(std::ostream& out, const GuardCellSizes<Dim>& gc)
127
{
128
129
130
for
(
unsigned
d=0; d<
Dim
; ++d)
131
out <<
"["
<< gc.left(d) <<
","
<< gc.right(d) <<
"]"
;
132
return
out;
133
}
134
135
/***************************************************************************
136
* $RCSfile: GuardCellSizes.cpp,v $ $Author: adelmann $
137
* $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:26 $
138
* IPPL_VERSION_ID: $Id: GuardCellSizes.cpp,v 1.1.1.1 2003/01/23 07:40:26 adelmann Exp $
139
***************************************************************************/
GuardCellSizes::set_Right
void set_Right(unsigned s)
Definition:
GuardCellSizes.hpp:97
GuardCellSizes::set_Left
void set_Left(unsigned s)
Definition:
GuardCellSizes.hpp:71
Dim
const unsigned Dim
Definition:
P3MPoissonSolver.h:26
GuardCellSizes.h
GuardCellSizes::GuardCellSizes
GuardCellSizes()
Definition:
GuardCellSizes.h:25
Generated on Tue Jul 2 2024 15:05:13 for OPAL (Object Oriented Parallel Accelerator Library) by
1.8.5