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
Package registry
Model registry
Operate
Terraform modules
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
Romin Tomasetti
gmsh
Commits
fb8b55a0
Commit
fb8b55a0
authored
6 years ago
by
Jean-François Remacle
Browse files
Options
Downloads
Patches
Plain Diff
added automaticmeshsizefield
parent
8b4035a6
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/CMakeLists.txt
+1
-0
1 addition, 0 deletions
Mesh/CMakeLists.txt
Mesh/Field.cpp
+2
-0
2 additions, 0 deletions
Mesh/Field.cpp
Mesh/automaticMeshSizeField.cpp
+10
-0
10 additions, 0 deletions
Mesh/automaticMeshSizeField.cpp
Mesh/automaticMeshSizeField.h
+52
-0
52 additions, 0 deletions
Mesh/automaticMeshSizeField.h
with
65 additions
and
0 deletions
Mesh/CMakeLists.txt
+
1
−
0
View file @
fb8b55a0
...
@@ -32,6 +32,7 @@ set(SRC
...
@@ -32,6 +32,7 @@ set(SRC
Field.cpp
Field.cpp
filterElements.cpp
filterElements.cpp
gmshCrossFields.cpp
gmshCrossFields.cpp
automaticMeshSizeField.cpp
)
)
file
(
GLOB HDR RELATIVE
${
CMAKE_CURRENT_SOURCE_DIR
}
*.h
)
file
(
GLOB HDR RELATIVE
${
CMAKE_CURRENT_SOURCE_DIR
}
*.h
)
...
...
This diff is collapsed.
Click to expand it.
Mesh/Field.cpp
+
2
−
0
View file @
fb8b55a0
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
#include
"BackgroundMeshTools.h"
#include
"BackgroundMeshTools.h"
#include
"STensor3.h"
#include
"STensor3.h"
#include
"ExtrudeParams.h"
#include
"ExtrudeParams.h"
#include
"automaticMeshSizeField.h"
#include
"nanoflann.hpp"
#include
"nanoflann.hpp"
#if defined(HAVE_POST)
#if defined(HAVE_POST)
...
@@ -2956,6 +2957,7 @@ FieldManager::FieldManager()
...
@@ -2956,6 +2957,7 @@ FieldManager::FieldManager()
map_type_name
[
"AttractorAnisoCurve"
]
=
new
FieldFactoryT
<
AttractorAnisoCurveField
>
();
map_type_name
[
"AttractorAnisoCurve"
]
=
new
FieldFactoryT
<
AttractorAnisoCurveField
>
();
#endif
#endif
map_type_name
[
"MaxEigenHessian"
]
=
new
FieldFactoryT
<
MaxEigenHessianField
>
();
map_type_name
[
"MaxEigenHessian"
]
=
new
FieldFactoryT
<
MaxEigenHessianField
>
();
map_type_name
[
"AutomaticMeshSizeField"
]
=
new
FieldFactoryT
<
automaticMeshSizeField
>
();
_background_field
=
-
1
;
_background_field
=
-
1
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Mesh/automaticMeshSizeField.cpp
0 → 100644
+
10
−
0
View file @
fb8b55a0
#include
"automaticMeshSizeField.h"
double
automaticMeshSizeField
::
operator
()(
double
X
,
double
Y
,
double
Z
,
GEntity
*
ge
)
{
return
_hbulk
;
}
void
automaticMeshSizeField
::
update
(){
}
This diff is collapsed.
Click to expand it.
Mesh/automaticMeshSizeField.h
0 → 100644
+
52
−
0
View file @
fb8b55a0
#ifndef _AUTOMATIC_MESH_SIZE_FIELD_H_
#define _AUTOMATIC_MESH_SIZE_FIELD_H_
#include
"Field.h"
class
automaticMeshSizeField
:
public
Field
{
int
_nPointsPerCircle
;
int
_nPointsPerGap
;
double
_hmin
,
_hmax
;
double
_hbulk
;
double
_gradientMax
;
char
fileName
[
256
];
public:
automaticMeshSizeField
()
{
_nPointsPerCircle
=
15
;
_nPointsPerGap
=
5
;
_hmin
=
1.e-8
;
// update needed
_hmax
=
1.e+8
;
// update needed
_hbulk
=
0.1
;
// update needed
_gradientMax
=
1.4
;
options
[
"nPointsPerCircle"
]
=
new
FieldOptionInt
(
_nPointsPerCircle
,
"Number of points per circle (adapt to curvature of surfaces)"
);
options
[
"nPointsPerGap"
]
=
new
FieldOptionInt
(
_nPointsPerGap
,
"Number of points in thin layers"
);
options
[
"hBulk"
]
=
new
FieldOptionDouble
(
_hbulk
,
"Size everywhere no size is prescribed"
,
&
update_needed
);
options
[
"gradientMax"
]
=
new
FieldOptionDouble
(
_gradientMax
,
"Maximun gradient of the size field"
);
}
const
char
*
getName
()
{
return
"AutomaticMeshSizeField"
;
}
std
::
string
getDescription
(){
return
"Compute a mesh size field that is quite automatic "
"Takes into account surface curvatures and closeness of objects"
;
}
void
update
();
virtual
double
operator
()(
double
X
,
double
Y
,
double
Z
,
GEntity
*
ge
=
0
);
};
#endif
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