![]() |
OpenPFC
0.1.4
Phase Field Crystal simulation framework
|
JSON deserialization functions for OpenPFC types. More...
#include "errors.hpp"#include "json_helpers.hpp"#include "openpfc/boundary_conditions/fixed_bc.hpp"#include "openpfc/boundary_conditions/moving_bc.hpp"#include "openpfc/core/world.hpp"#include "openpfc/fft.hpp"#include "openpfc/field_modifier.hpp"#include "openpfc/initial_conditions/constant.hpp"#include "openpfc/initial_conditions/file_reader.hpp"#include "openpfc/initial_conditions/random_seeds.hpp"#include "openpfc/initial_conditions/seed_grid.hpp"#include "openpfc/initial_conditions/single_seed.hpp"#include "openpfc/model.hpp"#include "openpfc/time.hpp"#include <algorithm>#include <cctype>#include <heffte.h>#include <stdexcept>

Go to the source code of this file.
Functions | |
| template<class T > | |
| T | pfc::ui::from_json (const json &settings) |
| template<> | |
| fft::Backend | pfc::ui::from_json< fft::Backend > (const json &j) |
| Converts a JSON string to fft::Backend enum. | |
| template<> | |
| heffte::plan_options | pfc::ui::from_json< heffte::plan_options > (const json &j) |
| Converts a JSON object to heffte::plan_options. | |
| template<> | |
| World | pfc::ui::from_json< World > (const json &j) |
| template<> | |
| Time | pfc::ui::from_json< Time > (const json &settings) |
| void | pfc::ui::from_json (const json &j, Constant &ic) |
| void | pfc::ui::from_json (const json &j, SingleSeed &seed) |
| void | pfc::ui::from_json (const json &j, RandomSeeds &ic) |
| void | pfc::ui::from_json (const json &j, SeedGrid &ic) |
| void | pfc::ui::from_json (const json &j, FileReader &ic) |
| void | pfc::ui::from_json (const json &j, FixedBC &bc) |
| void | pfc::ui::from_json (const json &j, MovingBC &bc) |
| void | pfc::ui::from_json (const json &, Model &) |
JSON deserialization functions for OpenPFC types.
This header provides template specializations and overloads for converting JSON objects into OpenPFC types. It handles:
|
inline |
Converts a JSON string to fft::Backend enum.
Parses backend selection from configuration. Supported values:
| j | The JSON object to parse (looks for "backend" field) |
| std::runtime_error | if backend is not supported or not compiled in |
|
inline |
Converts a JSON object to heffte::plan_options.
This function parses the provided JSON object and constructs a heffte::plan_options object based on the values found in the JSON. The function prints debug information to the console regarding the options being parsed.
| j | The JSON object to parse. |

|
inline |
Creates a World object from a JSON input.
| j | A JSON object containing the following fields:
|
| std::invalid_argument | if any of the required fields are missing or have an invalid value. |
