-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Demo4paraview #305
base: master
Are you sure you want to change the base?
Demo4paraview #305
Conversation
Kudos, SonarCloud Quality Gate passed! |
Hi @vasvav , great initiative, I like the idea 💪 What do you think about slightly generalizing it? E.g. naming the demo If we went that way, we'd do the following:
Let me know what you think about that :) some minor technicalities:
|
Hi @vasvav , I like the idea as well! :) As suggested by @TobiasDuswald , I think that generalising the demo to include multiple export formats and using TimeSeries (or operations) would make it more comprehensive and helpful for beginner users. Attached you can find the "evaluate.h" file that I've implemented for my alveoli simulation (inspired from a demo made by Lukas). Within it there's a bunch of functions that can be used to collect data from the agents and from the diffusion grids as well as export the data to CSV, txt and root files. In the main file you can set the frequency of the operation with
To setup the result collection you can use
right after you've instantiated the sim object and plot the results at the end of the simulation with something like
where |
Dear @nicogno and @TobiasDuswald, many thanks for the very useful suggestions and comments! @TobiasDuswald, I agree with the generalisation of the "custom" exporter :) Sure, I can write up something for a CSV-formatted file, yet I am neither familiar with ROOT nor with NumPy therefore I don't think I can contribute in this. I think it goes without saying that I am very very happy if anyone wishes to chime in and add something in this direction. @nicogno, I like the idea for allowing the "custom" exporter to manage for time-series data more elegantly. However, I'm thinking which is best to do in order to make the code accessible to inexperienced users ;) Would love you explain me the approach presented in the example code you shared with us- there are a few bits I am not entirely sure I follow. |
@vasvav I thought of something like this (https://biodynamo.org/notebooks/ST13-dynamic-scheduling.html) instead of calling a function after |
Purpose:
Demonstrate to new users how a VTU formatted file for Paraview is structured to output cell (agents) and grid (continuum) data. To run this demo, there is no requirement to install Paraview together with BioDynaMo. Also, to understand the driver function of this demo, users are advised to study the diffusion demo first.
Results:
Successful execution of the demo will produce four VTU files in the
output/custom_paraview
sub-folder that can be opened directly through Paraview. Filescells_4paraview.*.vtu
(at two time steps) contain the results for all cells (agents) in the simulation, while filesgrid_4paraview.*.vtu
(again at two time steps) contain the results for the two continuum (previously named diffusion grids) substances - in this example oxygen (O2) and some growth factor (GF) are considered as cytokines.