Skip to content
Snippets Groups Projects
Commit fa1979b4 authored by Frederik Hennig's avatar Frederik Hennig
Browse files

Updated C++ code. Fixed CMake dependencies.

parent 68c49ac9
No related merge requests found
......@@ -35,10 +35,23 @@
#include "CumulantMRTLatticeModel.h"
#include "EntropicMRTLatticeModel.h"
// Generated Communication Pack Infos
#include "SRTPackInfo.h"
#include "CumulantMRTPackInfo.h"
#include "EntropicMRTPackInfo.h"
// Generated NoSlip Boundaries
#include "SRTNoSlip.h"
#include "CumulantMRTNoSlip.h"
#include "EntropicMRTNoSlip.h"
namespace walberla{
// Set a typedef alias for our generated lattice model, for convenience.
// Set a typedef alias for our generated lattice model, the PackInfo, and the boundary.
// Changing the Method only requires changing these aliases.
typedef lbm::SRTLatticeModel LatticeModel_T;
typedef pystencils::SRTPackInfo PackInfo_T;
typedef lbm::SRTNoSlip NoSlip_T;
// Also set aliases for the stencils involved...
typedef LatticeModel_T::Stencil Stencil_T;
......@@ -85,17 +98,14 @@ int main( int argc, char ** argv )
// create and initialize boundary handling
const FlagUID fluidFlagUID( "Fluid" );
auto boundariesConfig = walberlaEnv.config()->getOneBlock( "Boundaries" );
// TODO: Replace by my NoSlip
// lbm::LbCodeGenerationExample_NoSlip noSlip(blocks, pdfFieldId);
NoSlip_T noSlip(blocks, pdfFieldId);
geometry::initBoundaryHandling<FlagField_T>(*blocks, flagFieldId, boundariesConfig);
geometry::setNonBoundaryCellsToDomain<FlagField_T>(*blocks, flagFieldId, fluidFlagUID);
// TODO
// noSlip.fillFromFlagField<FlagField_T>( blocks, flagFieldId, FlagUID("NoSlip"), fluidFlagUID );
noSlip.fillFromFlagField<FlagField_T>( blocks, flagFieldId, FlagUID("NoSlip"), fluidFlagUID );
// create time loop
SweepTimeloop timeloop( blocks->getBlockStorage(), timesteps );
......@@ -105,8 +115,8 @@ int main( int argc, char ** argv )
communication.addPackInfo( make_shared< lbm::PdfFieldPackInfo< LatticeModel_T > >( pdfFieldId ) );
// add LBM sweep and communication to time loop
timeloop.add() << BeforeFunction( communication, "communication" );
//<< Sweep( walls, "Boundary Walls" );
timeloop.add() << BeforeFunction( communication, "communication" )
<< Sweep( noSlip, "NoSlip Boundaries" );
timeloop.add() << Sweep( LatticeModel_T::Sweep( pdfFieldId ), "LB stream & collide" );
// LBM stability check
......
......@@ -26,6 +26,6 @@ if( WALBERLA_BUILD_WITH_CODEGEN )
walberla_add_executable ( NAME 02_LBMLatticeModelGenerationApp
FILES 02_LBMLatticeModelGeneration.cpp
DEPENDS blockforest core field stencil timeloop vtk pde LBMLatticeModelGenerationPython )
DEPENDS blockforest core domain_decomposition field geometry timeloop lbm stencil vtk LBMLatticeModelGenerationPython )
endif()
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment