Free Electron
Flatten.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 __spatial_Flatten_h__
8 #define __spatial_Flatten_h__
9 
10 #include "signal/signal.h"
11 #include "datatool/datatool.h"
12 #include "math/math.h"
13 #include "shape/shape.h"
14 
15 namespace fe
16 {
17 namespace ext
18 {
19 
20 /** Constrain particles in cartesian space by adjusting positions.
21 
22  @copydoc Flatten_info
23  */
24 class FE_DL_EXPORT Flatten : public Initialize<Flatten>,
25  virtual public HandlerI,
26  virtual public Config
27 {
28  public:
29  typedef enum
30  {
31  e_eq,
32  e_lt,
33  e_gt
34  } t_mode;
35  Flatten(void);
36 virtual ~Flatten(void);
37  void initialize(void);
38 
39  void addLimit(int a_dimension, Real a_value, t_mode a_mode);
40 
41  // AS HandlerI
42 virtual void handle(Record &r_sig);
43 
44  private:
45  struct t_limit
46  {
47  int m_dimension;
48  Real m_value;
49  t_mode m_mode;
50  };
51  std::vector<t_limit> m_limits;
52  AsParticle m_asParticle;
53  AsSignal m_asSignal;
54 };
55 
56 } /* namespace ext */
57 } /* namespace fe */
58 
59 #endif /* __spatial_Flatten_h__ */
60 
Convienience base class for specification and use of path accessors.
Definition: Config.h:19
possible attributes of a top level signal
Definition: datatoolAS.h:16
kernel
Definition: namespace.dox:3
Per-class participation in the Initialized <> mechanism.
Definition: Initialized.h:117
Constrain particles in cartesian space by adjusting positions.
Definition: Flatten.h:24
Interface to handle signals from an SignalerI.
Definition: HandlerI.h:22
particle in physical space
Definition: shapeAS.h:58
Reference to an instance of a Layout.
Definition: RecordSB.h:35