summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2025-04-20 19:23:02 +0200
committerClaudius "keldu" Holeksa <mail@keldu.de>2025-04-20 19:23:02 +0200
commit60fb118680cf773dd5db44a4930bab4b4c119deb (patch)
treea5cb1a1bf8104aca4ce93bfcd10a9139663204d5 /examples
parentf50bf98a4a39dfcfb5ad2690d0adaa851d3dc69a (diff)
Moved file and added build description
Diffstat (limited to 'examples')
-rw-r--r--examples/SConscript10
-rw-r--r--examples/meta.cpp5
-rw-r--r--examples/meta_2d.cpp14
3 files changed, 23 insertions, 6 deletions
diff --git a/examples/SConscript b/examples/SConscript
index c9d85cb..73adcf5 100644
--- a/examples/SConscript
+++ b/examples/SConscript
@@ -18,13 +18,21 @@ examples_env.headers = sorted(glob.glob(dir_path + "/*.hpp"))
env.sources += examples_env.sources;
env.headers += examples_env.headers;
+# Meta
+examples_objects = [];
+examples_env.add_source_files(examples_objects, ['meta_2d.cpp'], shared=False);
+examples_env.meta_2d = examples_env.Program('#bin/meta_2d', [env.library_static, examples_objects]);
+
# Cavity2D
examples_objects = [];
examples_env.add_source_files(examples_objects, ['cavity_2d.cpp'], shared=False);
examples_env.cavity_2d = examples_env.Program('#bin/cavity_2d', [env.library_static, examples_objects]);
# Set Alias
-env.examples = [examples_env.cavity_2d];
+env.examples = [
+ examples_env.meta_2d,
+ examples_env.cavity_2d
+];
env.Alias('examples', env.examples);
if env["build_examples"]:
diff --git a/examples/meta.cpp b/examples/meta.cpp
deleted file mode 100644
index 6bdc40d..0000000
--- a/examples/meta.cpp
+++ /dev/null
@@ -1,5 +0,0 @@
-#include "../c++/lbm.hpp"
-
-int main(int argc, char** argv){
- return 0;
-}
diff --git a/examples/meta_2d.cpp b/examples/meta_2d.cpp
new file mode 100644
index 0000000..5aa39f4
--- /dev/null
+++ b/examples/meta_2d.cpp
@@ -0,0 +1,14 @@
+#include "../c++/lbm.hpp"
+
+int main(int argc, char** argv){
+ using namespace kel::lbm;
+
+ converter<sch::Float64> conv{
+ {0.1},
+ {0.1}
+ };
+
+ print_lbm_meta<sch::Float64,sch::Descriptor<2,9>>(conv, {1e-5});
+
+ return 0;
+}