Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-fufem
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
Container registry
Model registry
Operate
Environments
Monitor
Incidents
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ansgar Burchardt
dune-fufem
Commits
af6aba82
Commit
af6aba82
authored
Sep 3, 2015
by
Elias Pipping
Browse files
Options
Downloads
Patches
Plain Diff
Revert "Cover dune-spgrid in unit tests, too"
This reverts commit
7712aa63
.
parent
903d14da
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
dune.module
+1
-1
1 addition, 1 deletion
dune.module
dune/fufem/test/common.hh
+14
-46
14 additions, 46 deletions
dune/fufem/test/common.hh
with
15 additions
and
47 deletions
dune.module
+
1
−
1
View file @
af6aba82
...
@@ -2,4 +2,4 @@ Module: dune-fufem
...
@@ -2,4 +2,4 @@ Module: dune-fufem
Depends
:
dune
-
common
(
>=
2.4
)
dune
-
geometry
(
>=
2.4
)
dune
-
grid
(
>=
2.4
)
dune
-
istl
(
>=
2.4
)
dune
-
localfunctions
(
>=
2.4
)
dune
-
functions
Depends
:
dune
-
common
(
>=
2.4
)
dune
-
geometry
(
>=
2.4
)
dune
-
grid
(
>=
2.4
)
dune
-
istl
(
>=
2.4
)
dune
-
localfunctions
(
>=
2.4
)
dune
-
functions
Version
:
0.1
Version
:
0.1
Maintainer
:
Carsten
Gräser
(
graeser
@
math
.
fu
-
berlin
.
de
)
Maintainer
:
Carsten
Gräser
(
graeser
@
math
.
fu
-
berlin
.
de
)
Suggests
:
dune
-
alugrid
dune
-
spgrid
Suggests
:
dune
-
alugrid
This diff is collapsed.
Click to expand it.
dune/fufem/test/common.hh
+
14
−
46
View file @
af6aba82
...
@@ -25,9 +25,6 @@
...
@@ -25,9 +25,6 @@
#include
"dune/subgrid/subgrid.hh"
#include
"dune/subgrid/subgrid.hh"
#endif
#endif
#if HAVE_DUNE_SPGRID
#include
<dune/grid/spgrid.hh>
#endif
template
<
typename
FT
>
template
<
typename
FT
>
struct
ToleranceTraits
{
struct
ToleranceTraits
{
...
@@ -269,46 +266,20 @@ GridType* constructCoarseGrid()
...
@@ -269,46 +266,20 @@ GridType* constructCoarseGrid()
return
gridFactory
.
createGrid
();
return
gridFactory
.
createGrid
();
}
}
template
<
int
dim
,
class
StructuredGrid
>
struct
StructuredGridConstructor
{
std
::
unique_ptr
<
StructuredGrid
>
construct
()
{
DUNE_THROW
(
Dune
::
NotImplemented
,
"Only able to construct YaspGrids and SPGrids"
);
}
};
template
<
int
dim
>
template
<
int
dim
>
struct
StructuredGridConstructor
<
dim
,
Dune
::
YaspGrid
<
dim
>>
Dune
::
YaspGrid
<
dim
>*
constructCoarse
YaspGrid
()
{
{
using
StructuredGrid
=
Dune
::
YaspGrid
<
dim
>
;
typedef
Dune
::
YaspGrid
<
dim
>
GridType
;
std
::
unique_ptr
<
StructuredGrid
>
construct
()
{
Dune
::
FieldVector
<
typename
GridType
::
ctype
,
dim
>
L
(
1.0
);
Dune
::
FieldVector
<
typename
StructuredGrid
::
ctype
,
dim
>
L
(
1.0
);
typename
Dune
::
array
<
int
,
dim
>
s
;
typename
Dune
::
array
<
int
,
dim
>
s
;
std
::
fill
(
s
.
begin
(),
s
.
end
(),
1
);
std
::
fill
(
s
.
begin
(),
s
.
end
(),
1
);
return
std
::
unique_ptr
<
StructuredGrid
>
(
new
StructuredGrid
(
L
,
s
));
GridType
*
grid
=
new
GridType
(
L
,
s
);
}
};
#if HAVE_DUNE_SPGRID
return
grid
;
template
<
int
dim
>
struct
StructuredGridConstructor
<
dim
,
Dune
::
SPGrid
<
double
,
dim
>>
{
using
StructuredGrid
=
Dune
::
SPGrid
<
double
,
dim
>
;
std
::
unique_ptr
<
StructuredGrid
>
construct
()
{
Dune
::
FieldVector
<
double
,
dim
>
a
(
0
);
Dune
::
FieldVector
<
double
,
dim
>
b
(
1
);
Dune
::
SPDomain
<
double
,
dim
>
domain
(
a
,
b
);
std
::
array
<
int
,
dim
>
precells
;
std
::
fill
(
precells
.
begin
(),
precells
.
end
(),
1
);
Dune
::
SPMultiIndex
<
dim
>
cells
(
precells
);
return
std
::
unique_ptr
<
StructuredGrid
>
(
new
StructuredGrid
(
domain
,
cells
));
}
}
};
#endif
template
<
class
GridType
>
template
<
class
GridType
>
void
refineLocally
(
GridType
&
grid
,
int
refine
=
3
)
void
refineLocally
(
GridType
&
grid
,
int
refine
=
3
)
...
@@ -351,11 +322,11 @@ bool checkWithAdaptiveGrid(TestSuite& suite, int uniformRefinements, int localRe
...
@@ -351,11 +322,11 @@ bool checkWithAdaptiveGrid(TestSuite& suite, int uniformRefinements, int localRe
return
passed
;
return
passed
;
}
}
template
<
int
dim
,
class
StructuredGrid
,
class
TestSuite
>
template
<
int
dim
,
class
TestSuite
>
bool
checkWithStructuredGrid
(
TestSuite
&
suite
,
int
uniformRefinements
,
std
::
string
name
)
bool
checkWithStructuredGrid
(
TestSuite
&
suite
,
int
uniformRefinements
,
std
::
string
name
)
{
{
StructuredGridConstructor
<
dim
,
StructuredGrid
>
gridConstructor
;
typedef
Dune
::
YaspGrid
<
dim
>
GridType
;
auto
grid
=
grid
C
onstruct
or
.
construct
(
);
GridType
*
grid
(
c
onstruct
CoarseYaspGrid
<
dim
>
()
);
grid
->
globalRefine
(
uniformRefinements
);
grid
->
globalRefine
(
uniformRefinements
);
...
@@ -365,6 +336,7 @@ bool checkWithStructuredGrid(TestSuite& suite, int uniformRefinements, std::stri
...
@@ -365,6 +336,7 @@ bool checkWithStructuredGrid(TestSuite& suite, int uniformRefinements, std::stri
if
(
passed
)
if
(
passed
)
std
::
cout
<<
"All tests passed with "
<<
name
<<
"."
<<
std
::
endl
;
std
::
cout
<<
"All tests passed with "
<<
name
<<
"."
<<
std
::
endl
;
delete
grid
;
return
passed
;
return
passed
;
}
}
...
@@ -451,12 +423,8 @@ bool checkWithStandardStructuredGrids(TestSuite& suite)
...
@@ -451,12 +423,8 @@ bool checkWithStandardStructuredGrids(TestSuite& suite)
{
{
bool
passed
=
true
;
bool
passed
=
true
;
passed
=
passed
and
checkWithStructuredGrid
<
2
,
Dune
::
YaspGrid
<
2
>>
(
suite
,
4
,
"YaspGrid<2>"
);
passed
=
passed
and
checkWithStructuredGrid
<
2
>
(
suite
,
4
,
"YaspGrid<2>"
);
passed
=
passed
and
checkWithStructuredGrid
<
3
,
Dune
::
YaspGrid
<
3
>>
(
suite
,
2
,
"YaspGrid<3>"
);
passed
=
passed
and
checkWithStructuredGrid
<
3
>
(
suite
,
2
,
"YaspGrid<3>"
);
#if HAVE_DUNE_SPGRID
passed
=
passed
and
checkWithStructuredGrid
<
2
,
Dune
::
SPGrid
<
double
,
2
>>
(
suite
,
4
,
"SPGridd<2>"
);
passed
=
passed
and
checkWithStructuredGrid
<
3
,
Dune
::
SPGrid
<
double
,
3
>>
(
suite
,
2
,
"SPGridd<3>"
);
#endif
return
passed
;
return
passed
;
}
}
...
...
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