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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
7ab038c6
Commit
7ab038c6
authored
12 years ago
by
Francois Henrotte
Browse files
Options
Downloads
Patches
Plain Diff
bug fix
parent
69897d88
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
Mesh/Matrix.h
+1
-1
1 addition, 1 deletion
Mesh/Matrix.h
Mesh/cross3D.h
+2
-0
2 additions, 0 deletions
Mesh/cross3D.h
Mesh/directions3D.cpp
+9
-6
9 additions, 6 deletions
Mesh/directions3D.cpp
Mesh/simple3D.cpp
+5
-5
5 additions, 5 deletions
Mesh/simple3D.cpp
with
17 additions
and
12 deletions
Mesh/Matrix.h
+
1
−
1
View file @
7ab038c6
...
@@ -39,7 +39,7 @@ class Matrix{
...
@@ -39,7 +39,7 @@ class Matrix{
double
get_m31
(){
return
m31
;
}
double
get_m31
(){
return
m31
;
}
double
get_m12
(){
return
m12
;
}
double
get_m12
(){
return
m12
;
}
double
get_m22
(){
return
m22
;
}
double
get_m22
(){
return
m22
;
}
double
get_m32
(){
return
m
2
3
;
}
double
get_m32
(){
return
m3
2
;
}
double
get_m13
(){
return
m13
;
}
double
get_m13
(){
return
m13
;
}
double
get_m23
(){
return
m23
;
}
double
get_m23
(){
return
m23
;
}
double
get_m33
(){
return
m33
;
}
double
get_m33
(){
return
m33
;
}
...
...
This diff is collapsed.
Click to expand it.
Mesh/cross3D.h
+
2
−
0
View file @
7ab038c6
...
@@ -13,6 +13,8 @@
...
@@ -13,6 +13,8 @@
#include
"stat_quatern.h"
#include
"stat_quatern.h"
using
namespace
CwMtx
;
using
namespace
CwMtx
;
#include
"Matrix.h"
//double max(const double a, const double b) { return (b>a)?b:a;}
//double max(const double a, const double b) { return (b>a)?b:a;}
double
min
(
const
double
a
,
const
double
b
)
{
return
(
b
<
a
)
?
b
:
a
;
}
double
min
(
const
double
a
,
const
double
b
)
{
return
(
b
<
a
)
?
b
:
a
;
}
double
squ
(
const
double
a
)
{
return
a
*
a
;
}
double
squ
(
const
double
a
)
{
return
a
*
a
;
}
...
...
This diff is collapsed.
Click to expand it.
Mesh/directions3D.cpp
+
9
−
6
View file @
7ab038c6
...
@@ -549,30 +549,31 @@ void Frame_field::save(GRegion* gr, const std::string& filename){
...
@@ -549,30 +549,31 @@ void Frame_field::save(GRegion* gr, const std::string& filename){
m
=
itA
->
second
;
m
=
itA
->
second
;
p
=
SPoint3
(
pVertex
->
x
(),
pVertex
->
y
(),
pVertex
->
z
());
p
=
SPoint3
(
pVertex
->
x
(),
pVertex
->
y
(),
pVertex
->
z
());
double
val1
=
0
,
val2
=
0
;
p1
=
SPoint3
(
pVertex
->
x
()
+
k
*
m
.
get_m11
(),
p1
=
SPoint3
(
pVertex
->
x
()
+
k
*
m
.
get_m11
(),
pVertex
->
y
()
+
k
*
m
.
get_m21
(),
pVertex
->
y
()
+
k
*
m
.
get_m21
(),
pVertex
->
z
()
+
k
*
m
.
get_m31
());
pVertex
->
z
()
+
k
*
m
.
get_m31
());
print_segment
(
p
,
p1
,
pVertex
->
z
(),
pVertex
->
z
()
,
file
);
print_segment
(
p
,
p1
,
val1
,
val2
,
file
);
p1
=
SPoint3
(
pVertex
->
x
()
-
k
*
m
.
get_m11
(),
p1
=
SPoint3
(
pVertex
->
x
()
-
k
*
m
.
get_m11
(),
pVertex
->
y
()
-
k
*
m
.
get_m21
(),
pVertex
->
y
()
-
k
*
m
.
get_m21
(),
pVertex
->
z
()
-
k
*
m
.
get_m31
());
pVertex
->
z
()
-
k
*
m
.
get_m31
());
print_segment
(
p
,
p1
,
pVertex
->
z
(),
pVertex
->
z
()
,
file
);
print_segment
(
p
,
p1
,
val1
,
val2
,
file
);
p1
=
SPoint3
(
pVertex
->
x
()
+
k
*
m
.
get_m12
(),
p1
=
SPoint3
(
pVertex
->
x
()
+
k
*
m
.
get_m12
(),
pVertex
->
y
()
+
k
*
m
.
get_m22
(),
pVertex
->
y
()
+
k
*
m
.
get_m22
(),
pVertex
->
z
()
+
k
*
m
.
get_m32
());
pVertex
->
z
()
+
k
*
m
.
get_m32
());
print_segment
(
p
,
p1
,
pVertex
->
z
(),
pVertex
->
z
()
,
file
);
print_segment
(
p
,
p1
,
val1
,
val2
,
file
);
p1
=
SPoint3
(
pVertex
->
x
()
-
k
*
m
.
get_m12
(),
p1
=
SPoint3
(
pVertex
->
x
()
-
k
*
m
.
get_m12
(),
pVertex
->
y
()
-
k
*
m
.
get_m22
(),
pVertex
->
y
()
-
k
*
m
.
get_m22
(),
pVertex
->
z
()
-
k
*
m
.
get_m32
());
pVertex
->
z
()
-
k
*
m
.
get_m32
());
print_segment
(
p
,
p1
,
pVertex
->
z
(),
pVertex
->
z
()
,
file
);
print_segment
(
p
,
p1
,
val1
,
val2
,
file
);
p1
=
SPoint3
(
pVertex
->
x
()
+
k
*
m
.
get_m13
(),
p1
=
SPoint3
(
pVertex
->
x
()
+
k
*
m
.
get_m13
(),
pVertex
->
y
()
+
k
*
m
.
get_m23
(),
pVertex
->
y
()
+
k
*
m
.
get_m23
(),
pVertex
->
z
()
+
k
*
m
.
get_m33
());
pVertex
->
z
()
+
k
*
m
.
get_m33
());
print_segment
(
p
,
p1
,
pVertex
->
z
(),
pVertex
->
z
()
,
file
);
print_segment
(
p
,
p1
,
val1
,
val2
,
file
);
p1
=
SPoint3
(
pVertex
->
x
()
-
k
*
m
.
get_m13
(),
p1
=
SPoint3
(
pVertex
->
x
()
-
k
*
m
.
get_m13
(),
pVertex
->
y
()
-
k
*
m
.
get_m23
(),
pVertex
->
y
()
-
k
*
m
.
get_m23
(),
pVertex
->
z
()
-
k
*
m
.
get_m33
());
pVertex
->
z
()
-
k
*
m
.
get_m33
());
print_segment
(
p
,
p1
,
pVertex
->
z
(),
pVertex
->
z
()
,
file
);
print_segment
(
p
,
p1
,
val1
,
val2
,
file
);
}
}
file
<<
"};
\n
"
;
file
<<
"};
\n
"
;
file
.
close
();
file
.
close
();
...
@@ -584,6 +585,7 @@ void Frame_field::fillTreeVolume(GRegion* gr){
...
@@ -584,6 +585,7 @@ void Frame_field::fillTreeVolume(GRegion* gr){
std
::
cout
<<
"Filling ANN tree with "
<<
n
<<
" vertices"
<<
std
::
endl
;
std
::
cout
<<
"Filling ANN tree with "
<<
n
<<
" vertices"
<<
std
::
endl
;
annTreeData
=
annAllocPts
(
n
,
3
);
annTreeData
=
annAllocPts
(
n
,
3
);
int
index
=
0
;
int
index
=
0
;
vertIndices
.
clear
();
for
(
std
::
map
<
MVertex
*
,
std
::
set
<
MVertex
*>
>::
iterator
iter
=
crossData
.
vertex_to_vertices
.
begin
();
for
(
std
::
map
<
MVertex
*
,
std
::
set
<
MVertex
*>
>::
iterator
iter
=
crossData
.
vertex_to_vertices
.
begin
();
iter
!=
crossData
.
vertex_to_vertices
.
end
();
++
iter
){
iter
!=
crossData
.
vertex_to_vertices
.
end
();
++
iter
){
MVertex
*
pVertex
=
iter
->
first
;
MVertex
*
pVertex
=
iter
->
first
;
...
@@ -591,6 +593,7 @@ void Frame_field::fillTreeVolume(GRegion* gr){
...
@@ -591,6 +593,7 @@ void Frame_field::fillTreeVolume(GRegion* gr){
annTreeData
[
index
][
1
]
=
pVertex
->
y
();
annTreeData
[
index
][
1
]
=
pVertex
->
y
();
annTreeData
[
index
][
2
]
=
pVertex
->
z
();
annTreeData
[
index
][
2
]
=
pVertex
->
z
();
vertIndices
.
push_back
(
pVertex
->
getNum
());
vertIndices
.
push_back
(
pVertex
->
getNum
());
index
++
;
}
}
annTree
=
new
ANNkd_tree
(
annTreeData
,
n
,
3
);
annTree
=
new
ANNkd_tree
(
annTreeData
,
n
,
3
);
#endif
#endif
...
...
This diff is collapsed.
Click to expand it.
Mesh/simple3D.cpp
+
5
−
5
View file @
7ab038c6
...
@@ -349,7 +349,7 @@ void Filler::treat_region(GRegion* gr){
...
@@ -349,7 +349,7 @@ void Filler::treat_region(GRegion* gr){
Frame_field
::
init_region
(
gr
);
Frame_field
::
init_region
(
gr
);
int
NumSmooth
=
CTX
::
instance
()
->
mesh
.
nbSmoothing
;
int
NumSmooth
=
CTX
::
instance
()
->
mesh
.
nbSmoothing
;
int
NumIter
=
0
;
int
NumIter
=
1
;
double
eold
;
double
eold
;
Frame_field
::
init
(
gr
);
Frame_field
::
init
(
gr
);
double
enew
=
Frame_field
::
smooth
(
gr
);
double
enew
=
Frame_field
::
smooth
(
gr
);
...
@@ -384,6 +384,8 @@ void Filler::treat_region(GRegion* gr){
...
@@ -384,6 +384,8 @@ void Filler::treat_region(GRegion* gr){
boundary_vertices
.
push_back
(
*
it
);
boundary_vertices
.
push_back
(
*
it
);
}
}
}
}
std
::
ofstream
file
(
"nodes.pos"
);
file
<<
"View
\"
test
\"
{
\n
"
;
for
(
i
=
0
;
i
<
boundary_vertices
.
size
();
i
++
){
for
(
i
=
0
;
i
<
boundary_vertices
.
size
();
i
++
){
x
=
boundary_vertices
[
i
]
->
x
();
x
=
boundary_vertices
[
i
]
->
x
();
...
@@ -394,11 +396,9 @@ void Filler::treat_region(GRegion* gr){
...
@@ -394,11 +396,9 @@ void Filler::treat_region(GRegion* gr){
compute_parameters
(
node
,
gr
);
compute_parameters
(
node
,
gr
);
rtree
.
Insert
(
node
->
min
,
node
->
max
,
node
);
rtree
.
Insert
(
node
->
min
,
node
->
max
,
node
);
fifo
.
push
(
node
);
fifo
.
push
(
node
);
print_node
(
node
,
file
);
}
}
//std::ofstream file("nodes.pos");
//file << "View \"test\" {\n";
count
=
1
;
count
=
1
;
while
(
!
fifo
.
empty
()){
while
(
!
fifo
.
empty
()){
parent
=
fifo
.
front
();
parent
=
fifo
.
front
();
...
@@ -448,7 +448,7 @@ void Filler::treat_region(GRegion* gr){
...
@@ -448,7 +448,7 @@ void Filler::treat_region(GRegion* gr){
count
++
;
count
++
;
}
}
//
file << "};\n";
file
<<
"};
\n
"
;
int
option
=
CTX
::
instance
()
->
mesh
.
algo3d
;
int
option
=
CTX
::
instance
()
->
mesh
.
algo3d
;
CTX
::
instance
()
->
mesh
.
algo3d
=
ALGO_3D_DELAUNAY
;
CTX
::
instance
()
->
mesh
.
algo3d
=
ALGO_3D_DELAUNAY
;
...
...
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