GECo can be used either as a programmable Python library (see demos in the demo subdirectory) or via its graphical user interface (command 'geco').
The simplest way to get started is by using the demos located in geco/demos/.
Before running the demos you should complete the set-up steps indicated in the Installation.
To run the demos navigate to geco/demos/ and run for example
python3 ev_torus.pyThe solution files are stored in geco/demos/solutions/ev/ by default, and this location can be customized by modifying the output.solution_directory parameter (for example solver.parameters["output"]["solution_directory"] = custom_solution_dir).
For additional parameters see the SolverBase class.
The generated output files depend on whether the gravitational interaction is Newtonian or general relativistic.
For the relativistic demo ev_torus and similar, GECo generates the following
output files:
- Gravitational fields NU, MU, BB, WW each in
.xdmfand.xml.gzformat - Spatial density RHO in
.xdmfand.xml.gzformat - Energy-momentum components P00, P03, P33, P11 in
.xdmfand.xml.gzformat.
For details on the meaning of these quantities see On Axisymmetric and Stationary Solutions of the Self-Gravitating Vlasov System
Several postprocessing scripts are collected in geco/bin/.
To run postprocessing on a solution, first navigate to the solution directory, before running
geco-postprocessing-dataif GECo is installed, or
python3 ~/geco/bin/geco-postprocessing-dataotherwise. This will run the postprocessing script to generate additional scalar data from the computed solution. Several of the postprocessing scripts rely on this data, so it is a good idea to run this script first. Other postprocessing scripts can be used similarly.
GECo is a convenient tool for exploring solutions and their properties corresponding to new distribution ansatz functions. To write and use a new ansatz, the following steps should be taken:
- Define your ansatz as a subclass of the
EVAnsatzorVPAnsatzclasses, as ingeco/cppcode/EV-E-Polytropic-L-Polytropic.h. The ansatz should contain member functionsansatz,init_parameters, andread_parameters. The model must be defined in a file with the patterncppcode/EV-[MY-MODEL-NAME].horcppcode/VP-MY-MODEL-NAME].has appropriate. - Add your ansatz to the list of
PYBIND11_MODULESin eithergeco/cppcod/EVBindings.horgeco/cppcod/VPBindings.h, following the examples already present. Make sure to#includethe header file corresponding to your new ansatz class. This provides Python bindings. - Finally use your model in a
run_my_model.pyfile as inmodel = MaterialModel("MY_MODEL-NAME"). Reference existing demos for more complete information.