dune-grid
2.11
Toggle main menu visibility
Loading...
Searching...
No Matches
dune
grid
albertagrid
albertagrid/datahandle.hh
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
2
// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
3
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
4
// vi: set et ts=4 sw=2 sts=2:
5
#ifndef DUNE_ALBERTAGRIDDATAHANDLE_HH
6
#define DUNE_ALBERTAGRIDDATAHANDLE_HH
7
8
#include <iostream>
9
10
#include <
dune/grid/common/grid.hh
>
11
12
#include <
dune/grid/albertagrid/misc.hh
>
13
#include <
dune/grid/albertagrid/albertaheader.hh
>
14
#include <
dune/grid/albertagrid/elementinfo.hh
>
15
#include <
dune/grid/albertagrid/refinement.hh
>
16
17
#if HAVE_ALBERTA
18
19
namespace
Dune
20
{
21
22
namespace
Alberta
23
{
24
25
template
<
class
Gr
id
,
class
RestrictPro
long
Operator >
26
class
AdaptRestrictProlongHandler
27
{
28
static
const
int
dimension =
Grid::dimension
;
29
30
typedef
typename
Grid::template Codim< 0 >::Entity Entity;
31
typedef
Dune::MakeableInterfaceObject< Entity >
EntityObject;
32
typedef
typename
EntityObject::ImplementationType
EntityImp;
33
34
typedef
Alberta::ElementInfo< dimension >
ElementInfo;
35
typedef
Alberta::Patch< dimension >
Patch;
36
37
Grid
&grid_;
38
RestrictProlongOperator &rpOp_;
39
EntityObject father_;
40
41
public
:
42
AdaptRestrictProlongHandler
(
Grid
&grid, RestrictProlongOperator &rpOp )
43
: grid_( grid ),
44
rpOp_( rpOp ),
45
father_( EntityImp( grid_ ) )
46
{}
47
48
void
restrictLocal
(
const
Patch &patch,
int
i )
49
{
50
ElementInfo fatherInfo = patch.
elementInfo
( i, grid_.levelProvider() );
51
father_.impl().setElement( fatherInfo, 0 );
52
rpOp_.preCoarsening( (
const
Entity &)father_ );
53
}
54
55
void
prolongLocal
(
const
Patch &patch,
int
i )
56
{
57
ElementInfo fatherInfo = patch.
elementInfo
( i, grid_.levelProvider() );
58
father_.impl().setElement( fatherInfo, 0 );
59
rpOp_.postRefinement( (
const
Entity &)father_ );
60
}
61
};
62
63
}
64
65
}
66
67
#endif
// #if HAVE_ALBERTA
68
69
#endif
albertaheader.hh
elementinfo.hh
provides a wrapper for ALBERTA's el_info structure
misc.hh
refinement.hh
provides a wrapper for ALBERTA's refinement patches and the corners for geometryInFather
Dune
Include standard header files.
Definition
agrid.hh:60
Dune::Alberta
Definition
albertagrid.cc:23
Dune::Alberta::AdaptRestrictProlongHandler::AdaptRestrictProlongHandler
AdaptRestrictProlongHandler(Grid &grid, RestrictProlongOperator &rpOp)
Definition
albertagrid/datahandle.hh:42
Dune::Alberta::AdaptRestrictProlongHandler::restrictLocal
void restrictLocal(const Patch &patch, int i)
Definition
albertagrid/datahandle.hh:48
Dune::Alberta::AdaptRestrictProlongHandler::prolongLocal
void prolongLocal(const Patch &patch, int i)
Definition
albertagrid/datahandle.hh:55
Dune::Alberta::ElementInfo< dimension >
Dune::Alberta::Patch< dimension >
Dune::Alberta::Patch::elementInfo
ElementInfo elementInfo(int i, const LevelProvider &levelProvider) const
Definition
refinement.hh:105
Dune::Grid
Grid abstract base class.
Definition
common/grid.hh:375
Dune::Grid::dimension
static constexpr int dimension
The dimension of the grid.
Definition
common/grid.hh:387
Dune::MakeableInterfaceObject< Entity >
Dune::MakeableInterfaceObject< Entity >::ImplementationType
Entity::Implementation ImplementationType
Definition
common/grid.hh:1122
grid.hh
Different resources needed by all grid implementations.
Generated by
1.17.0