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
a91e10f2
Commit
a91e10f2
authored
13 years ago
by
Gaetan Bricteux
Browse files
Options
Downloads
Patches
Plain Diff
fix commit
parent
34589b29
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Mesh/Voronoi3D.cpp
+10
-2
10 additions, 2 deletions
Mesh/Voronoi3D.cpp
Mesh/meshMetric.cpp
+1
-1
1 addition, 1 deletion
Mesh/meshMetric.cpp
Mesh/periodical.cpp
+10
-2
10 additions, 2 deletions
Mesh/periodical.cpp
Mesh/simple3D.cpp
+6
-0
6 additions, 0 deletions
Mesh/simple3D.cpp
with
27 additions
and
5 deletions
Mesh/Voronoi3D.cpp
+
10
−
2
View file @
a91e10f2
...
...
@@ -3,15 +3,19 @@
// See the LICENSE.txt file for license information. Please report all
// bugs and problems to <gmsh@geuz.org>.
#include
"voro++.hh"
#include
"Voronoi3D.h"
#include
"GModel.h"
#include
"MElement.h"
#include
"meshGRegion.h"
#include
<fstream>
#include
"Levy3D.h"
#if defined(HAVE_Voro3D)
#include
"voro++.hh"
#endif
#if defined(HAVE_Voro3D)
using
namespace
voro
;
#endif
/*********class clip*********/
...
...
@@ -72,6 +76,7 @@ void clip::execute(GRegion* gr){
}
void
clip
::
execute
(
std
::
vector
<
SPoint3
>&
vertices
,
std
::
vector
<
VoronoiElement
>&
clipped
){
#if defined(HAVE_Voro3D)
int
i
;
int
j
;
int
start
;
...
...
@@ -265,6 +270,9 @@ void clip::execute(std::vector<SPoint3>& vertices,std::vector<VoronoiElement>& c
//printf("%f %f\n",volume1,volume2);
for
(
i
=
0
;
i
<
pointers
.
size
();
i
++
)
delete
pointers
[
i
];
#else
Msg
::
Error
(
"Gmsh needs to be compiled with Voro3D to use clip"
);
#endif
}
double
clip
::
min
(
double
a
,
double
b
){
...
...
@@ -296,4 +304,4 @@ void clip::print_segment(SPoint3 p1,SPoint3 p2,std::ofstream& file){
<<
p1
.
x
()
<<
", "
<<
p1
.
y
()
<<
", "
<<
p1
.
z
()
<<
", "
<<
p2
.
x
()
<<
", "
<<
p2
.
y
()
<<
", "
<<
p2
.
z
()
<<
"){10, 20};
\n
"
;
}
\ No newline at end of file
}
This diff is collapsed.
Click to expand it.
Mesh/meshMetric.cpp
+
1
−
1
View file @
a91e10f2
...
...
@@ -171,7 +171,7 @@ void meshMetric::exportInfo(const char * fileendname){
meshMetric
::~
meshMetric
(){
if
(
_octree
)
delete
_octree
;
for
(
int
i
=
0
;
i
<
_elements
.
size
();
i
++
)
for
(
unsigned
int
i
=
0
;
i
<
_elements
.
size
();
i
++
)
delete
_elements
[
i
];
}
...
...
This diff is collapsed.
Click to expand it.
Mesh/periodical.cpp
+
10
−
2
View file @
a91e10f2
...
...
@@ -3,15 +3,19 @@
// See the LICENSE.txt file for license information. Please report all
// bugs and problems to <gmsh@geuz.org>.
#include
"voro++.hh"
#include
"periodical.h"
#include
"GModel.h"
#include
"meshGRegion.h"
#include
<fstream>
#include
<algorithm>
#include
"MElement.h"
#if defined(HAVE_Voro3D)
#include
"voro++.hh"
#endif
#if defined(HAVE_Voro3D)
using
namespace
voro
;
#endif
/*********class voroMetal3D*********/
...
...
@@ -58,6 +62,7 @@ void voroMetal3D::execute(GRegion* gr){
}
void
voroMetal3D
::
execute
(
std
::
vector
<
SPoint3
>&
vertices
){
#if defined(HAVE_Voro3D)
int
i
;
int
j
;
int
start
;
...
...
@@ -144,6 +149,9 @@ void voroMetal3D::execute(std::vector<SPoint3>& vertices){
file
<<
"};
\n
"
;
for
(
i
=
0
;
i
<
pointers
.
size
();
i
++
)
delete
pointers
[
i
];
#else
Msg
::
Error
(
"Gmsh needs to be compiled with Voro3D to use voroMetal3D"
);
#endif
}
void
voroMetal3D
::
print_segment
(
SPoint3
p1
,
SPoint3
p2
,
std
::
ofstream
&
file
){
...
...
@@ -151,4 +159,4 @@ void voroMetal3D::print_segment(SPoint3 p1,SPoint3 p2,std::ofstream& file){
<<
p1
.
x
()
<<
", "
<<
p1
.
y
()
<<
", "
<<
p1
.
z
()
<<
", "
<<
p2
.
x
()
<<
", "
<<
p2
.
y
()
<<
", "
<<
p2
.
z
()
<<
"){10, 20};
\n
"
;
}
\ No newline at end of file
}
This diff is collapsed.
Click to expand it.
Mesh/simple3D.cpp
+
6
−
0
View file @
a91e10f2
...
...
@@ -9,7 +9,9 @@
#include
"MElementOctree.h"
#include
"meshGRegion.h"
#include
<queue>
#if defined(HAVE_RTREE)
#include
"rtree.h"
#endif
#include
<fstream>
#define k1 0.7 //k1*h is the minimal distance between two nodes
...
...
@@ -325,6 +327,7 @@ void Filler::treat_model(){
}
void
Filler
::
treat_region
(
GRegion
*
gr
){
#if defined(HAVE_RTREE)
int
i
,
j
;
int
count
;
bool
ok
;
...
...
@@ -433,6 +436,9 @@ void Filler::treat_region(GRegion* gr){
for
(
i
=
0
;
i
<
garbage
.
size
();
i
++
)
delete
garbage
[
i
];
for
(
i
=
0
;
i
<
new_vertices
.
size
();
i
++
)
delete
new_vertices
[
i
];
new_vertices
.
clear
();
#else
Msg
::
Error
(
"Gmsh needs to be compiled with rtree to use Filler::treat_region"
);
#endif
}
Metric
Filler
::
get_metric
(
double
x
,
double
y
,
double
z
){
...
...
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