/usr/include/dune/grid/albertagrid/datahandle.hh is in libdune-grid-dev 2.2.1-2.
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 | #ifndef DUNE_ALBERTAGRIDDATAHANDLE_HH
#define DUNE_ALBERTAGRIDDATAHANDLE_HH
#include <iostream>
#include <dune/grid/common/grid.hh>
#include <dune/grid/albertagrid/misc.hh>
#include <dune/grid/albertagrid/albertaheader.hh>
#include <dune/grid/albertagrid/elementinfo.hh>
#include <dune/grid/albertagrid/refinement.hh>
#if HAVE_ALBERTA
namespace Dune
{
namespace Alberta
{
template< class Grid, class RestrictProlongOperator >
class AdaptRestrictProlongHandler
{
static const int dimension = Grid::dimension;
typedef typename Grid::template Codim< 0 >::Entity Entity;
typedef Dune::MakeableInterfaceObject< Entity > EntityObject;
typedef typename EntityObject::ImplementationType EntityImp;
typedef Alberta::ElementInfo< dimension > ElementInfo;
typedef Alberta::Patch< dimension > Patch;
Grid &grid_;
RestrictProlongOperator &rpOp_;
EntityObject father_;
public:
AdaptRestrictProlongHandler ( Grid &grid, RestrictProlongOperator &rpOp )
: grid_( grid ),
rpOp_( rpOp ),
father_( EntityImp( grid_ ) )
{}
void restrictLocal ( const Patch &patch, int i )
{
ElementInfo fatherInfo = patch.elementInfo( i, grid_.levelProvider() );
Grid::getRealImplementation( father_ ).setElement( fatherInfo, 0 );
rpOp_.preCoarsening( (const Entity &)father_ );
}
void prolongLocal ( const Patch &patch, int i )
{
ElementInfo fatherInfo = patch.elementInfo( i, grid_.levelProvider() );
Grid::getRealImplementation( father_ ).setElement( fatherInfo, 0 );
rpOp_.postRefinement( (const Entity &)father_ );
}
};
}
}
#endif // #if HAVE_ALBERTA
#endif
|