Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dumux
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
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
dumux-repositories
dumux
Commits
573457da
Commit
573457da
authored
5 years ago
by
Timo Koch
Browse files
Options
Downloads
Patches
Plain Diff
[test][disc] Fix and improve toroid rotation symmetric grid geometry test
parent
486db375
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1832
Rotationsymmetry: Fix bug to rotate around second axis
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/discretization/rotationsymmetry/test_rotationsymmetric_gridgeometry.cc
+13
-10
13 additions, 10 deletions
...n/rotationsymmetry/test_rotationsymmetric_gridgeometry.cc
with
13 additions
and
10 deletions
test/discretization/rotationsymmetry/test_rotationsymmetric_gridgeometry.cc
+
13
−
10
View file @
573457da
...
...
@@ -140,8 +140,9 @@ int main (int argc, char *argv[]) try
// make a grid
const
double
innerRadius
=
0.1
;
const
double
outerRadius
=
1.0
;
GlobalPosition
lower
({
innerRadius
,
innerRadius
});
GlobalPosition
upper
({
outerRadius
,
outerRadius
});
const
double
height
=
0.5
;
GlobalPosition
lower
({
innerRadius
,
0
});
GlobalPosition
upper
({
outerRadius
,
height
});
std
::
array
<
unsigned
int
,
Grid
::
dimension
>
els
({
20
,
20
});
std
::
shared_ptr
<
Grid
>
grid
=
Dune
::
StructuredGridFactory
<
Grid
>::
createCubeGrid
(
lower
,
upper
,
els
);
...
...
@@ -152,9 +153,9 @@ int main (int argc, char *argv[]) try
// compute the annulus area and the surface
const
auto
centroidRadius
=
0.5
*
(
innerRadius
+
outerRadius
);
const
auto
s
id
e
=
(
outerRadius
-
innerRadius
);
const
double
refVolume
=
side
*
side
*
2.0
*
M_PI
*
centroidRadius
;
const
double
refSurface
=
4
.0
*
side
*
2.0
*
M_PI
*
centroidRadius
;
const
auto
w
id
th
=
(
outerRadius
-
innerRadius
);
const
double
refVolume
=
height
*
width
*
2.0
*
M_PI
*
centroidRadius
;
const
double
refSurface
=
(
2
.0
*
height
+
2.0
*
width
)
*
2.0
*
M_PI
*
centroidRadius
;
runTest
(
gg
,
refVolume
,
refSurface
);
std
::
cout
<<
"Successfully tested toroid policy."
<<
std
::
endl
;
...
...
@@ -170,9 +171,11 @@ int main (int argc, char *argv[]) try
// make a grid
const
double
innerRadius
=
0.0
;
const
double
outerRadius
=
1.0
;
GlobalPosition
lower
({
innerRadius
,
innerRadius
});
GlobalPosition
upper
({
outerRadius
,
outerRadius
});
const
double
outerRadius
=
1.1
;
const
double
minY
=
-
0.25
;
const
double
height
=
0.5
;
GlobalPosition
lower
({
innerRadius
,
minY
});
GlobalPosition
upper
({
outerRadius
,
minY
+
height
});
std
::
array
<
unsigned
int
,
Grid
::
dimension
>
els
({
20
,
20
});
std
::
shared_ptr
<
Grid
>
grid
=
Dune
::
StructuredGridFactory
<
Grid
>::
createCubeGrid
(
lower
,
upper
,
els
);
...
...
@@ -182,8 +185,8 @@ int main (int argc, char *argv[]) try
gg
.
update
();
// compute the annulus area and the surface
const
double
refVolume
=
outerRadius
*
M_PI
*
outerRadius
*
outerRadius
;
const
double
refSurface
=
2.0
*
M_PI
*
outerRadius
+
2.0
*
M_PI
*
outerRadius
*
outerRadius
;
const
double
refVolume
=
height
*
M_PI
*
outerRadius
*
outerRadius
;
const
double
refSurface
=
2.0
*
M_PI
*
outerRadius
*
height
+
2.0
*
M_PI
*
outerRadius
*
outerRadius
;
runTest
(
gg
,
refVolume
,
refSurface
);
std
::
cout
<<
"Successfully tested toroid policy for perfect cylinder."
<<
std
::
endl
;
...
...
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