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
fc116d98
Commit
fc116d98
authored
13 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
better MinAniso
parent
23b0bbf7
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Mesh/Field.cpp
+19
-3
19 additions, 3 deletions
Mesh/Field.cpp
with
19 additions
and
3 deletions
Mesh/Field.cpp
+
19
−
3
View file @
fc116d98
...
@@ -1267,7 +1267,8 @@ class MinAnisoField : public Field
...
@@ -1267,7 +1267,8 @@ class MinAnisoField : public Field
{
{
return
"Take the intersection of a list of possibly anisotropic fields."
;
return
"Take the intersection of a list of possibly anisotropic fields."
;
}
}
virtual
void
operator
()
(
double
x
,
double
y
,
double
z
,
SMetric3
&
metr
,
GEntity
*
ge
=
0
){
virtual
void
operator
()
(
double
x
,
double
y
,
double
z
,
SMetric3
&
metr
,
GEntity
*
ge
=
0
)
{
SMetric3
v
(
1.
/
MAX_LC
);
SMetric3
v
(
1.
/
MAX_LC
);
for
(
std
::
list
<
int
>::
iterator
it
=
idlist
.
begin
();
it
!=
idlist
.
end
();
it
++
)
{
for
(
std
::
list
<
int
>::
iterator
it
=
idlist
.
begin
();
it
!=
idlist
.
end
();
it
++
)
{
Field
*
f
=
(
GModel
::
current
()
->
getFields
()
->
get
(
*
it
));
Field
*
f
=
(
GModel
::
current
()
->
getFields
()
->
get
(
*
it
));
...
@@ -1290,9 +1291,24 @@ class MinAnisoField : public Field
...
@@ -1290,9 +1291,24 @@ class MinAnisoField : public Field
double
v
=
MAX_LC
;
double
v
=
MAX_LC
;
for
(
std
::
list
<
int
>::
iterator
it
=
idlist
.
begin
();
it
!=
idlist
.
end
();
it
++
)
{
for
(
std
::
list
<
int
>::
iterator
it
=
idlist
.
begin
();
it
!=
idlist
.
end
();
it
++
)
{
Field
*
f
=
(
GModel
::
current
()
->
getFields
()
->
get
(
*
it
));
Field
*
f
=
(
GModel
::
current
()
->
getFields
()
->
get
(
*
it
));
if
(
f
&&
*
it
!=
id
)
v
=
std
::
min
(
v
,
(
*
f
)
(
x
,
y
,
z
,
ge
));
SMetric3
m
;
if
(
f
&&
*
it
!=
id
){
if
(
!
f
->
isotropic
()){
(
*
f
)(
x
,
y
,
z
,
m
,
ge
);
}
}
return
v
;
else
{
double
L
=
(
*
f
)(
x
,
y
,
z
,
ge
);
for
(
int
i
=
0
;
i
<
3
;
i
++
)
m
(
i
,
i
)
=
1.
/
(
L
*
L
);
}
}
metr
=
intersection
(
metr
,
m
);
}
fullMatrix
<
double
>
V
(
3
,
3
);
fullVector
<
double
>
S
(
3
);
metr
.
eig
(
V
,
S
,
1
);
double
val
=
sqrt
(
1.
/
S
(
2
));
//S(2) is largest eigenvalue
return
std
::
min
(
v
,
val
);
}
}
const
char
*
getName
()
const
char
*
getName
()
{
{
...
...
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