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
Longxiang Li
Nektar
Commits
8232ec46
Commit
8232ec46
authored
Aug 15, 2016
by
Dave Moxey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Start cleaning up files
parent
fb563319
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
10 deletions
+36
-10
utilities/NekMesh/OutputModules/OutputGmsh.cpp
utilities/NekMesh/OutputModules/OutputGmsh.cpp
+28
-10
utilities/NekMesh/OutputModules/OutputNekpp.cpp
utilities/NekMesh/OutputModules/OutputNekpp.cpp
+8
-0
No files found.
utilities/NekMesh/OutputModules/OutputGmsh.cpp
View file @
8232ec46
...
...
@@ -64,6 +64,8 @@ OutputGmsh::OutputGmsh(MeshSharedPtr m) : OutputModule(m)
{
elmMap
[
it
->
second
]
=
it
->
first
;
}
m_config
[
"order"
]
=
ConfigOption
(
false
,
"-1"
,
"Enforce a polynomial order"
);
}
OutputGmsh
::~
OutputGmsh
()
...
...
@@ -87,6 +89,9 @@ void OutputGmsh::Process()
cout
<<
"OutputGmsh: Writing file..."
<<
endl
;
}
boost
::
unordered_map
<
int
,
vector
<
int
>
>
orderingMap
;
boost
::
unordered_map
<
int
,
vector
<
int
>
>::
iterator
oIt
;
// Open the file stream.
OpenStream
();
...
...
@@ -98,23 +103,36 @@ void OutputGmsh::Process()
int
id
=
m_mesh
->
m_vertexSet
.
size
();
vector
<
ElementSharedPtr
>
toComplete
;
int
maxO
rder
=
-
1
;
int
o
rder
=
m_config
[
"order"
].
as
<
int
>
()
;
// Do first pass over elements of expansion dimension to determine
// which elements need completion.
for
(
int
i
=
0
;
i
<
m_mesh
->
m_element
[
m_mesh
->
m_expDim
].
size
();
++
i
)
if
(
order
!=
-
1
)
{
if
(
m_mesh
->
m_verbose
)
{
cout
<<
"Making mesh of order "
<<
order
<<
endl
;
}
}
else
{
ElementSharedPtr
e
=
m_mesh
->
m_element
[
m_mesh
->
m_expDim
][
i
];
if
(
e
->
GetMaxOrder
()
>
maxOrder
)
// Do first pass over elements of expansion dimension to determine
// which elements need completion.
for
(
int
i
=
0
;
i
<
m_mesh
->
m_element
[
m_mesh
->
m_expDim
].
size
();
++
i
)
{
maxOrder
=
e
->
GetMaxOrder
();
ElementSharedPtr
e
=
m_mesh
->
m_element
[
m_mesh
->
m_expDim
][
i
];
if
(
e
->
GetMaxOrder
()
>
order
)
{
order
=
e
->
GetMaxOrder
();
}
}
}
// Convert this mesh into a high-order mesh of uniform order.
cout
<<
"Mesh order of "
<<
maxOrder
<<
" detected"
<<
endl
;
maxOrder
=
4
;
m_mesh
->
MakeOrder
(
maxOrder
,
LibUtilities
::
ePolyEvenlySpaced
);
if
(
m_mesh
->
m_verbose
)
{
cout
<<
"Mesh order of "
<<
order
<<
" detected"
<<
endl
;
}
m_mesh
->
MakeOrder
(
order
,
LibUtilities
::
ePolyEvenlySpaced
);
// Add edge- and face-interior nodes to vertex set.
EdgeSet
::
iterator
eIt
;
...
...
utilities/NekMesh/OutputModules/OutputNekpp.cpp
View file @
8232ec46
...
...
@@ -68,6 +68,7 @@ OutputNekpp::OutputNekpp(MeshSharedPtr m) : OutputModule(m)
m_config
[
"test"
]
=
ConfigOption
(
true
,
"0"
,
"Attempt to load resulting mesh and create meshgraph."
);
m_config
[
"uncompress"
]
=
ConfigOption
(
true
,
"0"
,
"Uncompress xml sections"
);
m_config
[
"order"
]
=
ConfigOption
(
false
,
"-1"
,
"Enforce a polynomial order"
);
}
OutputNekpp
::~
OutputNekpp
()
...
...
@@ -98,6 +99,13 @@ void OutputNekpp::Process()
cout
<<
"OutputNekpp: Writing file..."
<<
endl
;
}
int
order
=
m_config
[
"order"
].
as
<
int
>
();
if
(
order
!=
-
1
)
{
m_mesh
->
MakeOrder
(
order
,
LibUtilities
::
ePolyEvenlySpaced
);
}
TiXmlDocument
doc
;
TiXmlDeclaration
*
decl
=
new
TiXmlDeclaration
(
"1.0"
,
"utf-8"
,
""
);
doc
.
LinkEndChild
(
decl
);
...
...
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