diff --git a/CMakeLists.txt b/CMakeLists.txt index 234ab35fa445684d12698162b5f42878845ac2d6..5e8f9c2ed1b299679ce9fc060314abb0fa278ca3 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 3083e37b95265f07905ce1f2c491dbf81c775efd..8eda26e582f04b6fb768532ef66bc26b9212140c 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 5e545ec6b0d0dafdc54e5699593c265dbc8c1648..8953a65b7c03583d3919daec27d4df351e1f131f 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 2090af836ae781570502060765f3167ca696f10d..5f2e912bab2f6e81dc4530cd4d0bbc433136e826 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 3745583a90a4e4ba93a91a27575b48a6a1049376..6943e4b69511e79dc8d185641bcdb3da16f62f43 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