Skip to content
Snippets Groups Projects
Commit 8ae96f37 authored by Matteo Cicuttin's avatar Matteo Cicuttin
Browse files

Minor fixes.

parent 5e48e0a3
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
# 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.
......
......@@ -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
......@@ -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
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment