NANDRAD Data Model Library  Version 2.0
NANDRAD
NANDRAD_MaterialLayer.h
1 /* The NANDRAD data model library.
2 
3  Copyright (c) 2012-today, Institut für Bauklimatik, TU Dresden, Germany
4 
5  Primary authors:
6  Andreas Nicolai <andreas.nicolai -[at]- tu-dresden.de>
7  Anne Paepcke <anne.paepcke -[at]- tu-dresden.de>
8 
9  This library is part of SIM-VICUS (https://github.com/ghorwin/SIM-VICUS)
10 
11  This library is free software: you can redistribute it and/or modify
12  it under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  This library is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  GNU General Public License for more details.
20 */
21 
22 #ifndef NANDRAD_MaterialLayerH
23 #define NANDRAD_MaterialLayerH
24 
25 #include "NANDRAD_CodeGenMacros.h"
26 
27 namespace NANDRAD {
28 
29 class Material;
30 
31 /*! A layer of a multi-layered construction. */
33 public:
34  /*! Default c'tor. */
36 
37  /*! Simple Constructor with thickness in [m] and material id. */
38  MaterialLayer(double thickness, unsigned int id):
39  m_thickness(thickness),
40  m_matId(id)
41  {}
42 
43  NANDRAD_READWRITE
44 
45  /*! Inequality operator. */
46  bool operator!=(const MaterialLayer & other) const { return (m_thickness != other.m_thickness || m_matId != other.m_matId); }
47  /*! Equality operator. */
48  bool operator==(const MaterialLayer & other) const { return !operator!=(other); }
49 
50  /*! Thickness in [m]. */
51  double m_thickness; // XML:A:required
52 
53  /*! Material id. */
54  unsigned int m_matId; // XML:A:required
55 
56  // *** Variables used only during simulation ***
57 
58  /*! Quick-access pointer to referenced material. */
59  const NANDRAD::Material *m_material = nullptr;
60 };
61 
62 } // namespace NANDRAD
63 
64 #endif // NANDRAD_MaterialLayerH
const NANDRAD::Material * m_material
Quick-access pointer to referenced material.
Class containing material data needed in the construction model.
double m_thickness
Thickness in [m].
bool operator==(const MaterialLayer &other) const
Equality operator.
MaterialLayer()
Default c&#39;tor.
NANDRAD_READWRITE bool operator!=(const MaterialLayer &other) const
Inequality operator.
MaterialLayer(double thickness, unsigned int id)
Simple Constructor with thickness in [m] and material id.
The namespace NANDRAD contains the data model classes that make up the NANDRAD solver input data...
A layer of a multi-layered construction.
unsigned int m_matId
Material id.