Peano
Loading...
Searching...
No Matches
InsertNoisyParticlesAlongCartesianGrid.py
Go to the documentation of this file.
1# This file is part of the ExaParty project. For conditions of distribution and
2# use, please see the copyright notice at www.peano-framework.org
4
5
8):
10 self,
11 particle_set,
12 distance_between_particles_along_one_axis,
13 noise_scale,
14 initialisation_call,
15 additional_includes="",
16 ):
17 """!
18
19 Wrapper around toolbox tying it to ExaParty's global properties
20
21 Very simplistic wrapper around generic factory mechanism from
22 the toolbox. The script adds references to DomainOffset[2] and
23 DomainSize[2] for example which are defined in Constants.h. This
24 constants file is something that's specific to ExaParty and not to
25 the particles toolbox.
26
27 We do not care at this point, if entries like DomainOffset[2]
28 do exist, i.e. if we run a 3d simulation. These are just inserted
29 into the generated C++ code which then in turn masks entries like
30 DomainSize[2] out if we work with Dimensions==2.
31
32 Parameter noise_scale is the amplitude of the noise in units of
33 distance_between_particles_along_one_axis
34
35 """
36 super(InsertNoisyParticlesAlongCartesianGrid, self).__init__(
37 particle_set=particle_set,
38 distance_between_particles=distance_between_particles_along_one_axis,
39 initialisation_call=initialisation_call,
40 noise=True,
41 noise_scale=noise_scale,
42 computational_domain_offset=[
43 "DomainOffset[0]",
44 "DomainOffset[1]",
45 "DomainOffset[2]",
46 ],
47 computational_domain_size=[
48 "DomainSize[0]",
49 "DomainSize[1]",
50 "DomainSize[2]",
51 ],
52 additional_includes=additional_includes
53 + """
54#include "Constants.h"
55""",
56 )
57
59 return __name__.replace(".py", "").replace(".", "_")
__init__(self, particle_set, distance_between_particles_along_one_axis, noise_scale, initialisation_call, additional_includes="")
Wrapper around toolbox tying it to ExaParty's global properties.