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
251dd10f
Commit
251dd10f
authored
12 years ago
by
Thomas Toulorge
Browse files
Options
Downloads
Patches
Plain Diff
Added metric for isotropic mesh refinement with linear interpolation of mesh size in band E
parent
30fb3b65
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Mesh/meshMetric.cpp
+7
-0
7 additions, 0 deletions
Mesh/meshMetric.cpp
Mesh/meshMetric.h
+2
-1
2 additions, 1 deletion
Mesh/meshMetric.h
with
9 additions
and
1 deletion
Mesh/meshMetric.cpp
+
7
−
0
View file @
251dd10f
...
...
@@ -513,6 +513,13 @@ void meshMetric::computeMetric(){
it
++
;
}
else
if
(
_technique
==
meshMetric
::
ISOTROPIC_LINEARINTERP_H
){
SVector3
gr
=
grads
[
ver
];
double
norm
=
gr
.
normalize
();
double
h_dist
=
(
signed_dist
<
_E
&&
signed_dist
>
_E_moins
&&
norm
!=
0.0
)
?
hmin
+
((
hmax
-
hmin
)
/
_E
)
*
dist
:
hmax
;
// the charcteristic element size in all directions - linear interp between hmin and hmax
H
=
SMetric3
(
1.
/
h_dist
/
h_dist
);
}
if
(
_technique
!=
meshMetric
::
EIGENDIRECTIONS
&&
_technique
!=
meshMetric
::
EIGENDIRECTIONS_LINEARINTERP_H
){
...
...
This diff is collapsed.
Click to expand it.
Mesh/meshMetric.h
+
2
−
1
View file @
251dd10f
...
...
@@ -21,7 +21,7 @@ class STensor3;
/**Anisotropic mesh size field based on a metric */
class
meshMetric
:
public
Field
{
public:
typedef
enum
{
LEVELSET
=
1
,
HESSIAN
=
2
,
FREY
=
3
,
EIGENDIRECTIONS
=
4
,
EIGENDIRECTIONS_LINEARINTERP_H
=
5
}
MetricComputationTechnique
;
typedef
enum
{
LEVELSET
=
1
,
HESSIAN
=
2
,
FREY
=
3
,
EIGENDIRECTIONS
=
4
,
EIGENDIRECTIONS_LINEARINTERP_H
=
5
,
ISOTROPIC_LINEARINTERP_H
=
6
}
MetricComputationTechnique
;
private
:
// intersect all metrics added in "setOfMetrics", preserve eigendirections of the "most anisotropic" metric
void
intersectMetrics
();
...
...
@@ -72,6 +72,7 @@ class meshMetric: public Field {
// parameters[4] = thickness of the interface in the negative ls direction (default: =parameters[0] if not specified)
// parameters[3] = the required minimum number of elements to represent a circle - used for curvature-based metric (default: = 15)
// 5: same as 4, except that the transition in band E uses linear interpolation of h, instead of linear interpolation of metric
// 6: fct is a LS, metric is isotropic with linear interpolation of h in band E
void
addMetric
(
int
technique
,
simpleFunction
<
double
>
*
fct
,
std
::
vector
<
double
>
parameters
);
inline
SMetric3
metricAtVertex
(
MVertex
*
v
)
{
...
...
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