OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
MaterialProperties.h
Go to the documentation of this file.
1#pragma once
3
5{
6private:
7 double * relativePermeability = nullptr;
8 double * relativePermittivity = nullptr;
9 const index_t numberOfNodes = 0;
10
11 const double freeSpacePermittivity = 8.854187817E-12; //physical constant
12 const double freeSpacePermeability = 1.256637061E-6; //physical constant
13
14 index_t yOffset;
15 index_t zOffset;
16public:
17 explicit MaterialProperties(double * permeability, double * permittivity, index_t numberOfNodes);
19 {
20 relativePermeability = nullptr;
21 relativePermittivity = nullptr;
22 };
25
26 inline const index_t GetNumberOfNodes() const;
27
28 inline double GetPermeabilityInX(index_t index) const;
29 inline double GetPermeabilityInY(index_t index) const;
30 inline double GetPermeabilityInZ(index_t index) const;
31
32 inline double GetPermittivityInX(index_t index) const;
33 inline double GetPermittivityInY(index_t index) const;
34 inline double GetPermittivityInZ(index_t index) const;
35};
36inline MaterialProperties::MaterialProperties(double * relativePermeability, double * relativePermittivity, index_t numberOfNodes)
37:relativePermeability(relativePermeability), relativePermittivity(relativePermittivity), numberOfNodes(numberOfNodes), yOffset(numberOfNodes), zOffset(numberOfNodes * 2) {}
38
40{
41 return numberOfNodes;
42}
43
45{
46 return relativePermeability[index] * freeSpacePermeability;
47}
49{
50 return relativePermeability[index+ yOffset] * freeSpacePermeability;
51}
53{
54 return relativePermeability[index + zOffset] * freeSpacePermeability;
55}
56
58{
59 return relativePermittivity[index] * freeSpacePermittivity;
60}
62{
63 return relativePermittivity[index + yOffset] * freeSpacePermittivity;
64}
66{
67 return relativePermittivity[index + zOffset] * freeSpacePermittivity;
68}
69
70
int64_t index_t
Definition SystemDependentDefines.h:13
Definition MaterialProperties.h:5
double GetPermittivityInX(index_t index) const
Definition MaterialProperties.h:57
const index_t GetNumberOfNodes() const
Definition MaterialProperties.h:39
double GetPermeabilityInX(index_t index) const
Definition MaterialProperties.h:44
double GetPermittivityInY(index_t index) const
Definition MaterialProperties.h:61
double GetPermeabilityInZ(index_t index) const
Definition MaterialProperties.h:52
double GetPermittivityInZ(index_t index) const
Definition MaterialProperties.h:65
MaterialProperties(MaterialProperties &other)=delete
double GetPermeabilityInY(index_t index) const
Definition MaterialProperties.h:48
~MaterialProperties()
Definition MaterialProperties.h:18
MaterialProperties(double *permeability, double *permittivity, index_t numberOfNodes)
Definition MaterialProperties.h:36
MaterialProperties & operator=(const MaterialProperties &other)=delete