renamed and stuff

This commit is contained in:
robin committed 2024-05-06 16:45:56 +02:00
1 parent 3c64364482
commit 59bd2f5a73
35 files changed
+34 -34

No files matched your search

File renamed without changes.
@@ -19,7 +19,7 @@ data/
hydrodynamic_U.h5
hydrodynamic_V.h5
interactive-track-and-trace/
opening-hdf5/
particle-track-and-trace/
...
```
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
project(VtkBase)
project(ParticleTrackTrace)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
@@ -34,7 +34,7 @@ endif()
# netcdf setup
find_package(netCDF REQUIRED)
add_executable(VtkBase MACOSX_BUNDLE main.cpp
add_executable(ParticleTrackTrace MACOSX_BUNDLE main.cpp
layers/BackgroundImage.cpp
layers/BackgroundImage.h
layers/EGlyphLayer.cpp
@@ -77,16 +77,16 @@ execute_process(
OUTPUT_STRIP_TRAILING_WHITESPACE
)
target_include_directories(VtkBase PUBLIC ${netCDF_INCLUDE_DIR})
target_include_directories(ParticleTrackTrace PUBLIC ${netCDF_INCLUDE_DIR})
find_library(NETCDF_LIB NAMES netcdf-cxx4 netcdf_c++4 PATHS ${NETCDFCXX_LIB_DIR} NO_DEFAULT_PATH)
# Prevent a "command line is too long" failure in Windows.
set(CMAKE_NINJA_FORCE_RESPONSE_FILE "ON" CACHE BOOL "Force Ninja to use response files.")
target_link_libraries(VtkBase ${NETCDF_LIB} ${VTK_LIBRARIES})
target_link_libraries(ParticleTrackTrace ${NETCDF_LIB} ${VTK_LIBRARIES})
# vtk_module_autoinit is needed
vtk_module_autoinit(
TARGETS VtkBase
TARGETS ParticleTrackTrace
MODULES ${VTK_LIBRARIES}
)
@@ -2,10 +2,9 @@
#include <vtkTransformFilter.h>
#include "advection/UVGrid.h"
#ifndef VTKBASE_NORMALISEDCARTOGRAPHICCAMERA_H
#define VTKBASE_NORMALISEDCARTOGRAPHICCAMERA_H
#ifndef NORMALISEDCARTOGRAPHICCAMERA_H
#define NORMALISEDCARTOGRAPHICCAMERA_H
#endif //VTKBASE_NORMALISEDCARTOGRAPHICCAMERA_H
/**
* Constructs a orthographically projected camera that looks at the square x,y in [-1, 1] with z = 0 and w = 1.
@@ -28,3 +27,5 @@ vtkSmartPointer<vtkMatrix4x4> getCartographicTransformMatrix(const std::shared_p
* @return pointer to transform filter
*/
vtkSmartPointer<vtkTransformFilter> createCartographicTransformFilter(const std::shared_ptr<UVGrid> uvGrid);
#endif //NORMALISEDCARTOGRAPHICCAMERA_H
File renamed without changes.
File renamed without changes.
@@ -1,5 +1,5 @@
#ifndef ADVECTION_ADVECTIONKERNEL_H
#define ADVECTION_ADVECTIONKERNEL_H
#ifndef ADVECTIONKERNEL_H
#define ADVECTIONKERNEL_H
#include <tuple>
@@ -28,4 +28,4 @@ public:
virtual ~AdvectionKernel() = default; // Apparently I need this, idk why
};
#endif //ADVECTION_ADVECTIONKERNEL_H
#endif //ADVECTIONKERNEL_H
@@ -1,5 +1,5 @@
#ifndef ADVECTION_EULERADVECTIONKERNEL_H
#define ADVECTION_EULERADVECTIONKERNEL_H
#ifndef EULERADVECTIONKERNEL_H
#define EULERADVECTIONKERNEL_H
#include "AdvectionKernel.h"
#include "UVGrid.h"
@@ -22,4 +22,4 @@ public:
};
#endif //ADVECTION_EULERADVECTIONKERNEL_H
#endif //EULERADVECTIONKERNEL_H
@@ -1,5 +1,5 @@
#ifndef ADVECTION_RK4ADVECTIONKERNEL_H
#define ADVECTION_RK4ADVECTIONKERNEL_H
#ifndef RK4ADVECTIONKERNEL_H
#define RK4ADVECTIONKERNEL_H
#include "AdvectionKernel.h"
#include "UVGrid.h"
@@ -19,4 +19,4 @@ public:
};
#endif //ADVECTION_RK4ADVECTIONKERNEL_H
#endif //RK4ADVECTIONKERNEL_H
@@ -1,5 +1,5 @@
#ifndef ADVECTION_UVGRID_H
#define ADVECTION_UVGRID_H
#ifndef UVGRID_H
#define UVGRID_H
#include <vector>
#include "Vel.h"
@@ -62,4 +62,4 @@ public:
void streamSlice(std::ostream &os, size_t t);
};
#endif //ADVECTION_UVGRID_H
#endif //UVGRID_H
File renamed without changes.
@@ -1,5 +1,5 @@
#ifndef ADVECTION_VEL_H
#define ADVECTION_VEL_H
#ifndef VEL_H
#define VEL_H
#include <utility>
#include <stdexcept>
@@ -41,4 +41,4 @@ Vel operator*(Scalar scalar, const Vel& p) {
return Vel(p.u * scalar, p.v * scalar);
}
#endif //ADVECTION_VEL_H
#endif //VEL_H
@@ -1,5 +1,5 @@
#ifndef ADVECTION_INTERPOLATE_H
#define ADVECTION_INTERPOLATE_H
#ifndef INTERPOLATE_H
#define INTERPOLATE_H
#include <vector>
@@ -25,4 +25,4 @@ Vel bilinearinterpolate(const UVGrid &uvGrid, int time, double lat, double lon);
*/
std::vector<Vel> bilinearinterpolation(const UVGrid &uvGrid, std::vector<std::tuple<int, double, double>> points);
#endif //ADVECTION_INTERPOLATE_H
#endif //INTERPOLATE_H
@@ -1,5 +1,5 @@
#ifndef ADVECTION_READDATA_H
#define ADVECTION_READDATA_H
#ifndef READDATA_H
#define READDATA_H
/**
* reads the file hydrodynamic_U.h5
@@ -19,4 +19,4 @@ std::vector<double> readHydrodynamicV();
*/
std::tuple<std::vector<int>, std::vector<double>, std::vector<double>> readGrid();
#endif //ADVECTION_READDATA_H
#endif //READDATA_H
@@ -1,5 +1,5 @@
#ifndef VTKBASE_SPAWNPOINTCALLBACK_H
#define VTKBASE_SPAWNPOINTCALLBACK_H
#ifndef SPAWNPOINTCALLBACK_H
#define SPAWNPOINTCALLBACK_H
#include <vtkCallbackCommand.h>
@@ -37,4 +37,4 @@ private:
};
#endif //VTKBASE_SPAWNPOINTCALLBACK_H
#endif //SPAWNPOINTCALLBACK_H
@@ -28,7 +28,6 @@ vtkSmartPointer<SpawnPointCallback> LGlyphLayer::createSpawnPointCallback() {
// Further notes; current thinking is to allow tracking a particle's age by using a scalar array in the VtkPolyData. This would be incremented for every tick/updateData function call.
// Another challenge is the concept of beaching; dead particles must not be included in the advect function call (wasted computations), but they should not be outright deleted from the vtkPoints either (we still want to display them). Working Solution: have another array of ints in the vtkPolyData, which tracks for how many calls of UpdateData a given particle has not had its position changed. If this int reaches some treshold (5? 10? 3? needs some testing), exclude the particle from the advect call.
//
// TODO: modelling all this in vtkClasses is workable, but ideally i would want to work with a native C++ class. See if this is doable and feasible.
LGlyphLayer::LGlyphLayer(std::shared_ptr<UVGrid> uvGrid, std::unique_ptr<AdvectionKernel> advectionKernel) {
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.