Quantum Phenomena Explorer 7.9.8
Interactive quantum-phenomena Explorer Tutor — source documentation
Loading...
Searching...
No Matches
simulationdomain2d.h
Go to the documentation of this file.
1/**
2 * @file simulationdomain2d.h
3 * @brief Declares the simulationdomain2d physics/numerical component used by QPE experiments.
4 * @ingroup qpe_quantum
5 *
6 * Source: @c core/quantum/simulationdomain2d.h. This file is part of Quantum Phenomena Explorer (QPE),
7 * maintained by Officina Turini. See LICENSE_IT.txt / LICENSE.txt for the
8 * QPE freeware source-available terms and THIRD_PARTY_NOTICES.txt for
9 * third-party components.
10 */
11
12#pragma once
13
14#include <cstddef>
15
16namespace qpe {
17
18/**
19 * @brief Data structure used by the Simulation Domain2D component.
20 *
21 * The structure keeps related values explicit and testable across the QPE physics, analysis, or persistence layers.
22 */
24{
25 std::size_t gridWidth = 0;
26 std::size_t gridHeight = 0;
27 float physicalWidth = 0.0f;
28 float physicalHeight = 0.0f;
29 float dx = 0.0f;
30 float dy = 0.0f;
31
32 /**
33 * @brief Performs valid.
34 */
35 bool valid() const noexcept;
36};
37
38/**
39 * @brief Implements the Simulation Domain2D Builder component.
40 *
41 * The class provides one focused service within the QPE architecture and is documented here independently of the experiment-level Help.
42 */
44{
45public:
46 /**
47 * @brief Performs make.
48 * @param gridWidth The grid width value used by the operation.
49 * @param gridHeight The grid height value used by the operation.
50 * @param physicalWidth The physical width value used by the operation.
51 * @param physicalHeight The physical height value used by the operation.
52 */
53 static SimulationDomain2D make(std::size_t gridWidth,
54 std::size_t gridHeight,
55 float physicalWidth,
56 float physicalHeight);
57 /**
58 * @brief Returns whether power of two.
59 * @param value Value to assign or evaluate.
60 */
61 static bool isPowerOfTwo(std::size_t value) noexcept;
62};
63
64} // namespace qpe
Implements the Simulation Domain2D Builder component.
Data structure used by the Simulation Domain2D component.
bool valid() const noexcept
Performs valid.