Skip to content
Snippets Groups Projects
CreateWorld.cpp 2.02 KiB
Newer Older
//======================================================================================================================
//
//  This file is part of waLBerla. waLBerla is free software: you can 
//  redistribute it and/or modify it under the terms of the GNU General Public
//  License as published by the Free Software Foundation, either version 3 of 
//  the License, or (at your option) any later version.
//  
//  waLBerla is distributed in the hope that it will be useful, but WITHOUT 
//  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
//  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License 
//  for more details.
//  
//  You should have received a copy of the GNU General Public License along
//  with waLBerla (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>.
//
//! \file HCSITS.cpp
//! \brief checks equality of hash grids and simple ccd
//! \author Sebastian Eibl <sebastian.eibl@fau.de>
//
//======================================================================================================================

#include "pe/basic.h"
#include "pe/utility/CreateWorld.h"

#include "blockforest/all.h"
#include "core/all.h"
#include "domain_decomposition/all.h"

#include "core/debug/TestSubsystem.h"

using namespace walberla;
using namespace walberla::pe;

typedef boost::tuple<Sphere, Plane> BodyTuple ;

int main( int argc, char** argv )
{
   walberla::debug::enterTestMode();
   Environment env(argc, argv);
   WALBERLA_UNUSED(env);

   // create blocks
   auto forest = createBlockForest(
                    math::AABB(0,0,0,10,10,10),
                    Vector3<uint_t>(1,1,1),
                    Vector3<bool>(false, false, false),
                    1,
                    1);

   WALBERLA_CHECK_EQUAL( forest->size(), 8);
   for (auto blockIt = forest->begin(); blockIt != forest->end(); ++blockIt)
   {
      blockforest::Block& currentBlock = *(dynamic_cast<blockforest::Block*>(&(*blockIt)));
      WALBERLA_CHECK_EQUAL( currentBlock.getLevel(), 1);
   }

   return EXIT_SUCCESS;
}