MCPcopy Create free account
hub / github.com/SeisSol/SeisSol / adjustAxes

Method adjustAxes

preprocessing/science/rconv/src/Map.cpp:83–113  ·  view source on GitHub ↗

transform from ned (srf coord system) to pj_mesh->axis

Source from the content-addressed store, hash-verified

81
82// transform from ned (srf coord system) to pj_mesh->axis
83void Map::adjustAxes(double* x, double* y, double* z) const
84{
85 double p[3] = { *x, *y, *z }; // x = n, y = e, z = d
86 double* v[3] = { x, y, z };
87
88 for (unsigned i = 0; i < 3; ++i) {
89 switch (pj_mesh->axis[i]) {
90 case 'e':
91 *v[i] = p[1];
92 break;
93 case 'w':
94 *v[i] = -p[1];
95 break;
96 case 'n':
97 *v[i] = p[0];
98 break;
99 case 's':
100 *v[i] = -p[0];
101 break;
102 case 'd':
103 *v[i] = p[2];
104 break;
105 case 'u':
106 *v[i] = -p[2];
107 break;
108 default:
109 std::cerr << "Weird axis definition: " << pj_mesh->axis[i] << std::endl;
110 break;
111 }
112 }
113}
114#else
115
116Map::Map(std::string const& targetCoordSystem)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected