Added support for more volume types

TODO:
- Test new type of volumes
This commit is contained in:
Jonas Strandstedt
2014-11-06 16:03:08 +01:00
parent f3225418b6
commit 3a2754fac7
2 changed files with 105 additions and 58 deletions
+21 -4
View File
@@ -28,6 +28,7 @@
#include <glm/gtx/std_based_type.hpp>
namespace ccmc {
class Kameleon;
class Model;
class Interpolator;
}
@@ -48,8 +49,14 @@ class KameleonWrapper {
public:
enum class Model {
ENLIL, // Heliosphere
BATSRUS // Magnetosphere
OpenGGCM,
BATSRUS, // Magnetosphere
ENLIL, // Heliosphere
MAS,
Adapt3D,
SWMF,
LFM,
Unknown
};
enum class TraceDirection {
@@ -62,6 +69,12 @@ public:
SOUTH,
FAROUT
};
enum class GridType {
Cartesian,
Spherical,
Unknown
};
KameleonWrapper(const std::string& filename, Model model);
~KameleonWrapper();
@@ -89,11 +102,14 @@ private:
std::vector<glm::vec3> traceLorentzTrajectory(glm::vec3 seedPoint,
float stepsize, float eCharge);
void getGridVariables(std::string& x, std::string& y, std::string& z);
void getGridVariables(std::string& x, std::string& y, std::string& z);
GridType getGridType(const std::string& x, const std::string& y, const std::string& z);
Model getModelType();
void progressBar(int current, int end);
glm::vec4 classifyFieldline(FieldlineEnd fEnd, FieldlineEnd bEnd);
ccmc::Kameleon* _kameleon;
ccmc::Model* _model;
Model _type;
ccmc::Interpolator* _interpolator;
@@ -101,6 +117,7 @@ private:
// Model parameters
float _xMin, _xMax, _yMin, _yMax, _zMin, _zMax;
std::string _xCoordVar, _yCoordVar, _zCoordVar;
GridType _gridType;
// For progressbar
int _lastiProgress;