Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nektar
Nektar
Commits
362a3c0b
Commit
362a3c0b
authored
Feb 02, 2017
by
Michael Turner
Browse files
spencers comments on tutorial
parent
7be3aea5
Changes
7
Hide whitespace changes
Inline
Side-by-side
utilities/NekMesh/CMakeLists.txt
View file @
362a3c0b
...
...
@@ -79,14 +79,14 @@ IF (NEKTAR_USE_MESHGEN)
ProcessModules/ProcessVarOpti/ElUtil.h
ProcessModules/ProcessVarOpti/Evaluator.hxx
ProcessModules/ProcessVarOpti/Hessian.hxx
InputModules/Input
CAD
.h
)
InputModules/Input
MCF
.h
)
SET
(
NekMeshSources
${
NekMeshSources
}
ProcessModules/ProcessVarOpti/NodeOptiCAD.cpp
ProcessModules/ProcessVarOpti/ProcessVarOpti.cpp
ProcessModules/ProcessVarOpti/PreProcessing.cpp
ProcessModules/ProcessVarOpti/NodeOpti.cpp
ProcessModules/ProcessVarOpti/ElUtil.cpp
InputModules/Input
CAD
.cpp
)
InputModules/Input
MCF
.cpp
)
ENDIF
(
NEKTAR_USE_MESHGEN
)
# Don't use macro -- this way we can just link against NekMeshUtils and
...
...
@@ -150,5 +150,5 @@ IF(NEKTAR_USE_MESHGEN)
ADD_NEKTAR_TEST
(
MeshGen/2d-cad
)
ADD_NEKTAR_TEST
(
MeshGen/2d-naca
)
# varopti tests
ADD_NEKTAR_TEST
(
MeshGen/varopti_cubesphere
)
ADD_NEKTAR_TEST
_LENGTHY
(
MeshGen/varopti_cubesphere
)
ENDIF
()
utilities/NekMesh/InputModules/Input
CAD
.cpp
→
utilities/NekMesh/InputModules/Input
MCF
.cpp
View file @
362a3c0b
...
...
@@ -39,7 +39,7 @@
#include <tinyxml.h>
#include "Input
CAD
.h"
#include "Input
MCF
.h"
using
namespace
std
;
using
namespace
Nektar
::
NekMeshUtils
;
...
...
@@ -49,22 +49,22 @@ namespace Nektar
namespace
Utilities
{
ModuleKey
Input
CAD
::
className
=
GetModuleFactory
().
RegisterCreatorFunction
(
ModuleKey
(
eInputModule
,
"mcf"
),
Input
CAD
::
create
,
"Reads
CAD geometry
and will generate the mesh file."
);
ModuleKey
Input
MCF
::
className
=
GetModuleFactory
().
RegisterCreatorFunction
(
ModuleKey
(
eInputModule
,
"mcf"
),
Input
MCF
::
create
,
"Reads
mesh configuration
and will generate the mesh file."
);
/**
* @brief Set up InputCAD object.
*/
Input
CAD
::
Input
CAD
(
MeshSharedPtr
m
)
:
InputModule
(
m
)
Input
MCF
::
Input
MCF
(
MeshSharedPtr
m
)
:
InputModule
(
m
)
{
}
Input
CAD
::~
Input
CAD
()
Input
MCF
::~
Input
MCF
()
{
}
void
Input
CAD
::
ParseFile
(
string
nm
)
void
Input
MCF
::
ParseFile
(
string
nm
)
{
vector
<
string
>
filename
;
filename
.
push_back
(
nm
);
...
...
@@ -159,13 +159,17 @@ void InputCAD::ParseFile(string nm)
it
=
information
.
find
(
"MeshType"
);
ASSERTL0
(
it
!=
information
.
end
(),
"no meshtype defined"
);
m_makeBL
=
it
->
second
==
"
BL
"
;
m_makeBL
=
it
->
second
==
"
3DBndLayer
"
;
m_2D
=
it
->
second
==
"2D"
;
if
(
it
->
second
==
"2DB
L
"
)
if
(
it
->
second
==
"2DB
ndLayer
"
)
{
m_makeBL
=
true
;
m_2D
=
true
;
}
if
(
!
m_makeBL
&&
!
m_2D
)
{
ASSERTL0
(
it
->
second
==
"3D"
,
"unsure on MeshType"
)
}
it
=
parameters
.
find
(
"MinDelta"
);
...
...
@@ -186,20 +190,20 @@ void InputCAD::ParseFile(string nm)
if
(
m_makeBL
)
{
it
=
parameters
.
find
(
"B
L
Surfs"
);
ASSERTL0
(
it
!=
parameters
.
end
(),
"no
bl
surfs defined"
);
it
=
parameters
.
find
(
"B
ndLayer
Surf
ace
s"
);
ASSERTL0
(
it
!=
parameters
.
end
(),
"no
BndLayer
surfs defined"
);
m_blsurfs
=
it
->
second
;
it
=
parameters
.
find
(
"B
L
Thick"
);
ASSERTL0
(
it
!=
parameters
.
end
(),
"no
bl
thick defined"
);
it
=
parameters
.
find
(
"B
ndLayer
Thick
ness
"
);
ASSERTL0
(
it
!=
parameters
.
end
(),
"no
BndLayer
thick defined"
);
m_blthick
=
it
->
second
;
it
=
parameters
.
find
(
"B
L
Layers"
);
it
=
parameters
.
find
(
"B
ndLayer
Layers"
);
m_splitBL
=
it
!=
parameters
.
end
();
if
(
m_splitBL
)
{
m_bllayers
=
it
->
second
;
it
=
parameters
.
find
(
"B
LProg
"
);
it
=
parameters
.
find
(
"B
ndLayerProgression
"
);
m_blprog
=
it
!=
parameters
.
end
()
?
it
->
second
:
"2.0"
;
}
}
...
...
@@ -230,11 +234,11 @@ void InputCAD::ParseFile(string nm)
}
set
<
string
>::
iterator
sit
;
sit
=
boolparameters
.
find
(
"SurfOpti"
);
sit
=
boolparameters
.
find
(
"Surf
ace
Opti
miser
"
);
m_surfopti
=
sit
!=
boolparameters
.
end
();
sit
=
boolparameters
.
find
(
"WriteOctree"
);
m_woct
=
sit
!=
boolparameters
.
end
();
sit
=
boolparameters
.
find
(
"Var
Opti
"
);
sit
=
boolparameters
.
find
(
"Var
iationalOptimiser
"
);
m_varopti
=
sit
!=
boolparameters
.
end
();
m_refine
=
refinement
.
size
()
>
0
;
...
...
@@ -251,7 +255,7 @@ void InputCAD::ParseFile(string nm)
}
}
void
Input
CAD
::
Process
()
void
Input
MCF
::
Process
()
{
ParseFile
(
m_config
[
"infile"
].
as
<
string
>
());
...
...
utilities/NekMesh/InputModules/Input
CAD
.h
→
utilities/NekMesh/InputModules/Input
MCF
.h
View file @
362a3c0b
...
...
@@ -33,8 +33,8 @@
//
////////////////////////////////////////////////////////////////////////////////
#ifndef UTILITIES_NEKMESH_INPUT
CAD
#define UTILITIES_NEKMESH_INPUT
CAD
#ifndef UTILITIES_NEKMESH_INPUT
MCF
#define UTILITIES_NEKMESH_INPUT
MCF
#include <NekMeshUtils/Module/Module.h>
...
...
@@ -43,17 +43,17 @@ namespace Nektar
namespace
Utilities
{
class
Input
CAD
:
public
NekMeshUtils
::
InputModule
class
Input
MCF
:
public
NekMeshUtils
::
InputModule
{
public:
Input
CAD
(
NekMeshUtils
::
MeshSharedPtr
m
);
virtual
~
Input
CAD
();
Input
MCF
(
NekMeshUtils
::
MeshSharedPtr
m
);
virtual
~
Input
MCF
();
virtual
void
Process
();
/// Creates an instance of this class
static
NekMeshUtils
::
ModuleSharedPtr
create
(
NekMeshUtils
::
MeshSharedPtr
m
)
{
return
MemoryManager
<
Input
CAD
>::
AllocateSharedPtr
(
m
);
return
MemoryManager
<
Input
MCF
>::
AllocateSharedPtr
(
m
);
}
/// %ModuleKey for class.
static
NekMeshUtils
::
ModuleKey
className
;
...
...
utilities/NekMesh/Tests/MeshGen/2d-cad.mcf
View file @
362a3c0b
...
...
@@ -3,7 +3,7 @@
<INFORMATION>
<I PROPERTY="CADFile" VALUE="2d-cad.STEP" />
<I PROPERTY="MeshType" VALUE="2DB
L
" />
<I PROPERTY="MeshType" VALUE="2DB
ndLayer
" />
</INFORMATION>
<PARAMETERS>
...
...
@@ -13,10 +13,10 @@
<P PARAM="Order" VALUE="4" />
<P PARAM="B
L
Surfs" VALUE="5-6" />
<P PARAM="B
L
Thick" VALUE="0.02" />
<P PARAM="B
L
Layers" VALUE="6" />
<P PARAM="B
LProg
" VALUE="1.5" />
<P PARAM="B
ndLayer
Surf
ace
s" VALUE="5-6" />
<P PARAM="B
ndLayer
Thick
ness
" VALUE="0.02" />
<P PARAM="B
ndLayer
Layers" VALUE="6" />
<P PARAM="B
ndLayerProgression
" VALUE="1.5" />
</PARAMETERS>
<BOOLPARAMETERS>
...
...
utilities/NekMesh/Tests/MeshGen/2d-naca.mcf
View file @
362a3c0b
...
...
@@ -3,7 +3,7 @@
<INFORMATION>
<I PROPERTY="CADFile" VALUE="0012" />
<I PROPERTY="MeshType" VALUE="2DB
L
" />
<I PROPERTY="MeshType" VALUE="2DB
ndLayer
" />
</INFORMATION>
<PARAMETERS>
...
...
@@ -13,8 +13,8 @@
<P PARAM="Order" VALUE="4" />
<P PARAM="B
L
Surfs" VALUE="5-6" />
<P PARAM="B
L
Thick" VALUE="0.05" />
<P PARAM="B
ndLayer
Surf
ace
s" VALUE="5-6" />
<P PARAM="B
ndLayer
Thick
ness
" VALUE="0.05" />
<P PARAM="Xmin" VALUE="-1.0" />
<P PARAM="Ymin" VALUE="-2.0" />
...
...
utilities/NekMesh/Tests/MeshGen/cylinder.mcf
View file @
362a3c0b
...
...
@@ -3,7 +3,7 @@
<INFORMATION>
<I PROPERTY="CADFile" VALUE="cylinder.STEP" />
<I PROPERTY="MeshType" VALUE="
Euler
" />
<I PROPERTY="MeshType" VALUE="
3D
" />
</INFORMATION>
<PARAMETERS>
...
...
utilities/NekMesh/Tests/MeshGen/sphere.mcf
View file @
362a3c0b
...
...
@@ -3,7 +3,7 @@
<INFORMATION>
<I PROPERTY="CADFile" VALUE="sphere.STEP" />
<I PROPERTY="MeshType" VALUE="
Euler
" />
<I PROPERTY="MeshType" VALUE="
3D
" />
</INFORMATION>
<PARAMETERS>
...
...
@@ -15,7 +15,7 @@
</PARAMETERS>
<BOOLPARAMETERS>
<P VALUE="SurfOpti" />
<P VALUE="Surf
ace
Opti
miser
" />
</BOOLPARAMETERS>
</MESHING>
...
...
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