32 #ifndef OPENPSTD_KERNELSCENE_H 33 #define OPENPSTD_KERNELSCENE_H 35 #include <Eigen/Dense> 39 #include "kernel_functions.h" 45 #include "../KernelInterface.h" 68 std::vector<std::shared_ptr<Boundary>> boundary_list;
69 std::vector<std::shared_ptr<Receiver>> receiver_list;
70 std::vector<std::shared_ptr<Speaker>> speaker_list;
73 std::map<Direction, EdgeParameters> default_edge_parameters;
74 int number_of_domains;
81 Scene(std::shared_ptr<PSTDSettings> settings);
92 void add_receiver(
const float x,
const float y,
const float z);
103 void add_speaker(
const float x,
const float y,
const float z);
110 void add_domain(std::shared_ptr<Domain> domain);
151 Eigen::ArrayXXf get_field(
char field_type);
157 std::vector<int> get_corner_points(std::shared_ptr<Domain> domain);
164 bool should_merge_domains(std::shared_ptr<Domain> domain1, std::shared_ptr<Domain> domain2);
170 std::shared_ptr<Domain> get_singular_parent_domain(std::shared_ptr<Domain> domain);
173 std::ostream &operator<<(std::ostream &str,
Scene const &v);
177 #endif //OPENPSTD_KERNELSCENE_H This is the general namespace of the OpenPSTD application.
Definition: Boundary.cpp:33
void apply_pml_matrices()
Applies the layer coefficients for each domain in the scene.
Definition: Scene.cpp:286
std::vector< std::shared_ptr< Domain > > domain_list
List with domains.
Definition: Scene.h:58
Scene(std::shared_ptr< PSTDSettings > settings)
Constructor of Scene object.
Definition: Scene.cpp:33
void add_pml_domains()
Add the necessary perfectly matched layer domain to the current scene, checks which layers belong to ...
Definition: Scene.cpp:41
Point size
Difference between top left and bottom right.
Definition: Scene.h:66
Point top_left
Top left of the most top left domain.
Definition: Scene.h:62
Collection of the rectangular domains.
Definition: Scene.h:55
void add_speaker(const float x, const float y, const float z)
Adds a speaker to the scene.
Definition: Scene.cpp:267
The points of the grid, represented by 2D integer vectors.
Definition: Geometry.h:43
Initial sound pressure Point bottom_right
Bottom right of the most bottom right domain.
Definition: Scene.h:64
std::shared_ptr< Domain > get_domain(int id)
Fetch a domain with specified ID, if existing.
Definition: Scene.cpp:401
std::shared_ptr< PSTDSettings > settings
Settings for the simulation.
Definition: Scene.h:60
void add_receiver(const float x, const float y, const float z)
Adds a receiver to the scene.
Definition: Scene.cpp:253
void compute_pml_matrices()
Computes the perfectly matched layer matrix coefficients for each domain in the scene.
Definition: Scene.cpp:278
Eigen::ArrayXXf get_pressure_field()
Obtains the global pressure field by summing the pressure in each domain.
Definition: Scene.cpp:378
int get_new_id()
Returns a new domain ID integer.
Definition: Scene.cpp:419
void add_domain(std::shared_ptr< Domain > domain)
Add domain to the scene.
Definition: Scene.cpp:294