From 8ae96f374431e05feedf03bd7f3d692e65de6ae6 Mon Sep 17 00:00:00 2001 From: Matteo Cicuttin <datafl4sh@toxicnet.eu> Date: Thu, 18 Nov 2021 15:57:09 +0100 Subject: [PATCH] Minor fixes. --- CMakeLists.txt | 6 ++++-- doc/compile.md | 4 +--- share/examples/yagi/params_yagi.lua | 4 ++-- share/examples/yagi_rad/params_yagi_rad.lua | 2 +- share/validation/params_test_maxwell_resonator.lua | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 234ab35..5e8f9c2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,8 +48,10 @@ else() message(FATAL_ERROR "GMSH not found") else() set(LINK_LIBS ${LINK_LIBS} gmsh) - include_directories(${GMSH_DIR}/include) - link_directories(${GMSH_DIR}/lib) + set(GMSH_INC "${GMSH_DIR}/include") + set(GMSH_LIB "${GMSH_DIR}/lib") + include_directories(${GMSH_INC}) + link_directories(${GMSH_LIB}) endif() endif() if(GMSH_INC) diff --git a/doc/compile.md b/doc/compile.md index 3083e37..8eda26e 100644 --- a/doc/compile.md +++ b/doc/compile.md @@ -1,8 +1,6 @@ # Compile instructions -- You need a C++20 compiler. This code is tested on GCC 10 and Clang 11. GCC 9 is known to *not* work. The code does not use (yet) fancy C++20 features, but it relies on the correct support of the spaceship operator. - -- The code does not have many dependencies. It essentially requires Eigen, Lua and SILO. On Debian they are installed with `apt install libeigen3-dev libsilo-dev libsiloh5-0 liblua5.3-dev`. +- The code does not have many dependencies. It essentially requires GMSH, Eigen, Lua and SILO. On Debian they are installed with `apt install libeigen3-dev libsilo-dev libsiloh5-0 liblua5.3-dev`. GMSH is usually installed from sources, and the build system expects to find it in `/opt/uliege/gmsh`. The GMSH from Debian should also be detected by the build system and work. - The code uses CMake to handle the builds. diff --git a/share/examples/yagi/params_yagi.lua b/share/examples/yagi/params_yagi.lua index 5e545ec..8953a65 100644 --- a/share/examples/yagi/params_yagi.lua +++ b/share/examples/yagi/params_yagi.lua @@ -43,7 +43,7 @@ for i,v in ipairs(pmc_bnds) do end local freq = 3e8 -function interface_source_7(tag, x, y, z, t) +function interface_source(tag, x, y, z, t) local Ex = 0 local Ey = 0 local Ez = math.sin(2*math.pi*t*freq) @@ -52,6 +52,6 @@ end bndconds[21] = {} bndconds[21].kind = "plane_wave_E" -bndconds[21].source = interface_source_7 +bndconds[21].source = interface_source diff --git a/share/examples/yagi_rad/params_yagi_rad.lua b/share/examples/yagi_rad/params_yagi_rad.lua index 2090af8..5f2e912 100644 --- a/share/examples/yagi_rad/params_yagi_rad.lua +++ b/share/examples/yagi_rad/params_yagi_rad.lua @@ -8,7 +8,7 @@ sim.dt = 1e-13 -- timestep size sim.timesteps = 50000 -- num of iterations sim.gmsh_model = "yagi_rad.geo" -- gmsh model filename sim.use_gpu = 0 -- 0: cpu, 1: gpu -sim.approx_order = 2 -- approximation order +sim.approx_order = 1 -- approximation order sim.time_integrator = "leapfrog" postpro.silo_output_rate = 500 -- rate at which to write silo files postpro.cycle_print_rate = 10 -- console print rate diff --git a/share/validation/params_test_maxwell_resonator.lua b/share/validation/params_test_maxwell_resonator.lua index 3745583..6943e4b 100644 --- a/share/validation/params_test_maxwell_resonator.lua +++ b/share/validation/params_test_maxwell_resonator.lua @@ -97,7 +97,7 @@ function on_timestep(ts) if ( do_IO ) then local tot_energy = e.Ex + e.Ey + e.Ez + e.Hx + e.Hy + e.Hz local energy_err = 100*(tot_energy - 2*We)/(2*We) - fh:write(energy_err, " ", tot_energy, " ", err.Ey, " ", err.Hx, " ", err.Hz, "\n") + fh:write(energy_err, " ", tot_energy, " ", e.Ey, " ", e.Hx, " ", e.Hz, "\n") end end -- GitLab