hummingbird
Solving the self-adjoint angular flux transport equation using spectral elements on Cartesian geometry
Loading...
Searching...
No Matches
source_bank.h
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-3-Clause
2// Copyright (c) 2026, Liam Pohlmann
3
4#ifndef HUMMINGBIRD_PHYSICS_SOURCE_BANK_H_
5#define HUMMINGBIRD_PHYSICS_SOURCE_BANK_H_
6
7#include <memory>
8#include <nlohmann/json.hpp>
9#include <string>
10#include <unordered_map>
11
12#include "banks/bank_base.h"
15#include "physics/source_base.h"
16
17using nlohmann::json;
18
19namespace hummingbird {
20
21/**
22 * @brief Bank holding the volumetric sources defined in the input file
23 *
24 */
25class SourceBank : public BankBase<std::unique_ptr<SourceBase>> {
26 public:
27 /**
28 * @brief Construct a new Source Bank object. Source structs are build using
29 * the JSON input file
30 *
31 * @param json_input Input file as json object
32 */
33 SourceBank(const json& json_input);
34
35 private:
36 /**
37 * @brief Build internal maps based on JSON input
38 *
39 * @param json_input JSON object containing input file information
40 */
41 void Build(const json& json_input);
42};
43} // namespace hummingbird
44
45#endif // HUMMINGBIRD_PHYSICS_SOURCE_BANK_H_
Base class for banks that store objects of type T by integer ID and look them up by the name given in...
Definition bank_base.h:21
void Build(const json &json_input)
Build internal maps based on JSON input.
Definition source_bank.cc:7
SourceBank(const json &json_input)
Construct a new Source Bank object. Source structs are build using the JSON input file.
Definition source_bank.cc:5