Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//======================================================================================================================
//
// 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;
}