SP4EHW/HW43d9e23575627master
README.md
- This codes create Python bindings for all Particles code.
- The main.py shows all the C++ classes and their functions which were be transformed to Python codes for all the particles: Planet, PingPong and MaterialPoint.
- Python bindings for all factory classes (ParticlesFactory, MaterialPointsFactory,PlanetsFactory, PingPongBalssFactory), Compute, ComputeTemperature and csvwriter are implemented in overall.cpp.
Following is the commands to compile the source codes:
cmake .
make
Run the python code by the following command to create the input
python ./homework4/src/main.py size radius
size: determines the matrix size, the number of particles would be size*size
radius: determines the radius of a cirlce that generates heat
Example:
python ./homework4/src/main.py 512 0.1
To run the code:
./homework4/build/particles nsteps dump_freq input.csv particle_type timestep [Boundary_temperature]
nsteps: number of steps
dump_freq: frequency of file writing
input.csv: input file name
particle_type: type of particle (Ex.: material_point)
timestep: time step
Boundary_temperature: The boundary temperature for the material_point, this parameter is optional, if it is determined then the temperature of the boundary will be set to this value, otherwise there is no boundary condition
Example:
./homework4/build/particles 20000 200 input.csv material_point 0.000001 0