Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-alugrid
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
ag-ohlberger
dune-community
dune-alugrid
Commits
7a080856
Commit
7a080856
authored
9 years ago
by
Robert K
Browse files
Options
Downloads
Patches
Plain Diff
[cleanup] use function pointer.
parent
f09ef113
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/alugrid/common/hsfc.hh
+8
-13
8 additions, 13 deletions
dune/alugrid/common/hsfc.hh
with
8 additions
and
13 deletions
dune/alugrid/common/hsfc.hh
+
8
−
13
View file @
7a080856
...
...
@@ -32,11 +32,16 @@ namespace Dune {
typedef
Dune
::
CollectiveCommunication
<
typename
MPIHelper
::
MPICommunicator
>
CollectiveCommunication
;
// type of Zoltan HSFC ordering function
typedef
double
zoltan_hsfc_inv_t
(
Zoltan_Struct
*
zz
,
double
*
coord
);
static
const
int
dimension
=
Coordinate
::
dimension
;
Coordinate
lower_
;
Coordinate
length_
;
const
zoltan_hsfc_inv_t
*
hsfcInv_
;
mutable
Zoltan
zz_
;
public:
...
...
@@ -46,6 +51,7 @@ namespace Dune {
CollectiveCommunication
(
Dune
::
MPIHelper
::
getCommunicator
()
)
)
:
lower_
(
lower
),
length_
(
upper
),
hsfcInv_
(
dimension
==
3
?
Zoltan_HSFC_InvHilbert3d
:
Zoltan_HSFC_InvHilbert2d
),
zz_
(
comm
)
{
// compute length
...
...
@@ -62,19 +68,8 @@ namespace Dune {
for
(
int
d
=
0
;
d
<
dimension
;
++
d
)
center
[
d
]
=
(
point
[
d
]
-
lower_
[
d
])
/
length_
[
d
];
if
(
dimension
==
3
)
{
return
Zoltan_HSFC_InvHilbert3d
(
zz_
.
Get_C_Handle
(),
&
center
[
0
]
);
}
else
if
(
dimension
==
2
)
{
return
Zoltan_HSFC_InvHilbert2d
(
zz_
.
Get_C_Handle
(),
&
center
[
0
]
);
}
else
{
DUNE_THROW
(
NotImplemented
,
"Zoltan_HSFC_InvHilbert"
<<
dimension
<<
"d not available!"
);
return
0.0
;
}
// return hsfc index in interval [0,1]
return
hsfcInv_
(
zz_
.
Get_C_Handle
(),
&
center
[
0
]
);
}
};
...
...
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