Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tnl-dev
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor 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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
TNL
tnl-dev
Commits
907d7eef
There was an error fetching the commit references. Please try again later.
Commit
907d7eef
authored
8 years ago
by
Jakub Klinkovský
Browse files
Options
Downloads
Patches
Plain Diff
Fixed type aliases in MeshEntityTest
parent
5ebfbd6d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/UnitTests/Meshes/MeshEntityTest.h
+13
-13
13 additions, 13 deletions
src/UnitTests/Meshes/MeshEntityTest.h
with
13 additions
and
13 deletions
src/UnitTests/Meshes/MeshEntityTest.h
+
13
−
13
View file @
907d7eef
...
...
@@ -11,9 +11,12 @@
using
namespace
TNL
;
using
namespace
TNL
::
Meshes
;
//typedef MeshConfigBase< MeshTriangleTopology, 2, double, int, int, void > TestTriangleEntityTopology;
typedef
MeshConfigBase
<
MeshEdgeTopology
,
2
,
double
,
int
,
int
,
void
>
TestEdgeEntityTopology
;
typedef
MeshConfigBase
<
MeshVertexTopology
,
2
,
double
,
int
,
int
,
void
>
TestVertexEntityTopology
;
using
RealType
=
double
;
using
Device
=
Devices
::
Host
;
using
IndexType
=
int
;
using
TestVertexMeshConfig
=
MeshConfigBase
<
MeshVertexTopology
,
2
,
RealType
,
IndexType
,
IndexType
,
void
>
;
using
TestEdgeMeshConfig
=
MeshConfigBase
<
MeshEdgeTopology
,
2
,
RealType
,
IndexType
,
IndexType
,
void
>
;
class
TestTriangleMeshConfig
:
public
MeshConfigBase
<
MeshTriangleTopology
>
{
...
...
@@ -72,14 +75,9 @@ public:
using
BaseType
::
setSuperentityIndex
;
};
using
RealType
=
double
;
using
Device
=
Devices
::
Host
;
using
IndexType
=
int
;
TEST
(
MeshEntityTest
,
VertexMeshEntityTest
)
{
typedef
MeshConfigBase
<
MeshEdgeTopology
,
2
,
RealType
,
IndexType
,
IndexType
,
void
>
TestEntityTopology
;
typedef
TestMeshEntity
<
TestEntityTopology
,
MeshVertexTopology
>
VertexMeshEntityType
;
typedef
TestMeshEntity
<
TestVertexMeshConfig
,
MeshVertexTopology
>
VertexMeshEntityType
;
typedef
typename
VertexMeshEntityType
::
PointType
PointType
;
ASSERT_TRUE
(
PointType
::
getType
()
==
(
Containers
::
StaticVector
<
2
,
RealType
>::
getType
()
)
);
...
...
@@ -94,12 +92,14 @@ TEST( MeshEntityTest, VertexMeshEntityTest )
TEST
(
MeshEntityTest
,
EdgeMeshEntityTest
)
{
typedef
TestMeshEntity
<
Test
EdgeEntityTopology
,
MeshEdge
Topology
>
Edge
MeshEntityType
;
typedef
TestMeshEntity
<
TestEdge
EntityTopology
,
MeshVertex
Topology
>
Vertex
MeshEntityType
;
typedef
TestMeshEntity
<
Test
VertexMeshConfig
,
MeshVertex
Topology
>
Vertex
MeshEntityType
;
typedef
TestMeshEntity
<
TestEdge
MeshConfig
,
MeshEdge
Topology
>
Edge
MeshEntityType
;
typedef
typename
VertexMeshEntityType
::
PointType
PointType
;
ASSERT_TRUE
(
PointType
::
getType
()
==
(
Containers
::
StaticVector
<
2
,
RealType
>::
getType
()
)
);
ASSERT_TRUE
(
EdgeMeshEntityType
().
template
subentitiesAvailable
<
0
>()
);
/****
*
* Here we test the following simple example:
...
...
@@ -157,12 +157,12 @@ TEST( MeshEntityTest, EdgeMeshEntityTest )
TEST
(
MeshEntityTest
,
TriangleMeshEntityTest
)
{
typedef
TestMeshEntity
<
TestVertexMeshConfig
,
MeshVertexTopology
>
VertexMeshEntityType
;
typedef
TestMeshEntity
<
TestEdgeMeshConfig
,
MeshEdgeTopology
>
EdgeMeshEntityType
;
typedef
TestMeshEntity
<
TestTriangleMeshConfig
,
MeshTriangleTopology
>
TriangleMeshEntityType
;
static_assert
(
TriangleMeshEntityType
::
SubentityTraits
<
1
>::
storageEnabled
,
"Testing triangular mesh does not store edges as required."
);
static_assert
(
TriangleMeshEntityType
::
SubentityTraits
<
0
>::
storageEnabled
,
""
);
typedef
TestMeshEntity
<
TestEdgeEntityTopology
,
MeshEdgeTopology
>
EdgeMeshEntityType
;
typedef
TestMeshEntity
<
TestVertexEntityTopology
,
MeshVertexTopology
>
VertexMeshEntityType
;
typedef
typename
VertexMeshEntityType
::
PointType
PointType
;
ASSERT_TRUE
(
PointType
::
getType
()
==
(
Containers
::
StaticVector
<
2
,
RealType
>::
getType
()
)
);
...
...
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