RivinHD / Tsunami-Simulation

https://rivinhd.github.io/Tsunami-Simulation/
Other
0 stars 1 forks source link

Fixing the note from submission 4. Two-Dimensional Solver #45

Closed Integer-Ctrl closed 11 months ago

Integer-Ctrl commented 11 months ago

"A prebuild HTML of the documentation can be found at ../Tsunami-Simulation/docs_sphinx/prebuild."


"There are changes needed to be done to the F-Wave solver, [...]"


"Otherwise, three loaded values would be lost if the arrays are aligned correctly. If the cache line is smaller than 128 bit"


#ifdef TEST
    std::ifstream l_file( "resources/config.test.json" );
#endif // TEST
#ifndef TEST

// create a thread that runs the stations write function
std::thread writeStationsThread( writeStations, &l_stations, l_waveProp );
[ ... ]

(tsunami_lab) tsunami_19@LeChuck:~/04_two_dimensional/gerlach_hofer/Tsunami-Simulation/build$ cmake --config Debug --target sanitize ..
CMake Warning:
  Ignoring extra path from command line:

   "/home/tsunami_19/04_two_dimensional/gerlach_hofer/Tsunami-Simulation/build/Debug"

CMake Warning:
  Ignoring extra path from command line:

   "sanitize"

CMake Error: Unknown argument --target
CMake Error: Run 'cmake --help' for all supported options.

(tsunami_lab) tsunami_19@LeChuck:~/04_two_dimensional/gerlach_hofer/Tsunami-Simulation/build$ ./sanitize_test 
=================================================================
==287180==ERROR: AddressSanitizer: stack-use-after-return on address 0x7f0641abde9c at pc 0x556d052c7990 bp 0x7ffc9d799b20 sp 0x7ffc9d799b10
READ of size 4 at 0x7f0641abde9c thread T0
    #0 0x556d052c798f in tsunami_lab::io::Stations::write(float const*) /home/tsunami_19/04_two_dimensional/gerlach_hofer/Tsunami-Simulation/src/io/Stations.cpp:92
    #1 0x556d058107a1 in C_A_T_C_H_T_E_S_T_4 /home/tsunami_19/04_two_dimensional/gerlach_hofer/Tsunami-Simulation/src/io/Stations.test.cpp:51
    #2 0x556d053f88c2 in Catch::TestInvokerAsFunction::invoke() const /home/tsunami_19/04_two_dimensional/gerlach_hofer/Tsunami-Simulation/submodules/Catch2/single_include/catch2/catch.hpp:14330

REQUIERED INPUT:
N_CELLS_X is the number of cells in x-direction.

    /**
     * Gets the combined height of bathymetry and water height
     *
     * @return combined height
    */
    t_real const* getTotalHeight()
    {
        for( t_idx i = 1; i < m_yCells + 1; i++ )
        {