Free Electron
shapeAS.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __shape_shapeAS_h__
8 #define __shape_shapeAS_h__
9 
10 namespace fe
11 {
12 namespace ext
13 {
14 
15 class AsPoint :
16  virtual public AccessorSet,
17  public Initialize<AsPoint>
18 {
19  public:
20  void initialize(void)
21  {
22  add(location, FE_SPEC("spc:at", "point location"));
23  }
24  /// location
25  Accessor<SpatialVector> location;
26 };
27 
28 class AsVelocityPoint :
29  virtual public AsPoint,
30  public Initialize<AsVelocityPoint>
31 {
32  public:
33  void initialize(void)
34  {
35  add(velocity, FE_USE("spc:velocity"));
36  }
37  /// spatial velocity
38  Accessor<SpatialVector> velocity;
39 };
40 
41 /// force application point
42 class AsForcePoint :
43  public AsVelocityPoint,
44  public Initialize<AsForcePoint>
45 {
46  public:
47  void initialize(void)
48  {
49  add(force, FE_USE("sim:force"));
50  }
51 
52  /// spatial force
54 };
55 
56 
57 /// particle in physical space
58 class AsParticle :
59  public AsForcePoint,
60  public Initialize<AsParticle>
61 {
62  public:
63  void initialize(void)
64  {
65  add(mass, FE_USE("sim:mass"));
66  }
67  /// mass
69 };
70 
71 class AsPoint1D :
72  virtual public AccessorSet,
73  public Initialize<AsPoint1D>
74 {
75  public:
76  void initialize(void)
77  {
78  add(location, FE_SPEC("spc:location1d", "point location 1D"));
79  }
80  /// location
81  Accessor<Real> location;
82 };
83 
84 class AsVelocityPoint1D :
85  virtual public AsPoint1D,
86  public Initialize<AsVelocityPoint1D>
87 {
88  public:
89  void initialize(void)
90  {
91  add(velocity, FE_USE("spc:velocity1d"));
92  }
93  /// spatial velocity
94  Accessor<Real> velocity;
95 };
96 
97 /// force application point
99  public AsVelocityPoint1D,
100  public Initialize<AsForcePoint1D>
101 {
102  public:
103  void initialize(void)
104  {
105  add(force, FE_USE("sim:force1d"));
106  }
107 
108  /// spatial force
110 };
111 
112 
113 /// particle in physical space
115  public AsForcePoint1D,
116  public Initialize<AsParticle1D>
117 {
118  public:
119  void initialize(void)
120  {
121  add(mass, FE_USE("sim:mass"));
122  }
123  /// mass
125 };
126 
127 /// quad in physical space
128 class AsQuad :
129  virtual public AccessorSet,
130  public Initialize<AsQuad>
131 {
132  public:
133  void initialize(void)
134  {
135  add(v0, FE_USE("quad:v0"));
136  add(v1, FE_USE("quad:v1"));
137  add(v2, FE_USE("quad:v2"));
138  add(v3, FE_USE("quad:v3"));
139  }
144 };
145 
146 
147 /// possible bounding area/volume attributes
148 class AsBounded :
149  virtual public AccessorSet,
150  public Initialize<AsBounded>
151 {
152  public:
153  void initialize(void)
154  {
155  add(radius, FE_USE("bnd:radius"));
156  }
157  /// spatial radius
159 };
160 
161 class AsTransform :
162  virtual public AccessorSet,
163  public Initialize<AsTransform>
164 {
165  public:
166  void initialize(void)
167  {
168  add(transform, FE_USE("spc:transform"));
169  }
170  /// transform
171  Accessor<SpatialTransform> transform;
172 };
173 
174 class FE_DL_EXPORT AsColored:
175  public AccessorSet,
176  public Initialize<AsColored>
177 {
178  public:
179  void initialize(void)
180  {
181  add(color, FE_USE("sim:color"));
182  }
183  Accessor<Color> color;
184 };
185 
186 /// Labeled
187 class AsLabeled :
188  virtual public AccessorSet,
189  public Initialize<AsLabeled>
190 {
191  public:
192  void initialize(void)
193  {
194  add(label, FE_USE("sim:label"));
195  }
196  /// label
198 };
199 
200 
201 } /* namespace ext */
202 } /* namespace fe */
203 
204 #endif /* __shape_shapeAS_h__ */
205 
quad in physical space
Definition: shapeAS.h:128
Set of accessors.
Definition: AccessorSet.h:18
Accessor< Real > mass
mass
Definition: shapeAS.h:124
Accessor< Real > mass
mass
Definition: shapeAS.h:68
kernel
Definition: namespace.dox:3
force application point
Definition: shapeAS.h:42
Per-class participation in the Initialized <> mechanism.
Definition: Initialized.h:117
The main data access class for the data system.
Definition: Accessor.h:128
force application point
Definition: shapeAS.h:98
particle in physical space
Definition: shapeAS.h:58
Accessor< Real > force
spatial force
Definition: shapeAS.h:109
Accessor< Real > radius
spatial radius
Definition: shapeAS.h:158
possible bounding area/volume attributes
Definition: shapeAS.h:148
particle in physical space
Definition: shapeAS.h:114
Accessor< String > label
label
Definition: shapeAS.h:197
Accessor< SpatialVector > force
spatial force
Definition: shapeAS.h:53
Labeled.
Definition: shapeAS.h:187