OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
SubParticleAssignDefs.h
Go to the documentation of this file.
1// -*- C++ -*-
2/***************************************************************************
3 *
4 * The IPPL Framework
5 *
6 *
7 * Visit http://people.web.psi.ch/adelmann/ for more details
8 *
9 ***************************************************************************/
10
11#ifndef SUB_PARTICLE_ASSIGN_DEFS_H
12#define SUB_PARTICLE_ASSIGN_DEFS_H
13
14// include files
17
19//
20// Is the domain specification object compressed?
21//
23
24template<class PA, class T, unsigned D, class C>
25inline bool
27{
28 return false;
29}
30
32//
33// Do the terms all use the same kind of subset object?
34//
36
37template<class PA, class T, unsigned D, class C>
38inline bool
40{
41 return p.matchType(s.fID);
42}
43
45//
46// Initialize all subset objects in an expression before the loop starts
47//
49
50template<class PA, class T, unsigned D, class C>
51inline int
53{
54 p.initialize();
55 return 0;
56}
57
59//
60// Set a subfield iterator to point to the next lfield
61//
63
64template<class PA, class T, unsigned D, class C>
65inline int
67{
68 p.nextLField();
69 return 0;
70}
71
73//
74// Do any of the terms in an expression have an ID equal to a given one?
75//
77
78template<class PA, class T, unsigned D, class C>
79inline bool
81{
82 return false;
83}
84
86//
87// Plugbase.
88//
90
91template<class PA, class T, unsigned D, class C>
92inline bool
94{
95 return p.plugBase(f.Domain);
96}
97
98template<class PA, class T, unsigned D, class C>
99inline bool
101{
102 return false;
103}
104
106//
107// Evaluation functors.
108// Just need EvalFunctor_1 here. EvalFunctor_0 is defined since we
109// need it to compile, but it should never be called because it is
110// only used when things are compressed, and SubParticleAttrib's are
111// never compressed.
112//
114
115template<class PA, class T, unsigned D>
116inline T&
118{
119 return p.offset(e.I);
120}
121
122template<class PA, class T, unsigned D>
123inline T&
125{
126 // we should never be here
127 ERRORMSG("SubParticleAttrib::iterator -> EvalFunctor_0 called.");
128 Ippl::abort();
129
130 // this is here just so we can have some kind of return value
131 return p.offset(0);
132}
133
135//
136// Does an iterator reference something with unit stride?
137//
139
140template<class PA, class T, unsigned D, class C>
141inline bool
143{
144 return true;
145}
146
147
149//
150// Ask each term to fill guard cells and compress itself
151//
153
154template<class PA, class T, unsigned D, class C, class T1>
155inline int
157{
158 return 0;
159}
160
161
162#endif // SUB_PARTICLE_ASSIGN_DEFS_H
163
164/***************************************************************************
165 * $RCSfile: SubParticleAssignDefs.h,v $ $Author: adelmann $
166 * $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:33 $
167 * IPPL_VERSION_ID: $Id: SubParticleAssignDefs.h,v 1.1.1.1 2003/01/23 07:40:33 adelmann Exp $
168 ***************************************************************************/
bool for_each(SubParticleAttribIter< PA, T, D > &, DomainCompressed, C)
#define ERRORMSG(msg)
Definition: IpplInfo.h:350
constexpr double e
The value of.
Definition: Physics.h:39
NDIndex< D > Domain
Definition: AssignDefs.h:71
const_iterator_iv nextLField()
bool plugBase(const NDIndex< Dim > &)
static bool matchType(int t)
static void abort(const char *=0)
Definition: IpplInfo.cpp:616