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
16
namespace
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
*/
23
struct
SimulationDomain2D
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
*/
43
class
SimulationDomain2DBuilder
44
{
45
public
:
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
qpe::SimulationDomain2DBuilder
Implements the Simulation Domain2D Builder component.
Definition
simulationdomain2d.h:44
qpe
Definition
mainwindow.h:76
qpe::SimulationDomain2D
Data structure used by the Simulation Domain2D component.
Definition
simulationdomain2d.h:24
qpe::SimulationDomain2D::physicalWidth
float physicalWidth
Definition
simulationdomain2d.h:27
qpe::SimulationDomain2D::physicalHeight
float physicalHeight
Definition
simulationdomain2d.h:28
qpe::SimulationDomain2D::gridWidth
std::size_t gridWidth
Definition
simulationdomain2d.h:25
qpe::SimulationDomain2D::dy
float dy
Definition
simulationdomain2d.h:30
qpe::SimulationDomain2D::gridHeight
std::size_t gridHeight
Definition
simulationdomain2d.h:26
qpe::SimulationDomain2D::valid
bool valid() const noexcept
Performs valid.
Definition
simulationdomain2d.cpp:32
qpe::SimulationDomain2D::dx
float dx
Definition
simulationdomain2d.h:29
core
quantum
simulationdomain2d.h
Generated by
1.12.0