OGS
MaterialSpatialDistributionMap.h
Go to the documentation of this file.
1 
12 #pragma once
13 
14 #include <map>
15 #include <memory>
16 #include <vector>
17 
18 namespace MeshLib
19 {
20 template <typename PROP_VAL_TYPE>
21 class PropertyVector;
22 } // namespace MeshLib
23 
24 namespace MaterialPropertyLib
25 {
26 class Medium;
27 
29 {
30 public:
32  std::map<int, std::shared_ptr<Medium>> const& media,
33  MeshLib::PropertyVector<int> const* const material_ids)
34  : media_(media), material_ids_(material_ids)
35  {
36  }
37 
38  Medium* getMedium(std::size_t element_id);
39  Medium const* getMedium(std::size_t element_id) const;
40  void checkElementHasMedium(std::size_t const element_id) const;
41 
42 private:
43  std::map<int, std::shared_ptr<Medium>> const& media_;
45 };
46 } // namespace MaterialPropertyLib
void checkElementHasMedium(std::size_t const element_id) const
MaterialSpatialDistributionMap(std::map< int, std::shared_ptr< Medium >> const &media, MeshLib::PropertyVector< int > const *const material_ids)
MeshLib::PropertyVector< int > const *const material_ids_
std::map< int, std::shared_ptr< Medium > > const & media_