generate and test different data
This commit is contained in:
parent
8350b03c96
commit
c7145cbf8b
10 changed files with 61 additions and 31 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -183,4 +183,4 @@ _deps
|
||||||
|
|
||||||
# Blender files
|
# Blender files
|
||||||
*.blend
|
*.blend
|
||||||
*.blend1
|
*.blend1!/utk_experiments/utk/cmake-build-debug/
|
||||||
|
|
|
||||||
2
.idea/.name
generated
2
.idea/.name
generated
|
|
@ -1 +1 @@
|
||||||
psa
|
utk_tests
|
||||||
19
.idea/codeStyles/Project.xml
generated
19
.idea/codeStyles/Project.xml
generated
|
|
@ -1,19 +0,0 @@
|
||||||
<component name="ProjectCodeStyleConfiguration">
|
|
||||||
<code_scheme name="Project" version="173">
|
|
||||||
<Objective-C>
|
|
||||||
<option name="INDENT_NAMESPACE_MEMBERS" value="2" />
|
|
||||||
<option name="INDENT_C_STRUCT_MEMBERS" value="2" />
|
|
||||||
<option name="INDENT_CLASS_MEMBERS" value="2" />
|
|
||||||
<option name="INDENT_INSIDE_CODE_BLOCK" value="2" />
|
|
||||||
</Objective-C>
|
|
||||||
<clangFormatSettings>
|
|
||||||
<option name="ENABLED" value="true" />
|
|
||||||
</clangFormatSettings>
|
|
||||||
<codeStyleSettings language="ObjectiveC">
|
|
||||||
<indentOptions>
|
|
||||||
<option name="INDENT_SIZE" value="2" />
|
|
||||||
<option name="TAB_SIZE" value="2" />
|
|
||||||
</indentOptions>
|
|
||||||
</codeStyleSettings>
|
|
||||||
</code_scheme>
|
|
||||||
</component>
|
|
||||||
7
.idea/misc.xml
generated
7
.idea/misc.xml
generated
|
|
@ -3,7 +3,12 @@
|
||||||
<component name="CMakePythonSetting">
|
<component name="CMakePythonSetting">
|
||||||
<option name="pythonIntegrationState" value="YES" />
|
<option name="pythonIntegrationState" value="YES" />
|
||||||
</component>
|
</component>
|
||||||
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$/utk_experiments/psa">
|
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$/utk_experiments">
|
||||||
<contentRoot DIR="$PROJECT_DIR$" />
|
<contentRoot DIR="$PROJECT_DIR$" />
|
||||||
</component>
|
</component>
|
||||||
|
<component name="CidrRootsConfiguration">
|
||||||
|
<excludeRoots>
|
||||||
|
<file path="$PROJECT_DIR$/utk_experiments/utk/cmake-build-debug" />
|
||||||
|
</excludeRoots>
|
||||||
|
</component>
|
||||||
</project>
|
</project>
|
||||||
3
.idea/vcs.xml
generated
3
.idea/vcs.xml
generated
|
|
@ -4,8 +4,5 @@
|
||||||
<mapping directory="" vcs="Git" />
|
<mapping directory="" vcs="Git" />
|
||||||
<mapping directory="$PROJECT_DIR$/utk_experiments/psa" vcs="Git" />
|
<mapping directory="$PROJECT_DIR$/utk_experiments/psa" vcs="Git" />
|
||||||
<mapping directory="$PROJECT_DIR$/utk_experiments/utk" vcs="Git" />
|
<mapping directory="$PROJECT_DIR$/utk_experiments/utk" vcs="Git" />
|
||||||
<mapping directory="$PROJECT_DIR$/utk_experiments/utk/cmake-build-debug/_deps/cli11-src" vcs="Git" />
|
|
||||||
<mapping directory="$PROJECT_DIR$/utk_experiments/utk/cmake-build-debug/_deps/semidiscrete_ot_2d-src" vcs="Git" />
|
|
||||||
<mapping directory="$PROJECT_DIR$/utk_experiments/utk/cmake-build-debug/_deps/spdlog-src" vcs="Git" />
|
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
BIN
raytracer/media/scenes/grid.blend1
Normal file
BIN
raytracer/media/scenes/grid.blend1
Normal file
Binary file not shown.
BIN
raytracer/media/scenes/sportscar.blend1
Normal file
BIN
raytracer/media/scenes/sportscar.blend1
Normal file
Binary file not shown.
|
|
@ -1,4 +1,5 @@
|
||||||
#include "utk/metrics/PCF.hpp"
|
#include "utk/metrics/PCF.hpp"
|
||||||
|
#include "utk/metrics/RDF_Heck.hpp"
|
||||||
#include <utk/metrics/RadialSpectrum.hpp>
|
#include <utk/metrics/RadialSpectrum.hpp>
|
||||||
#include <utk/samplers/SamplerStep.hpp>
|
#include <utk/samplers/SamplerStep.hpp>
|
||||||
#include <utk/utils/Pointset.hpp>
|
#include <utk/utils/Pointset.hpp>
|
||||||
|
|
@ -57,6 +58,28 @@ void writeRadspecToFile(const std::string &filename,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
void writeRDFtoFile(const std::string &filename,
|
||||||
|
std::pair<std::vector<T>, std::vector<int32_t>> radspec) {
|
||||||
|
std::ofstream file;
|
||||||
|
file.open(filename);
|
||||||
|
|
||||||
|
auto xs = radspec.first;
|
||||||
|
auto ys = radspec.second;
|
||||||
|
|
||||||
|
if (xs.size() != ys.size()) {
|
||||||
|
std::cerr << "Dimensions of radial spactrum are unequal: xDim: "
|
||||||
|
<< xs.size() << " yDim: " << ys.size() << std::endl;
|
||||||
|
std::terminate();
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < xs.size(); ++i) {
|
||||||
|
file << std::setprecision(std::numeric_limits<long double>::digits10 + 2)
|
||||||
|
<< std::fixed;
|
||||||
|
file << xs[i] << ", " << ys[i] << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
|
|
||||||
// load Points from file and generate metrics
|
// load Points from file and generate metrics
|
||||||
|
|
@ -75,10 +98,10 @@ int main() {
|
||||||
|
|
||||||
for (float i = 0.015625f; i <= 0.5f; i += 0.015625f) {
|
for (float i = 0.015625f; i <= 0.5f; i += 0.015625f) {
|
||||||
// PCF
|
// PCF
|
||||||
std::cout << "Calculating PCF with " << NBINS << " bins for max radius " << i << "…" << std::endl;
|
std::cout << "Calculating RDF with " << NBINS << " bins for max radius " << i << "…" << std::endl;
|
||||||
auto pcf = utk::PCF{true, 0.01, i, NBINS, 0.001}.compute(pointView);
|
auto rdf = utk::RDF{true, NBINS, i}.compute(pointView);
|
||||||
|
|
||||||
writePCFToFile("pcffiles/pcf_" + std::to_string(i) + ".txt", pcf);
|
writeRDFtoFile("rdffiles/rdf_" + std::to_string(i) + ".txt", rdf);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FFT based spectrum
|
// FFT based spectrum
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
||||||
Subproject commit a12c408ddac03425444c857a725572bfe6fa4837
|
Subproject commit 3a248e347abe6c377a0e87a9434fcec2782a6545
|
||||||
Loading…
Add table
Add a link
Reference in a new issue