Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-istl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Core Modules
dune-istl
Commits
a8ddd5fa
Commit
a8ddd5fa
authored
19 years ago
by
Markus Blatt
Browse files
Options
Downloads
Patches
Plain Diff
Some documentation for IndexInfoFromGrid.
[[Imported from SVN: r449]]
parent
a66cd051
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
istl/owneroverlapcopy.hh
+52
-6
52 additions, 6 deletions
istl/owneroverlapcopy.hh
with
52 additions
and
6 deletions
istl/owneroverlapcopy.hh
+
52
−
6
View file @
a8ddd5fa
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
// $Id$
#ifndef DUNE_OWNERCOPY_HH
#define DUNE_OWNERCOPY_HH
...
...
@@ -34,23 +35,44 @@ namespace Dune {
@{
*/
/**
* @brief A class setting up standard communication for a two-valued
attribute set with owner/overlap/copy semantics.
*/
class
OwnerOverlapCopyAttributeSet
{
enum
AttributeSet
{
owner
=
1
,
overlap
=
2
,
copy
=
0
};
enum
AttributeSet
{
owner
=
1
,
overlap
=
2
,
copy
=
0
};
};
template
<
class
G
lobalIdType
,
class
LocalIdType
>
template
<
class
G
,
class
LocalIdType
>
class
IndexInfoFromGrid
{
public:
/** @brief The type of the global index. */
typedef
G
GlobalIdType
/** @brief The type of the local index. */
typedef
L
LocalIdType
;
/**
* @brief A triple describing a local index.
*
* The triple consists of the global index and the local
* index and an attribute
*/
typedef
tripel
<
GlobalIdType
,
LocalIdType
,
int
>
IndexTripel
;
/**
* @brief A triple describing a remote index.
*
* The triple consists of a process number and the global index and
* the attribute of the index at the remote process.
*/
typedef
tripel
<
int
,
GlobalIdType
,
int
>
RemoteIndexTripel
;
/**
* @brief Add a new index triple to the set of local indices.
*
* @param x The index triple.
*/
void
addLocalIndex
(
const
IndexTripel
&
x
)
{
if
(
x
.
third
!=
OwnerOverlapCopyAttributeSet
::
owner
&&
...
...
@@ -59,6 +81,12 @@ namespace Dune {
DUNE_THROW
(
ISTLError
,
"OwnerOverlapCopyCommunication: global index not in index set"
);
localindices
.
insert
(
x
);
}
/**
* @brief Add a new remote index triple to the set of remote indices.
*
* @param x The index triple to add.
*/
void
addRemoteIndex
(
const
RemoteIndexTripel
&
x
)
{
if
(
x
.
third
!=
OwnerOverlapCopyAttributeSet
::
owner
&&
...
...
@@ -68,16 +96,27 @@ namespace Dune {
remoteindices
.
insert
(
x
);
}
/**
* @brief Get the set of indices local to the process.
* @return The set of local indices.
*/
const
std
::
set
<
IndexTripel
>&
localIndices
()
const
{
return
localindices
;
}
/**
* @brief Get the set of remote indices.
* @return the set of remote indices.
*/
const
std
::
set
<
RemoteIndexTripel
>&
remoteIndices
()
const
{
return
remoteindices
;
}
/**
* @brief Remove all indices from the sets.
*/
void
clear
()
{
localindices
.
clear
();
...
...
@@ -85,13 +124,20 @@ namespace Dune {
}
private
:
/** @brief The set of local indices. */
std
::
set
<
IndexTripel
>
localindices
;
/** @brief The set of remote indices. */
std
::
set
<
RemoteIndexTripel
>
remoteindices
;
};
#if HAVE_MPI
/**
* @brief A class setting up standard communication for a two-valued
attribute set with owner/overlap/copy semantics.
*/
// set up communication from known distribution with owner/overlap/copy semantics
template
<
class
GlobalIdType
,
class
LocalIdType
>
class
OwnerOverlapCopyCommunication
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment