Commit b9404412 authored by Robert K's avatar Robert K

Merge branch 'master' into feature/distributed-boundary-segments

parents aa3944ed dfc4be44
Pipeline #17581 failed with stage
in 81 minutes and 19 seconds
......@@ -9,6 +9,15 @@ set(DUNE_REENABLE_ADD_TEST TRUE)
set(ALUGRID_EXTRA_GRIDSELECTOR_FILE TRUE)
set(ALUGRID_DISABLE_METIS TRUE)
# set to true to compile more things into library
set(DUNE_ALUGRID_COMPILE_BINDINGS FALSE)
# variable to be set in config.h
if( DUNE_ALUGRID_COMPILE_BINDINGS )
set(DUNE_ALUGRID_COMPILE_BINDINGS_IN_LIB 1)
endif()
# general stuff
cmake_minimum_required(VERSION 2.8.12)
......
......@@ -39,6 +39,8 @@
/* Define to the revision of dune-alugrid*/
#define DUNE_ALUGRID_VERSION_REVISION ${DUNE_ALUGRID_VERSION_REVISION}
/* Define to build more .cc into library */
#cmakedefine DUNE_ALUGRID_COMPILE_BINDINGS_IN_LIB 1
/* Define if we have dlmalloc */
#cmakedefine HAVE_DLMALLOC 1
......
set(alu3dgriddir ${CMAKE_INSTALL_INCLUDEDIR}/dune/alugrid/3d)
set(alu3dgrid_HEADERS alu3dinclude.hh communication.hh
set(alu3dgrid_HEADERS aluinline.hh alu3dinclude.hh communication.hh
datacollectorcaps.hh datahandle.hh grid.hh grid_imp.cc grid_inline.hh
mappings.hh mappings_imp.cc topology.hh topology.cc
entity.hh entity_imp.cc entity_inline.hh entityseed.hh
faceutility.hh faceutility_imp.cc geometry.hh geometry_imp.cc
gridfactory.hh gridfactory.cc gridview.hh
indexsets.hh iterator.hh iterator.cc iterator_imp.cc alu3diterators.hh
indexsets.hh indexsets.cc iterator.hh iterator.cc iterator_imp.cc alu3diterators.hh
alugrid.hh)
set(headercheck_IGNORE ${alu3dgrid_HEADERS})
# include not needed for CMake
......
#ifndef DUNE_ALUGRID_ALU3DINCLUDE_HH
#define DUNE_ALUGRID_ALU3DINCLUDE_HH
//////////////////////////////////////////////////////////////////////
// compile imp.cc into lib (1 yes, 0 no)
// if you change this, you'll get what you deserve
//////////////////////////////////////////////////////////////////////
#define COMPILE_ALUGRID_LIB 0
#if COMPILE_ALUGRID_LIB
#define COMPILE_ALUGRID_INLINE 0
#else
#define COMPILE_ALUGRID_INLINE 1
#endif
#if COMPILE_ALUGRID_INLINE
#define alu_inline inline
#else
#define alu_inline
#endif
/////////////////////////////////////////////////////////////////////
#include "aluinline.hh"
// all methods and classes of the ALUGrid are defined in the namespace
#define ALU3DSPACE ::ALUGrid::
......
This diff is collapsed.
This diff is collapsed.
......@@ -194,5 +194,5 @@ namespace Dune
} //end namespace Dune
#undef alu_inline
//#undef alu_inline
#endif // #ifndef DUNE_ALU3DGRID_ALUGRID_HH
#ifndef DUNE_ALUGRID_INLINE_HH
#define DUNE_ALUGRID_INLINE_HH
//////////////////////////////////////////////////////////////////////
// compile imp.cc into lib (1 yes, 0 no)
// if you change this, you'll get what you deserve
//////////////////////////////////////////////////////////////////////
#if DUNE_ALUGRID_COMPILE_BINDINGS_IN_LIB
#define COMPILE_ALUGRID_LIB 1
#else
#define COMPILE_ALUGRID_LIB 0
#endif
#if COMPILE_ALUGRID_LIB
#define COMPILE_ALUGRID_INLINE 0
#else
#define COMPILE_ALUGRID_INLINE 1
#endif
#if COMPILE_ALUGRID_INLINE
#define alu_inline inline
#else
#define alu_inline
#endif
/////////////////////////////////////////////////////////////////////
#endif //DUNE_ALUGRID_INLINE_HH
......@@ -11,6 +11,7 @@
// Local includes
#include "alu3dinclude.hh"
#include "indexsets.hh"
#include "iterator.hh"
#include "entityseed.hh"
......@@ -691,5 +692,4 @@ protected:
#if COMPILE_ALUGRID_INLINE
#include "entity_imp.cc"
#endif
#endif
This diff is collapsed.
......@@ -5,6 +5,7 @@
#include "geometry.hh"
#include "grid.hh"
namespace Dune {
/////////////////////////////////////////////////////////////////
......@@ -13,6 +14,7 @@ namespace Dune {
// --Codim0Entity
//
////////////////////////////////////////////////////////////////
/*
template<int dim, class GridImp>
inline void ALU3dGridEntity<0,dim,GridImp> ::
removeElement ()
......@@ -201,6 +203,7 @@ namespace Dune {
alugrid_assert ( item_ );
return ((*item_).requestrule() == coarse_element_t);
}
*/
//*******************************************************************
//
......
......@@ -280,7 +280,8 @@ namespace Dune
bndType_( orig.bndType_ ),
conformanceState_(orig.conformanceState_),
conformingRefinement_( orig.conformingRefinement_ ),
ghostCellsEnabled_( orig.ghostCellsEnabled_ )
ghostCellsEnabled_( orig.ghostCellsEnabled_ ),
levelIntersection_( orig.levelIntersection_ )
{}
template< int dim, int dimworld, ALU3dGridElementType type, class Comm >
......
......@@ -706,7 +706,7 @@ namespace Dune
const JacobianTransposed& jacobianTransposed (const LocalCoordinate& local) const;
//! returns true if mapping is affine
inline bool affine () const;
bool affine () const;
//! returns volume of geometry
ctype volume () const;
......@@ -742,8 +742,8 @@ namespace Dune
const coord_t& p1);
//! build geometry of local coordinates relative to father
template <class GeometryType>
bool buildGeomInFather(const GeometryType &fatherGeom , const GeometryType & myGeom);
template <class Geometry>
bool buildGeomInFather(const Geometry &fatherGeom , const Geometry &myGeom);
//! print internal data
//! no interface method
......
This diff is collapsed.
......@@ -403,10 +403,10 @@ namespace Dune
typedef typename Partition< All_Partition > :: LevelGridView LevelGridView;
//! Type of the level index set
typedef DefaultIndexSet< GridImp, typename Codim< 0 > :: LevelIterator > LevelIndexSetImp;
typedef DefaultIndexSet< Grid, typename Codim< 0 > :: LevelIterator > LevelIndexSetImp;
//! Type of the leaf index set
typedef DefaultIndexSet< GridImp, typename Codim< 0 > :: LeafIterator > LeafIndexSetImp;
typedef DefaultIndexSet< Grid, typename Codim< 0 > :: LeafIterator > LeafIndexSetImp;
typedef IndexSet< Grid, LevelIndexSetImp > LevelIndexSet;
typedef IndexSet< Grid, LeafIndexSetImp > LeafIndexSet;
......@@ -713,39 +713,6 @@ namespace Dune
entity.level(), true );
}
private:
//! General definiton for a leaf iterator
template <int codim, PartitionIteratorType pitype>
typename Traits::template Codim<codim>::template Partition<pitype>::LeafIterator
leafbegin(int level) const;
//! General definition for an end iterator on leaf level
template <int codim, PartitionIteratorType pitype>
typename Traits::template Codim<codim>::template Partition<pitype>::LeafIterator
leafend(int level) const;
//! General definiton for a leaf iterator
template <int codim>
typename Traits::template Codim<codim>::LeafIterator
leafbegin(int level) const;
//! General definition for an end iterator on leaf level
template <int codim>
typename Traits::template Codim<codim>::LeafIterator
leafend(int level) const;
//! Iterator to first entity of codim 0 on leaf level (All_Partition)
LeafIteratorType leafbegin (int level) const;
//! one past the end on this leaf level (codim 0 and All_Partition)
LeafIteratorType leafend (int level) const;
//! Iterator to first entity of codim 0 on leaf level (All_Partition)
LeafIteratorType leafbegin () const;
//! one past the end on this leaf level (codim 0 and All_Partition)
LeafIteratorType leafend () const;
public:
//! General definiton for a leaf iterator
template <int codim, PartitionIteratorType pitype>
......@@ -767,17 +734,6 @@ namespace Dune
typename Traits::template Codim<codim>::LeafIterator
leafend() const;
private:
//! General definiton for a leaf iterator
template <int codim, PartitionIteratorType pitype>
typename Traits::template Codim<codim>::template Partition<pitype>::LeafIterator
createLeafIteratorBegin (int level) const;
//! General definition for an end iterator on leaf level
template <int codim, PartitionIteratorType pitype>
typename Traits::template Codim<codim>::template Partition<pitype>::LeafIterator
createLeafIteratorEnd(int level) const;
public:
//! number of grid entities per level and codim
int size (int level, int cd) const;
......@@ -849,38 +805,16 @@ namespace Dune
const typename Traits :: LeafIndexSet & leafIndexSet () const;
//! get level index set of the grid
const typename Traits :: LevelIndexSet & levelIndexSet (int level) const
{
assert( (level >= 0) && (level < int( levelIndexVec_.size() )) );
if( ! levelIndexVec_[ level ] )
{
levelIndexVec_[ level ] = createLevelIndexSet( level );
}
return (*levelIndexVec_[ level ]);
}
const typename Traits :: LevelIndexSet & levelIndexSet (int level) const;
/** \brief return instance of level index set
\note if index set for this level has not been created then this
instance will be deleted once the shared_ptr goes out of scope.
*/
std::shared_ptr< LevelIndexSetImp > accessLevelIndexSet ( int level ) const
{
assert( (level >= 0) && (level < int( levelIndexVec_.size() )) );
if( levelIndexVec_[ level ] )
{
return levelIndexVec_[ level ];
}
else
{
return createLevelIndexSet( level );
}
}
std::shared_ptr< LevelIndexSetImp > accessLevelIndexSet ( int level ) const;
protected:
std::shared_ptr< LevelIndexSetImp > createLevelIndexSet ( int level ) const
{
return std::shared_ptr< LevelIndexSetImp > (new LevelIndexSetImp( *this, lbegin< 0 >( level ), lend< 0 >( level ), level ) );
}
std::shared_ptr< LevelIndexSetImp > createLevelIndexSet ( int level ) const;
public:
template< int cd >
......
This diff is collapsed.
This diff is collapsed.
#ifndef DUNE_ALU3DGRID_FACTORY_CC
#define DUNE_ALU3DGRID_FACTORY_CC
#if COMPILE_ALUGRID_INLINE == 0
#include <config.h>
#endif
#include <cstdlib>
#include <cstdio>
#include <cstring>
......@@ -22,11 +18,7 @@
#include <utils/bisection-compatibility/bisectioncompatibility.hh>
#if COMPILE_ALUGRID_INLINE
#define alu_inline inline
#else
#define alu_inline
#endif
#include "dune/alugrid/3d/aluinline.hh"
namespace Dune
{
......@@ -1345,20 +1337,34 @@ namespace Dune
}
#if COMPILE_ALUGRID_LIB
#if ! COMPILE_ALUGRID_INLINE
// Instantiation -3-3
template class ALUGrid< 3, 3, cube, nonconforming >;
template class ALUGrid< 3, 3, simplex, nonconforming >;
template class ALUGrid< 3, 3, simplex, conforming >;
template class ALU3dGridFactory< ALUGrid< 3, 3, cube, nonconforming > >;
template class ALU3dGridFactory< ALUGrid< 3, 3, simplex, nonconforming > >;
template class ALU3dGridFactory< ALUGrid< 3, 3, simplex, conforming > >;
// Instantiation -2-3
template class ALUGrid< 2, 3, cube, nonconforming >;
template class ALUGrid< 2, 3, simplex, nonconforming >;
template class ALUGrid< 2, 3, simplex, conforming >;
template class ALU3dGridFactory< ALUGrid< 2, 3, cube, nonconforming > >;
template class ALU3dGridFactory< ALUGrid< 2, 3, simplex, nonconforming > >;
template class ALU3dGridFactory< ALUGrid< 2, 3, simplex, conforming > >;
// Instantiation -2-2
template class ALUGrid< 2, 2, cube, nonconforming >;
template class ALUGrid< 2, 2, simplex, nonconforming >;
template class ALUGrid< 2, 2, simplex, conforming >;
template class ALU3dGridFactory< ALUGrid< 2, 2, cube, nonconforming > >;
template class ALU3dGridFactory< ALUGrid< 2, 2, simplex, nonconforming > >;
template class ALU3dGridFactory< ALUGrid< 2, 2, simplex, conforming > >;
#endif
#endif // ! COMPILE_ALUGRID_INLINE
}
#undef alu_inline
#endif // end DUNE_ALU3DGRID_FACTORY_CC
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -59,6 +59,10 @@
namespace ALUGridZoltan
{
using ::ALUGrid::MpAccessGlobal;
using ::ALUGrid::MpAccessLocal;
using ::ALUGrid::MpAccessMPI;
#if HAVE_ZOLTAN
template < class ldb_vertex_map_t, class ldb_edge_set_t >
class ObjectCollection
......@@ -260,7 +264,7 @@ namespace ALUGridZoltan
enum method_t {HSFC, PHG, PARMETIS};
template< class ldb_vertex_map_t, class ldb_edge_set_t, class ldb_connect_set_t >
bool CALL_Zoltan_LB_Partition( method_t method,
ALUGrid::MpAccessGlobal &mpa,
MpAccessGlobal &mpa,
ldb_vertex_map_t& vertexMap,
ldb_edge_set_t& edgeSet,
ldb_connect_set_t& connect,
......@@ -268,7 +272,7 @@ namespace ALUGridZoltan
const bool verbose )
{
#if HAVE_ZOLTAN && HAVE_MPI
ALUGrid::MpAccessMPI* mpaMPI = dynamic_cast<ALUGrid::MpAccessMPI *> (&mpa);
MpAccessMPI* mpaMPI = dynamic_cast<MpAccessMPI *> (&mpa);
if( mpaMPI == 0 )
{
std::cerr << "ERROR: wrong mpAccess object, couldn't convert to MpAccessMPI!! in: " << __FILE__ << " line : " << __LINE__ << std::endl;
......@@ -392,13 +396,13 @@ namespace ALUGridZoltan
int& moveTo = i->second;
// insert and also set partition number new (including own number)
if ( moveTo == -1 ) moveTo = myrank ;
connect.insert( ALUGrid::MpAccessLocal::sendRank( moveTo ) );
connect.insert( MpAccessLocal::sendRank( moveTo ) );
}
// insert also process number that I will receive objects from
for (int i=0; i < numImport; ++i)
{
connect.insert( ALUGrid::MpAccessLocal::recvRank( importProcs[ i ] ) );
connect.insert( MpAccessLocal::recvRank( importProcs[ i ] ) );
}
}
else
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
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