Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Bing Yuan
Nektar
Commits
aec9bc57
Commit
aec9bc57
authored
Mar 28, 2017
by
David Moxey
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into feature/dump-mesh-on-failure
parents
76927fc7
d61fc059
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
67 additions
and
60 deletions
+67
-60
CHANGELOG.md
CHANGELOG.md
+9
-3
library/LibUtilities/LinearAlgebra/SparseMatrix.cpp
library/LibUtilities/LinearAlgebra/SparseMatrix.cpp
+6
-6
library/LibUtilities/LinearAlgebra/SparseMatrix.hpp
library/LibUtilities/LinearAlgebra/SparseMatrix.hpp
+6
-6
library/NekMeshUtils/MeshElements/Mesh.cpp
library/NekMeshUtils/MeshElements/Mesh.cpp
+46
-45
No files found.
CHANGELOG.md
View file @
aec9bc57
...
...
@@ -6,16 +6,21 @@ v4.5.0
**NekMesh**
:
-
Add periodic boundary condition meshing in 2D (!733)
-
Adjust boundary layer thickness in corners in 2D (!739)
-
Rework meshing control so that if possible viewable meshes will be dumped
when some part of the system fails (!756)
-
Add manifold meshing option (!756)
**Documentation**
:
-
Added the developer-guide repository as a submodule (!751)
v4.4.1
------
**Library**
-
Remove the duplicate output of errorutil (!756)
**NekMesh**
:
-
Fix memory consumption issue with Gmsh output (!747)
-
Rework meshing control so that if possible viewable meshes will be dumped
when some part of the system fails (!756)
-
Add manifold meshing option (!756)
v4.4.0
------
**Library**
:
...
...
@@ -57,6 +62,7 @@ v4.4.0
-
Fix bug in FieldUtils when using half mode expansions (!734)
-
Do not read the same fld/pts files again for every variable (!670)
-
Fix bug in CMake PETSc detection for Ubuntu 16.04/Debian 9 (!735)
-
Fix warnings with Intel compiler (!742)
**ADRSolver:**
-
Add a projection equation system for C^0 projections (!675)
...
...
library/LibUtilities/LinearAlgebra/SparseMatrix.cpp
View file @
aec9bc57
...
...
@@ -75,19 +75,19 @@ namespace Nektar
template
<
typename
SparseStorageType
>
const
IndexType
NekSparseMatrix
<
SparseStorageType
>::
GetRows
()
const
IndexType
NekSparseMatrix
<
SparseStorageType
>::
GetRows
()
const
{
return
m_sparseStorage
->
GetRows
();
}
template
<
typename
SparseStorageType
>
const
IndexType
NekSparseMatrix
<
SparseStorageType
>::
GetColumns
()
const
IndexType
NekSparseMatrix
<
SparseStorageType
>::
GetColumns
()
const
{
return
m_sparseStorage
->
GetColumns
();
}
template
<
typename
SparseStorageType
>
const
IndexType
NekSparseMatrix
<
SparseStorageType
>::
GetNumNonZeroEntries
()
const
IndexType
NekSparseMatrix
<
SparseStorageType
>::
GetNumNonZeroEntries
()
const
{
return
m_sparseStorage
->
GetNumNonZeroEntries
();
}
...
...
@@ -137,7 +137,7 @@ namespace Nektar
}
template
<
typename
SparseStorageType
>
const
size_t
NekSparseMatrix
<
SparseStorageType
>::
GetMemoryFootprint
()
const
size_t
NekSparseMatrix
<
SparseStorageType
>::
GetMemoryFootprint
()
const
{
return
m_sparseStorage
->
GetMemoryUsage
(
m_sparseStorage
->
GetNumNonZeroEntries
(),
...
...
@@ -148,7 +148,7 @@ namespace Nektar
}
template
<
typename
SparseStorageType
>
const
unsigned
long
NekSparseMatrix
<
SparseStorageType
>::
GetMulCallsCounter
()
const
unsigned
long
NekSparseMatrix
<
SparseStorageType
>::
GetMulCallsCounter
()
const
{
return
m_mulCallsCounter
;
}
...
...
@@ -161,7 +161,7 @@ namespace Nektar
}
template
<
typename
SparseStorageType
>
const
IndexType
NekSparseMatrix
<
SparseStorageType
>::
GetBandwidth
()
IndexType
NekSparseMatrix
<
SparseStorageType
>::
GetBandwidth
()
{
int
bandwidth
=
0
;
...
...
library/LibUtilities/LinearAlgebra/SparseMatrix.hpp
View file @
aec9bc57
...
...
@@ -73,15 +73,15 @@ namespace Nektar
LIB_UTILITIES_EXPORT
NekSparseMatrix
(
const
NekSparseMatrix
&
src
);
LIB_UTILITIES_EXPORT
~
NekSparseMatrix
();
LIB_UTILITIES_EXPORT
const
IndexType
GetRows
()
const
;
LIB_UTILITIES_EXPORT
const
IndexType
GetColumns
()
const
;
LIB_UTILITIES_EXPORT
const
IndexType
GetNumNonZeroEntries
()
const
;
LIB_UTILITIES_EXPORT
IndexType
GetRows
()
const
;
LIB_UTILITIES_EXPORT
IndexType
GetColumns
()
const
;
LIB_UTILITIES_EXPORT
IndexType
GetNumNonZeroEntries
()
const
;
LIB_UTILITIES_EXPORT
const
DataType
GetFillInRatio
()
const
;
LIB_UTILITIES_EXPORT
const
size_t
GetMemoryFootprint
()
const
;
LIB_UTILITIES_EXPORT
const
unsigned
long
GetMulCallsCounter
()
const
;
LIB_UTILITIES_EXPORT
size_t
GetMemoryFootprint
()
const
;
LIB_UTILITIES_EXPORT
unsigned
long
GetMulCallsCounter
()
const
;
LIB_UTILITIES_EXPORT
const
DataType
GetAvgRowDensity
()
const
;
LIB_UTILITIES_EXPORT
const
IndexType
GetBandwidth
();
LIB_UTILITIES_EXPORT
IndexType
GetBandwidth
();
LIB_UTILITIES_EXPORT
COOMatTypeSharedPtr
GetCooStorage
();
...
...
library/NekMeshUtils/MeshElements/Mesh.cpp
View file @
aec9bc57
...
...
@@ -33,9 +33,9 @@
//
////////////////////////////////////////////////////////////////////////////////
#include <NekMeshUtils/MeshElements/Mesh.h>
#include <LibUtilities/Foundations/ManagerAccess.h>
#include <LibUtilities/BasicUtils/Progressbar.hpp>
#include <LibUtilities/Foundations/ManagerAccess.h>
#include <NekMeshUtils/MeshElements/Mesh.h>
using
namespace
std
;
...
...
@@ -96,17 +96,22 @@ unsigned int Mesh::GetNumEntities()
* - Finally, any boundary elements are updated so that they have the same
* interior degrees of freedom as their corresponding edge or face links.
*/
void
Mesh
::
MakeOrder
(
int
order
,
LibUtilities
::
PointsType
distType
)
void
Mesh
::
MakeOrder
(
int
order
,
LibUtilities
::
PointsType
distType
)
{
// going to make a copy of the curavture information
// cheaper that geom objects
// currently the geometry objects which make up a 3D element
// dont use the volume nodes, they are just stored,
// so we can get away without copying them
int
id
=
m_vertexSet
.
size
();
EdgeSet
::
iterator
eit
;
FaceSet
::
iterator
fit
;
boost
::
unordered_map
<
int
,
SpatialDomains
::
Geometry1DSharedPtr
>
edgeGeoms
;
boost
::
unordered_map
<
int
,
SpatialDomains
::
Geometry2DSharedPtr
>
faceGeoms
;
boost
::
unordered_map
<
int
,
SpatialDomains
::
GeometrySharedPtr
>
volGeoms
;
boost
::
unordered_map
<
int
,
EdgeSharedPtr
>
edgeCopies
;
boost
::
unordered_map
<
int
,
FaceSharedPtr
>
faceCopies
;
// Decide on distribution of points to use for each shape type based on the
// input we've been supplied.
...
...
@@ -127,7 +132,7 @@ void Mesh::MakeOrder(int order,
pTypes
[
LibUtilities
::
eTriangle
]
=
LibUtilities
::
eNodalTriElec
;
pTypes
[
LibUtilities
::
eQuadrilateral
]
=
LibUtilities
::
eGaussLobattoLegendre
;
pTypes
[
LibUtilities
::
ePrism
]
=
LibUtilities
::
eNodalPrismElec
;
pTypes
[
LibUtilities
::
ePrism
]
=
LibUtilities
::
eNodalPrismElec
;
pTypes
[
LibUtilities
::
eTetrahedron
]
=
LibUtilities
::
eNodalTetElec
;
pTypes
[
LibUtilities
::
eHexahedron
]
=
LibUtilities
::
eGaussLobattoLegendre
;
}
...
...
@@ -136,32 +141,20 @@ void Mesh::MakeOrder(int order,
ASSERTL1
(
false
,
"Mesh::MakeOrder does not support this points type."
);
}
// Begin by
generating Nektar++ geometry
objects for edges, faces
and
//
elements
so that we don't affect any neighbouring elements in the mesh as
// Begin by
coping mesh
objects for edges, faces
// so that we don't affect any neighbouring elements in the mesh as
// we process each element.
for
(
eit
=
m_edgeSet
.
begin
();
eit
!=
m_edgeSet
.
end
();
eit
++
)
{
SpatialDomains
::
Geometry1DSharedPtr
geom
=
(
*
eit
)
->
GetGeom
(
m_spaceDim
);
geom
->
FillGeom
();
edgeGeoms
[(
*
eit
)
->
m_id
]
=
geom
;
}
for
(
fit
=
m_faceSet
.
begin
();
fit
!=
m_faceSet
.
end
();
fit
++
)
// at the same time we delete the curvature from the original edge
for
(
eit
=
m_edgeSet
.
begin
();
eit
!=
m_edgeSet
.
end
();
eit
++
)
{
SpatialDomains
::
Geometry2DSharedPtr
geom
=
(
*
fit
)
->
GetGeom
(
m_spaceDim
);
geom
->
FillGeom
();
faceGeoms
[(
*
fit
)
->
m_id
]
=
geom
;
edgeCopies
[(
*
eit
)
->
m_id
]
=
EdgeSharedPtr
(
new
Edge
(
*
(
*
eit
)));
(
*
eit
)
->
m_edgeNodes
.
clear
();
}
for
(
int
i
=
0
;
i
<
m_element
[
m_expDim
].
size
();
i
++
)
for
(
fit
=
m_faceSet
.
begin
();
fit
!=
m_faceSet
.
end
();
fit
++
)
{
ElementSharedPtr
el
=
m_element
[
m_expDim
][
i
];
SpatialDomains
::
GeometrySharedPtr
geom
=
el
->
GetGeom
(
m_spaceDim
);
geom
->
FillGeom
();
volGeoms
[
el
->
GetId
()]
=
geom
;
faceCopies
[(
*
fit
)
->
m_id
]
=
FaceSharedPtr
(
new
Face
(
*
(
*
fit
)));
(
*
fit
)
->
m_faceNodes
.
clear
();
}
boost
::
unordered_set
<
int
>
processedEdges
,
processedFaces
,
processedVolumes
;
...
...
@@ -176,8 +169,8 @@ void Mesh::MakeOrder(int order,
{
if
(
m_verbose
)
{
LibUtilities
::
PrintProgressbar
(
ct
,
m_edgeSet
.
size
(),
"MakeOrder: Edges: "
);
LibUtilities
::
PrintProgressbar
(
ct
,
m_edgeSet
.
size
(),
"MakeOrder: Edges: "
);
}
int
edgeId
=
(
*
eit
)
->
m_id
;
...
...
@@ -186,8 +179,12 @@ void Mesh::MakeOrder(int order,
continue
;
}
(
*
eit
)
->
MakeOrder
(
order
,
edgeGeoms
[
edgeId
],
pTypes
[
LibUtilities
::
eSegment
],
m_spaceDim
,
id
);
EdgeSharedPtr
cpEdge
=
edgeCopies
[
edgeId
];
SpatialDomains
::
GeometrySharedPtr
geom
=
cpEdge
->
GetGeom
(
m_spaceDim
);
geom
->
FillGeom
();
(
*
eit
)
->
MakeOrder
(
order
,
geom
,
pTypes
[
LibUtilities
::
eSegment
],
m_spaceDim
,
id
);
processedEdges
.
insert
(
edgeId
);
}
...
...
@@ -198,8 +195,8 @@ void Mesh::MakeOrder(int order,
{
if
(
m_verbose
)
{
LibUtilities
::
PrintProgressbar
(
ct
,
m_faceSet
.
size
(),
"MakeOrder: Faces: "
);
LibUtilities
::
PrintProgressbar
(
ct
,
m_faceSet
.
size
(),
"MakeOrder: Faces: "
);
}
int
faceId
=
(
*
fit
)
->
m_id
;
...
...
@@ -208,10 +205,14 @@ void Mesh::MakeOrder(int order,
continue
;
}
LibUtilities
::
ShapeType
type
=
(
*
fit
)
->
m_vertexList
.
size
()
==
3
?
LibUtilities
::
eTriangle
:
LibUtilities
::
eQuadrilateral
;
(
*
fit
)
->
MakeOrder
(
order
,
faceGeoms
[
faceId
],
pTypes
[
type
],
m_spaceDim
,
id
);
FaceSharedPtr
cpFace
=
faceCopies
[
faceId
];
SpatialDomains
::
GeometrySharedPtr
geom
=
cpFace
->
GetGeom
(
m_spaceDim
);
geom
->
FillGeom
();
LibUtilities
::
ShapeType
type
=
(
*
fit
)
->
m_vertexList
.
size
()
==
3
?
LibUtilities
::
eTriangle
:
LibUtilities
::
eQuadrilateral
;
(
*
fit
)
->
MakeOrder
(
order
,
geom
,
pTypes
[
type
],
m_spaceDim
,
id
);
processedFaces
.
insert
(
faceId
);
}
...
...
@@ -219,7 +220,7 @@ void Mesh::MakeOrder(int order,
for
(
int
i
=
0
;
i
<
m_element
[
1
].
size
();
++
i
)
{
ElementSharedPtr
el
=
m_element
[
1
][
i
];
EdgeSharedPtr
edge
=
el
->
GetEdgeLink
();
EdgeSharedPtr
edge
=
el
->
GetEdgeLink
();
if
(
!
edge
)
{
...
...
@@ -235,7 +236,7 @@ void Mesh::MakeOrder(int order,
for
(
int
i
=
0
;
i
<
m_element
[
2
].
size
();
++
i
)
{
ElementSharedPtr
el
=
m_element
[
2
][
i
];
FaceSharedPtr
face
=
el
->
GetFaceLink
();
FaceSharedPtr
face
=
el
->
GetFaceLink
();
if
(
!
face
)
{
...
...
@@ -256,9 +257,10 @@ void Mesh::MakeOrder(int order,
{
LibUtilities
::
PrintProgressbar
(
i
,
nElmt
,
"MakeOrder: Elements: "
);
}
ElementSharedPtr
el
=
m_element
[
m_expDim
][
i
];
el
->
MakeOrder
(
order
,
volGeoms
[
el
->
GetId
()],
pTypes
[
el
->
GetConf
().
m_e
],
m_spaceDim
,
id
);
ElementSharedPtr
el
=
m_element
[
m_expDim
][
i
];
SpatialDomains
::
GeometrySharedPtr
geom
=
el
->
GetGeom
(
m_spaceDim
);
geom
->
FillGeom
();
el
->
MakeOrder
(
order
,
geom
,
pTypes
[
el
->
GetConf
().
m_e
],
m_spaceDim
,
id
);
}
if
(
m_verbose
)
...
...
@@ -266,6 +268,5 @@ void Mesh::MakeOrder(int order,
cout
<<
endl
;
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment