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
542645a4
Commit
542645a4
authored
8 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
workaround ANN (not thread safe?) - should move to flann
parent
84470f6d
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Mesh/Field.cpp
+9
-0
9 additions, 0 deletions
Mesh/Field.cpp
with
9 additions
and
0 deletions
Mesh/Field.cpp
+
9
−
0
View file @
542645a4
...
@@ -1921,6 +1921,9 @@ class AttractorAnisoCurveField : public Field {
...
@@ -1921,6 +1921,9 @@ class AttractorAnisoCurveField : public Field {
if
(
update_needed
)
if
(
update_needed
)
update
();
update
();
double
xyz
[
3
]
=
{
x
,
y
,
z
};
double
xyz
[
3
]
=
{
x
,
y
,
z
};
#if defined(_OPENMP)
#pragma omp critical
#endif
kdtree
->
annkSearch
(
xyz
,
1
,
index
,
dist
);
kdtree
->
annkSearch
(
xyz
,
1
,
index
,
dist
);
double
d
=
sqrt
(
dist
[
0
]);
double
d
=
sqrt
(
dist
[
0
]);
double
lTg
=
d
<
dMin
?
lMinTangent
:
d
>
dMax
?
lMaxTangent
:
double
lTg
=
d
<
dMin
?
lMinTangent
:
d
>
dMax
?
lMaxTangent
:
...
@@ -1938,6 +1941,9 @@ class AttractorAnisoCurveField : public Field {
...
@@ -1938,6 +1941,9 @@ class AttractorAnisoCurveField : public Field {
if
(
update_needed
)
if
(
update_needed
)
update
();
update
();
double
xyz
[
3
]
=
{
X
,
Y
,
Z
};
double
xyz
[
3
]
=
{
X
,
Y
,
Z
};
#if defined(_OPENMP)
#pragma omp critical
#endif
kdtree
->
annkSearch
(
xyz
,
1
,
index
,
dist
);
kdtree
->
annkSearch
(
xyz
,
1
,
index
,
dist
);
double
d
=
sqrt
(
dist
[
0
]);
double
d
=
sqrt
(
dist
[
0
]);
return
std
::
max
(
d
,
0.05
);
return
std
::
max
(
d
,
0.05
);
...
@@ -2168,6 +2174,9 @@ class AttractorField : public Field
...
@@ -2168,6 +2174,9 @@ class AttractorField : public Field
double
xyz
[
3
];
double
xyz
[
3
];
getCoord
(
X
,
Y
,
Z
,
xyz
[
0
],
xyz
[
1
],
xyz
[
2
],
ge
);
getCoord
(
X
,
Y
,
Z
,
xyz
[
0
],
xyz
[
1
],
xyz
[
2
],
ge
);
#if defined(_OPENMP)
#pragma omp critical
#endif
kdtree
->
annkSearch
(
xyz
,
1
,
index
,
dist
);
kdtree
->
annkSearch
(
xyz
,
1
,
index
,
dist
);
return
sqrt
(
dist
[
0
]);
return
sqrt
(
dist
[
0
]);
}
}
...
...
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