/usr/include/dune/grid/alugrid/2d/datahandle.hh is in libdune-grid-dev 2.3.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
#ifndef DUNE_ALU2DGRIDDATAHANDLE_HH
#define DUNE_ALU2DGRIDDATAHANDLE_HH
//- system includes
#include <iostream>
#include <dune/grid/common/adaptcallback.hh>
//- local includes
#include "alu2dinclude.hh"
using std::endl;
using std::cout;
using std::flush;
namespace ALU2DSPACENAME
{
/////////////////////////////////////////////////////////////////
//
// --AdaptRestrictProlong
//
/////////////////////////////////////////////////////////////////
template< class GridType, class AdaptDataHandle >
class AdaptRestrictProlong2dImpl
: public AdaptRestrictProlong2d ALU2DDIMWORLD( GridType::dimensionworld, GridType::elementType )
{
GridType & grid_;
typedef Dune :: MakeableInterfaceObject<typename GridType::template Codim<0>::Entity> EntityType;
typedef typename EntityType :: ImplementationType RealEntityType;
typedef typename Dune::ALU2dImplTraits< GridType::dimensionworld, GridType::elementType >::HElementType HElementType ;
EntityType & reFather_;
EntityType & reSon_;
RealEntityType & realFather_;
RealEntityType & realSon_;
AdaptDataHandle &rp_;
int maxlevel_;
public:
//! Constructor
AdaptRestrictProlong2dImpl ( GridType &grid,
EntityType &f, RealEntityType &rf,
EntityType &s, RealEntityType &rs,
AdaptDataHandle &rp )
: grid_(grid)
, reFather_(f)
, reSon_(s)
, realFather_(rf)
, realSon_(rs)
, rp_(rp)
, maxlevel_(-1)
{}
virtual ~AdaptRestrictProlong2dImpl ()
{}
//! restrict data , elem is always the father
int preCoarsening ( HElementType &father )
{
maxlevel_ = std::max( maxlevel_, father.level() );
//father.resetRefinedTag();
realFather_.setElement( father );
rp_.preCoarsening( reFather_ );
return 0;
}
//! prolong data, elem is the father
int postRefinement ( HElementType &father )
{
maxlevel_ = std::max( maxlevel_, father.level()+1 );
//father.resetRefinedTag();
realFather_.setElement( father );
rp_.postRefinement( reFather_ );
return 0;
}
int maxLevel () const { return maxlevel_; }
};
} // namespace ALU2DSPACENAME
#endif // #ifndef DUNE_ALU2DGRIDDATAHANDLE_HH
|