C++ Library containing some ODE and PDE solvers
LSS2 is C++ library written written in Visual Studio 2019 IDE (VS) on win-x64 platform using C++17 standard. It contains several linear system solvers plus some ODE and PDE solvers. It has been migrated from LSS using valarrays instead of vectors. It also has some output functionalities.
LSS2 uses among others some CUDA solvers. Therefore NVidia’s graphic device with CUDA library v11.3 (and above) is required.
As the library is being developed and tested in VS I will describe the setup only for this IDE. For other IDEs the steps will be similar.
Download the library in zip or tar above and extract.
Make sure to create CUDA project (>= v11.3) in VS
Open property pages for the newly created project and
Place lss2_debug.dll, lss2_debug.lib (lss2_release.dll, lss2_release.lib in case of Release configuration) into your executable folder
Now you should be ready to use the library. Test it using following example
// main.cu file
#include <iostream>
#include <string>
#include <lss/utilities/range.hpp>
#include <lss/configs/discretization_config_1d.hpp>
int main()
{
// number of space subdivisions:
std::size_t const Sd = 100;
// number of time subdivisions:
std::size_t const Td = 100;
// space range:
auto const &space_range_ptr = lss::range_builder().lower(0.0).upper(20.0).build();
// time range
auto const &time_range_ptr = lss::range_builder().lower(0.0).upper(1.0).build();
//// discretization config:
auto const &discretization_ptr = lss::discretization_config_1d_builder()
.space_range(space_range_ptr)
.number_of_space_points(Sd)
.time_range(time_range_ptr)
.number_of_time_points(Td)
.build();
std::cout<<"Uniform space step value: "<< discretization_ptr->space_step()<<"\n";
return 0;
}
If it does not compile or run ok make sure you did not miss any of the previous steps. Otherwise you can drop me a line on my github page.
In this section I will try to describe how to work with the library on several examples. I will also list several conventions which a client has to follow in order to properly use the solvers inside the library. Some of these conventions will be relaxed as the developement progresses.
Having trouble with LSS2? You can open issue or contact me on mail michal.sara99@gmail.com and I’ll try and help you sort it out.