SP4EHW/HW4c35860ee0260master
SP4EHW/HW4
c35860ee0260master
README.md
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 (MaterialPoint)
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/MaterialGeneartion.py 20 0.1
To run the code:
python3 ./homework4/build/main.py nsteps dump_freq input.csv particle_type timestep
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
Example:
python3 ./homework4/build/main.py 20 1 input.csv material_point 0.0001
c4science · Help