Request: Tutorial/help on how to build/link against waLBerla (using Cmake)
Hi!
I would like to experiment a bit with waLBerla, but can't for the life of me figure out how to properly link against it. I asked for help on SO already, where someone mentioned that waLBerla does not provide a real CMake package config file.
More details can be found in the SO post about my setup so far, but as I'm pretty sure I'm doing things suboptimally, I was wondering what you could recommend. In general a tutorial would be nice and would definitely lower the barrier for new(er) users to experiment with waLBerla. If I manage to get it to work, I have no problem writing it up and make a merge request. Or include it in the setup instructions.
In short, say I want to compile the following code (from the first tutorial):
#include "core/Environment.h"
#include "blockforest/Initialization.h"
using namespace walberla;
int main( int argc, char ** argv )
{
Environment env( argc, argv );
// create blocks
shared_ptr< StructuredBlockForest > blocks = blockforest::createUniformBlockGrid(
uint_c( 3), uint_c(2), uint_c( 4), // number of blocks in x,y,z direction
uint_c(10), uint_c(8), uint_c(12), // how many cells per block (x,y,z)
real_c(0.5), // dx: length of one cell in physical coordinates
false, // one block per process? - "false" means all blocks to one process
false, false, false ); // no periodicity
return 0;
}
What would be the best possible project layout?
Thanks!