OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
SurfaceDiscretization.h
Go to the documentation of this file.
1#pragma once
2#include <vector>
3#include <string>
4#include <stdexcept>
5
8
10{
11
12private:
13 const double* deltaXY =nullptr;
14 const double* deltaXZ =nullptr;
15 const double* deltaYZ =nullptr;
16
17public:
20 {
21 deltaXY = nullptr;
22 deltaXZ = nullptr;
23 deltaYZ = nullptr;
24 };
27
28 void ExtractComponentsFromSingleVector(const std::vector<double> & surfaceDiscretizations) override;
29
30 inline const double GetDeltaXYAtIndex(index_t index) const;
31 inline const double GetDeltaXZAtIndex(index_t index) const;
32 inline const double GetDeltaYZAtIndex(index_t index) const;
33
34};
35
36inline const double SurfaceDiscretization::GetDeltaXYAtIndex(index_t index) const
37{
38 if (index < numberOfNodes)
39 {
40 return deltaXY[index];
41 }
42 else
43 {
44 throw std::out_of_range(outOfRangeMessage);
45 }
46}
47
48inline const double SurfaceDiscretization::GetDeltaXZAtIndex(index_t index) const
49{
50 if (index < numberOfNodes)
51 {
52 return deltaXZ[index];
53 }
54 else
55 {
56 throw std::out_of_range(outOfRangeMessage);
57 }
58}
59
60inline const double SurfaceDiscretization::GetDeltaYZAtIndex(index_t index) const
61{
62 if (index < numberOfNodes)
63 {
64 return deltaYZ[index];
65 }
66 else
67 {
68 throw std::out_of_range(outOfRangeMessage);
69 }
70}
int64_t index_t
Definition SystemDependentDefines.h:13
Definition MeshDiscretization.h:7
index_t numberOfNodes
Definition MeshDiscretization.h:9
const std::string outOfRangeMessage
Definition MeshDiscretization.h:10
Definition SurfaceDiscretization.h:10
SurfaceDiscretization()
Definition SurfaceDiscretization.h:18
SurfaceDiscretization & operator=(const SurfaceDiscretization &other)=delete
SurfaceDiscretization(SurfaceDiscretization &other)=delete
void ExtractComponentsFromSingleVector(const std::vector< double > &surfaceDiscretizations) override
Definition SurfaceDiscretization.cpp:3
const double GetDeltaXYAtIndex(index_t index) const
Definition SurfaceDiscretization.h:36
const double GetDeltaXZAtIndex(index_t index) const
Definition SurfaceDiscretization.h:48
~SurfaceDiscretization()
Definition SurfaceDiscretization.h:19
const double GetDeltaYZAtIndex(index_t index) const
Definition SurfaceDiscretization.h:60