Celeritas  0.5.0-56+6b053cd
Macros | Functions
RZMapFieldInputIO.json.cc File Reference
#include "RZMapFieldInputIO.json.hh"
#include <initializer_list>
#include <ostream>
#include <string>
#include <vector>
#include "corecel/Types.hh"
#include "corecel/cont/Range.hh"
#include "corecel/io/JsonUtils.json.hh"
#include "corecel/io/Logger.hh"
#include "celeritas/Quantities.hh"
#include "FieldDriverOptionsIO.json.hh"
#include "RZMapFieldInput.hh"

Macros

#define RZFI_LOAD(NAME)   j.at(#NAME).get_to(inp.NAME)
 

Functions

void celeritas::from_json (nlohmann::json const &j, RZMapFieldInput &inp)
 Read field from JSON. More...
 
void celeritas::to_json (nlohmann::json &j, RZMapFieldInput const &inp)
 Write field to JSON.
 
std::istream & celeritas::operator>> (std::istream &is, RZMapFieldInput &)
 Helper to read the field from a file or stream. More...
 
std::ostream & celeritas::operator<< (std::ostream &os, RZMapFieldInput const &)
 Helper to write the field to a file or stream.
 

Function Documentation

◆ from_json()

void celeritas::from_json ( nlohmann::json const &  j,
RZMapFieldInput inp 
)

Read field from JSON.

Todo:
Remove in 1.0

◆ operator>>()

std::istream & celeritas::operator>> ( std::istream &  is,
RZMapFieldInput inp 
)

Helper to read the field from a file or stream.

Example to read from a file:

RZMapFieldInput inp;
std::ifstream("foo.json") >> inp;