Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
f656ebc9
Commit
f656ebc9
authored
19 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
- better fallback when outside the octree - disable bgm when optimizing in netgen
parent
f52fb269
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Mesh/3D_BGMesh.cpp
+17
-4
17 additions, 4 deletions
Mesh/3D_BGMesh.cpp
Mesh/3D_Mesh_Netgen.cpp
+6
-2
6 additions, 2 deletions
Mesh/3D_Mesh_Netgen.cpp
doc/VERSIONS
+4
-3
4 additions, 3 deletions
doc/VERSIONS
with
27 additions
and
9 deletions
Mesh/3D_BGMesh.cpp
+
17
−
4
View file @
f656ebc9
// $Id: 3D_BGMesh.cpp,v 1.4
0
2006-01-28 1
8:44
:1
9
geuzaine Exp $
// $Id: 3D_BGMesh.cpp,v 1.4
1
2006-01-28 1
9:53
:1
8
geuzaine Exp $
//
// Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
//
...
...
@@ -30,18 +30,20 @@ extern Mesh *THEM;
extern
Context_T
CTX
;
static
OctreePost
*
BGM_OCTREE
=
NULL
;
static
double
BGM_MAX
=
0.
;
int
BGMWithView
(
Post_View
*
ErrView
)
{
if
(
BGM_OCTREE
)
delete
BGM_OCTREE
;
BGM_OCTREE
=
new
OctreePost
(
ErrView
);
BGM_MAX
=
ErrView
->
Max
;
Create_BgMesh
(
ONFILE
,
.2
,
THEM
);
return
1
;
}
double
Lc_XYZ
(
double
X
,
double
Y
,
double
Z
,
Mesh
*
m
)
{
double
l
;
double
l
,
fact
[
6
]
=
{
0.001
,
0.005
,
0.01
,
0.05
,
0.1
,
0.5
}
;
switch
(
m
->
BGM
.
Typ
)
{
case
FUNCTION
:
...
...
@@ -52,7 +54,18 @@ double Lc_XYZ(double X, double Y, double Z, Mesh * m)
l
=
m
->
BGM
.
lc
;
break
;
case
ONFILE
:
BGM_OCTREE
->
searchScalar
(
X
,
Y
,
Z
,
&
l
,
0
);
if
(
!
BGM_OCTREE
->
searchScalar
(
X
,
Y
,
Z
,
&
l
,
0
)){
for
(
int
i
=
0
;
i
<
6
;
i
++
){
double
eps
=
CTX
.
lc
*
fact
[
i
];
if
(
BGM_OCTREE
->
searchScalar
(
X
+
eps
,
Y
,
Z
,
&
l
,
0
))
break
;
if
(
BGM_OCTREE
->
searchScalar
(
X
-
eps
,
Y
,
Z
,
&
l
,
0
))
break
;
if
(
BGM_OCTREE
->
searchScalar
(
X
,
Y
+
eps
,
Z
,
&
l
,
0
))
break
;
if
(
BGM_OCTREE
->
searchScalar
(
X
,
Y
-
eps
,
Z
,
&
l
,
0
))
break
;
if
(
BGM_OCTREE
->
searchScalar
(
X
,
Y
,
Z
+
eps
,
&
l
,
0
))
break
;
if
(
BGM_OCTREE
->
searchScalar
(
X
,
Y
,
Z
-
eps
,
&
l
,
0
))
break
;
}
}
if
(
l
<=
0
)
l
=
BGM_MAX
;
break
;
case
WITHPOINTS
:
Msg
(
GERROR
,
"We should never call Lc_XYZ with BGM.Typ == WITHPOINTS!"
);
...
...
@@ -61,7 +74,7 @@ double Lc_XYZ(double X, double Y, double Z, Mesh * m)
}
if
(
l
<=
0.
){
Msg
(
WARNING
,
"Characteristic length <= 0
: setting to LC/10"
);
Msg
(
WARNING
,
"Characteristic length <= 0
at point (%g,%g,%g)"
,
X
,
Y
,
Z
);
l
=
CTX
.
lc
/
10.
;
}
...
...
This diff is collapsed.
Click to expand it.
Mesh/3D_Mesh_Netgen.cpp
+
6
−
2
View file @
f656ebc9
// $Id: 3D_Mesh_Netgen.cpp,v 1.1
8
2006-01-
06 00:34:26
geuzaine Exp $
// $Id: 3D_Mesh_Netgen.cpp,v 1.1
9
2006-01-
28 19:53:18
geuzaine Exp $
//
// Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
//
...
...
@@ -312,7 +312,11 @@ void Optimize_Netgen(Mesh *m)
Msg
(
STATUS2
,
"Optimize volume mesh..."
);
double
t1
=
Cpu
();
Degre1
();
// cleanup 2nd order vertices, if any
// cleanup 2nd order vertices, if any
Degre1
();
// make sure we don't use any fancy background mesh
Create_BgMesh
(
WITHPOINTS
,
.2
,
m
);
List_T
*
list
=
Tree2List
(
m
->
Volumes
);
for
(
int
i
=
0
;
i
<
List_Nbr
(
list
);
i
++
){
...
...
This diff is collapsed.
Click to expand it.
doc/VERSIONS
+
4
−
3
View file @
f656ebc9
$Id: VERSIONS,v 1.35
5
2006-01-28
05:26:43
geuzaine Exp $
$Id: VERSIONS,v 1.35
6
2006-01-28
19:53:18
geuzaine Exp $
New since 1.62: post-processing views can now also be exported as
meshes; small bug fixes and enhancements.
New since 1.62: post-processing views can now also be exported as
meshes; speedup generation of meshes w/ background characteristic
length fields from post-pro views; small bug fixes and enhancements.
New in 1.62: new option to draw color gradients in the background;
enhanced perspective projection mode; new "lasso" selection mode (same
...
...
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