Peano
Loading...
Searching...
No Matches
DastgenTestDummyParticle.py
Go to the documentation of this file.
1# This file is part of the SWIFT2 project. For conditions of distribution and
2# use, please see the copyright notice at www.peano-framework.org
3from swift2.particle.Particle import Particle
4from swift2.particle.AlgorithmStep import AlgorithmStep
5
6import peano4
7import dastgen2
9
10from abc import ABC
11
12
14 """!
15
16 A dummy particle containing meaningless variables to test the functionality
17 of dastgen2.
18
19 All this particle does is define variables, and then test getters, setters,
20 and constructors.
21
22 """
23
25 self,
26 name,
27 particles_per_cell=0, # makes no sense, and should likely be forbidden
28 min_h=0.3,
29 max_h=0.3,
30 ):
31 super(DastgenTestDummyParticle, self).__init__(
32 name,
33 particles_per_cell,
34 min_h,
35 max_h,
36 )
37
38 # Generate the data attributes.
39 self._generate_boolean_attributes(ifdefs=False)
40 self._generate_boolean_attributes(ifdefs=True)
41
42 self._generate_double_attributes(compress=False, ifdefs=False)
43 self._generate_double_attributes(compress=False, ifdefs=True)
44 self._generate_double_attributes(compress=True, ifdefs=False)
45 self._generate_double_attributes(compress=True, ifdefs=True)
46
47 self._generate_enum_attributes(ifdefs=False)
48 self._generate_enum_attributes(ifdefs=True)
49
50 self._generate_integer_attributes(compress=False, ifdefs=False)
51 self._generate_integer_attributes(compress=False, ifdefs=True)
52 self._generate_integer_attributes(compress=True, ifdefs=False)
53 self._generate_integer_attributes(compress=True, ifdefs=True)
54
55 self._generate_string_attributes(ifdefs=False)
56 self._generate_string_attributes(ifdefs=True)
57
58 self._generate_boolean_array_attributes(compress=False, ifdefs=False)
59 self._generate_boolean_array_attributes(compress=True, ifdefs=False)
60 self._generate_boolean_array_attributes(compress=False, ifdefs=True)
61 self._generate_boolean_array_attributes(compress=True, ifdefs=True)
62
63 self._generate_double_array_attributes(compress=False, ifdefs=False)
64 self._generate_double_array_attributes(compress=True, ifdefs=False)
65 self._generate_double_array_attributes(compress=False, ifdefs=True)
66 self._generate_double_array_attributes(compress=True, ifdefs=True)
67
68 self._generate_integer_array_attributes(compress=False, ifdefs=False)
69 self._generate_integer_array_attributes(compress=True, ifdefs=False)
70 self._generate_integer_array_attributes(compress=False, ifdefs=True)
71 self._generate_integer_array_attributes(compress=True, ifdefs=True)
72
73 self._generate_peano_double_array_attributes(compress=False, ifdefs=False)
74 self._generate_peano_double_array_attributes(compress=True, ifdefs=False)
75 self._generate_peano_double_array_attributes(compress=False, ifdefs=True)
76 self._generate_peano_double_array_attributes(compress=True, ifdefs=True)
77
78 self._generate_peano_integer_array_attributes(compress=False, ifdefs=False)
79 self._generate_peano_integer_array_attributes(compress=True, ifdefs=False)
80 self._generate_peano_integer_array_attributes(compress=False, ifdefs=True)
81 self._generate_peano_integer_array_attributes(compress=True, ifdefs=True)
82
83 self._generate_user_defined_attributes(ifdefs=False)
84 self._generate_user_defined_attributes(ifdefs=True)
85
86 return
87
88 def _generate_user_defined_attributes(self, ifdefs: bool):
89 if ifdefs:
90 var_basename = "DebugUserDefinedAttribute"
91 defs = ["PeanoDebug > 0"]
92 else:
93 var_basename = "UserDefinedAttribute"
94 defs = []
95 self.data.add_attribute(
97 name="myStatic" + var_basename,
98 type="std::string",
99 include="""
100#include <string>
101""",
102 ifdefs=defs,
103 qualifier=dastgen2.attributes.Attribute.Qualifier.STATIC,
104 user_type_has_toString_method=False,
105 )
106 )
107
108 def _generate_boolean_attributes(self, ifdefs: bool):
109 """!
110 Generate boolean attributes.
111
112 ifdefs: Boolean
113 if True, add debug ifdefs to the attributes.
114 """
115
116 # Set the variable basename, so we get different
117 # variable names for each possible case.
118 var_basename = "Boolean"
119 if ifdefs:
120 var_basename = "DebugBoolean"
121
122 # Set ifdefs
123 defs = []
124 if ifdefs:
125 defs = ["PeanoDebug > 0"]
126
127 # NOTE: initial values, where provided, are hardcoded to be checked
128 # for equality in the test. If you modify them, the test will fail.
129 self.data.add_attribute(
131 "my" + var_basename,
132 qualifier=dastgen2.attributes.Attribute.Qualifier.NONE,
133 ifdefs=defs,
134 )
135 )
136 self.data.add_attribute(
138 "myInitval" + var_basename,
139 initval="true",
140 qualifier=dastgen2.attributes.Attribute.Qualifier.NONE,
141 ifdefs=defs,
142 )
143 )
144 self.data.add_attribute(
146 "myStatic" + var_basename,
147 qualifier=dastgen2.attributes.Attribute.Qualifier.STATIC,
148 ifdefs=defs,
149 )
150 )
151 self.data.add_attribute(
153 "myStaticInitval" + var_basename,
154 initval="true",
155 qualifier=dastgen2.attributes.Attribute.Qualifier.STATIC,
156 ifdefs=defs,
157 )
158 )
159 self.data.add_attribute(
161 "myConst" + var_basename,
162 initval="true",
163 qualifier=dastgen2.attributes.Attribute.Qualifier.CONST,
164 ifdefs=defs,
165 )
166 )
167 self.data.add_attribute(
169 "myConstStatic" + var_basename,
170 initval="true",
171 qualifier=dastgen2.attributes.Attribute.Qualifier.CONST_STATIC,
172 ifdefs=defs,
173 )
174 )
175 self.data.add_attribute(
177 "myConstExpr" + var_basename,
178 initval="true",
179 qualifier=dastgen2.attributes.Attribute.Qualifier.CONSTEXPR,
180 ifdefs=defs,
181 )
182 )
183
184 return
185
186 def _generate_double_attributes(self, compress: bool, ifdefs: bool):
187 """!
188 Generate double attributes.
189
190 compress: Boolean
191 if True, enable compression.
192
193 ifdefs: Boolean
194 if True, add debug ifdefs to the attributes.
195 """
196
197 # Set the variable basename, so we get different
198 # variable names for each possible case.
199 var_basename = "Double"
200 if compress and not ifdefs:
201 var_basename = "CompressedDouble"
202 if ifdefs and not compress:
203 var_basename = "DebugDouble"
204 if ifdefs and compress:
205 var_basename = "DebugCompressedDouble"
206
207 # Set compression values
208 valid_mantissa_bits = None
209 if compress:
210 valid_mantissa_bits = 23
211
212 # Set ifdefs
213 defs = []
214 if ifdefs:
215 defs = ["PeanoDebug > 0"]
216
217 # NOTE: initial values, where provided, are hardcoded to be checked
218 # for equality in the test. If you modify them, the test will fail.
219 self.data.add_attribute(
221 "my" + var_basename,
222 qualifier=dastgen2.attributes.Attribute.Qualifier.NONE,
223 valid_mantissa_bits=valid_mantissa_bits,
224 ifdefs=defs,
225 )
226 )
227 self.data.add_attribute(
229 "myInitval" + var_basename,
230 initval=4.0,
231 qualifier=dastgen2.attributes.Attribute.Qualifier.NONE,
232 valid_mantissa_bits=valid_mantissa_bits,
233 ifdefs=defs,
234 )
235 )
236 self.data.add_attribute(
238 "myStatic" + var_basename,
239 qualifier=dastgen2.attributes.Attribute.Qualifier.STATIC,
240 valid_mantissa_bits=valid_mantissa_bits,
241 ifdefs=defs,
242 )
243 )
244 self.data.add_attribute(
246 "myStaticInitval" + var_basename,
247 initval=8.0,
248 qualifier=dastgen2.attributes.Attribute.Qualifier.STATIC,
249 valid_mantissa_bits=valid_mantissa_bits,
250 ifdefs=defs,
251 )
252 )
253 self.data.add_attribute(
255 "myConst" + var_basename,
256 initval=16.0,
257 qualifier=dastgen2.attributes.Attribute.Qualifier.CONST,
258 valid_mantissa_bits=valid_mantissa_bits,
259 ifdefs=defs,
260 )
261 )
262 self.data.add_attribute(
264 "myConstStatic" + var_basename,
265 initval=32.0,
266 qualifier=dastgen2.attributes.Attribute.Qualifier.CONST_STATIC,
267 valid_mantissa_bits=valid_mantissa_bits,
268 ifdefs=defs,
269 )
270 )
271 self.data.add_attribute(
273 "myConstExpr" + var_basename,
274 initval=64.0,
275 qualifier=dastgen2.attributes.Attribute.Qualifier.CONSTEXPR,
276 valid_mantissa_bits=valid_mantissa_bits,
277 ifdefs=defs,
278 )
279 )
280
281 return
282
283 def _generate_enum_attributes(self, ifdefs: bool):
284 """!
285 Generate enum attributes.
286
287 ifdefs: Boolean
288 if True, add debug ifdefs to the attributes.
289 """
290
291 # Set the variable basename, so we get different
292 # variable names for each possible case.
293 var_basename = "Enum"
294
295 # Set ifdefs
296 defs = []
297 if ifdefs:
298 var_basename = "DebugEnum"
299 defs = ["PeanoDebug > 0"]
300
301 self.data.add_attribute(
303 "my" + var_basename,
304 variants=["Foo", "Bar", "Baz", "Last"],
305 qualifier=dastgen2.attributes.Attribute.Qualifier.NONE,
306 ifdefs=defs,
307 )
308 )
309
310 return
311
312 def _generate_integer_attributes(self, compress: bool, ifdefs: bool):
313 """!
314 Generate integer attributes.
315
316 compress: Boolean
317 if True, enable compression.
318
319 ifdefs: Boolean
320 if True, add debug ifdefs to the attributes.
321 """
322
323 # Set the variable basename, so we get different
324 # variable names for each possible case.
325 var_basename = "Integer"
326 if compress and not ifdefs:
327 var_basename = "CompressedInteger"
328 if ifdefs and not compress:
329 var_basename = "DebugInteger"
330 if ifdefs and compress:
331 var_basename = "DebugCompressedInteger"
332
333 # Set compression values
334 min_value = None
335 max_value = None
336 if compress:
337 min_value = 0
338 max_value = 2097152
339
340 # Set ifdefs
341 defs = []
342 if ifdefs:
343 defs = ["PeanoDebug > 0"]
344
345 # NOTE: initial values, where provided, are hardcoded to be checked
346 # for equality in the test. If you modify them, the test will fail.
347 self.data.add_attribute(
349 "my" + var_basename,
350 qualifier=dastgen2.attributes.Attribute.Qualifier.NONE,
351 min_value=min_value,
352 max_value=max_value,
353 ifdefs=defs,
354 )
355 )
356 self.data.add_attribute(
358 "myInitval" + var_basename,
359 initval=123,
360 qualifier=dastgen2.attributes.Attribute.Qualifier.NONE,
361 min_value=min_value,
362 max_value=max_value,
363 ifdefs=defs,
364 )
365 )
366 self.data.add_attribute(
368 "myStatic" + var_basename,
369 qualifier=dastgen2.attributes.Attribute.Qualifier.STATIC,
370 min_value=min_value,
371 max_value=max_value,
372 ifdefs=defs,
373 )
374 )
375 self.data.add_attribute(
377 "myStaticInitval" + var_basename,
378 initval=1234,
379 qualifier=dastgen2.attributes.Attribute.Qualifier.STATIC,
380 min_value=min_value,
381 max_value=max_value,
382 ifdefs=defs,
383 )
384 )
385 self.data.add_attribute(
387 "myConst" + var_basename,
388 initval=12345,
389 qualifier=dastgen2.attributes.Attribute.Qualifier.CONST,
390 min_value=min_value,
391 max_value=max_value,
392 ifdefs=defs,
393 )
394 )
395 self.data.add_attribute(
397 "myConstStatic" + var_basename,
398 initval=123456,
399 qualifier=dastgen2.attributes.Attribute.Qualifier.CONST_STATIC,
400 min_value=min_value,
401 max_value=max_value,
402 ifdefs=defs,
403 )
404 )
405 self.data.add_attribute(
407 "myConstExpr" + var_basename,
408 initval=1234567,
409 qualifier=dastgen2.attributes.Attribute.Qualifier.CONSTEXPR,
410 min_value=min_value,
411 max_value=max_value,
412 ifdefs=defs,
413 )
414 )
415
416 return
417
418 def _generate_string_attributes(self, ifdefs: bool):
419 """!
420 Generate string attributes.
421
422 ifdefs: Boolean
423 if True, add debug ifdefs to the attributes.
424 """
425
426 # Set the variable basename, so we get different
427 # variable names for each possible case.
428 var_basename = "String"
429
430 # Set ifdefs
431 defs = []
432 if ifdefs:
433 var_basename = "DebugString"
434 defs = ["PeanoDebug > 0"]
435
436 # NOTE: initial values, where provided, are hardcoded to be checked
437 # for equality in the test. If you modify them, the test will fail.
438 self.data.add_attribute(
440 "my" + var_basename,
441 qualifier=dastgen2.attributes.Attribute.Qualifier.NONE,
442 ifdefs=defs,
443 )
444 )
445 self.data.add_attribute(
447 "myInitval" + var_basename,
448 initval="initval",
449 qualifier=dastgen2.attributes.Attribute.Qualifier.NONE,
450 ifdefs=defs,
451 )
452 )
453 self.data.add_attribute(
455 "myStatic" + var_basename,
456 qualifier=dastgen2.attributes.Attribute.Qualifier.STATIC,
457 ifdefs=defs,
458 )
459 )
460 self.data.add_attribute(
462 "myStaticInitval" + var_basename,
463 initval="static_initval",
464 qualifier=dastgen2.attributes.Attribute.Qualifier.STATIC,
465 ifdefs=defs,
466 )
467 )
468 self.data.add_attribute(
470 "myConst" + var_basename,
471 initval="const_initval",
472 qualifier=dastgen2.attributes.Attribute.Qualifier.CONST,
473 ifdefs=defs,
474 )
475 )
476 self.data.add_attribute(
478 "myConstStatic" + var_basename,
479 initval="const_static_initval",
480 qualifier=dastgen2.attributes.Attribute.Qualifier.CONST_STATIC,
481 ifdefs=defs,
482 )
483 )
484 # Not implemented yet
485 # self.data.add_attribute(
486 # dastgen2.attributes.String(
487 # "myConstExpr" + var_basename,
488 # initval="constexpr_initval",
489 # qualifier=dastgen2.attributes.Attribute.Qualifier.CONSTEXPR,
490 # ifdefs=defs,
491 # )
492 # )
493
494 return
495
496 def _generate_boolean_array_attributes(self, compress: bool, ifdefs: bool):
497 """!
498 Generate boolean-array attributes.
499
500 compress: Boolean
501 if True, enable compression.
502
503 ifdefs: Boolean
504 if True, add debug ifdefs to the attributes.
505 """
506
507 # Set the variable basename, so we get different
508 # variable names for each possible case.
509 var_basename = "BooleanArray"
510 if compress and not ifdefs:
511 var_basename = "CompressedBooleanArray"
512 if ifdefs and not compress:
513 var_basename = "DebugBooleanArray"
514 if ifdefs and compress:
515 var_basename = "CompressedDebugBooleanArray"
516
517 # Set ifdefs
518 defs = []
519 if ifdefs:
520 defs = ["PeanoDebug > 0"]
521
522 self.data.add_attribute(
524 "my" + var_basename,
525 cardinality=8,
526 qualifier=dastgen2.attributes.Attribute.Qualifier.NONE,
527 compress=compress,
528 ifdefs=defs,
529 )
530 )
531
532 return
533
534 def _generate_integer_array_attributes(self, compress: bool, ifdefs: bool):
535 """!
536 Generate integer-array attributes.
537
538 compress: Boolean
539 if True, enable compression.
540
541 ifdefs: Boolean
542 if True, add debug ifdefs to the attributes.
543 """
544
545 # Set the variable basename, so we get different
546 # variable names for each possible case.
547 var_basename = "IntegerArray"
548 if compress and not ifdefs:
549 var_basename = "CompressedIntegerArray"
550 if ifdefs and not compress:
551 var_basename = "DebugIntegerArray"
552 if ifdefs and compress:
553 var_basename = "CompressedDebugIntegerArray"
554
555 # Set ifdefs
556 defs = []
557 if ifdefs:
558 defs = ["PeanoDebug > 0"]
559
560 # Set compression values
561 min_value = None
562 max_value = None
563 if compress:
564 min_value = 0
565 max_value = 2097152
566
567 self.data.add_attribute(
569 "my" + var_basename,
570 cardinality=8,
571 qualifier=dastgen2.attributes.Attribute.Qualifier.NONE,
572 min_value=None,
573 max_value=None,
574 ifdefs=defs,
575 )
576 )
577
578 return
579
580 def _generate_double_array_attributes(self, compress: bool, ifdefs: bool):
581 """!
582 Generate double-array attributes.
583
584 compress: Boolean
585 if True, enable compression.
586
587 ifdefs: Boolean
588 if True, add debug ifdefs to the attributes.
589 """
590
591 # Set the variable basename, so we get different
592 # variable names for each possible case.
593 var_basename = "DoubleArray"
594 if compress and not ifdefs:
595 var_basename = "CompressedDoubleArray"
596 if ifdefs and not compress:
597 var_basename = "DebugDoubleArray"
598 if ifdefs and compress:
599 var_basename = "CompressedDebugDoubleArray"
600
601 # Set ifdefs
602 defs = []
603 if ifdefs:
604 defs = ["PeanoDebug > 0"]
605
606 # Set compression values
607 valid_mantissa_bits = None
608 if compress:
609 valid_mantissa_bits = 23
610
611 self.data.add_attribute(
613 "my" + var_basename,
614 cardinality=8,
615 qualifier=dastgen2.attributes.Attribute.Qualifier.NONE,
616 valid_mantissa_bits=valid_mantissa_bits,
617 ifdefs=defs,
618 )
619 )
620
621 return
622
623 def _generate_peano_integer_array_attributes(self, compress: bool, ifdefs: bool):
624 """!
625 Generate peano4 integer-array attributes.
626
627 compress: Boolean
628 if True, enable compression.
629
630 ifdefs: Boolean
631 if True, add debug ifdefs to the attributes.
632 """
633
634 # Set the variable basename, so we get different
635 # variable names for each possible case.
636 var_basename = "PeanoIntegerArray"
637 if compress and not ifdefs:
638 var_basename = "CompressedPeanoIntegerArray"
639 if ifdefs and not compress:
640 var_basename = "DebugPeanoIntegerArray"
641 if ifdefs and compress:
642 var_basename = "CompressedDebugPeanoIntegerArray"
643
644 # Set ifdefs
645 defs = []
646 if ifdefs:
647 defs = ["PeanoDebug > 0"]
648
649 # Set compression values
650 min_value = None
651 max_value = None
652 if compress:
653 min_value = 0
654 max_value = 2097152
655
656 self.data.add_attribute(
658 "my" + var_basename,
659 cardinality=8,
660 min_value=None,
661 max_value=None,
662 ifdefs=defs,
663 )
664 )
665
666 return
667
668 def _generate_peano_double_array_attributes(self, compress: bool, ifdefs: bool):
669 """!
670 Generate peano4 double-array attributes.
671
672 compress: Boolean
673 if True, enable compression.
674
675 ifdefs: Boolean
676 if True, add debug ifdefs to the attributes.
677 """
678
679 # Set the variable basename, so we get different
680 # variable names for each possible case.
681 var_basename = "PeanoDoubleArray"
682 if compress and not ifdefs:
683 var_basename = "CompressedPeanoDoubleArray"
684 if ifdefs and not compress:
685 var_basename = "DebugPeanoDoubleArray"
686 if ifdefs and compress:
687 var_basename = "CompressedDebugPeanoDoubleArray"
688
689 # Set ifdefs
690 defs = []
691 if ifdefs:
692 defs = ["PeanoDebug > 0"]
693
694 # Set compression values
695 valid_mantissa_bits = None
696 if compress:
697 valid_mantissa_bits = 23
698
699 self.data.add_attribute(
701 "my" + var_basename,
702 cardinality=8,
703 valid_mantissa_bits=valid_mantissa_bits,
704 ifdefs=defs,
705 )
706 )
707
708 return
709
711 """!
712
713 Return algorithm steps: A list of AlgorithmStep objects to be executed in
714 that order.
715
716 """
717
718 step = AlgorithmStep(
719 name="dummyDastgenTest",
720 dependencies=AlgorithmStep.Dependencies.SELF,
721 effect=AlgorithmStep.Effect.ALTER_LOCAL_STATE,
722 touch_vertex_first_time_kernel="""::swift2::dastgenTest::checkDastgen(assignedParticles);""",
723 prepare_traversal_kernel="""
724 ::swift2::dastgenTest::dummyMoveForwardInTime<globaldata::{}>();""".format(
725 self.namenamename
726 ),
727 includes="""
728 #include "DastgenTest.h"
729 """,
730 )
731
732 # We need 2 algorithm steps because the main.cpp generation
733 # assumes there will be more than 1 algorithm step. That's a
734 # fair assumption, and not a good enough reason to go exception
735 # handle that just for this test.
736 step2 = AlgorithmStep(
737 name="dummyDastgenTest2",
738 dependencies=AlgorithmStep.Dependencies.SELF,
739 effect=AlgorithmStep.Effect.ALTER_LOCAL_STATE,
740 touch_vertex_last_time_kernel="""::swift2::dastgenTest::checkDastgen(assignedParticles);""",
741 unprepare_traversal_kernel="""
742 globaldata::{PARTICLE}::getSpecies().setTimeStamp( globaldata::{PARTICLE}::getSpecies().getMinTimeStamp() + globaldata::{PARTICLE}::getSpecies().getMinTimeStepSize(), false );
743 ::swift2::dastgenTest::reportStep<globaldata::{PARTICLE}>( "{PARTICLE}" );
744 """.replace(
745 "{PARTICLE}", self.namenamename
746 ),
747 includes="""
748 #include "DastgenTest.h"
749 """,
750 )
751
752 return [step, step2]
753
754 @property
755 def mantissa_size(self):
756 """
757
758 Set the mantissa size of doubles and Peano double arrays if
759 we want to use reduced precission via Clang annotations. As a reference,
760 floats have mantissa size = 23.
761
762 """
763 return self._mantissa_size
764
765 @mantissa_size.setter
766 def mantissa_size(self, mantissa_size):
767 if mantissa_size < 0:
768 raise ValueError("Mantissa size has to be larger than 0.")
769 self._mantissa_size = mantissa_size
770
772 """
773
774 Transform namespace into cpp format. Could be used to append namespace to
775 constants in kernels (not used currently).
776
777 """
778 namespace = "::".join(self._swift_project_namespace) + "::"
779
780 print(namespace)
781
783 return []
784
785 @property
787 return (
788 super(DastgenTestDummyParticle, self).readme_descriptor
789 + """
790
791 Dummy particle containing meaningless variables to test the functionality
792 of dastgen2.
793 """
794 )
Represent an array of boolean flags.
cardinality is a string (you can thus use symbols as well as long as they will be defined at compile ...
Definition Double.py:6
Wrapper around C++ enumerations which is not a datatype supported natively by MPI.
Definition Enumeration.py:6
Wrapper around C++ string which is not a dataype supported by MPI natively.
Definition String.py:6
Wrapper around user-defined attribute.
Specialisation of dastgen2.attributes.DoubleArray which relies on Peano's tarch.
Defines the meta data around one algorithmic step per particle.
Base class for any particle in the project.
Definition Particle.py:10
A dummy particle containing meaningless variables to test the functionality of dastgen2.
_generate_peano_double_array_attributes(self, bool compress, bool ifdefs)
Generate peano4 double-array attributes.
mantissa_size(self)
Set the mantissa size of doubles and Peano double arrays if we want to use reduced precission via Cla...
_generate_peano_integer_array_attributes(self, bool compress, bool ifdefs)
Generate peano4 integer-array attributes.
algorithm_steps(self)
Return algorithm steps: A list of AlgorithmStep objects to be executed in that order.
_generate_integer_attributes(self, bool compress, bool ifdefs)
Generate integer attributes.
initialisation_steps(self)
Return sequence of algorithm steps that have to be performed throughout initialisation.
_generate_double_array_attributes(self, bool compress, bool ifdefs)
Generate double-array attributes.
_generate_integer_array_attributes(self, bool compress, bool ifdefs)
Generate integer-array attributes.
_generate_boolean_array_attributes(self, bool compress, bool ifdefs)
Generate boolean-array attributes.
_generate_double_attributes(self, bool compress, bool ifdefs)
Generate double attributes.
__init__(self, name, particles_per_cell=0, min_h=0.3, max_h=0.3)
Initialise the particle.