SlideShare una empresa de Scribd logo
1 de 19
Descargar para leer sin conexión
Gravitation
Project
Workshop on Advanced Techniques for Scientific
Programming and Management of Open Source
Software Packages
Bellomo, Franco @fnbellomo
Aguena da Silva, Michel
Fogliatto, Ezequiel
Romero Abad, David
Workshop on Advanced Techniques for Scientific Programming and
Management of Open Source Software Packages
Gravitation project
PROBLEM DESCRIPTION
MAIN TASK
Compute the movement of
bodies under gravity forces
using collaborative
techniques
Workshop on Advanced Techniques for Scientific Programming and
Management of Open Source Software Packages
Gravitation project
Fij =
G mimj
|⃗
xi− ⃗
x j|
2
⃗
xj−⃗
xi
|⃗
xi− ⃗
xj|
PROBLEM DESCRIPTION
MAIN TASK
Compute the movement of
bodies under gravity forces
using collaborative
techniques
Workshop on Advanced Techniques for Scientific Programming and
Management of Open Source Software Packages
Gravitation project
⃗
Fij =mi gij ( ⃗
xj−⃗
xi)
¨
⃗
Xi=∑j
gij ( ⃗
xj−⃗
xi)
˙
⃗
Xi=⃗
vi
¨
⃗
Vi=∑j
gij ( ⃗
xj−⃗
xi)
X' X
V' V
0 Identity
0
0
g
0
g
˙
⃗
α M ⃗
α
EQUATION DISCRETIZATION
Workshop on Advanced Techniques for Scientific Programming and
Management of Open Source Software Packages
Gravitation project
X' X
V' V
0 Identity
0
0
g
0
g
˙
⃗
α M ⃗
α
⃗
αn+1= ⃗
αn+δt M ⃗
αn
Explicit Euler
⃗
αn+1= ⃗
αn+
δt
2
[M ⃗
αn+1+ M ⃗
αn]
Crank-Nicholson
⃗
αn+1= ⃗
αn+
1
6
( K1+2K2+2 K3+K4)
Runge – Kutta 4th
order
EQUATION DISCRETIZATION
Workshop on Advanced Techniques for Scientific Programming and
Management of Open Source Software Packages
Gravitation project
PYTHON + GIT + GITHUB
class Gravitation(object):
“”” This is the main gravitation wrapper”””
class Body(object):
“”” Base class for space objects”””
class make_plot(object):
“””Class designed for runtime plotting”””
List of bodies
Time advancement
Mass, position,
velocity
Runtime plotting
Image and video
Multi-processing
def main():
“””Main function”””
usage: Main.py [-h] [--method METHOD] [--tstep TSTEP]
[--file FILENAME] [--plot] [--profile] [--nsteps NSTEPS]
[--config][--confile CONFIG_FILE]
Workshop on Advanced Techniques for Scientific Programming and
Management of Open Source Software Packages
Gravitation project
PYTHON + GIT + GITHUB
make_plot Gravitation
body
body
body
GITHUB
base update move gfactor
https://github.com/fnbellomo/GProject.git
Workshop on Advanced Techniques for Scientific Programming and
Management of Open Source Software Packages
Gravitation project
Workshop on Advanced Techniques for Scientific Programming and
Management of Open Source Software Packages
Gravitation project
Workshop on Advanced Techniques for Scientific Programming and
Management of Open Source Software Packages
Gravitation project
Workshop on Advanced Techniques for Scientific Programming and
Management of Open Source Software Packages
Gravitation project
make_plot
● First approach: sequential plotting
● Second approach: multi-processing
make_plot
move()
plot()
process 1
process 2
Shared memory
Workshop on Advanced Techniques for Scientific Programming and
Management of Open Source Software Packages
Gravitation project
LATEST VERSION
A python program that integrates the equation of movement for an
arbitrary number of bodies
Main features
● Collaborative project
● Command-line options. Reads data and options from file or during
runtime
● Several numerical methods: Explicit Euler, Crank-Nicholson, Runge-
Kutta4, adaptive Runge-Kutta
● Runtime plotting with multiprocessing
● Plot saving for post-processing
● Implements Unit test
● Class documentation with pydoc
Workshop on Advanced Techniques for Scientific Programming and
Management of Open Source Software Packages
Gravitation project
SOME RESULTS
Workshop on Advanced Techniques for Scientific Programming and
Management of Open Source Software Packages
Gravitation project
PROFILING
import cProfile, pstats
Pr = cProfile.Profile()
pr.enable()
pr.disable()
Workshop on Advanced Techniques for Scientific Programming and
Management of Open Source Software Packages
Gravitation project
PROFILING
99039 function calls in 0.535 seconds
Ordered by: standard name
ncalls tottime percall cumtime percall filename:lineno(function)
45000 0.223 0.000 0.223 0.000 Body.py:20(gfactor)
3 0.000 0.000 0.000 0.000 Body.py:9(__init__)
3000 0.261 0.000 0.531 0.000 Gravitation.py:107(move)
3000 0.016 0.000 0.018 0.000 Gravitation.py:175(update)
6 0.000 0.000 0.000 0.000 Gravitation.py:8(float_list)
6003 0.001 0.000 0.001 0.000 {len}
3 0.000 0.000 0.000 0.000 {method 'split' of 'str' objects}
12000 0.019 0.000 0.019 0.000 {numpy.core._dotblas.dot}
3 0.000 0.000 0.000 0.000 {numpy.core.multiarray.zeros}
1 0.000 0.000 0.000 0.000 {open}
4 0.000 0.000 0.000 0.000 {print}
30002 0.011 0.000 0.011 0.000 {range}
Workshop on Advanced Techniques for Scientific Programming and
Management of Open Source Software Packages
Gravitation project
INSTALL
Dependences:
Dependences:
● Numpy
● Matplotlib
Installation:
$ git clone https://github.com/fnbellomo/GProject.git
$ cd GProyect
$ sudo python install setup.py
Workshop on Advanced Techniques for Scientific Programming and
Management of Open Source Software Packages
Gravitation project
DOCUMENTATION (pydoc)
Workshop on Advanced Techniques for Scientific Programming and
Management of Open Source Software Packages
Gravitation project
WHAT WE LEARNED?
● Working in collaboration is not easy!
● Implementation of better programming
● Use of Control Version Software
TO DO
● Rewrite class design
● Split the program into a larger number of independent modules
● Optimize calculations
● Optimize communication between processes
Workshop on Advanced Techniques for Scientific Programming and
Management of Open Source Software Packages
Gravitation project
Thanks!
Any questions?

Más contenido relacionado

Similar a Group3-Gravitation.pdf

Pyparis2017 / Scikit-learn - an incomplete yearly review, by Gael Varoquaux
Pyparis2017 / Scikit-learn - an incomplete yearly review, by Gael VaroquauxPyparis2017 / Scikit-learn - an incomplete yearly review, by Gael Varoquaux
Pyparis2017 / Scikit-learn - an incomplete yearly review, by Gael VaroquauxPôle Systematic Paris-Region
 
[Pycon 2015] 오늘 당장 딥러닝 실험하기 제출용
[Pycon 2015] 오늘 당장 딥러닝 실험하기 제출용[Pycon 2015] 오늘 당장 딥러닝 실험하기 제출용
[Pycon 2015] 오늘 당장 딥러닝 실험하기 제출용현호 김
 
Scikit-learn: the state of the union 2016
Scikit-learn: the state of the union 2016Scikit-learn: the state of the union 2016
Scikit-learn: the state of the union 2016Gael Varoquaux
 
Reverse engineering tools a devops engineers can use
Reverse engineering tools a devops engineers can useReverse engineering tools a devops engineers can use
Reverse engineering tools a devops engineers can useJean Marcel Belmont
 
運用CNTK 實作深度學習物件辨識 Deep Learning based Object Detection with Microsoft Cogniti...
運用CNTK 實作深度學習物件辨識 Deep Learning based Object Detection with Microsoft Cogniti...運用CNTK 實作深度學習物件辨識 Deep Learning based Object Detection with Microsoft Cogniti...
運用CNTK 實作深度學習物件辨識 Deep Learning based Object Detection with Microsoft Cogniti...Herman Wu
 
The Ring programming language version 1.8 book - Part 92 of 202
The Ring programming language version 1.8 book - Part 92 of 202The Ring programming language version 1.8 book - Part 92 of 202
The Ring programming language version 1.8 book - Part 92 of 202Mahmoud Samir Fayed
 
The Ring programming language version 1.9 book - Part 81 of 210
The Ring programming language version 1.9 book - Part 81 of 210The Ring programming language version 1.9 book - Part 81 of 210
The Ring programming language version 1.9 book - Part 81 of 210Mahmoud Samir Fayed
 
A Practical Road to SaaS in Python
A Practical Road to SaaS in PythonA Practical Road to SaaS in Python
A Practical Road to SaaS in PythonC4Media
 
Ehtsham Elahi, Senior Research Engineer, Personalization Science and Engineer...
Ehtsham Elahi, Senior Research Engineer, Personalization Science and Engineer...Ehtsham Elahi, Senior Research Engineer, Personalization Science and Engineer...
Ehtsham Elahi, Senior Research Engineer, Personalization Science and Engineer...MLconf
 
Reactive Autonomous System Programming using the PROFETA tool
Reactive Autonomous System Programming using the PROFETA toolReactive Autonomous System Programming using the PROFETA tool
Reactive Autonomous System Programming using the PROFETA toolCorrado Santoro
 
The Ring programming language version 1.5.1 book - Part 12 of 180
The Ring programming language version 1.5.1 book - Part 12 of 180The Ring programming language version 1.5.1 book - Part 12 of 180
The Ring programming language version 1.5.1 book - Part 12 of 180Mahmoud Samir Fayed
 
Performance evaluation of GANs in a semisupervised OCR use case
Performance evaluation of GANs in a semisupervised OCR use casePerformance evaluation of GANs in a semisupervised OCR use case
Performance evaluation of GANs in a semisupervised OCR use caseFlorian Wilhelm
 
Performance evaluation of GANs in a semisupervised OCR use case
Performance evaluation of GANs in a semisupervised OCR use casePerformance evaluation of GANs in a semisupervised OCR use case
Performance evaluation of GANs in a semisupervised OCR use caseinovex GmbH
 
Startup Camp - Git, Python, Django session
Startup Camp - Git, Python, Django sessionStartup Camp - Git, Python, Django session
Startup Camp - Git, Python, Django sessionJuraj Michálek
 
Automated ML Workflow for Distributed Big Data Using Analytics Zoo (CVPR2020 ...
Automated ML Workflow for Distributed Big Data Using Analytics Zoo (CVPR2020 ...Automated ML Workflow for Distributed Big Data Using Analytics Zoo (CVPR2020 ...
Automated ML Workflow for Distributed Big Data Using Analytics Zoo (CVPR2020 ...Jason Dai
 
WRENCH: Workflow Management System Simulation Workbench
WRENCH: Workflow Management System Simulation WorkbenchWRENCH: Workflow Management System Simulation Workbench
WRENCH: Workflow Management System Simulation WorkbenchRafael Ferreira da Silva
 
Drools, jBPM OptaPlanner presentation
Drools, jBPM OptaPlanner presentationDrools, jBPM OptaPlanner presentation
Drools, jBPM OptaPlanner presentationMark Proctor
 
FIWARE Global Summit - FogFlow, a new GE for IoT Edge Computing
FIWARE Global Summit - FogFlow, a new GE for IoT Edge ComputingFIWARE Global Summit - FogFlow, a new GE for IoT Edge Computing
FIWARE Global Summit - FogFlow, a new GE for IoT Edge ComputingFIWARE
 

Similar a Group3-Gravitation.pdf (20)

Pyparis2017 / Scikit-learn - an incomplete yearly review, by Gael Varoquaux
Pyparis2017 / Scikit-learn - an incomplete yearly review, by Gael VaroquauxPyparis2017 / Scikit-learn - an incomplete yearly review, by Gael Varoquaux
Pyparis2017 / Scikit-learn - an incomplete yearly review, by Gael Varoquaux
 
[Pycon 2015] 오늘 당장 딥러닝 실험하기 제출용
[Pycon 2015] 오늘 당장 딥러닝 실험하기 제출용[Pycon 2015] 오늘 당장 딥러닝 실험하기 제출용
[Pycon 2015] 오늘 당장 딥러닝 실험하기 제출용
 
Scikit-learn: the state of the union 2016
Scikit-learn: the state of the union 2016Scikit-learn: the state of the union 2016
Scikit-learn: the state of the union 2016
 
Reverse engineering tools a devops engineers can use
Reverse engineering tools a devops engineers can useReverse engineering tools a devops engineers can use
Reverse engineering tools a devops engineers can use
 
運用CNTK 實作深度學習物件辨識 Deep Learning based Object Detection with Microsoft Cogniti...
運用CNTK 實作深度學習物件辨識 Deep Learning based Object Detection with Microsoft Cogniti...運用CNTK 實作深度學習物件辨識 Deep Learning based Object Detection with Microsoft Cogniti...
運用CNTK 實作深度學習物件辨識 Deep Learning based Object Detection with Microsoft Cogniti...
 
The Ring programming language version 1.8 book - Part 92 of 202
The Ring programming language version 1.8 book - Part 92 of 202The Ring programming language version 1.8 book - Part 92 of 202
The Ring programming language version 1.8 book - Part 92 of 202
 
The Ring programming language version 1.9 book - Part 81 of 210
The Ring programming language version 1.9 book - Part 81 of 210The Ring programming language version 1.9 book - Part 81 of 210
The Ring programming language version 1.9 book - Part 81 of 210
 
A Practical Road to SaaS in Python
A Practical Road to SaaS in PythonA Practical Road to SaaS in Python
A Practical Road to SaaS in Python
 
Ehtsham Elahi, Senior Research Engineer, Personalization Science and Engineer...
Ehtsham Elahi, Senior Research Engineer, Personalization Science and Engineer...Ehtsham Elahi, Senior Research Engineer, Personalization Science and Engineer...
Ehtsham Elahi, Senior Research Engineer, Personalization Science and Engineer...
 
Reactive Autonomous System Programming using the PROFETA tool
Reactive Autonomous System Programming using the PROFETA toolReactive Autonomous System Programming using the PROFETA tool
Reactive Autonomous System Programming using the PROFETA tool
 
The Ring programming language version 1.5.1 book - Part 12 of 180
The Ring programming language version 1.5.1 book - Part 12 of 180The Ring programming language version 1.5.1 book - Part 12 of 180
The Ring programming language version 1.5.1 book - Part 12 of 180
 
Performance evaluation of GANs in a semisupervised OCR use case
Performance evaluation of GANs in a semisupervised OCR use casePerformance evaluation of GANs in a semisupervised OCR use case
Performance evaluation of GANs in a semisupervised OCR use case
 
Performance evaluation of GANs in a semisupervised OCR use case
Performance evaluation of GANs in a semisupervised OCR use casePerformance evaluation of GANs in a semisupervised OCR use case
Performance evaluation of GANs in a semisupervised OCR use case
 
Startup Camp - Git, Python, Django session
Startup Camp - Git, Python, Django sessionStartup Camp - Git, Python, Django session
Startup Camp - Git, Python, Django session
 
Heroku pycon
Heroku pyconHeroku pycon
Heroku pycon
 
ConSol_IBM_webcast_quarkus_the_blue_hedgehog_of_java_web_frameworks
ConSol_IBM_webcast_quarkus_the_blue_hedgehog_of_java_web_frameworksConSol_IBM_webcast_quarkus_the_blue_hedgehog_of_java_web_frameworks
ConSol_IBM_webcast_quarkus_the_blue_hedgehog_of_java_web_frameworks
 
Automated ML Workflow for Distributed Big Data Using Analytics Zoo (CVPR2020 ...
Automated ML Workflow for Distributed Big Data Using Analytics Zoo (CVPR2020 ...Automated ML Workflow for Distributed Big Data Using Analytics Zoo (CVPR2020 ...
Automated ML Workflow for Distributed Big Data Using Analytics Zoo (CVPR2020 ...
 
WRENCH: Workflow Management System Simulation Workbench
WRENCH: Workflow Management System Simulation WorkbenchWRENCH: Workflow Management System Simulation Workbench
WRENCH: Workflow Management System Simulation Workbench
 
Drools, jBPM OptaPlanner presentation
Drools, jBPM OptaPlanner presentationDrools, jBPM OptaPlanner presentation
Drools, jBPM OptaPlanner presentation
 
FIWARE Global Summit - FogFlow, a new GE for IoT Edge Computing
FIWARE Global Summit - FogFlow, a new GE for IoT Edge ComputingFIWARE Global Summit - FogFlow, a new GE for IoT Edge Computing
FIWARE Global Summit - FogFlow, a new GE for IoT Edge Computing
 

Último

Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779Delhi Call girls
 
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort ServiceDelhi Call girls
 
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night EnjoyCall Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night EnjoyPooja Nehwal
 
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...Hasting Chen
 
Air breathing and respiratory adaptations in diver animals
Air breathing and respiratory adaptations in diver animalsAir breathing and respiratory adaptations in diver animals
Air breathing and respiratory adaptations in diver animalsaqsarehman5055
 
Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024
Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024
Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024eCommerce Institute
 
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara ServicesVVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara ServicesPooja Nehwal
 
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docxANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docxNikitaBankoti2
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxraffaeleoman
 
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort ServiceDelhi Call girls
 
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...Kayode Fayemi
 
Presentation on Engagement in Book Clubs
Presentation on Engagement in Book ClubsPresentation on Engagement in Book Clubs
Presentation on Engagement in Book Clubssamaasim06
 
Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)Chameera Dedduwage
 
Mathematics of Finance Presentation.pptx
Mathematics of Finance Presentation.pptxMathematics of Finance Presentation.pptx
Mathematics of Finance Presentation.pptxMoumonDas2
 
Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510Vipesco
 
If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaKayode Fayemi
 
Report Writing Webinar Training
Report Writing Webinar TrainingReport Writing Webinar Training
Report Writing Webinar TrainingKylaCullinane
 
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...Sheetaleventcompany
 
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdfThe workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdfSenaatti-kiinteistöt
 
SaaStr Workshop Wednesday w/ Lucas Price, Yardstick
SaaStr Workshop Wednesday w/ Lucas Price, YardstickSaaStr Workshop Wednesday w/ Lucas Price, Yardstick
SaaStr Workshop Wednesday w/ Lucas Price, Yardsticksaastr
 

Último (20)

Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
 
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
 
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night EnjoyCall Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
 
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
 
Air breathing and respiratory adaptations in diver animals
Air breathing and respiratory adaptations in diver animalsAir breathing and respiratory adaptations in diver animals
Air breathing and respiratory adaptations in diver animals
 
Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024
Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024
Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024
 
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara ServicesVVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
 
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docxANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
 
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
 
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
 
Presentation on Engagement in Book Clubs
Presentation on Engagement in Book ClubsPresentation on Engagement in Book Clubs
Presentation on Engagement in Book Clubs
 
Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)
 
Mathematics of Finance Presentation.pptx
Mathematics of Finance Presentation.pptxMathematics of Finance Presentation.pptx
Mathematics of Finance Presentation.pptx
 
Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510
 
If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New Nigeria
 
Report Writing Webinar Training
Report Writing Webinar TrainingReport Writing Webinar Training
Report Writing Webinar Training
 
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
 
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdfThe workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
 
SaaStr Workshop Wednesday w/ Lucas Price, Yardstick
SaaStr Workshop Wednesday w/ Lucas Price, YardstickSaaStr Workshop Wednesday w/ Lucas Price, Yardstick
SaaStr Workshop Wednesday w/ Lucas Price, Yardstick
 

Group3-Gravitation.pdf

  • 1. Gravitation Project Workshop on Advanced Techniques for Scientific Programming and Management of Open Source Software Packages Bellomo, Franco @fnbellomo Aguena da Silva, Michel Fogliatto, Ezequiel Romero Abad, David
  • 2. Workshop on Advanced Techniques for Scientific Programming and Management of Open Source Software Packages Gravitation project PROBLEM DESCRIPTION MAIN TASK Compute the movement of bodies under gravity forces using collaborative techniques
  • 3. Workshop on Advanced Techniques for Scientific Programming and Management of Open Source Software Packages Gravitation project Fij = G mimj |⃗ xi− ⃗ x j| 2 ⃗ xj−⃗ xi |⃗ xi− ⃗ xj| PROBLEM DESCRIPTION MAIN TASK Compute the movement of bodies under gravity forces using collaborative techniques
  • 4. Workshop on Advanced Techniques for Scientific Programming and Management of Open Source Software Packages Gravitation project ⃗ Fij =mi gij ( ⃗ xj−⃗ xi) ¨ ⃗ Xi=∑j gij ( ⃗ xj−⃗ xi) ˙ ⃗ Xi=⃗ vi ¨ ⃗ Vi=∑j gij ( ⃗ xj−⃗ xi) X' X V' V 0 Identity 0 0 g 0 g ˙ ⃗ α M ⃗ α EQUATION DISCRETIZATION
  • 5. Workshop on Advanced Techniques for Scientific Programming and Management of Open Source Software Packages Gravitation project X' X V' V 0 Identity 0 0 g 0 g ˙ ⃗ α M ⃗ α ⃗ αn+1= ⃗ αn+δt M ⃗ αn Explicit Euler ⃗ αn+1= ⃗ αn+ δt 2 [M ⃗ αn+1+ M ⃗ αn] Crank-Nicholson ⃗ αn+1= ⃗ αn+ 1 6 ( K1+2K2+2 K3+K4) Runge – Kutta 4th order EQUATION DISCRETIZATION
  • 6. Workshop on Advanced Techniques for Scientific Programming and Management of Open Source Software Packages Gravitation project PYTHON + GIT + GITHUB class Gravitation(object): “”” This is the main gravitation wrapper””” class Body(object): “”” Base class for space objects””” class make_plot(object): “””Class designed for runtime plotting””” List of bodies Time advancement Mass, position, velocity Runtime plotting Image and video Multi-processing def main(): “””Main function””” usage: Main.py [-h] [--method METHOD] [--tstep TSTEP] [--file FILENAME] [--plot] [--profile] [--nsteps NSTEPS] [--config][--confile CONFIG_FILE]
  • 7. Workshop on Advanced Techniques for Scientific Programming and Management of Open Source Software Packages Gravitation project PYTHON + GIT + GITHUB make_plot Gravitation body body body GITHUB base update move gfactor https://github.com/fnbellomo/GProject.git
  • 8. Workshop on Advanced Techniques for Scientific Programming and Management of Open Source Software Packages Gravitation project
  • 9. Workshop on Advanced Techniques for Scientific Programming and Management of Open Source Software Packages Gravitation project
  • 10. Workshop on Advanced Techniques for Scientific Programming and Management of Open Source Software Packages Gravitation project
  • 11. Workshop on Advanced Techniques for Scientific Programming and Management of Open Source Software Packages Gravitation project make_plot ● First approach: sequential plotting ● Second approach: multi-processing make_plot move() plot() process 1 process 2 Shared memory
  • 12. Workshop on Advanced Techniques for Scientific Programming and Management of Open Source Software Packages Gravitation project LATEST VERSION A python program that integrates the equation of movement for an arbitrary number of bodies Main features ● Collaborative project ● Command-line options. Reads data and options from file or during runtime ● Several numerical methods: Explicit Euler, Crank-Nicholson, Runge- Kutta4, adaptive Runge-Kutta ● Runtime plotting with multiprocessing ● Plot saving for post-processing ● Implements Unit test ● Class documentation with pydoc
  • 13. Workshop on Advanced Techniques for Scientific Programming and Management of Open Source Software Packages Gravitation project SOME RESULTS
  • 14. Workshop on Advanced Techniques for Scientific Programming and Management of Open Source Software Packages Gravitation project PROFILING import cProfile, pstats Pr = cProfile.Profile() pr.enable() pr.disable()
  • 15. Workshop on Advanced Techniques for Scientific Programming and Management of Open Source Software Packages Gravitation project PROFILING 99039 function calls in 0.535 seconds Ordered by: standard name ncalls tottime percall cumtime percall filename:lineno(function) 45000 0.223 0.000 0.223 0.000 Body.py:20(gfactor) 3 0.000 0.000 0.000 0.000 Body.py:9(__init__) 3000 0.261 0.000 0.531 0.000 Gravitation.py:107(move) 3000 0.016 0.000 0.018 0.000 Gravitation.py:175(update) 6 0.000 0.000 0.000 0.000 Gravitation.py:8(float_list) 6003 0.001 0.000 0.001 0.000 {len} 3 0.000 0.000 0.000 0.000 {method 'split' of 'str' objects} 12000 0.019 0.000 0.019 0.000 {numpy.core._dotblas.dot} 3 0.000 0.000 0.000 0.000 {numpy.core.multiarray.zeros} 1 0.000 0.000 0.000 0.000 {open} 4 0.000 0.000 0.000 0.000 {print} 30002 0.011 0.000 0.011 0.000 {range}
  • 16. Workshop on Advanced Techniques for Scientific Programming and Management of Open Source Software Packages Gravitation project INSTALL Dependences: Dependences: ● Numpy ● Matplotlib Installation: $ git clone https://github.com/fnbellomo/GProject.git $ cd GProyect $ sudo python install setup.py
  • 17. Workshop on Advanced Techniques for Scientific Programming and Management of Open Source Software Packages Gravitation project DOCUMENTATION (pydoc)
  • 18. Workshop on Advanced Techniques for Scientific Programming and Management of Open Source Software Packages Gravitation project WHAT WE LEARNED? ● Working in collaboration is not easy! ● Implementation of better programming ● Use of Control Version Software TO DO ● Rewrite class design ● Split the program into a larger number of independent modules ● Optimize calculations ● Optimize communication between processes
  • 19. Workshop on Advanced Techniques for Scientific Programming and Management of Open Source Software Packages Gravitation project Thanks! Any questions?