|
Celeritas 0.7+28f01d9
|
#include "VolumeParamsIO.json.hh"#include <istream>#include <ostream>#include "corecel/Assert.hh"#include "corecel/cont/Range.hh"#include "corecel/io/JsonUtils.json.hh"#include "corecel/io/LabelIO.json.hh"#include "inp/Model.hh"Functions | |
| void | celeritas::to_json (nlohmann::json &j, VolumeParams const &vp) |
| Write volume hierarchy data to JSON. | |
| std::ostream & | celeritas::operator<< (std::ostream &os, VolumeParams const &vp) |
| void celeritas::to_json | ( | nlohmann::json & | j, |
| VolumeParams const & | vp | ||
| ) |
Write volume hierarchy data to JSON.
The output object has:
volumes : array of volume labels (indexed by VolumeId)volume_instances : array of volume instance labels (indexed by VolumeInstanceId)world : integer VolumeId of the root, or null if emptychildren : array of arrays; children[v] lists the VolumeInstanceId integers of the direct children placed inside volume v instance_to_volume : array; instance_to_volume[vi] is the integer VolumeId that instance vi instantiates, or null if vi is a null instance