From eff1ac65aad84041fe525313c679a9bf39ec889e Mon Sep 17 00:00:00 2001 From: Robert Kloefkorn <robertk@posteo.org> Date: Mon, 18 Aug 2014 16:29:13 +0200 Subject: [PATCH] cleanup actualDim and actualDimw (not done yet). --- dune/alugrid/3d/alu3dinclude.hh | 54 ++++++++--------- dune/alugrid/3d/alu3diterators.hh | 26 +++----- dune/alugrid/3d/datahandle.hh | 18 +++--- dune/alugrid/3d/entity.hh | 24 ++++---- dune/alugrid/3d/entity_imp.cc | 16 ++--- dune/alugrid/3d/entityseed.hh | 14 ++--- dune/alugrid/3d/faceutility.hh | 2 +- dune/alugrid/3d/geometry.hh | 5 +- dune/alugrid/3d/grid.hh | 82 +++++++++++++------------- dune/alugrid/3d/grid_imp.cc | 10 ++-- dune/alugrid/3d/indexsets.hh | 36 +++++------ dune/alugrid/3d/iterator.cc | 4 ++ dune/alugrid/3d/iterator.hh | 36 +++++------ dune/alugrid/3d/iterator_imp.cc | 8 +-- dune/alugrid/3d/mappings.hh | 4 +- dune/alugrid/impl/serial/gitter_sti.cc | 46 +++++++-------- dune/alugrid/test/test-alugrid.cc | 6 ++ 17 files changed, 194 insertions(+), 197 deletions(-) diff --git a/dune/alugrid/3d/alu3dinclude.hh b/dune/alugrid/3d/alu3dinclude.hh index 2f35be1bf..6a8febc99 100644 --- a/dune/alugrid/3d/alu3dinclude.hh +++ b/dune/alugrid/3d/alu3dinclude.hh @@ -146,11 +146,11 @@ namespace Dune // ALU3dCodimImplTraits // -------------------- - template< int actualDim, int actualDimw, ALU3dGridElementType elType, class Comm, int codim > + template< ALU3dGridElementType elType, class Comm, int codim > struct ALU3dCodimImplTraits; - template< int actualDim, int actualDimw, class Comm > - struct ALU3dCodimImplTraits< actualDim, actualDimw, tetra, Comm, 0 > + template< class Comm > + struct ALU3dCodimImplTraits< tetra, Comm, 0 > { typedef typename ALU3dBasicImplTraits< Comm >::GitterType GitterType; typedef typename ALU3dBasicImplTraits< Comm >::GitterImplType GitterImplType; @@ -162,8 +162,8 @@ namespace Dune typedef typename GitterImplType::Objects::Hbnd3Default GhostImplementationType; }; - template< int actualDim, int actualDimw, class Comm > - struct ALU3dCodimImplTraits< actualDim, actualDimw, hexa, Comm, 0 > + template< class Comm > + struct ALU3dCodimImplTraits< hexa, Comm, 0 > { typedef typename ALU3dBasicImplTraits< Comm >::GitterType GitterType; typedef typename ALU3dBasicImplTraits< Comm >::GitterImplType GitterImplType; @@ -175,8 +175,8 @@ namespace Dune typedef typename GitterImplType::Objects::Hbnd4Default GhostImplementationType; }; - template< int actualDim, int actualDimw, class Comm > - struct ALU3dCodimImplTraits< actualDim, actualDimw, tetra, Comm, 1 > + template< class Comm > + struct ALU3dCodimImplTraits< tetra, Comm, 1 > { typedef typename ALU3dBasicImplTraits< Comm >::GitterType GitterType; @@ -185,8 +185,8 @@ namespace Dune typedef typename GitterType::Geometric::hface3_GEO ImplementationType; }; - template< int actualDim, int actualDimw, class Comm > - struct ALU3dCodimImplTraits< actualDim, actualDimw, hexa, Comm, 1 > + template< class Comm > + struct ALU3dCodimImplTraits< hexa, Comm, 1 > { typedef typename ALU3dBasicImplTraits< Comm >::GitterType GitterType; @@ -195,8 +195,8 @@ namespace Dune typedef typename GitterType::Geometric::hface4_GEO ImplementationType; }; - template< int actualDim, int actualDimw, ALU3dGridElementType elType, class Comm > - struct ALU3dCodimImplTraits< actualDim, actualDimw, elType, Comm, 2 > + template< ALU3dGridElementType elType, class Comm > + struct ALU3dCodimImplTraits< elType, Comm, 2 > { typedef typename ALU3dBasicImplTraits< Comm >::GitterType GitterType; @@ -205,8 +205,8 @@ namespace Dune typedef typename GitterType::Geometric::hedge1_GEO ImplementationType; }; - template< int actualDim, int actualDimw, ALU3dGridElementType elType, class Comm > - struct ALU3dCodimImplTraits< actualDim, actualDimw, elType, Comm, 3 > + template< ALU3dGridElementType elType, class Comm > + struct ALU3dCodimImplTraits< elType, Comm, 3 > { typedef typename ALU3dBasicImplTraits< Comm >::GitterType GitterType; @@ -220,11 +220,11 @@ namespace Dune // ALU3dImplTraits // --------------- - template< int actualDim, int actualDimw, ALU3dGridElementType elType, class Comm > + template< ALU3dGridElementType elType, class Comm > struct ALU3dImplTraits; - template< int actualDim, int actualDimw, class Comm > - struct ALU3dImplTraits< actualDim, actualDimw, tetra, Comm > + template< class Comm > + struct ALU3dImplTraits< tetra, Comm > : public ALU3dBasicImplTraits< Comm > { typedef typename ALU3dBasicImplTraits< Comm >::GitterType GitterType; @@ -253,19 +253,19 @@ namespace Dune template< int codim > struct Codim - : public ALU3dCodimImplTraits< actualDim, actualDimw, tetra, Comm, codim > + : public ALU3dCodimImplTraits< tetra, Comm, codim > {}; // access of faces template <class Elem> static const GEOFaceType* getFace( const Elem& elem, const int aluFace ) { - return elem.myhface3( aluFace ); + return elem.myhface( aluFace ); } }; - template< int actualDim, int actualDimw, class Comm > - struct ALU3dImplTraits< actualDim, actualDimw, hexa, Comm > + template< class Comm > + struct ALU3dImplTraits< hexa, Comm > : public ALU3dBasicImplTraits< Comm > { typedef typename ALU3dBasicImplTraits< Comm >::GitterType GitterType; @@ -294,14 +294,14 @@ namespace Dune template< int codim > struct Codim - : public ALU3dCodimImplTraits< actualDim, actualDimw, hexa, Comm, codim > + : public ALU3dCodimImplTraits< hexa, Comm, codim > {}; // access of faces template <class Elem> static const GEOFaceType* getFace( const Elem& elem, const int aluFace ) { - return elem.myhface4( aluFace ); + return elem.myhface( aluFace ); } }; @@ -419,18 +419,18 @@ namespace Dune // some helper functions ///////////////////////////////////////////////////////////////////////// - template< int actualDim, int actualDimw, class Comm > + template< class Comm > struct ALU3dGridFaceGetter { - static const typename ALU3dImplTraits< actualDim, actualDimw, tetra, Comm >::GEOFaceType * - getFace( const typename ALU3dImplTraits< actualDim, actualDimw, tetra, Comm >::GEOElementType& elem, int index) + static const typename ALU3dImplTraits< tetra, Comm >::GEOFaceType * + getFace( const typename ALU3dImplTraits< tetra, Comm >::GEOElementType& elem, int index) { alugrid_assert (index >= 0 && index < 4); return elem.myhface3( ElementTopologyMapping< tetra >::dune2aluFace(index) ); } - static const typename ALU3dImplTraits< actualDim, actualDimw, hexa, Comm >::GEOFaceType* - getFace( const typename ALU3dImplTraits< actualDim, actualDimw, hexa, Comm >::GEOElementType &elem, int index ) + static const typename ALU3dImplTraits< hexa, Comm >::GEOFaceType* + getFace( const typename ALU3dImplTraits< hexa, Comm >::GEOElementType &elem, int index ) { alugrid_assert (index >= 0 && index < 6); return elem.myhface4( ElementTopologyMapping< hexa >::dune2aluFace(index) ); diff --git a/dune/alugrid/3d/alu3diterators.hh b/dune/alugrid/3d/alu3diterators.hh index abd397ca2..671b589b6 100644 --- a/dune/alugrid/3d/alu3diterators.hh +++ b/dune/alugrid/3d/alu3diterators.hh @@ -863,22 +863,12 @@ namespace ALUGrid typedef typename GridImp::MPICommunicatorType Comm; typedef typename Dune::ALU3dBasicImplTraits< Comm >::HElementType HElementType; - typedef typename Dune::ALU3dImplTraits< GridImp::actualDimension, GridImp::actualDimensionWorld, GridImp::elementType, Comm >::GEOElementType GEOElementType; + typedef typename Dune::ALU3dImplTraits< GridImp::elementType, Comm >::GEOElementType GEOElementType; typedef typename IteratorElType< 1, Comm >::ElType ItemType; - - static ItemType *getItemFromEl ( typename Dune::ALU3dImplTraits< GridImp::actualDimension, GridImp::actualDimensionWorld, Dune::tetra, Comm >::GEOElementType &el, int i ) - { - return el.myhface3( i ); - } - - static ItemType *getItemFromEl ( typename Dune::ALU3dImplTraits< GridImp::actualDimension, GridImp::actualDimensionWorld, Dune::hexa, Comm >::GEOElementType &el, int i ) - { - return el.myhface4( i ); - } static ItemType *getItem ( HElementType &el, int i ) { - return getItemFromEl( static_cast< GEOElementType & >( el ), i ); + return el.myhface( i ); } static int numItems () @@ -896,7 +886,7 @@ namespace ALUGrid typedef typename GridImp::MPICommunicatorType Comm; typedef typename Dune::ALU3dBasicImplTraits< Comm >::HElementType HElementType; - typedef typename Dune::ALU3dImplTraits< GridImp::actualDimension, GridImp::actualDimensionWorld, GridImp::elementType, Comm >::GEOElementType GEOElementType; + typedef typename Dune::ALU3dImplTraits< GridImp::elementType, Comm >::GEOElementType GEOElementType; typedef typename IteratorElType< 2, Comm >::ElType ItemType; static ItemType *getItem ( HElementType &el, int i ) @@ -919,7 +909,7 @@ namespace ALUGrid typedef typename GridImp::MPICommunicatorType Comm; typedef typename Dune::ALU3dBasicImplTraits< Comm >::HElementType HElementType; - typedef typename Dune::ALU3dImplTraits< GridImp::actualDimension, GridImp::actualDimensionWorld, GridImp::elementType, Comm >::GEOElementType GEOElementType; + typedef typename Dune::ALU3dImplTraits< GridImp::elementType, Comm >::GEOElementType GEOElementType; typedef typename IteratorElType< 3, Comm >::ElType ItemType; static ItemType *getItem ( HElementType &el, int i ) @@ -953,7 +943,7 @@ namespace ALUGrid template< int actualDim, int actualDimw, Dune::ALU3dGridElementType elType > struct SelectVector< actualDim, actualDimw, elType, 1 > { - typedef typename Dune::ALU3dImplTraits< actualDim, actualDimw, elType, Dune::ALUGridMPIComm >::GEOElementType GEOElementType; + typedef typename Dune::ALU3dImplTraits< elType, Dune::ALUGridMPIComm >::GEOElementType GEOElementType; static const std::vector< int > &getNotOnItemVector ( int face ) { @@ -964,7 +954,7 @@ namespace ALUGrid template< int actualDim, int actualDimw, Dune::ALU3dGridElementType elType > struct SelectVector< actualDim, actualDimw, elType, 2 > { - typedef typename Dune::ALU3dImplTraits< actualDim, actualDimw, elType, Dune::ALUGridMPIComm >::GEOElementType GEOElementType; + typedef typename Dune::ALU3dImplTraits< elType, Dune::ALUGridMPIComm >::GEOElementType GEOElementType; static const std::vector< int > &getNotOnItemVector( int face ) { return GEOElementType::edgesNotOnFace( face ); @@ -974,7 +964,7 @@ namespace ALUGrid template< int actualDim, int actualDimw, Dune::ALU3dGridElementType elType > struct SelectVector< actualDim, actualDimw, elType, 3 > { - typedef typename Dune::ALU3dImplTraits< actualDim, actualDimw, elType, Dune::ALUGridMPIComm >::GEOElementType GEOElementType; + typedef typename Dune::ALU3dImplTraits< elType, Dune::ALUGridMPIComm >::GEOElementType GEOElementType; static const std::vector< int > &getNotOnItemVector ( int face ) { return GEOElementType::verticesNotOnFace( face ); @@ -1424,7 +1414,7 @@ namespace ALUGrid for( iter.first(); ! iter.done(); iter.next() ) { - typedef typename Dune::ALU3dImplTraits< GridImp::actualDimension, GridImp::actualDimensionWorld, GridImp::elementType, Comm >::GEOElementType GEOElementType; + typedef typename Dune::ALU3dImplTraits< GridImp::elementType, Comm >::GEOElementType GEOElementType; enum { numEdges = Dune::EntityCount< GridImp::elementType >::numEdges }; GEOElementType *elem = 0; diff --git a/dune/alugrid/3d/datahandle.hh b/dune/alugrid/3d/datahandle.hh index aa90c99ed..4265dd359 100644 --- a/dune/alugrid/3d/datahandle.hh +++ b/dune/alugrid/3d/datahandle.hh @@ -32,7 +32,7 @@ namespace ALUGrid typedef typename GridType::MPICommunicatorType Comm; - typedef Dune::ALU3dImplTraits< GridType::actualDimension, GridType::actualDimensionWorld, GridType::elementType, Comm > ImplTraits; + typedef Dune::ALU3dImplTraits< GridType::elementType, Comm > ImplTraits; typedef typename ImplTraits::template Codim< codim >::ImplementationType ImplElementType; typedef typename ImplTraits::template Codim< codim >::InterfaceType HElementType; @@ -147,7 +147,7 @@ namespace ALUGrid typedef typename GridType::MPICommunicatorType Comm; - typedef Dune::ALU3dImplTraits< GridType::actualDimension, GridType::actualDimensionWorld, GridType::elementType, Comm > ImplTraits; + typedef Dune::ALU3dImplTraits< GridType::elementType, Comm > ImplTraits; typedef typename ImplTraits::template Codim< codim >::ImplementationType ImplElementType; typedef typename ImplTraits::template Codim< codim >::InterfaceType HElementType; @@ -287,7 +287,7 @@ namespace ALUGrid typedef typename GridType::MPICommunicatorType Comm; - typedef Dune::ALU3dImplTraits< GridType::actualDimension, GridType::actualDimensionWorld, GridType::elementType, Comm > ImplTraits; + typedef Dune::ALU3dImplTraits< GridType::elementType, Comm > ImplTraits; typedef typename ImplTraits::template Codim< codim >::ImplementationType IMPLElementType; typedef typename ImplTraits::template Codim< codim >::InterfaceType HElementType; @@ -363,7 +363,7 @@ namespace ALUGrid typedef typename GridType::MPICommunicatorType Comm; - typedef Dune::ALU3dImplTraits< GridType::actualDimension, GridType::actualDimensionWorld, GridType::elementType, Comm > ImplTraits; + typedef Dune::ALU3dImplTraits< GridType::elementType, Comm > ImplTraits; typedef typename ImplTraits::template Codim< codim >::ImplementationType IMPLElementType; typedef typename ImplTraits::template Codim< codim >::InterfaceType HElementType; @@ -419,7 +419,7 @@ namespace ALUGrid typedef typename GridType::MPICommunicatorType Comm; - typedef Dune::ALU3dImplTraits< GridType::actualDimension, GridType::actualDimensionWorld, GridType::elementType, Comm > ImplTraits; + typedef Dune::ALU3dImplTraits< GridType::elementType, Comm > ImplTraits; typedef typename ImplTraits::template Codim< codim >::ImplementationType IMPLElementType; typedef typename ImplTraits::template Codim< codim >::InterfaceType HElementType; @@ -498,7 +498,7 @@ namespace ALUGrid typedef typename GridType::MPICommunicatorType Comm; - typedef Dune::ALU3dImplTraits< GridType::actualDimension, GridType::actualDimensionWorld, GridType::elementType, Comm > ImplTraits; + typedef Dune::ALU3dImplTraits< GridType::elementType, Comm > ImplTraits; typedef typename ImplTraits::template Codim< 0 >::InterfaceType HElementType; @@ -644,7 +644,7 @@ namespace ALUGrid }; typedef typename GridType::MPICommunicatorType Comm; - typedef Dune::ALU3dImplTraits< GridType::actualDimension, GridType::actualDimensionWorld, GridType::elementType, Comm > ImplTraits; + typedef Dune::ALU3dImplTraits< GridType::elementType, Comm > ImplTraits; typedef typename ImplTraits::template Codim< 0 >::InterfaceType HElementType; typedef typename BaseType :: EntityType EntityType ; @@ -907,7 +907,7 @@ namespace ALUGrid typedef typename GridType::MPICommunicatorType Comm; - typedef Dune::ALU3dImplTraits< GridType::actualDimension, GridType::actualDimensionWorld, GridType::elementType, Comm > ImplTraits; + typedef Dune::ALU3dImplTraits< GridType::elementType, Comm > ImplTraits; typedef typename ImplTraits::HElementType HElementType; typedef typename ImplTraits::HBndSegType HBndSegType; typedef typename ImplTraits::BNDFaceType BNDFaceType; @@ -982,7 +982,7 @@ namespace ALUGrid typedef typename GridType::MPICommunicatorType Comm; - typedef Dune::ALU3dImplTraits< GridType::actualDimension, GridType::actualDimensionWorld, GridType::elementType, Comm > ImplTraits; + typedef Dune::ALU3dImplTraits< GridType::elementType, Comm > ImplTraits; typedef typename ImplTraits::HElementType HElementType; typedef typename ImplTraits::HBndSegType HBndSegType; diff --git a/dune/alugrid/3d/entity.hh b/dune/alugrid/3d/entity.hh index a2f50fb55..b0a481b81 100644 --- a/dune/alugrid/3d/entity.hh +++ b/dune/alugrid/3d/entity.hh @@ -71,11 +71,11 @@ public EntityDefaultImplementation <cd,dim,GridImp,ALU3dGridEntity> typedef typename GridImp::MPICommunicatorType Comm; - friend class ALU3dGrid< GridImp::actualDimension, GridImp::actualDimensionWorld, GridImp::elementType, Comm >; + friend class ALU3dGrid< GridImp::dimension, GridImp::dimensionworld, GridImp::elementType, Comm >; friend class ALU3dGridEntity < 0, dim, GridImp >; friend class ALU3dGridLevelIterator < cd, All_Partition, GridImp >; - friend class ALU3dGridHierarchicIndexSet< GridImp::actualDimension, GridImp::actualDimensionWorld, GridImp::elementType, Comm >; + friend class ALU3dGridHierarchicIndexSet< GridImp::dimension, GridImp::dimensionworld, GridImp::elementType, Comm >; template< class > friend class ALU3dGridFactory; @@ -84,7 +84,7 @@ public EntityDefaultImplementation <cd,dim,GridImp,ALU3dGridEntity> public: typedef typename GridImp::GridObjectFactoryType FactoryType; - typedef ALU3dImplTraits< GridImp::actualDimension, GridImp::actualDimensionWorld, GridImp::elementType, Comm > ImplTraits; + typedef ALU3dImplTraits< GridImp::elementType, Comm > ImplTraits; typedef typename ImplTraits::template Codim<cd>::InterfaceType HItemType; typedef typename ImplTraits::template Codim<cd>::ImplementationType ItemType; typedef typename ImplTraits::VertexType VertexType; @@ -205,7 +205,7 @@ class ALU3dGridEntity<0,dim,GridImp> typedef typename GridImp::MPICommunicatorType Comm; - typedef ALU3dImplTraits< GridImp::actualDimension, GridImp::actualDimensionWorld, elementType, Comm > ImplTraits; + typedef ALU3dImplTraits< elementType, Comm > ImplTraits; typedef typename ImplTraits::template Codim<0>::InterfaceType HElementType; typedef typename ImplTraits::GEOElementType GEOElementType; @@ -220,7 +220,7 @@ class ALU3dGridEntity<0,dim,GridImp> typedef typename ImplTraits::MarkRuleType MarkRuleType; - friend class ALU3dGrid< GridImp::actualDimension, GridImp::actualDimensionWorld, elementType, Comm >; + friend class ALU3dGrid< GridImp::dimension, GridImp::dimensionworld, elementType, Comm >; friend class ALU3dGridIntersectionIterator < GridImp >; friend class ALU3dGridIntersectionIterator < const GridImp >; friend class ALU3dGridHierarchicIterator < const GridImp >; @@ -234,7 +234,7 @@ class ALU3dGridEntity<0,dim,GridImp> friend class ALU3dGridLeafIterator <2, All_Partition,GridImp>; friend class ALU3dGridLeafIterator <3, All_Partition,GridImp>; - friend class ALU3dGridHierarchicIndexSet< GridImp::actualDimension, GridImp::actualDimensionWorld, elementType, Comm >; + friend class ALU3dGridHierarchicIndexSet< GridImp::dimension, GridImp::dimensionworld, elementType, Comm >; template< class > friend class ALU3dGridFactory; @@ -497,9 +497,9 @@ class ALU3dGridEntityPointerBase friend class ALU3dGridEntity<codim,dim,GridImp>; friend class ALU3dGridEntity< 0,dim,GridImp>; - friend class ALU3dGrid < GridImp::actualDimension, GridImp::actualDimensionWorld, GridImp::elementType, Comm >; + friend class ALU3dGrid < GridImp::dimension, GridImp::dimensionworld, GridImp::elementType, Comm >; - typedef ALU3dImplTraits< GridImp::actualDimension, GridImp::actualDimensionWorld, GridImp::elementType, Comm > ImplTraits; + typedef ALU3dImplTraits< GridImp::elementType, Comm > ImplTraits; typedef typename ImplTraits::template Codim<codim>::InterfaceType HElementType; typedef typename ImplTraits::HBndSegType HBndSegType; @@ -622,9 +622,9 @@ protected: friend class ALU3dGridEntity<cd,dim,GridImp>; friend class ALU3dGridEntity< 0,dim,GridImp>; - friend class ALU3dGrid < GridImp::actualDimension, GridImp::actualDimensionWorld, GridImp::elementType, Comm >; + friend class ALU3dGrid < GridImp::dimension, GridImp::dimensionworld, GridImp::elementType, Comm >; - typedef ALU3dImplTraits< GridImp::actualDimension, GridImp::actualDimensionWorld, GridImp::elementType, Comm > ImplTraits; + typedef ALU3dImplTraits< GridImp::elementType, Comm > ImplTraits; typedef typename ImplTraits::template Codim<cd>::InterfaceType HElementType; typedef typename ImplTraits::HBndSegType HBndSegType; @@ -716,9 +716,9 @@ protected: friend class ALU3dGridEntity<cd,dim,GridImp>; friend class ALU3dGridEntity< 0,dim,GridImp>; - friend class ALU3dGrid < GridImp::actualDimension, GridImp::actualDimensionWorld, GridImp::elementType, Comm >; + friend class ALU3dGrid < GridImp::dimension, GridImp::dimensionworld, GridImp::elementType, Comm >; - typedef ALU3dImplTraits< GridImp::actualDimension, GridImp::actualDimensionWorld, GridImp::elementType, Comm > ImplTraits; + typedef ALU3dImplTraits< GridImp::elementType, Comm > ImplTraits; typedef typename ImplTraits::template Codim<cd>::InterfaceType HElementType; typedef typename ImplTraits::HBndSegType HBndSegType; diff --git a/dune/alugrid/3d/entity_imp.cc b/dune/alugrid/3d/entity_imp.cc index f0ac235a6..0aa58248a 100644 --- a/dune/alugrid/3d/entity_imp.cc +++ b/dune/alugrid/3d/entity_imp.cc @@ -266,7 +266,7 @@ namespace Dune { case 0: return this->getIndex(); case 1: - return (ALU3dGridFaceGetter< GridImp::actualDimension, GridImp::actualDimensionWorld, Comm >::getFace( *item_, i ))->getIndex(); + return (ALU3dGridFaceGetter< Comm >::getFace( *item_, i ))->getIndex(); case 2: return item_->myhedge1( ElemTopo::dune2aluEdge( i ) )->getIndex(); case 3: @@ -292,7 +292,7 @@ namespace Dune { entity (const FactoryType& factory, const int level, const EntityType & entity, - const typename ALU3dImplTraits<GridImp::actualDimension, GridImp::actualDimensionWorld, GridImp::elementType, typename GridImp::MPICommunicatorType>::IMPLElementType & item, + const typename ALU3dImplTraits<GridImp::elementType, typename GridImp::MPICommunicatorType>::IMPLElementType & item, int i) { return ALU3dGridEntityPointer<0, GridImp>( entity ); @@ -311,7 +311,7 @@ namespace Dune { entity (const FactoryType& factory, const int level, const EntityType & en, - const typename ALU3dImplTraits<GridImp::actualDimension, GridImp::actualDimensionWorld, GridImp::elementType, typename GridImp::MPICommunicatorType>::IMPLElementType & item, + const typename ALU3dImplTraits<GridImp::elementType, typename GridImp::MPICommunicatorType>::IMPLElementType & item, int duneFace) { int aluFace = Topo::dune2aluFace(duneFace); @@ -319,7 +319,7 @@ namespace Dune { ALU3dGridEntityPointer<1,GridImp> (factory, level, - *(ALU3dGridFaceGetter< GridImp::actualDimension, GridImp::actualDimensionWorld, typename GridImp::MPICommunicatorType >::getFace(item, duneFace)), // getFace already constains dune2aluFace + *(ALU3dGridFaceGetter< typename GridImp::MPICommunicatorType >::getFace(item, duneFace)), // getFace already constains dune2aluFace item.twist(aluFace), duneFace // we need the duneFace number here for the buildGeom method ); @@ -341,7 +341,7 @@ namespace Dune { entity (const FactoryType& factory, const int level, const EntityType & en, - const typename ALU3dImplTraits<GridImp::actualDimension, GridImp::actualDimensionWorld, GridImp::elementType, typename GridImp::MPICommunicatorType>::IMPLElementType & item, + const typename ALU3dImplTraits<GridImp::elementType, typename GridImp::MPICommunicatorType>::IMPLElementType & item, int i) { // get reference element @@ -354,7 +354,7 @@ namespace Dune { int v = en.template getSubIndex<dim> (localNum); // get the hedge object - const typename ALU3dImplTraits<GridImp::actualDimension, GridImp::actualDimensionWorld, GridImp::elementType, typename GridImp::MPICommunicatorType>::GEOEdgeType & + const typename ALU3dImplTraits<GridImp::elementType, typename GridImp::MPICommunicatorType>::GEOEdgeType & edge = *(item.myhedge1(Topo::dune2aluEdge(i))); int vx = edge.myvertex(0)->getIndex(); @@ -377,7 +377,7 @@ namespace Dune { entity (const FactoryType& factory, const int level, const EntityType & en, - const typename ALU3dImplTraits<GridImp::actualDimension, GridImp::actualDimensionWorld, GridImp::elementType, typename GridImp::MPICommunicatorType>::IMPLElementType & item, + const typename ALU3dImplTraits<GridImp::elementType, typename GridImp::MPICommunicatorType>::IMPLElementType & item, int i) { return ALU3dGridEntityPointer<3,GridImp> @@ -486,7 +486,7 @@ namespace Dune { alugrid_assert ( item_ ); for(int i=0; i<numFaces; ++i) { - const GEOFaceType &face = *ALU3dGridFaceGetter< GridImp::actualDimension, GridImp::actualDimensionWorld, Comm >::getFace( *item_, i ); + const GEOFaceType &face = *ALU3dGridFaceGetter< Comm >::getFace( *item_, i ); // don't count internal boundaries as boundary if( face.isBorder() ) continue ; diff --git a/dune/alugrid/3d/entityseed.hh b/dune/alugrid/3d/entityseed.hh index a27875533..58c9db796 100644 --- a/dune/alugrid/3d/entityseed.hh +++ b/dune/alugrid/3d/entityseed.hh @@ -25,12 +25,12 @@ protected: friend class ALU3dGridEntity<codim,dim,GridImp>; friend class ALU3dGridEntity< 0,dim,GridImp>; - friend class ALU3dGrid < GridImp::actualDimension, GridImp::actualDimensionWorld, GridImp::elementType, Comm >; + friend class ALU3dGrid < dim, dimworld, GridImp::elementType, Comm >; - typedef ALU3dImplTraits< GridImp::actualDimension, GridImp::actualDimensionWorld, GridImp::elementType, Comm > ImplTraits; + typedef ALU3dImplTraits< GridImp::elementType, Comm > ImplTraits; typedef typename ImplTraits::template Codim<codim>::ImplementationType ImplementationType; typedef typename ImplTraits::template Codim<codim>::InterfaceType HElementType; - typedef typename ImplTraits::template Codim<codim>::EntitySeedType KeyType ; + typedef typename ImplTraits::template Codim<codim>::EntitySeedType KeyType ; typedef typename ImplTraits::BNDFaceType BNDFaceType; typedef typename ImplTraits::HBndSegType HBndSegType; @@ -216,9 +216,9 @@ public ALU3dGridEntitySeedBase<cd,GridImp> friend class ALU3dGridEntity<cd,dim,GridImp>; friend class ALU3dGridEntity< 0,dim,GridImp>; - friend class ALU3dGrid < GridImp::actualDimension, GridImp::actualDimensionWorld, GridImp::elementType, Comm >; + friend class ALU3dGrid < dim, dimworld, GridImp::elementType, Comm >; - typedef ALU3dImplTraits< GridImp::actualDimension, GridImp::actualDimensionWorld, GridImp::elementType, Comm > ImplTraits; + typedef ALU3dImplTraits< GridImp::elementType, Comm > ImplTraits; typedef typename ImplTraits::template Codim<cd>::ImplementationType ImplementationType; typedef typename ImplTraits::template Codim<cd>::InterfaceType HElementType; @@ -330,9 +330,9 @@ protected: friend class ALU3dGridEntity<cd,dim,GridImp>; friend class ALU3dGridEntity< 0,dim,GridImp>; - friend class ALU3dGrid < GridImp::actualDimension, GridImp::actualDimensionWorld, GridImp::elementType, Comm >; + friend class ALU3dGrid < dim, dimworld, GridImp::elementType, Comm >; - typedef ALU3dImplTraits< GridImp::actualDimension, GridImp::actualDimensionWorld, GridImp::elementType, Comm > ImplTraits; + typedef ALU3dImplTraits< GridImp::elementType, Comm > ImplTraits; typedef typename ImplTraits::template Codim<cd>::ImplementationType ImplementationType; typedef typename ImplTraits::template Codim<cd>::InterfaceType HElementType; diff --git a/dune/alugrid/3d/faceutility.hh b/dune/alugrid/3d/faceutility.hh index 5f138e12b..3eddf8685 100644 --- a/dune/alugrid/3d/faceutility.hh +++ b/dune/alugrid/3d/faceutility.hh @@ -39,7 +39,7 @@ namespace Dune template< int actualDim, int actualDimw, ALU3dGridElementType type, class Comm > class ALU3dGridFaceInfo { - typedef ALU3dImplTraits< actualDim, actualDimw, type, Comm > ImplTraits; + typedef ALU3dImplTraits< type, Comm > ImplTraits; //- private typedefs typedef typename ImplTraits::HasFaceType HasFaceType; public: diff --git a/dune/alugrid/3d/geometry.hh b/dune/alugrid/3d/geometry.hh index 488162a73..6af8cf860 100644 --- a/dune/alugrid/3d/geometry.hh +++ b/dune/alugrid/3d/geometry.hh @@ -24,7 +24,7 @@ namespace Dune class ALU3dGridEntityPointer; template<int mydim, int coorddim, class GridImp> class ALU3dGridGeometry; - template< int actualDim, int actualDimw, ALU3dGridElementType, class > + template< int dim, int dimworld, ALU3dGridElementType, class > class ALU3dGrid; class BilinearSurfaceMapping; class TrilinearMapping; @@ -667,8 +667,7 @@ namespace Dune typedef typename GridImp::MPICommunicatorType Comm; //friend class ALU3dGridIntersectionIterator<GridImp>; - typedef ALU3dImplTraits< GridImp::dimension, GridImp::dimensionworld, - elementType, Comm > ALU3dImplTraitsType ; + typedef ALU3dImplTraits< elementType, Comm > ALU3dImplTraitsType ; public: typedef typename ALU3dImplTraitsType::IMPLElementType IMPLElementType; diff --git a/dune/alugrid/3d/grid.hh b/dune/alugrid/3d/grid.hh index 7d3813d76..f3d5fbfd1 100644 --- a/dune/alugrid/3d/grid.hh +++ b/dune/alugrid/3d/grid.hh @@ -81,7 +81,7 @@ namespace Dune class ALU3dGridFactory; template <class GridImp, class GeometryImp, int nChild> class ALULocalGeometryStorage; - template< int actualDim, int actualDimw, ALU3dGridElementType elType, class Comm > + template< int dim, int dimworld, ALU3dGridElementType elType, class Comm > struct ALU3dGridCommHelper; @@ -90,10 +90,10 @@ namespace Dune // ----------------------------- #if ALU3DGRID_PARALLEL - template<int actualDim, int actualDimw, ALU3dGridElementType elType, class Comm = ALUGridMPIComm > + template<int dim, int dimworld, ALU3dGridElementType elType, class Comm = ALUGridMPIComm > class ALU3dGrid; #else // #if ALU3DGRID_PARALLEL - template< int actualDim, int actualDimw, ALU3dGridElementType elType, class Comm = ALUGridNoComm > + template< int dim, int dimworld, ALU3dGridElementType elType, class Comm = ALUGridNoComm > class ALU3dGrid; #endif // #else // #if ALU3DGRID_PARALLEL @@ -143,15 +143,15 @@ namespace Dune }; - template< int actualDim, int actualDimw, ALU3dGridElementType elType, class Comm > + template< int dim, int dimworld, ALU3dGridElementType elType, class Comm > struct ALU3dGridCommunications; - template< int actualDim, int actualDimw, ALU3dGridElementType elType > - struct ALU3dGridCommunications< actualDim, actualDimw, elType, ALUGridNoComm > : public ALU3dGridCommunicationsBase + template< int dim, int dimworld, ALU3dGridElementType elType > + struct ALU3dGridCommunications< dim, dimworld, elType, ALUGridNoComm > : public ALU3dGridCommunicationsBase { using ALU3dGridCommunicationsBase :: checkForConformingRefinement ; - typedef ALU3dGridLocalIdSet< actualDim, actualDimw, elType, ALUGridNoComm > GlobalIdSet; + typedef ALU3dGridLocalIdSet< dim, dimworld, elType, ALUGridNoComm > GlobalIdSet; typedef int GlobalId; typedef ALU3DSPACE GitterDuneImpl GitterImplType; @@ -200,12 +200,12 @@ namespace Dune }; #if ALU3DGRID_PARALLEL - template< int actualDim, int actualDimw, ALU3dGridElementType elType > - struct ALU3dGridCommunications< actualDim, actualDimw, elType, ALUGridMPIComm > : public ALU3dGridCommunicationsBase + template< int dim, int dimworld, ALU3dGridElementType elType > + struct ALU3dGridCommunications< dim, dimworld, elType, ALUGridMPIComm > : public ALU3dGridCommunicationsBase { using ALU3dGridCommunicationsBase :: checkForConformingRefinement ; - typedef ALU3dGridGlobalIdSet< actualDim, actualDimw, elType, ALUGridMPIComm > GlobalIdSet; + typedef ALU3dGridGlobalIdSet< dim, dimworld, elType, ALUGridMPIComm > GlobalIdSet; typedef ALUGridId< ALUMacroKey > GlobalId; typedef ALU3DSPACE GitterDunePll GitterImplType; @@ -365,7 +365,7 @@ namespace Dune typedef IdSet< Grid, GlobalIdSetImp, GlobalIdType > GlobalIdSet; //! Type of the communication class - typedef typename ALU3dGridCommunications< actualDim, actualDimw, elType, Comm >::CollectiveCommunication CollectiveCommunication; + typedef typename ALU3dGridCommunications< dim, dimworld, elType, Comm >::CollectiveCommunication CollectiveCommunication; }; // struct Traits //! Type of the level index set implementation @@ -405,24 +405,24 @@ namespace Dune For installation instructions see http://www.dune-project.org/external_libraries/install_alugrid.html . @author Robert Kloefkorn */ - template< int actualDim, int actualDimw, ALU3dGridElementType elType, class Comm > + template< int dim, int dimworld, ALU3dGridElementType elType, class Comm > class ALU3dGrid - : public GridDefaultImplementation< 3, 3, alu3d_ctype, - ALU3dGridFamily< actualDim, actualDimw, elType, Comm > >, + : public GridDefaultImplementation< dim, dimworld, alu3d_ctype, + ALU3dGridFamily< dim, dimworld, elType, Comm > >, public HasObjectStream, public HasHierarchicIndexSet { - typedef ALU3dGrid< actualDim, actualDimw, elType, Comm > ThisType; - typedef GridDefaultImplementation< 3, 3, alu3d_ctype, ALU3dGridFamily< actualDim, actualDimw, elType, Comm > > BaseType; + typedef ALU3dGrid< dim, dimworld, elType, Comm > ThisType; + typedef GridDefaultImplementation< dim, dimworld, alu3d_ctype, ALU3dGridFamily< dim, dimworld, elType, Comm > > BaseType; // for compatibility: MyType := ThisType typedef ThisType MyType; // friend declarations - friend class ALU3dGridEntity< 0, 3, const ThisType>; - friend class ALU3dGridEntity< 1, 3, const ThisType>; - friend class ALU3dGridEntity< 2, 3, const ThisType>; - friend class ALU3dGridEntity< 3, 3, const ThisType>; + friend class ALU3dGridEntity< 0, dimworld, const ThisType>; + friend class ALU3dGridEntity< 1, dimworld, const ThisType>; + friend class ALU3dGridEntity< 2, dimworld, const ThisType>; + friend class ALU3dGridEntity< 3, dimworld, const ThisType>; friend class ALU3dGridIntersectionIterator< ThisType >; @@ -439,9 +439,9 @@ namespace Dune friend class ALU3dGridIntersectionIterator< const ThisType >; friend class ALU3dGridHierarchicIterator< const ThisType >; - friend class ALU3dGridHierarchicIndexSet< actualDim, actualDimw, elType, Comm >; - friend class ALU3dGridGlobalIdSet< actualDim, actualDimw, elType, Comm >; - friend class ALU3dGridLocalIdSet< actualDim, actualDimw, elType, Comm >; + friend class ALU3dGridHierarchicIndexSet< dim, dimworld, elType, Comm >; + friend class ALU3dGridGlobalIdSet< dim, dimworld, elType, Comm >; + friend class ALU3dGridLocalIdSet< dim, dimworld, elType, Comm >; friend class Conversion< ThisType, HasObjectStream >; friend class Conversion< const ThisType, HasObjectStream >; @@ -449,7 +449,7 @@ namespace Dune friend class Conversion< ThisType, HasHierarchicIndexSet >; friend class Conversion< const ThisType, HasHierarchicIndexSet >; - friend struct ALU3dGridCommHelper< actualDim, actualDimw, elType, Comm >; + friend struct ALU3dGridCommHelper< dim, dimworld, elType, Comm >; // new intersection iterator is a wrapper which get itersectioniteratoimp as pointers public: @@ -472,17 +472,15 @@ namespace Dune enum { refineStepsForHalf = 1 }; static const ALU3dGridElementType elementType = elType; - static const int actualDimension = actualDim; - static const int actualDimensionWorld = actualDimw; typedef typename ALU3DSPACE GatherScatterType::ObjectStreamType ObjectStreamType; typedef ObjectStreamType InStreamType ; typedef ObjectStreamType OutStreamType ; - typedef ALU3dGridFamily< actualDim, actualDimw, elType, Comm > GridFamily; + typedef ALU3dGridFamily< dim, dimworld, elType, Comm > GridFamily; typedef typename GridFamily::Traits Traits; - static const int dimension = BaseType::dimension; + static const int dimension = BaseType::dimension; static const int dimensionworld = BaseType::dimensionworld; protected: @@ -507,7 +505,7 @@ namespace Dune typedef typename Partition< All_Partition > :: MacroGridView MacroGridView; //! Type of the hierarchic index set - typedef ALU3dGridHierarchicIndexSet< actualDim, actualDimw, elType, Comm > HierarchicIndexSet; + typedef ALU3dGridHierarchicIndexSet< dim, dimworld, elType, Comm > HierarchicIndexSet; //! Type of the level index set, needed by data handle typedef typename GridFamily::LevelIndexSetImp LevelIndexSetImp; @@ -528,8 +526,8 @@ namespace Dune //! type of collective communication object typedef typename Traits::CollectiveCommunication CollectiveCommunication; - typedef ALULeafCommunication< actualDim, actualDimw, elType, Comm > LeafCommunication; - typedef ALULevelCommunication< actualDim, actualDimw, elType, Comm > LevelCommunication; + typedef ALULeafCommunication< dim, dimworld, elType, Comm > LeafCommunication; + typedef ALULevelCommunication< dim, dimworld, elType, Comm > LevelCommunication; public: typedef MakeableInterfaceObject<typename Traits::template Codim<0>::Entity> EntityObject; @@ -563,7 +561,7 @@ namespace Dune typedef ALU3dGridHierarchicIterator< const ThisType > HierarchicIteratorImp; - typedef typename ALU3dImplTraits< actualDim, actualDimw, elType, Comm >::GitterImplType GitterImplType; + typedef typename ALU3dImplTraits< elType, Comm >::GitterImplType GitterImplType; //! max number of levels enum { @@ -585,7 +583,7 @@ namespace Dune public: typedef Comm MPICommunicatorType; - typedef ALU3dGridCommunications< actualDim, actualDimw, elType, Comm > Communications; + typedef ALU3dGridCommunications< dim, dimworld, elType, Comm > Communications; protected: typedef ALU3dGridVertexList< Comm > VertexListType; @@ -1036,7 +1034,7 @@ namespace Dune return leafVertexList_; } - int getLevelOfLeafVertex ( const typename ALU3dImplTraits< actualDim, actualDimw, elType, Comm >::VertexType &vertex ) const + int getLevelOfLeafVertex ( const typename ALU3dImplTraits< elType, Comm >::VertexType &vertex ) const { alugrid_assert ( leafVertexList_.up2Date() ); return leafVertexList_.getLevel(vertex); @@ -1239,26 +1237,26 @@ namespace Dune namespace Capabilities { - template< int actualDim, int actualDimw, ALU3dGridElementType elType, class Comm, int cdim > - struct hasEntity< Dune::ALU3dGrid< actualDim, actualDimw, elType, Comm >, cdim > + template< int dim, int dimworld, ALU3dGridElementType elType, class Comm, int cdim > + struct hasEntity< Dune::ALU3dGrid< dim, dimworld, elType, Comm >, cdim > { static const bool v = true; }; - template< int actualDim, int actualDimw, ALU3dGridElementType elType, class Comm > - struct isParallel< ALU3dGrid< actualDim, actualDimw, elType, Comm > > + template< int dim, int dimworld, ALU3dGridElementType elType, class Comm > + struct isParallel< ALU3dGrid< dim, dimworld, elType, Comm > > { static const bool v = true; }; - template< int actualDim, int actualDimw, ALU3dGridElementType elType, class Comm > - struct isLevelwiseConforming< ALU3dGrid< actualDim, actualDimw, elType, Comm > > + template< int dim, int dimworld, ALU3dGridElementType elType, class Comm > + struct isLevelwiseConforming< ALU3dGrid< dim, dimworld, elType, Comm > > { static const bool v = true; }; - template< int actualDim, int actualDimw, ALU3dGridElementType elType, class Comm > - struct hasBackupRestoreFacilities< ALU3dGrid< actualDim, actualDimw, elType, Comm > > + template< int dim, int dimworld, ALU3dGridElementType elType, class Comm > + struct hasBackupRestoreFacilities< ALU3dGrid< dim, dimworld, elType, Comm > > { static const bool v = true; }; diff --git a/dune/alugrid/3d/grid_imp.cc b/dune/alugrid/3d/grid_imp.cc index c6164b1ba..a4be1f632 100644 --- a/dune/alugrid/3d/grid_imp.cc +++ b/dune/alugrid/3d/grid_imp.cc @@ -52,7 +52,7 @@ namespace Dune typedef ALU3DSPACE ALU3dGridLevelIteratorWrapper< 0, Dune::All_Partition, Comm > ElementLevelIteratorType; typedef typename ElementLevelIteratorType :: val_t val_t; - typedef ALU3dImplTraits< GridType::actualDimension, GridType::actualDimensionWorld, elType, Comm > ImplTraits; + typedef ALU3dImplTraits< elType, Comm > ImplTraits; typedef typename ImplTraits::IMPLElementType IMPLElementType; typedef typename ImplTraits::VertexType VertexType; @@ -122,7 +122,7 @@ namespace Dune typedef ALU3DSPACE ALU3dGridLeafIteratorWrapper< 0, Dune::All_Partition, Comm > ElementIteratorType; typedef typename ElementIteratorType :: val_t val_t; - typedef ALU3dImplTraits< GridType::actualDimension, GridType::actualDimensionWorld, elType, Comm > ImplTraits; + typedef ALU3dImplTraits< elType, Comm > ImplTraits; typedef typename ImplTraits::IMPLElementType IMPLElementType; typedef typename ImplTraits::VertexType VertexType; @@ -316,7 +316,7 @@ namespace Dune IteratorType w (*this, maxLevel(), nlinks() ); typedef typename IteratorType :: val_t val_t ; - typedef typename ALU3dImplTraits< actualDim, actualDimw, elType, Comm >::IMPLElementType IMPLElementType; + typedef typename ALU3dImplTraits< elType, Comm >::IMPLElementType IMPLElementType; for (w.first () ; ! w.done () ; w.next ()) { @@ -483,7 +483,7 @@ namespace Dune IteratorType w (*this, maxLevel(), nlinks() ); typedef typename IteratorType::val_t val_t; - typedef typename ALU3dImplTraits< actualDim, actualDimw, elType, Comm >::IMPLElementType IMPLElementType; + typedef typename ALU3dImplTraits< elType, Comm >::IMPLElementType IMPLElementType; for (w.first () ; ! w.done () ; w.next ()) { @@ -631,7 +631,7 @@ namespace Dune alu_inline void ALU3dGrid< actualDim, actualDimw, elType, Comm >::checkMacroGrid () { - typedef typename ALU3dImplTraits< actualDim, actualDimw, elType, Comm >::HElementType HElementType; + typedef typename ALU3dImplTraits< elType, Comm >::HElementType HElementType; typedef ALU3DSPACE PureElementLeafIterator< HElementType > IteratorType; IteratorType w( this->myGrid() ); for (w->first () ; ! w->done () ; w->next ()) diff --git a/dune/alugrid/3d/indexsets.hh b/dune/alugrid/3d/indexsets.hh index ee4c978bb..0554e284d 100644 --- a/dune/alugrid/3d/indexsets.hh +++ b/dune/alugrid/3d/indexsets.hh @@ -20,7 +20,7 @@ namespace Dune // External Forward Declarations // ----------------------------- - template<int actualDim, int actualDimw, ALU3dGridElementType, class > + template<int dim, int dimworld, ALU3dGridElementType, class > class ALU3dGrid; template<int cd, int dim, class GridImp> @@ -32,16 +32,16 @@ namespace Dune // --------------------------- //! hierarchic index set of ALU3dGrid - template<int actualDim, int actualDimw, ALU3dGridElementType elType, class Comm > + template<int dim, int dimworld, ALU3dGridElementType elType, class Comm > class ALU3dGridHierarchicIndexSet - : public IndexSet< ALU3dGrid< actualDim, actualDimw, elType, Comm >, ALU3dGridHierarchicIndexSet< actualDim, actualDimw, elType, Comm > > + : public IndexSet< ALU3dGrid< dim, dimworld, elType, Comm >, ALU3dGridHierarchicIndexSet< dim, dimworld, elType, Comm > > { - typedef ALU3dGridHierarchicIndexSet< actualDim, actualDimw, elType, Comm > This; + typedef ALU3dGridHierarchicIndexSet< dim, dimworld, elType, Comm > This; - typedef ALU3dGrid< actualDim, actualDimw, elType, Comm > GridType; + typedef ALU3dGrid< dim, dimworld, elType, Comm > GridType; enum { numCodim = GridType::dimension + 1 }; - friend class ALU3dGrid<GridType::actualDimension, GridType::actualDimensionWorld, elType, Comm >; + friend class ALU3dGrid<dim, dimworld, elType, Comm >; // constructor ALU3dGridHierarchicIndexSet( const GridType &grid ) @@ -317,16 +317,16 @@ namespace Dune { // ALU3dGlobalIdSet // ---------------- - template<int actualDim, int actualDimw, ALU3dGridElementType elType, class Comm > + template<int dim, int dimworld, ALU3dGridElementType elType, class Comm > class ALU3dGridGlobalIdSet - : public IdSet< ALU3dGrid< actualDim, actualDimw, elType, Comm >, ALU3dGridGlobalIdSet< actualDim, actualDimw, elType, Comm >, - typename ALU3dGrid< actualDim, actualDimw, elType, Comm >::Traits::GlobalIdType >, + : public IdSet< ALU3dGrid< dim, dimworld, elType, Comm >, ALU3dGridGlobalIdSet< dim, dimworld, elType, Comm >, + typename ALU3dGrid< dim, dimworld, elType, Comm >::Traits::GlobalIdType >, public ALU3DSPACE AdaptRestrictProlongType { - typedef ALU3dGrid< actualDim, actualDimw, elType, Comm > GridType; + typedef ALU3dGrid< dim, dimworld, elType, Comm > GridType; typedef typename GridType::HierarchicIndexSet HierarchicIndexSetType; - typedef ALU3dImplTraits< actualDim, actualDimw, elType, Comm > ImplTraitsType; + typedef ALU3dImplTraits< elType, Comm > ImplTraitsType; typedef typename ImplTraitsType::IMPLElementType IMPLElementType; typedef typename ImplTraitsType::GEOElementType GEOElementType; typedef typename ImplTraitsType::GEOFaceType GEOFaceType; @@ -825,7 +825,7 @@ namespace Dune { alugrid_assert ( ids_[codim][vertex.getIndex()].isValid() ); } - friend class ALU3dGrid< GridType::actualDimension, GridType::actualDimensionWorld, elType, Comm >; + friend class ALU3dGrid< dim, dimworld, elType, Comm >; const IdType & getId(const IdType & macroId) const { @@ -969,18 +969,18 @@ namespace Dune { //*********************************************************** //! hierarchic index set of ALU3dGrid - template< int actualDim, int actualDimw, ALU3dGridElementType elType, class Comm > + template< int dim, int dimworld, ALU3dGridElementType elType, class Comm > class ALU3dGridLocalIdSet - : public IdSet< ALU3dGrid< actualDim, actualDimw, elType, Comm >, ALU3dGridLocalIdSet< actualDim, actualDimw, elType, Comm >, int >, + : public IdSet< ALU3dGrid< dim, dimworld, elType, Comm >, ALU3dGridLocalIdSet< dim, dimworld, elType, Comm >, int >, public ALU3DSPACE AdaptRestrictProlongType { - typedef ALU3dGridLocalIdSet< actualDim, actualDimw, elType, Comm > This; + typedef ALU3dGridLocalIdSet< dim, dimworld, elType, Comm > This; - typedef ALU3dImplTraits< actualDim, actualDimw, elType, Comm > ImplTraitsType; + typedef ALU3dImplTraits< elType, Comm > ImplTraitsType; typedef typename ImplTraitsType::HElementType HElementType; typedef typename ImplTraitsType::HBndSegType HBndSegType; - typedef ALU3dGrid< actualDim, actualDimw, elType, Comm > GridType; + typedef ALU3dGrid< dim, dimworld, elType, Comm > GridType; typedef typename GridType::HierarchicIndexSet HierarchicIndexSetType; // this means that only up to 300000000 entities are allowed @@ -994,7 +994,7 @@ namespace Dune { codimStart_[ codim ] = codim * codimMultiplier; } - friend class ALU3dGrid< GridType::actualDimension, GridType::actualDimensionWorld, elType, Comm >; + friend class ALU3dGrid< dim, dimworld, elType, Comm >; // fake method to have the same method like GlobalIdSet void updateIdSet() {} diff --git a/dune/alugrid/3d/iterator.cc b/dune/alugrid/3d/iterator.cc index 335bb39e7..c914313aa 100644 --- a/dune/alugrid/3d/iterator.cc +++ b/dune/alugrid/3d/iterator.cc @@ -8,6 +8,10 @@ #include "alu3dinclude.hh" #include "iterator.hh" +#ifndef alu_inline +#define alu_inline inline +#endif + namespace Dune { /************************************************************************* diff --git a/dune/alugrid/3d/iterator.hh b/dune/alugrid/3d/iterator.hh index a1ce67bb2..73cb9f022 100644 --- a/dune/alugrid/3d/iterator.hh +++ b/dune/alugrid/3d/iterator.hh @@ -57,7 +57,7 @@ class ALU3dGridIntersectionIterator typedef typename GridImp::MPICommunicatorType Comm; - typedef ALU3dImplTraits< GridImp::actualDimension, GridImp::actualDimensionWorld, GridImp::elementType, Comm > ImplTraits; + typedef ALU3dImplTraits< GridImp::elementType, Comm > ImplTraits; typedef typename ImplTraits::HElementType HElementType ; typedef typename ImplTraits::HBndSegType HBndSegType; @@ -67,17 +67,17 @@ class ALU3dGridIntersectionIterator typedef typename ImplTraits::NeighbourPairType NeighbourPairType; typedef typename ImplTraits::BNDFaceType BNDFaceType; - typedef typename ALU3dImplTraits< GridImp::actualDimension, GridImp::actualDimensionWorld, tetra, Comm >::GEOElementType GEOTetraElementType; - typedef typename ALU3dImplTraits< GridImp::actualDimension, GridImp::actualDimensionWorld, hexa, Comm >::GEOElementType GEOHexaElementType; - typedef typename ALU3dImplTraits< GridImp::actualDimension, GridImp::actualDimensionWorld, tetra, Comm >::BNDFaceType GEOTriangleBndType; - typedef typename ALU3dImplTraits< GridImp::actualDimension, GridImp::actualDimensionWorld, hexa, Comm >::BNDFaceType GEOQuadBndType; + typedef typename ALU3dImplTraits< tetra, Comm >::GEOElementType GEOTetraElementType; + typedef typename ALU3dImplTraits< tetra, Comm >::BNDFaceType GEOTriangleBndType; + typedef typename ALU3dImplTraits< hexa, Comm >::GEOElementType GEOHexaElementType; + typedef typename ALU3dImplTraits< hexa, Comm >::BNDFaceType GEOQuadBndType; - typedef ALU3dGridFaceInfo< GridImp::actualDimension, GridImp::actualDimensionWorld, GridImp::elementType, Comm > FaceInfoType; + typedef ALU3dGridFaceInfo< dim, dimworld, GridImp::elementType, Comm > FaceInfoType; typedef typename conditional< tetra == GridImp::elementType, - ALU3dGridGeometricFaceInfoTetra< GridImp::actualDimension, GridImp::actualDimensionWorld, Comm >, - ALU3dGridGeometricFaceInfoHexa< GridImp::actualDimension, GridImp::actualDimensionWorld, Comm > >::type GeometryInfoType; + ALU3dGridGeometricFaceInfoTetra< dim, dimworld, Comm >, + ALU3dGridGeometricFaceInfoHexa< dim, dimworld, Comm > >::type GeometryInfoType; typedef ElementTopologyMapping<GridImp::elementType> ElementTopo; typedef FaceTopologyMapping<GridImp::elementType> FaceTopo; @@ -252,18 +252,18 @@ protected: void buildLocalGeometries() const; // get the face corresponding to the index - const typename ALU3dImplTraits< GridImp::actualDimension, GridImp::actualDimensionWorld, tetra, Comm >::GEOFaceType * + const typename ALU3dImplTraits< tetra, Comm >::GEOFaceType * getFace ( const GEOTriangleBndType &bnd, int index ) const; // get the face corresponding to the index - const typename ALU3dImplTraits< GridImp::actualDimension, GridImp::actualDimensionWorld, hexa, Comm >::GEOFaceType * + const typename ALU3dImplTraits< hexa, Comm >::GEOFaceType * getFace ( const GEOQuadBndType &bnd, int index ) const; // get the face corresponding to the index - const typename ALU3dImplTraits< GridImp::actualDimension, GridImp::actualDimensionWorld, tetra, Comm >::GEOFaceType * + const typename ALU3dImplTraits< tetra, Comm >::GEOFaceType * getFace ( const GEOTetraElementType &elem, int index ) const; - const typename ALU3dImplTraits< GridImp::actualDimension, GridImp::actualDimensionWorld, hexa, Comm >::GEOFaceType * + const typename ALU3dImplTraits< hexa, Comm >::GEOFaceType * getFace ( const GEOHexaElementType &elem, int index ) const; //! structure containing the topological and geometrical information about @@ -300,7 +300,7 @@ public ALU3dGridIntersectionIterator<GridImp> typedef typename GridImp::MPICommunicatorType Comm; - typedef ALU3dImplTraits< GridImp::actualDimension, GridImp::actualDimensionWorld, GridImp::elementType, Comm > ImplTraits; + typedef ALU3dImplTraits< GridImp::elementType, Comm > ImplTraits; typedef typename ImplTraits::HElementType HElementType ; typedef typename ImplTraits::GEOElementType GEOElementType; @@ -309,12 +309,12 @@ public ALU3dGridIntersectionIterator<GridImp> typedef typename ImplTraits::NeighbourPairType NeighbourPairType; typedef typename ImplTraits::BNDFaceType BNDFaceType; - typedef ALU3dGridFaceInfo<GridImp::actualDimension, GridImp::actualDimensionWorld, GridImp::elementType, Comm > FaceInfoType; + typedef ALU3dGridFaceInfo< dim, dimworld, GridImp::elementType, Comm > FaceInfoType; typedef typename conditional< tetra == GridImp::elementType, - ALU3dGridGeometricFaceInfoTetra< GridImp::actualDimension, GridImp::actualDimensionWorld, Comm >, - ALU3dGridGeometricFaceInfoHexa< GridImp::actualDimension, GridImp::actualDimensionWorld, Comm > >::type GeometryInfoType; + ALU3dGridGeometricFaceInfoTetra< dim, dimworld, Comm >, + ALU3dGridGeometricFaceInfoHexa< dim, dimworld, Comm > >::type GeometryInfoType; typedef ElementTopologyMapping<GridImp::elementType> ElementTopo; typedef FaceTopologyMapping<GridImp::elementType> FaceTopo; @@ -519,7 +519,7 @@ class ALU3dGridLevelIterator friend class ALU3dGridEntity<2,dim,GridImp>; friend class ALU3dGridEntity<1,dim,GridImp>; friend class ALU3dGridEntity<0,dim,GridImp>; - friend class ALU3dGrid< GridImp::actualDimension, GridImp::actualDimensionWorld, GridImp::elementType, Comm >; + friend class ALU3dGrid< dim, dimworld, GridImp::elementType, Comm >; friend class ALU3dGridTreeIterator< ALU3DSPACE ALU3dGridLevelIteratorWrapper< cd, pitype, Comm > >; @@ -668,7 +668,7 @@ class ALU3dGridHierarchicIterator typedef typename GridImp::MPICommunicatorType Comm; - typedef ALU3dImplTraits< GridImp::actualDimension, GridImp::actualDimensionWorld, GridImp::elementType, Comm > ImplTraits; + typedef ALU3dImplTraits< GridImp::elementType, Comm > ImplTraits; typedef typename ImplTraits::HElementType HElementType; typedef typename ImplTraits::HBndSegType HBndSegType; diff --git a/dune/alugrid/3d/iterator_imp.cc b/dune/alugrid/3d/iterator_imp.cc index 81b0034d9..b502751fa 100644 --- a/dune/alugrid/3d/iterator_imp.cc +++ b/dune/alugrid/3d/iterator_imp.cc @@ -410,7 +410,7 @@ inline void ALU3dGridIntersectionIterator< GridImp >::buildLocalGeometries() con } template <class GridImp> -inline const typename ALU3dImplTraits< GridImp::actualDimension, GridImp::actualDimensionWorld, tetra, typename GridImp::MPICommunicatorType >::GEOFaceType * +inline const typename ALU3dImplTraits< tetra, typename GridImp::MPICommunicatorType >::GEOFaceType * ALU3dGridIntersectionIterator<GridImp>:: getFace(const GEOTriangleBndType& bnd, int index) const { @@ -418,7 +418,7 @@ getFace(const GEOTriangleBndType& bnd, int index) const } template <class GridImp> -inline const typename ALU3dImplTraits< GridImp::actualDimension, GridImp::actualDimensionWorld, hexa, typename GridImp::MPICommunicatorType >::GEOFaceType * +inline const typename ALU3dImplTraits< hexa, typename GridImp::MPICommunicatorType >::GEOFaceType * ALU3dGridIntersectionIterator<GridImp>:: getFace(const GEOQuadBndType& bnd, int index) const { @@ -426,7 +426,7 @@ getFace(const GEOQuadBndType& bnd, int index) const } template <class GridImp> -inline const typename ALU3dImplTraits< GridImp::actualDimension, GridImp::actualDimensionWorld, tetra, typename GridImp::MPICommunicatorType >::GEOFaceType * +inline const typename ALU3dImplTraits< tetra, typename GridImp::MPICommunicatorType >::GEOFaceType * ALU3dGridIntersectionIterator<GridImp>:: getFace(const GEOTetraElementType& elem, int index) const { alugrid_assert (index >= 0 && index < numFaces); @@ -434,7 +434,7 @@ getFace(const GEOTetraElementType& elem, int index) const { } template <class GridImp> -inline const typename ALU3dImplTraits< GridImp::actualDimension, GridImp::actualDimensionWorld, hexa, typename GridImp::MPICommunicatorType >::GEOFaceType * +inline const typename ALU3dImplTraits< hexa, typename GridImp::MPICommunicatorType >::GEOFaceType * ALU3dGridIntersectionIterator<GridImp>:: getFace(const GEOHexaElementType& elem, int index) const { alugrid_assert (index >= 0 && index < numFaces); diff --git a/dune/alugrid/3d/mappings.hh b/dune/alugrid/3d/mappings.hh index 283de44df..5aa7005f1 100644 --- a/dune/alugrid/3d/mappings.hh +++ b/dune/alugrid/3d/mappings.hh @@ -390,7 +390,7 @@ namespace Dune { { public: typedef FieldVector< alu3d_ctype, 3 > CoordinateType; - typedef typename ALU3dImplTraits< actualDim, actualDimw, tetra, Comm >::HfaceRuleType RefinementRuleType; + typedef typename ALU3dImplTraits< tetra, Comm >::HfaceRuleType RefinementRuleType; NonConformingFaceMapping ( RefinementRuleType rule, int nChild ) : rule_( rule ), nChild_( nChild ) @@ -423,7 +423,7 @@ namespace Dune { { public: typedef FieldVector< alu3d_ctype, 2 > CoordinateType; - typedef typename ALU3dImplTraits< actualDim, actualDimw, hexa, Comm >::HfaceRuleType RefinementRuleType; + typedef typename ALU3dImplTraits< hexa, Comm >::HfaceRuleType RefinementRuleType; NonConformingFaceMapping ( RefinementRuleType rule, int nChild ) : rule_( rule ), nChild_( nChild ) diff --git a/dune/alugrid/impl/serial/gitter_sti.cc b/dune/alugrid/impl/serial/gitter_sti.cc index 9553d6c20..ddae4529c 100644 --- a/dune/alugrid/impl/serial/gitter_sti.cc +++ b/dune/alugrid/impl/serial/gitter_sti.cc @@ -455,7 +455,7 @@ namespace ALUGrid { for (w->first (); ! w->done (); w->next ()) { - element_t* item = ((element_t *) &w->item ()); + element_t* item = ((element_t *) &w->item ()); // store vertices for (int i=0; i < elementVertices; ++i ) { @@ -482,7 +482,7 @@ namespace ALUGrid for (w->first (); ! w->done (); w->next ()) { element_t* item = ((element_t *) &w->item ()); - // vtuFile << item->getIndex() << " "; + // vtuFile << item->getIndex() << " "; bool ok = true; const int nFaces = item->nFaces(); for (int k=0; k < nFaces; ++k ) @@ -520,7 +520,7 @@ namespace ALUGrid { for (wbnd->first (); ! wbnd->done (); wbnd->next ()) { - bndseg* item = ((bndseg *) &wbnd->item ()); + bndseg* item = ((bndseg *) &wbnd->item ()); bool ok = true; ok &= item->myhface(0)->nb.front().first->isRealObject(); ok &= item->myhface(0)->nb.rear().first->isRealObject(); @@ -585,21 +585,21 @@ namespace ALUGrid for (w->first (); ! w->done (); w->next ()) { element_t* item = ((element_t *) &w->item ()); - for (int i=0; i<elementVertices; ++i) - { - vtuFile << " " << vertexList[ item->myvertex(i)->getIndex() ].first; - } + for (int i=0; i<elementVertices; ++i) + { + vtuFile << " " << vertexList[ item->myvertex(i)->getIndex() ].first; + } } if (showbnd) { for (wbnd->first (); ! wbnd->done (); wbnd->next ()) { - bndseg* item = ((bndseg *) &wbnd->item ()); - for (int i=0; i<nFaceVertices; ++i) - { - vtuFile << " " << vertexList[ item->myvertex(0,i)->getIndex() ].first; - } + bndseg* item = ((bndseg *) &wbnd->item ()); + for (int i=0; i<nFaceVertices; ++i) + { + vtuFile << " " << vertexList[ item->myvertex(0,i)->getIndex() ].first; + } } } @@ -607,11 +607,11 @@ namespace ALUGrid { for (wface->first (); ! wface->done (); wface->next ()) { - myhface_t* item = ((myhface_t *) &wface->item ()); - for (int i=0; i<nFaceVertices; ++i) - { - vtuFile << " " << vertexList[ item->myvertex(i)->getIndex() ].first; - } + myhface_t* item = ((myhface_t *) &wface->item ()); + for (int i=0; i<nFaceVertices; ++i) + { + vtuFile << " " << vertexList[ item->myvertex(i)->getIndex() ].first; + } } } vtuFile << std::endl; @@ -623,15 +623,15 @@ namespace ALUGrid for( int i = 0; i < nCells; ++i ) { - vtuFile << " " << (i+1)* elementVertices; + vtuFile << " " << (i+1)* elementVertices; } for( int i = 0; i < nBnd; ++i ) { - vtuFile << " " << nCells* elementVertices + (i+1)* nFaceVertices; + vtuFile << " " << nCells* elementVertices + (i+1)* nFaceVertices; } for( int i = 0; i < nFaces; ++i ) { - vtuFile << " " << nCells*elementVertices + nBnd*nFaceVertices + (i+1)*nFaceVertices; + vtuFile << " " << nCells*elementVertices + nBnd*nFaceVertices + (i+1)*nFaceVertices; } vtuFile << std::endl; @@ -645,17 +645,17 @@ namespace ALUGrid const int elemId = ( elementVertices == 4 ) ? 10 : 12; for( int i = 0; i < nCells; ++i ) { - vtuFile << " " << elemId; + vtuFile << " " << elemId; } // 5 for triangle, 9 for quadrilateral const int faceId = ( nFaceVertices == 3 ) ? 5 : 9; for( int i = 0; i < nBnd; ++i ) { - vtuFile << " " << faceId; + vtuFile << " " << faceId; } for( int i = 0; i < nFaces; ++i ) { - vtuFile << " " << faceId; + vtuFile << " " << faceId; } vtuFile << std::endl; diff --git a/dune/alugrid/test/test-alugrid.cc b/dune/alugrid/test/test-alugrid.cc index 05b5c19a4..53bae8010 100644 --- a/dune/alugrid/test/test-alugrid.cc +++ b/dune/alugrid/test/test-alugrid.cc @@ -623,12 +623,14 @@ int main (int argc , char **argv) { //GridType grid("alu2d.triangle", &bndPrj ); //checkALUSerial(grid,2); + /* typedef Dune::ALUGrid< 2, 3, Dune::cube, Dune::nonconforming > SurfaceGridType; std::string surfaceFilename( "./dgf/cube-testgrid-2-3.dgf" ); std::cout << "READING from '" << surfaceFilename << "'..." << std::endl; Dune::GridPtr< SurfaceGridType > surfaceGridPtr( surfaceFilename ); checkCapabilities< false >( *surfaceGridPtr ); checkALUSerial( *surfaceGridPtr, 1, display ); + */ } // check non-conform ALUGrid for 2d @@ -645,12 +647,14 @@ int main (int argc , char **argv) { //GridType grid("alu2d.triangle", &bndPrj ); //checkALUSerial(grid,2); + /* typedef Dune::ALUGrid< 2, 3, Dune::simplex, Dune::nonconforming > SurfaceGridType; std::string surfaceFilename( "./dgf/simplex-testgrid-2-3.dgf" ); std::cout << "READING from '" << surfaceFilename << "'..." << std::endl; Dune::GridPtr< SurfaceGridType > surfaceGridPtr( surfaceFilename ); checkCapabilities< false >( *surfaceGridPtr ); checkALUSerial( *surfaceGridPtr, 1, display ); + */ } // check conform ALUGrid for 2d @@ -666,6 +670,7 @@ int main (int argc , char **argv) { //GridType grid("alu2d.triangle", &bndPrj ); //checkALUSerial(grid,2); + /* typedef Dune::ALUGrid< 2, 3, Dune::simplex, Dune::conforming > SurfaceGridType; //typedef ALUConformGrid< 2, 3 > SurfaceGridType; std::string surfaceFilename( "./dgf/simplex-testgrid-2-3.dgf" ); @@ -673,6 +678,7 @@ int main (int argc , char **argv) { Dune::GridPtr< SurfaceGridType > surfaceGridPtr( surfaceFilename ); checkCapabilities< true >( *surfaceGridPtr ); checkALUSerial( *surfaceGridPtr, 1, display ); + */ } #endif // #ifndef NO_2D -- GitLab