-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLoopStructuralModels.h
More file actions
117 lines (104 loc) · 5.04 KB
/
LoopStructuralModels.h
File metadata and controls
117 lines (104 loc) · 5.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
#ifndef __LOOPSTRUCTURALMODELS_H
#define __LOOPSTRUCTURALMODELS_H
#include "LoopProjectFileUtils.h"
#include "LoopExtents.h"
namespace LoopProjectFile
{
struct StructuralModelsConfiguration
{
char foliationInterpolator[LOOP_CONFIGURATION_DEFAULT_STRING_LENGTH];
int foliationNumElements;
double foliationBuffer;
char foliationSolver[LOOP_CONFIGURATION_DEFAULT_STRING_LENGTH];
int foliationDamp;
char faultInterpolator[LOOP_CONFIGURATION_DEFAULT_STRING_LENGTH];
int faultNumElements;
double faultDataRegion;
char faultSolver[LOOP_CONFIGURATION_DEFAULT_STRING_LENGTH];
int faultCpw;
int faultNpw;
StructuralModelsConfiguration()
{
for (int i = 0; i < LOOP_CONFIGURATION_DEFAULT_STRING_LENGTH; i++)
{
foliationInterpolator[i] = 0;
foliationSolver[i] = 0;
faultInterpolator[i] = 0;
faultSolver[i] = 0;
}
strncpy_s(foliationInterpolator, "PLI", 3);
foliationNumElements = 100000;
foliationBuffer = 0.8;
strncpy_s(foliationSolver, "pyamg", 5);
foliationDamp = 1;
strncpy_s(faultInterpolator, "FDI", 3);
faultNumElements = 30000;
faultDataRegion = 0.3;
strncpy_s(faultSolver, "pyamg", 5);
faultCpw = 10;
faultNpw = 10;
};
};
namespace StructuralModels
{
/*!
* \brief Checks the structure of the given netCDF root node for the
* structural geology models and checks that the dimensions within that structure match the project file
* extent attributes.
*
* \param rootNode - the rootNode of the netCDF Loop project file
* \param xyzGridSize - the size of each dimension for the data (x=easting, y=northing, z=depth)
* \param verbose - a flag to toggle verbose message printing
*
* \return A flag indicating whether the netCDF file is valid for structural geology structure and dimension sizes
*/
bool CheckStructuralModelsValid(netCDF::NcGroup *rootNode, std::vector<int> xyzGridSize, bool verbose = false);
/*!
* \brief Adds or overrides structual geology model data into the loop project file at a
* specific index location
*
* \param rootNode - the rootNode of the netCDF Loop project file
* \param data - the data to add
* \param dataShape - the dimensions of the data being added
* \param index - the index location for the data
* \param verbose - a flag to toggle verbose message printing
*
* \return Response with success/fail of data insert with error message if it failed
*/
LoopProjectFileResponse SetStructuralModel(netCDF::NcGroup *rootNode, std::vector<float> data, std::vector<int> dataShape, unsigned int index = 0, bool verbose = false);
/*!
* \brief Retrieves structural geology model data from the loop project file at a
* specific index location
*
* \param rootNode - the rootNode of the netCDF Loop project file
* \param data - a reference to where the data is to be copied
* \param dataShape - the dimensions of the data being retrieved
* \param index - the index location for the data
* \param verbose - a flag to toggle verbose message printing
*
* \return Response with success/fail of data retrieval with error message if it failed
*/
LoopProjectFileResponse GetStructuralModel(netCDF::NcGroup *rootNode, std::vector<float> &data, std::vector<int> &dataShape, unsigned int index = 0, bool verbose = false);
/*!
* \brief Retrieves structural model configuration from the loop project file
*
* \param rootNode - the rootNode of the netCDF Loop project file
* \param configuration - a reference to where the configuration data is to be copied
* \param verbose - a flag to toggle verbose message printing
*
* \return Response with success/fail of observation data retrieval with an error message if it failed
*/
LoopProjectFileResponse GetStructuralModelsConfiguration(netCDF::NcGroup *rootNode, StructuralModelsConfiguration &configuration, bool verbose = false);
/*!
* \brief Sets structural model configuration to the loop project file
*
* \param rootNode - the rootNode of the netCDF Loop project file
* \param configuration - the configuration to be inserted
* \param verbose - a flag to toggle verbose message printing
*
* \return Response with success/fail of observation data insertion with an error message if it failed
*/
LoopProjectFileResponse SetStructuralModelsConfiguration(netCDF::NcGroup *rootNode, StructuralModelsConfiguration configuration, bool verbose = false);
} // namespace StructuralModels
} // namespace LoopProjectFile
#endif