Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
iwr
dune-curvedgrid
Commits
75106fc1
Commit
75106fc1
authored
Apr 15, 2020
by
Praetorius, Simon
Browse files
renamed CGeo namespace to Curved
parent
8b0c4cb8
Changes
22
Show whitespace changes
Inline
Side-by-side
dune/curvedsurfacegrid/backuprestore.hh
View file @
75106fc1
...
...
@@ -9,7 +9,7 @@
namespace
Dune
{
namespace
C
Geo
namespace
C
urved
{
// BackupRestoreFacilities
...
...
@@ -44,7 +44,7 @@ namespace Dune
}
};
}
// namespace C
Geo
}
// namespace C
urved
...
...
dune/curvedsurfacegrid/coordfunctionimplementations.hh
View file @
75106fc1
...
...
@@ -30,11 +30,11 @@ namespace Dune
//convertDuneGridToCrvsrfMesh
template
<
class
GridPtr
>
C
Geo
::
Mesh
*
convertDuneGridToCrvsrfMesh
(
GridPtr
&
grid
){
C
urved
::
Mesh
*
convertDuneGridToCrvsrfMesh
(
GridPtr
&
grid
){
auto
gridView
=
grid
->
leafGridView
();
//determine coordinate-extrema
C
Geo
::
Vertex
minc
(
DBL_MAX
,
DBL_MAX
,
DBL_MAX
),
maxc
(
-
DBL_MAX
,
-
DBL_MAX
,
-
DBL_MAX
);
C
urved
::
Vertex
minc
(
DBL_MAX
,
DBL_MAX
,
DBL_MAX
),
maxc
(
-
DBL_MAX
,
-
DBL_MAX
,
-
DBL_MAX
);
for
(
const
auto
&
vertexEntity
:
vertices
(
gridView
)){
const
auto
&
vertex
=
vertexEntity
.
geometry
().
corner
(
0
);
for
(
int
i
=
0
;
i
<
grid
->
dimensionworld
;
++
i
){
...
...
@@ -43,19 +43,19 @@ namespace Dune
}
}
C
Geo
::
Mesh
*
surface_mesh
=
new
C
Geo
::
Mesh
(
grid
->
dimension
,
grid
->
dimensionworld
);
C
Geo
::
VertexMap
<
int
>
vmap
(
minc
,
maxc
,
grid
->
dimensionworld
);
C
urved
::
Mesh
*
surface_mesh
=
new
C
urved
::
Mesh
(
grid
->
dimension
,
grid
->
dimensionworld
);
C
urved
::
VertexMap
<
int
>
vmap
(
minc
,
maxc
,
grid
->
dimensionworld
);
//build mesh
int
next_index
=
0
;
for
(
const
auto
&
element
:
elements
(
gridView
)){
if
(
element
.
geometry
().
corners
()
!=
3
){
C
Geo
::
error
(
"Element is not a triangle in convertDuneGridToCrvsrfMesh."
);
C
urved
::
error
(
"Element is not a triangle in convertDuneGridToCrvsrfMesh."
);
}
int32_t
el
[
grid
->
dimension
+
1
];
for
(
int
i
=
0
;
i
<=
grid
->
dimension
;
++
i
){
auto
coords
=
element
.
geometry
().
corner
(
i
);
C
Geo
::
Vertex
v
(
coords
[
0
],
coords
[
1
],
coords
[
2
]);
C
urved
::
Vertex
v
(
coords
[
0
],
coords
[
1
],
coords
[
2
]);
if
(
!
vmap
.
find_3d
(
v
,
el
[
i
])){
surface_mesh
->
add_vertex
(
v
);
el
[
i
]
=
next_index
;
...
...
@@ -93,7 +93,7 @@ namespace Dune
input
*=
radius_
/
input
.
two_norm
();
}
double
run_time
=
dbl_time
()
-
start_time
;
std
::
cout
<<
"csphere time: "
<<
C
Geo
::
ft
(
run_time
,
11
,
9
)
std
::
cout
<<
"csphere time: "
<<
C
urved
::
ft
(
run_time
,
11
,
9
)
<<
", count: "
<<
inputs
.
size
()
<<
std
::
endl
;
}
#endif
...
...
@@ -135,7 +135,7 @@ namespace Dune
for
(
int
i
=
0
;
i
<
3
;
++
i
)
input
[
i
]
=
center_
[
i
]
+
direction
[
i
]
*
factor
;
}
double
run_time
=
dbl_time
()
-
start_time
;
std
::
cout
<<
"sphere time: "
<<
C
Geo
::
ft
(
run_time
,
11
,
9
)
std
::
cout
<<
"sphere time: "
<<
C
urved
::
ft
(
run_time
,
11
,
9
)
<<
", count: "
<<
inputs
.
size
()
<<
std
::
endl
;
}
#endif
...
...
@@ -162,29 +162,29 @@ namespace Dune
SurfaceDistanceCoordFunction
(
const
GridPtr
&
gridPtr
,
double
expansion_width
=-
1.0
,
bool
no_scaling
=
false
)
:
cache
(
nullptr
){
if
(
gridPtr
->
dimension
!=
2
||
gridPtr
->
dimensionworld
!=
3
){
C
Geo
::
error
(
"SurfaceDistanceCoordFunction needs a triangle-surface-mesh!"
);
C
urved
::
error
(
"SurfaceDistanceCoordFunction needs a triangle-surface-mesh!"
);
}
surface_mesh
=
convertDuneGridToCrvsrfMesh
(
gridPtr
);
backgrid
=
new
C
Geo
::
BackGrid
(
*
surface_mesh
,
expansion_width
,
no_scaling
);
backgrid
=
new
C
urved
::
BackGrid
(
*
surface_mesh
,
expansion_width
,
no_scaling
);
if
(
cached
){
C
Geo
::
Vertex
c_begin
,
c_end
;
C
urved
::
Vertex
c_begin
,
c_end
;
surface_mesh
->
determine_coordinate_extrema
(
c_begin
,
c_end
);
C
Geo
::
Vertex
c_expansion
=
(
c_end
-
c_begin
)
*
0.1
;
cache
=
new
C
Geo
::
VertexMap
<
C
Geo
::
Vertex
>
(
c_begin
-
c_expansion
,
c_end
+
c_expansion
,
3
);
C
urved
::
Vertex
c_expansion
=
(
c_end
-
c_begin
)
*
0.1
;
cache
=
new
C
urved
::
VertexMap
<
C
urved
::
Vertex
>
(
c_begin
-
c_expansion
,
c_end
+
c_expansion
,
3
);
}
}
//constructor using vtu-reader to read "file"
SurfaceDistanceCoordFunction
(
const
char
*
file
,
double
expansion_width
=-
1.0
,
bool
no_scaling
=
false
)
:
cache
(
nullptr
){
surface_mesh
=
new
C
Geo
::
Mesh
(
2
,
3
);
surface_mesh
=
new
C
urved
::
Mesh
(
2
,
3
);
read_vtu_file
(
file
,
*
surface_mesh
);
backgrid
=
new
C
Geo
::
BackGrid
(
*
surface_mesh
,
expansion_width
,
no_scaling
);
backgrid
=
new
C
urved
::
BackGrid
(
*
surface_mesh
,
expansion_width
,
no_scaling
);
if
(
cached
){
C
Geo
::
Vertex
c_begin
,
c_end
;
C
urved
::
Vertex
c_begin
,
c_end
;
surface_mesh
->
determine_coordinate_extrema
(
c_begin
,
c_end
);
C
Geo
::
Vertex
c_expansion
=
(
c_end
-
c_begin
)
*
0.1
;
cache
=
new
C
Geo
::
VertexMap
<
C
Geo
::
Vertex
>
(
c_begin
-
c_expansion
,
c_end
+
c_expansion
,
3
);
C
urved
::
Vertex
c_expansion
=
(
c_end
-
c_begin
)
*
0.1
;
cache
=
new
C
urved
::
VertexMap
<
C
urved
::
Vertex
>
(
c_begin
-
c_expansion
,
c_end
+
c_expansion
,
3
);
}
}
...
...
@@ -202,18 +202,18 @@ namespace Dune
}
//resetCache
void
resetCache
(
C
Geo
::
Vertex
begin
=
C
Geo
::
Vertex
(),
C
Geo
::
Vertex
end
=
C
Geo
::
Vertex
(),
void
resetCache
(
C
urved
::
Vertex
begin
=
C
urved
::
Vertex
(),
C
urved
::
Vertex
end
=
C
urved
::
Vertex
(),
double
expansion_factor
=
0.1
){
if
(
cached
){
delete
cache
;
if
(
begin
.
is_origin
()
&&
end
.
is_origin
()){
surface_mesh
->
determine_coordinate_extrema
(
begin
,
end
);
}
C
Geo
::
Vertex
c_expansion
=
(
end
-
begin
)
*
expansion_factor
;
cache
=
new
C
Geo
::
VertexMap
<
C
Geo
::
Vertex
>
(
begin
-
c_expansion
,
end
+
c_expansion
,
3
);
C
urved
::
Vertex
c_expansion
=
(
end
-
begin
)
*
expansion_factor
;
cache
=
new
C
urved
::
VertexMap
<
C
urved
::
Vertex
>
(
begin
-
c_expansion
,
end
+
c_expansion
,
3
);
}
else
{
C
Geo
::
error
(
"Cannot reset cache in uncached SurfaceDistanceCoordFunction!"
);
C
urved
::
error
(
"Cannot reset cache in uncached SurfaceDistanceCoordFunction!"
);
}
}
...
...
@@ -232,8 +232,8 @@ namespace Dune
int
uncached_cnt
=
0
;
double
start_time
=
dbl_time
();
for
(
auto
&
input
:
inputs
){
C
Geo
::
Vertex
hit_vertex
;
C
Geo
::
Vertex
v
(
input
[
0
],
input
[
1
],
input
[
2
]);
C
urved
::
Vertex
hit_vertex
;
C
urved
::
Vertex
v
(
input
[
0
],
input
[
1
],
input
[
2
]);
if
(
!
cache
->
find_3d
(
v
,
hit_vertex
)){
backgrid
->
distance_to_surface_3d
(
v
,
hit_vertex
);
cache
->
insert
(
v
,
hit_vertex
);
...
...
@@ -241,17 +241,17 @@ namespace Dune
}
}
double
run_time
=
dbl_time
()
-
start_time
;
std
::
cout
<<
"surfdist time: "
<<
C
Geo
::
ft
(
run_time
,
11
,
9
)
<<
", count: "
<<
inputs
.
size
()
std
::
cout
<<
"surfdist time: "
<<
C
urved
::
ft
(
run_time
,
11
,
9
)
<<
", count: "
<<
inputs
.
size
()
<<
", uncached: "
<<
uncached_cnt
<<
std
::
endl
;
}
else
{
//uncached
double
start_time
=
dbl_time
();
for
(
auto
&
input
:
inputs
){
C
Geo
::
Vertex
hit_vertex
;
C
Geo
::
Vertex
v
(
input
[
0
],
input
[
1
],
input
[
2
]);
C
urved
::
Vertex
hit_vertex
;
C
urved
::
Vertex
v
(
input
[
0
],
input
[
1
],
input
[
2
]);
backgrid
->
distance_to_surface_3d
(
v
,
hit_vertex
);
}
double
run_time
=
dbl_time
()
-
start_time
;
std
::
cout
<<
"surfdist time: "
<<
C
Geo
::
ft
(
run_time
,
11
,
9
)
std
::
cout
<<
"surfdist time: "
<<
C
urved
::
ft
(
run_time
,
11
,
9
)
<<
", count: "
<<
inputs
.
size
()
<<
std
::
endl
;
}
}
...
...
@@ -262,16 +262,16 @@ namespace Dune
if
(
cached
){
cache
->
debug_output_statistics
();
}
else
{
C
Geo
::
error
(
"Cannot output vertexmap-statistics in "
C
urved
::
error
(
"Cannot output vertexmap-statistics in "
"uncached SurfaceDistanceCoordFunction!"
);
}
}
#endif
private:
C
Geo
::
Mesh
*
surface_mesh
;
C
Geo
::
BackGrid
*
backgrid
;
C
Geo
::
VertexMap
<
C
Geo
::
Vertex
>
*
cache
;
C
urved
::
Mesh
*
surface_mesh
;
C
urved
::
BackGrid
*
backgrid
;
C
urved
::
VertexMap
<
C
urved
::
Vertex
>
*
cache
;
#if COLLECTOR_BENCHMARK != 0
mutable
std
::
vector
<
FieldVector
<
double
,
3
>
>
inputs
;
#endif
...
...
@@ -284,8 +284,8 @@ namespace Dune
#if COLLECTOR_BENCHMARK != 0
inputs
.
push_back
(
x
);
#endif
C
Geo
::
Vertex
hit_vertex
;
C
Geo
::
Vertex
v
(
x
[
0
],
x
[
1
],
x
[
2
]);
C
urved
::
Vertex
hit_vertex
;
C
urved
::
Vertex
v
(
x
[
0
],
x
[
1
],
x
[
2
]);
if
(
!
cache
->
find_3d
(
v
,
hit_vertex
)){
backgrid
->
distance_to_surface_3d
(
v
,
hit_vertex
);
cache
->
insert
(
v
,
hit_vertex
);
...
...
@@ -301,8 +301,8 @@ namespace Dune
#if COLLECTOR_BENCHMARK != 0
inputs
.
push_back
(
x
);
#endif
C
Geo
::
Vertex
hit_vertex
;
C
Geo
::
Vertex
v
(
x
[
0
],
x
[
1
],
x
[
2
]);
C
urved
::
Vertex
hit_vertex
;
C
urved
::
Vertex
v
(
x
[
0
],
x
[
1
],
x
[
2
]);
backgrid
->
distance_to_surface_3d
(
v
,
hit_vertex
);
return
{
hit_vertex
[
0
],
hit_vertex
[
1
],
hit_vertex
[
2
]};
}
...
...
dune/curvedsurfacegrid/datahandle.hh
View file @
75106fc1
...
...
@@ -11,7 +11,7 @@
namespace
Dune
{
namespace
C
Geo
namespace
C
urved
{
// CommDataHandle
...
...
@@ -81,7 +81,7 @@ namespace Dune
WrappedHandle
&
wrappedHandle_
;
};
}
// namespace C
Geo
}
// namespace C
urved
}
// namespace Dune
#endif // DUNE_CURVED_SURFACE_GRID_DATAHANDLE_HH
dune/curvedsurfacegrid/entity.hh
View file @
75106fc1
...
...
@@ -11,7 +11,7 @@
namespace
Dune
{
namespace
C
Geo
namespace
C
urved
{
// Internal Forward Declarations
...
...
@@ -337,7 +337,7 @@ namespace Dune
using
LocalGeometry
=
typename
Traits
::
template
Codim
<
0
>
::
LocalGeometry
;
//! facade type for entities
using
EntityFacade
=
Dune
::
Entity
<
0
,
dim
,
G
,
Dune
::
C
Geo
::
Entity
>
;
using
EntityFacade
=
Dune
::
Entity
<
0
,
dim
,
G
,
Dune
::
C
urved
::
Entity
>
;
//! type of hierarchic iterator
using
HierarchicIterator
=
typename
Traits
::
HierarchicIterator
;
...
...
@@ -362,25 +362,25 @@ namespace Dune
LevelIntersectionIterator
ilevelbegin
()
const
{
using
IteratorImpl
=
C
Geo
::
IntersectionIterator
<
Grid
,
typename
HostGrid
::
LevelIntersectionIterator
>
;
using
IteratorImpl
=
C
urved
::
IntersectionIterator
<
Grid
,
typename
HostGrid
::
LevelIntersectionIterator
>
;
return
IteratorImpl
(
*
this
,
Super
::
hostEntity
().
ilevelbegin
());
}
LevelIntersectionIterator
ilevelend
()
const
{
using
IteratorImpl
=
C
Geo
::
IntersectionIterator
<
Grid
,
typename
HostGrid
::
LevelIntersectionIterator
>
;
using
IteratorImpl
=
C
urved
::
IntersectionIterator
<
Grid
,
typename
HostGrid
::
LevelIntersectionIterator
>
;
return
IteratorImpl
(
*
this
,
Super
::
hostEntity
().
ilevelend
());
}
LeafIntersectionIterator
ileafbegin
()
const
{
using
IteratorImpl
=
C
Geo
::
IntersectionIterator
<
Grid
,
typename
HostGrid
::
LeafIntersectionIterator
>
;
using
IteratorImpl
=
C
urved
::
IntersectionIterator
<
Grid
,
typename
HostGrid
::
LeafIntersectionIterator
>
;
return
IteratorImpl
(
*
this
,
Super
::
hostEntity
().
ileafbegin
());
}
LeafIntersectionIterator
ileafend
()
const
{
using
IteratorImpl
=
C
Geo
::
IntersectionIterator
<
Grid
,
typename
HostGrid
::
LeafIntersectionIterator
>
;
using
IteratorImpl
=
C
urved
::
IntersectionIterator
<
Grid
,
typename
HostGrid
::
LeafIntersectionIterator
>
;
return
IteratorImpl
(
*
this
,
Super
::
hostEntity
().
ileafend
());
}
...
...
@@ -411,13 +411,13 @@ namespace Dune
HierarchicIterator
hbegin
(
int
maxLevel
)
const
{
using
IteratorImpl
=
C
Geo
::
HierarchicIterator
<
G
>
;
using
IteratorImpl
=
C
urved
::
HierarchicIterator
<
G
>
;
return
IteratorImpl
(
Super
::
gridFunction
(),
Super
::
hostEntity
().
hbegin
(
maxLevel
));
}
HierarchicIterator
hend
(
int
maxLevel
)
const
{
using
IteratorImpl
=
C
Geo
::
HierarchicIterator
<
G
>
;
using
IteratorImpl
=
C
urved
::
HierarchicIterator
<
G
>
;
return
IteratorImpl
(
Super
::
gridFunction
(),
Super
::
hostEntity
().
hend
(
maxLevel
));
}
...
...
@@ -437,7 +437,7 @@ namespace Dune
}
};
}
// namespace C
Geo
}
// namespace C
urved
}
// namespace Dune
#endif // DUNE_CURVED_SURFACE_GRID_ENTITY_HH
dune/curvedsurfacegrid/entityseed.hh
View file @
75106fc1
...
...
@@ -10,7 +10,7 @@
namespace
Dune
{
namespace
C
Geo
namespace
C
urved
{
// EntitySeed
...
...
@@ -50,7 +50,7 @@ namespace Dune
HostEntitySeed
hostEntitySeed_
=
{};
};
}
// namespace C
Geo
}
// namespace C
urved
}
// namespace Dune
#endif // DUNE_CURVED_SURFACE_GRID_ENTITYSEED_HH
dune/curvedsurfacegrid/geometry.hh
View file @
75106fc1
...
...
@@ -29,7 +29,7 @@
namespace
Dune
{
namespace
C
Geo
namespace
C
urved
{
/// \brief Curved geometry implementation based on local basis function parametrization
/**
...
...
@@ -220,7 +220,7 @@ namespace Dune
#endif // DOXYGEN
}
// end namespace C
Geo
}
// end namespace C
urved
}
// namespace Dune
#endif // DUNE_CURVED_SURFACE_GRID_GEOMETRY_HH
dune/curvedsurfacegrid/grid.hh
View file @
75106fc1
...
...
@@ -29,8 +29,8 @@ namespace Dune
using
HG
=
GridOf_t
<
GridFunction
>
;
using
type
=
GridDefaultImplementation
<
HG
::
dimension
,
C
Geo
::
DimRange
<
GridFunction
>::
value
,
typename
HG
::
ctype
,
C
Geo
::
GridFamily
<
GridFunction
,
order
>
HG
::
dimension
,
C
urved
::
DimRange
<
GridFunction
>::
value
,
typename
HG
::
ctype
,
C
urved
::
GridFamily
<
GridFunction
,
order
>
>
;
};
}
...
...
@@ -82,18 +82,18 @@ namespace Dune
template
<
class
GF
,
int
ORDER
>
class
CurvedSurfaceGrid
:
public
CurvedSurfaceGridBase
<
GF
,
ORDER
>
,
public
C
Geo
::
BackupRestoreFacilities
<
CurvedSurfaceGrid
<
GF
,
ORDER
>
>
,
public
C
urved
::
BackupRestoreFacilities
<
CurvedSurfaceGrid
<
GF
,
ORDER
>
>
{
using
Self
=
CurvedSurfaceGrid
;
using
Super
=
CurvedSurfaceGridBase
<
GF
,
ORDER
>
;
// friend declarations
template
<
class
,
class
>
friend
class
C
Geo
::
IdSet
;
template
<
class
,
class
>
friend
class
C
Geo
::
IndexSet
;
template
<
class
,
class
>
friend
class
C
urved
::
IdSet
;
template
<
class
,
class
>
friend
class
C
urved
::
IndexSet
;
public:
using
GridFunction
=
GF
;
using
GridFamily
=
C
Geo
::
GridFamily
<
GF
,
ORDER
>
;
using
GridFamily
=
C
urved
::
GridFamily
<
GF
,
ORDER
>
;
/** \name Traits
* \{ */
...
...
@@ -441,7 +441,7 @@ namespace Dune
bool
loadBalance
(
CommDataHandleIF
<
DataHandle
,
Data
>&
datahandle
)
{
using
DataHandleIF
=
CommDataHandleIF
<
DataHandle
,
Data
>
;
using
WrappedDataHandle
=
C
Geo
::
CommDataHandle
<
Self
,
DataHandleIF
>
;
using
WrappedDataHandle
=
C
urved
::
CommDataHandle
<
Self
,
DataHandleIF
>
;
WrappedDataHandle
wrappedDataHandle
(
*
this
,
datahandle
);
const
bool
gridChanged
=
hostGrid
().
loadBalance
(
wrappedDataHandle
);
...
...
dune/curvedsurfacegrid/gridfamily.hh
View file @
75106fc1
...
...
@@ -29,7 +29,7 @@ namespace Dune
/** \brief namespace containing the implementations of CurvedSurfaceGrid
* \ingroup CurvedGeo
*/
namespace
C
Geo
namespace
C
urved
{
template
<
class
GF
>
struct
DimRange
...
...
@@ -74,17 +74,17 @@ namespace Dune
static
const
int
dimensionworld
=
DimRange
<
GridFunction
>::
value
;
using
LeafIntersection
=
Dune
::
Intersection
<
const
Grid
,
C
Geo
::
Intersection
<
const
Grid
,
typename
HostGrid
::
LeafIntersection
>>
;
=
Dune
::
Intersection
<
const
Grid
,
C
urved
::
Intersection
<
const
Grid
,
typename
HostGrid
::
LeafIntersection
>>
;
using
LevelIntersection
=
Dune
::
Intersection
<
const
Grid
,
C
Geo
::
Intersection
<
const
Grid
,
typename
HostGrid
::
LevelIntersection
>>
;
=
Dune
::
Intersection
<
const
Grid
,
C
urved
::
Intersection
<
const
Grid
,
typename
HostGrid
::
LevelIntersection
>>
;
using
LeafIntersectionIterator
=
Dune
::
IntersectionIterator
<
const
Grid
,
C
Geo
::
IntersectionIterator
<
const
Grid
,
typename
HostGrid
::
LeafIntersectionIterator
>
,
C
Geo
::
Intersection
<
const
Grid
,
typename
HostGrid
::
LeafIntersection
>
>
;
=
Dune
::
IntersectionIterator
<
const
Grid
,
C
urved
::
IntersectionIterator
<
const
Grid
,
typename
HostGrid
::
LeafIntersectionIterator
>
,
C
urved
::
Intersection
<
const
Grid
,
typename
HostGrid
::
LeafIntersection
>
>
;
using
LevelIntersectionIterator
=
Dune
::
IntersectionIterator
<
const
Grid
,
C
Geo
::
IntersectionIterator
<
const
Grid
,
typename
HostGrid
::
LevelIntersectionIterator
>
,
C
Geo
::
Intersection
<
const
Grid
,
typename
HostGrid
::
LevelIntersection
>
>
;
=
Dune
::
IntersectionIterator
<
const
Grid
,
C
urved
::
IntersectionIterator
<
const
Grid
,
typename
HostGrid
::
LevelIntersectionIterator
>
,
C
urved
::
Intersection
<
const
Grid
,
typename
HostGrid
::
LevelIntersection
>
>
;
using
HierarchicIterator
=
Dune
::
EntityIterator
<
0
,
const
Grid
,
C
Geo
::
HierarchicIterator
<
const
Grid
>>
;
=
Dune
::
EntityIterator
<
0
,
const
Grid
,
C
urved
::
HierarchicIterator
<
const
Grid
>>
;
template
<
int
codim
>
struct
Codim
...
...
@@ -93,31 +93,31 @@ namespace Dune
using
LocalTransformation
=
std
::
conditional_t
<
(
codim
==
0
),
DefaultLocalGeometry
<
ctype
,
dimension
,
dimension
>
,
C
Geo
::
LocalGeometryWrapper
<
LocalGeometry
>>
;
C
urved
::
LocalGeometryWrapper
<
LocalGeometry
>>
;
template
<
int
mydim
,
int
cdim
,
class
GridImpl
>
using
GeometryImplTemplate
=
C
Geo
::
Geometry
<
ctype
,
mydim
,
cdim
,
LocalFunction
,
LocalTransformation
,
order
>
;
=
C
urved
::
Geometry
<
ctype
,
mydim
,
cdim
,
LocalFunction
,
LocalTransformation
,
order
>
;
// geometry types
using
GeometryImpl
=
GeometryImplTemplate
<
dimension
-
codim
,
dimensionworld
,
const
Grid
>
;
using
Geometry
=
Dune
::
Geometry
<
dimension
-
codim
,
dimensionworld
,
const
Grid
,
GeometryImplTemplate
>
;
// entity types
using
EntityImpl
=
C
Geo
::
Entity
<
codim
,
dimension
,
const
Grid
>
;
using
Entity
=
Dune
::
Entity
<
codim
,
dimension
,
const
Grid
,
C
Geo
::
Entity
>
;
using
EntityImpl
=
C
urved
::
Entity
<
codim
,
dimension
,
const
Grid
>
;
using
Entity
=
Dune
::
Entity
<
codim
,
dimension
,
const
Grid
,
C
urved
::
Entity
>
;
using
EntitySeed
=
Dune
::
EntitySeed
<
const
Grid
,
C
Geo
::
EntitySeed
<
codim
,
const
Grid
>
>
;
using
EntitySeed
=
Dune
::
EntitySeed
<
const
Grid
,
C
urved
::
EntitySeed
<
codim
,
const
Grid
>
>
;
template
<
PartitionIteratorType
pitype
>
struct
Partition
{
using
LeafIteratorImp
=
C
Geo
::
Iterator
<
typename
HostGrid
::
LeafGridView
,
codim
,
pitype
,
const
Grid
>
;
=
C
urved
::
Iterator
<
typename
HostGrid
::
LeafGridView
,
codim
,
pitype
,
const
Grid
>
;
using
LeafIterator
=
Dune
::
EntityIterator
<
codim
,
const
Grid
,
LeafIteratorImp
>
;
using
LevelIteratorImp
=
C
Geo
::
Iterator
<
typename
HostGrid
::
LevelGridView
,
codim
,
pitype
,
const
Grid
>
;
=
C
urved
::
Iterator
<
typename
HostGrid
::
LevelGridView
,
codim
,
pitype
,
const
Grid
>
;
using
LevelIterator
=
Dune
::
EntityIterator
<
codim
,
const
Grid
,
LevelIteratorImp
>
;
};
...
...
@@ -126,24 +126,24 @@ namespace Dune
};
// index-sets
using
LeafIndexSet
=
C
Geo
::
IndexSet
<
const
Grid
,
typename
HostGrid
::
Traits
::
LeafIndexSet
>
;
using
LevelIndexSet
=
C
Geo
::
IndexSet
<
const
Grid
,
typename
HostGrid
::
Traits
::
LevelIndexSet
>
;
using
LeafIndexSet
=
C
urved
::
IndexSet
<
const
Grid
,
typename
HostGrid
::
Traits
::
LeafIndexSet
>
;
using
LevelIndexSet
=
C
urved
::
IndexSet
<
const
Grid
,
typename
HostGrid
::
Traits
::
LevelIndexSet
>
;
// id-sets
using
GlobalIdSet
=
C
Geo
::
IdSet
<
const
Grid
,
typename
HostGrid
::
Traits
::
GlobalIdSet
>
;
using
LocalIdSet
=
C
Geo
::
IdSet
<
const
Grid
,
typename
HostGrid
::
Traits
::
LocalIdSet
>
;
using
GlobalIdSet
=
C
urved
::
IdSet
<
const
Grid
,
typename
HostGrid
::
Traits
::
GlobalIdSet
>
;
using
LocalIdSet
=
C
urved
::
IdSet
<
const
Grid
,
typename
HostGrid
::
Traits
::
LocalIdSet
>
;
using
CollectiveCommunication
=
typename
HostGrid
::
Traits
::
CollectiveCommunication
;
// grid views
using
LeafGridView
=
Dune
::
GridView
<
C
Geo
::
GridViewTraits
<
typename
HostGrid
::
LeafGridView
,
GF
,
order
>>
;
=
Dune
::
GridView
<
C
urved
::
GridViewTraits
<
typename
HostGrid
::
LeafGridView
,
GF
,
order
>>
;
using
LevelGridView
=
Dune
::
GridView
<
C
Geo
::
GridViewTraits
<
typename
HostGrid
::
LevelGridView
,
GF
,
order
>>
;
=
Dune
::
GridView
<
C
urved
::
GridViewTraits
<
typename
HostGrid
::
LevelGridView
,
GF
,
order
>>
;
};
};
}
// namespace C
Geo
}
// namespace C
urved
}
// namespace Dune
#endif // DUNE_CURVED_SURFACE_GRID_GRIDFAMILY_HH
dune/curvedsurfacegrid/gridview.hh
View file @
75106fc1
...
...
@@ -16,7 +16,7 @@
namespace
Dune
{
namespace
C
Geo
namespace
C
urved
{
// Internal Forward Declarations
...
...
@@ -44,19 +44,19 @@ namespace Dune
public:
using
GridViewImp
=
GridView
<
HostGridView
,
GridFunction
,
order
>
;
using
Grid
=
Dune
::
CurvedSurfaceGrid
<
GridFunction
,
order
>
;
using
IndexSet
=
C
Geo
::
IndexSet
<
const
Grid
,
typename
HostGridView
::
IndexSet
>
;
using
IndexSet
=
C
urved
::
IndexSet
<
const
Grid
,
typename
HostGridView
::
IndexSet
>
;
using
Intersection
=
Dune
::
Intersection
<
const
Grid
,
C
Geo
::
Intersection
<
const
Grid
,
HostIntersection
>
>
;
using
Intersection
=
Dune
::
Intersection
<
const
Grid
,
C
urved
::
Intersection
<
const
Grid
,
HostIntersection
>
>
;
using
IntersectionIterator
=
Dune
::
IntersectionIterator
<
const
Grid
,
C
Geo
::
IntersectionIterator
<
const
Grid
,
HostIntersectionIterator
>
,
C
Geo
::
Intersection
<
const
Grid
,
HostIntersection
>
>
;
=
Dune
::
IntersectionIterator
<
const
Grid
,
C
urved
::
IntersectionIterator
<
const
Grid
,
HostIntersectionIterator
>
,
C
urved
::
Intersection
<
const
Grid
,
HostIntersection
>
>
;
using
CollectiveCommunication
=
typename
HostGridView
::
CollectiveCommunication
;
template
<
int
codim
>
struct
Codim
{
using
IteratorImp
=
C
Geo
::
Iterator
<
HostGridView
,
codim
,
All_Partition
,
const
Grid
>
;
using
IteratorImp
=
C
urved
::
Iterator
<
HostGridView
,
codim
,
All_Partition
,
const
Grid
>
;
using
Iterator
=
Dune
::
EntityIterator
<
codim
,
const
Grid
,
IteratorImp
>
;
using
Entity
=
typename
Grid
::
Traits
::
template
Codim
<
codim
>
::
Entity
;
...
...
@@ -67,7 +67,7 @@ namespace Dune
template
<
PartitionIteratorType
pit
>
struct
Partition
{
using
IteratorImp
=
C
Geo
::
Iterator
<
HostGridView
,
codim
,
pit
,
const
Grid
>
;
using
IteratorImp
=
C
urved
::
Iterator
<
HostGridView
,
codim
,
pit
,
const
Grid
>
;
using
Iterator
=
Dune
::
EntityIterator
<
codim
,
const
Grid
,
IteratorImp
>
;
};
};
...
...
@@ -197,13 +197,13 @@ namespace Dune
IntersectionIterator
ibegin
(
const
typename
Codim
<
0
>::
Entity
&
entity
)
const
{
using
IteratorImpl
=
C
Geo
::
IntersectionIterator
<
const
Grid
,
typename
HostGridView
::
IntersectionIterator
>
;
using
IteratorImpl
=
C
urved
::
IntersectionIterator
<
const
Grid
,
typename
HostGridView
::
IntersectionIterator
>
;
return
IteratorImpl
(
entity
,
hostGridView
().
ibegin
(
entity
.
impl
().
hostEntity
()));
}
IntersectionIterator
iend
(
const
typename
Codim
<
0
>::
Entity
&
entity
)
const
{
using
IteratorImpl
=
C
Geo
::
IntersectionIterator
<
const
Grid
,
typename
HostGridView
::
IntersectionIterator
>
;
using
IteratorImpl
=
C
urved
::
IntersectionIterator
<
const
Grid
,
typename
HostGridView
::
IntersectionIterator
>
;
return
IteratorImpl
(
entity
,
hostGridView
().
iend
(
entity
.
impl
().
hostEntity
()));
}
...
...
@@ -228,7 +228,7 @@ namespace Dune
CommunicationDirection
direction
)
const
{
using
DataHandleIF
=
CommDataHandleIF
<
DataHandle
,
Data
>
;
using
WrappedDataHandle
=
C
Geo
::
CommDataHandle
<
Grid
,
DataHandleIF
>
;
using
WrappedDataHandle
=
C
urved
::
CommDataHandle
<
Grid
,
DataHandleIF
>
;
WrappedDataHandle
wrappedDataHandle
(
grid
(),
dataHandle
);
hostGridView
().
communicate
(
wrappedDataHandle
,
interface
,
direction
);
...
...
@@ -242,7 +242,7 @@ namespace Dune
mutable
IndexSet
indexSet_
;
};
}
// namespace C
Geo
}
// namespace C
urved
}
// namespace Dune
#endif // DUNE_CURVED_SURFACE_GRID_GRIDVIEW_HH
dune/curvedsurfacegrid/idset.hh
View file @
75106fc1
...
...
@@ -9,7 +9,7 @@
namespace
Dune
{
namespace
C
Geo
namespace
C
urved
{
// IdSet
...
...
@@ -73,7 +73,7 @@ namespace Dune
const
HostIdSet
*
hostIdSet_
=
nullptr
;
};
}
// namespace C
Geo
}
// namespace C
urved
}
// namespace Dune
#endif // DUNE_CURVED_SURFACE_GRID_IDSET_HH
dune/curvedsurfacegrid/indexsets.hh
View file @
75106fc1
...
...
@@ -11,7 +11,7 @@
namespace
Dune
{
namespace
C
Geo
namespace
C
urved
{
// IndexSet
...
...
@@ -98,7 +98,7 @@ namespace Dune
const
HostIndexSet
*
hostIndexSet_
=
nullptr
;
};