Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Nektar
Nektar
Commits
cd81bd9b
Commit
cd81bd9b
authored
Dec 01, 2017
by
Michael Turner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix tatarclength function
parent
24617c15
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
27 deletions
+23
-27
library/NekMeshUtils/2DGenerator/2DGenerator.cpp
library/NekMeshUtils/2DGenerator/2DGenerator.cpp
+1
-4
library/NekMeshUtils/CADSystem/OCE/CADCurveOCE.cpp
library/NekMeshUtils/CADSystem/OCE/CADCurveOCE.cpp
+3
-18
library/NekMeshUtils/CADSystem/OCE/OpenCascade.h
library/NekMeshUtils/CADSystem/OCE/OpenCascade.h
+1
-0
library/NekMeshUtils/Octree/Octree.cpp
library/NekMeshUtils/Octree/Octree.cpp
+18
-5
No files found.
library/NekMeshUtils/2DGenerator/2DGenerator.cpp
View file @
cd81bd9b
...
...
@@ -188,7 +188,7 @@ void Generator2D::Process()
nodes
);
}
}
if
(
m_mesh
->
m_verbose
)
{
cout
<<
endl
<<
"
\t
Face meshing:"
<<
endl
<<
endl
;
...
...
@@ -226,9 +226,6 @@ void Generator2D::Process()
m_mesh
->
m_element
[
1
].
push_back
(
E2
);
}
// m_mesh->m_expDim = 1;
// m_mesh->m_element[2].clear();
ProcessVertices
();
ProcessEdges
();
ProcessFaces
();
...
...
library/NekMeshUtils/CADSystem/OCE/CADCurveOCE.cpp
View file @
cd81bd9b
...
...
@@ -61,24 +61,9 @@ void CADCurveOCE::Initialise(int i, TopoDS_Shape in)
NekDouble
CADCurveOCE
::
tAtArcLength
(
NekDouble
s
)
{
NekDouble
dt
=
(
m_b
[
1
]
-
m_b
[
0
])
/
(
1000
);
NekDouble
t
=
m_b
[
0
];
NekDouble
len
=
0.0
;
while
(
len
<=
s
)
{
gp_Pnt
P1
,
P2
;
gp_Vec
drdt1
,
drdt2
;
m_c
->
D1
(
t
,
P1
,
drdt1
);
t
+=
dt
;
m_c
->
D1
(
t
,
P2
,
drdt2
);
len
+=
(
drdt1
.
Magnitude
()
+
drdt2
.
Magnitude
())
/
2.0
*
dt
/
1000.0
;
}
return
t
-
dt
;
GeomAdaptor_Curve
c
(
m_c
);
GCPnts_AbscissaPoint
ap
(
c
,
s
*
1000.0
,
m_b
[
0
]);
return
ap
.
Parameter
();
}
NekDouble
CADCurveOCE
::
Length
(
NekDouble
ti
,
NekDouble
tf
)
...
...
library/NekMeshUtils/CADSystem/OCE/OpenCascade.h
View file @
cd81bd9b
...
...
@@ -68,6 +68,7 @@
#include <ShapeAnalysis_Curve.hxx>
#include <BRepBndLib.hxx>
#include <BRepExtrema_DistShapeShape.hxx>
#include <GCPnts_AbscissaPoint.hxx>
/// Shape fixing classes
#include <ShapeFix_Face.hxx>
...
...
library/NekMeshUtils/Octree/Octree.cpp
View file @
cd81bd9b
...
...
@@ -836,14 +836,25 @@ int Octree::CountElemt()
void
Octree
::
CompileSourcePointList
()
{
int
totalEnt
=
m_mesh
->
m_cad
->
GetNumSurf
();
int
preEnt
=
0
;
if
(
m_mesh
->
m_cad
->
Is2D
())
{
totalEnt
+=
m_mesh
->
m_cad
->
GetNumCurve
();
preEnt
+=
m_mesh
->
m_cad
->
GetNumCurve
();
for
(
int
i
=
1
;
i
<=
m_mesh
->
m_cad
->
GetNumCurve
();
i
++
)
{
if
(
m_mesh
->
m_verbose
)
{
LibUtilities
::
PrintProgressbar
(
i
,
totalEnt
,
"
\t
Compiling source points"
);
}
CADCurveSharedPtr
curve
=
m_mesh
->
m_cad
->
GetCurve
(
i
);
Array
<
OneD
,
NekDouble
>
bds
=
curve
->
GetBounds
();
int
samples
=
100
;
//this works assuming the curves are not distorted
int
samples
=
ceil
(
curve
->
Length
(
bds
[
0
],
bds
[
1
])
/
m_minDelta
)
*
2
;
samples
=
max
(
40
,
samples
);
NekDouble
dt
=
(
bds
[
1
]
-
bds
[
0
])
/
(
samples
+
1
);
for
(
int
j
=
1
;
j
<
samples
-
1
;
j
++
)
// dont want first and last point
{
...
...
@@ -891,7 +902,7 @@ void Octree::CompileSourcePointList()
{
if
(
m_mesh
->
m_verbose
)
{
LibUtilities
::
PrintProgressbar
(
i
,
m_mesh
->
m_cad
->
GetNumSurf
()
,
LibUtilities
::
PrintProgressbar
(
preEnt
+
i
,
totalEnt
,
"
\t
Compiling source points"
);
}
...
...
@@ -959,8 +970,10 @@ void Octree::CompileSourcePointList()
// these are the acutal number of sample points in each parametric
// direction
int
nu
=
ceil
(
DeltaU
/
m_minDelta
)
*
40
*
2
;
int
nv
=
ceil
(
DeltaV
/
m_minDelta
)
*
40
*
2
;
int
nu
=
ceil
(
DeltaU
*
40
/
m_minDelta
)
*
2
;
int
nv
=
ceil
(
DeltaV
*
40
/
m_minDelta
)
*
2
;
nu
=
max
(
40
,
nu
);
nv
=
max
(
40
,
nv
);
for
(
int
j
=
0
;
j
<
nu
;
j
++
)
{
...
...
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