diff --git a/modules/fieldlinessequence/tasks/findlastclosedfieldlinestask.cpp b/modules/fieldlinessequence/tasks/findlastclosedfieldlinestask.cpp index 55ee7729f2..c545330be6 100644 --- a/modules/fieldlinessequence/tasks/findlastclosedfieldlinestask.cpp +++ b/modules/fieldlinessequence/tasks/findlastclosedfieldlinestask.cpp @@ -156,97 +156,10 @@ void FindLastClosedFieldlinesTask::perform( fls::addExtraQuantities(&*kameleon, variableNames, magVariableNames, state); std::string fileName = cdfPath.stem().string() + "_lastClosedFieldlines"; state.saveStateToJson(_outputFolder.string() + fileName); + state.saveStateToOsfls(_outputFolder.string() + fileName); } - - - - - - - - - - //LINFO(std::format("Reached perform function")); - ////find positions of initial set of seedpoints - //std::vector listOfSeedPoints = initialCircleOfPoints(); - //// set threshold - //float progressCallbackValue = 0.0f; - - //std::vector extraVars; - //std::vector extraMagVars; - - ////for each file - //for (const std::string& cdfPath : _sourceFiles) { - // progressCallbackValue += (1/ listOfSeedPoints.size()); - // //////////for each seedpoint - // //trace - // FieldlinesState newState; - // bool isSuccessful = fls::traceFromListOfPoints( - // newState, - // cdfPath, - // listOfSeedPoints, - // 0.0, //_manualTimeOffset - // _tracingVar, - // extraVars, // _extraVars - // extraMagVars // _extraMagVars - // ); - - // newState.lineStart(); - // const std::vector& lineStarts = newState.lineCount(); - // const std::vector& lineCounts = newState.lineCount(); - - // LINFO(std::format("Find first and last point on line")); - // for (int i = 0; i < lineStarts.size(); ++i) { - // progressCallback(progressCallbackValue); - // size_t firstIndex = lineStarts[i]; - // size_t lastIndex = firstIndex + lineCounts[i]; - // glm::vec3 firstPos = newState.vertexPositions()[firstIndex]; - // glm::vec3 lastPos = newState.vertexPositions()[lastIndex]; - // LINFO(std::format("First Pos: {}", firstPos)); - // LINFO(std::format("Last Pos: {}", lastPos)); - - // - // } - - - - - // //check if endpoints are close to earth and determain closed vs not closed - - // //run iteration: - - // //move seedpoint, if closed further, else closer to earth - // //reduce movement distance - // //step when movement distance is less than threshold - - // // save list of points in .txt file with approriate name correlating with cdf file used - // // save traced fieldlines in either osfls or json - //} - progressCallback(1.0f); } -std::vector FindLastClosedFieldlinesTask::initialCircleOfPoints() { - std::vector list; - float angleDeg = 360.0 / _numberOfPointsOnBoundary; - float angleRad = static_cast(angleDeg * std::numbers::pi / 180.0); - - for (int i = 0; i<_numberOfPointsOnBoundary; ++i) { - glm::vec3 posSphere; - posSphere.x = 10.0; - posSphere.y = angleRad * i; - posSphere.z = 0.0; - - glm::vec3 posCartesian; - posCartesian.x = posSphere.x * cos(posSphere.y); - posCartesian.y = posSphere.x * sin(posSphere.y); - posCartesian.z = 0.0; - LINFO(std::format("\n {}, {} ", posCartesian.x, posCartesian.y)); - - list.push_back(posCartesian); - } - return list; -} - } //namespace openspace diff --git a/modules/fieldlinessequence/tasks/findlastclosedfieldlinestask.h b/modules/fieldlinessequence/tasks/findlastclosedfieldlinestask.h index 0968b85211..94f93a7b8f 100644 --- a/modules/fieldlinessequence/tasks/findlastclosedfieldlinestask.h +++ b/modules/fieldlinessequence/tasks/findlastclosedfieldlinestask.h @@ -48,7 +48,6 @@ namespace openspace { int _numberOfPointsOnBoundary = 1; float _threshold = 0.5; //RE std::filesystem::path _outputFolder; - bool _saveLastIterationOfFieldLines = true; }; } // namespace openspace diff --git a/modules/kameleon/ext/kameleon b/modules/kameleon/ext/kameleon index 172cb41c2b..364be4f711 160000 --- a/modules/kameleon/ext/kameleon +++ b/modules/kameleon/ext/kameleon @@ -1 +1 @@ -Subproject commit 172cb41c2b42b93d510f4896f126b1df408defe7 +Subproject commit 364be4f7118545bbc2d2fc83acb41f4faeaca691