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
86bd617c
Commit
86bd617c
authored
11 years ago
by
Maximilien Siavelis
Browse files
Options
Downloads
Patches
Plain Diff
No commit message
No commit message
parent
c4966acf
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Plugin/FaultZone.cpp
+8
-8
8 additions, 8 deletions
Plugin/FaultZone.cpp
Plugin/FaultZone.h
+5
-5
5 additions, 5 deletions
Plugin/FaultZone.h
with
13 additions
and
13 deletions
Plugin/FaultZone.cpp
+
8
−
8
View file @
86bd617c
...
@@ -476,8 +476,8 @@ std::vector < int > GMSH_FaultZoneMesher::HeavisideFunc(MVertex* mVert, SPoint3&
...
@@ -476,8 +476,8 @@ std::vector < int > GMSH_FaultZoneMesher::HeavisideFunc(MVertex* mVert, SPoint3&
double
norm
=
vectPoint
.
normalize
();
double
norm
=
vectPoint
.
normalize
();
assert
(
norm
);
assert
(
norm
);
std
::
vector
<
int
>
heav
;
if
(
_nodeByHeavNode
.
find
(
mVert
)
!=
_nodeByHeavNode
.
end
()){
// if it is a pure heaviside node
if
(
_nodeByHeavNode
.
find
(
mVert
)
!=
_nodeByHeavNode
.
end
()){
// if it is a pure heaviside node
std
::
vector
<
int
>
heav
(
1
,
0
);
SVector3
vectNorm
=
_vectNormByFissure
[
_fissureByHeavNode
[
mVert
]];
SVector3
vectNorm
=
_vectNormByFissure
[
_fissureByHeavNode
[
mVert
]];
double
lsn
=
dot
(
vectPoint
,
vectNorm
);
double
lsn
=
dot
(
vectPoint
,
vectNorm
);
if
(
lsn
==
0
){
if
(
lsn
==
0
){
...
@@ -486,24 +486,24 @@ std::vector < int > GMSH_FaultZoneMesher::HeavisideFunc(MVertex* mVert, SPoint3&
...
@@ -486,24 +486,24 @@ std::vector < int > GMSH_FaultZoneMesher::HeavisideFunc(MVertex* mVert, SPoint3&
SVector3
vectTan
=
_vectsTanByTipNode
[
mVert
];
SVector3
vectTan
=
_vectsTanByTipNode
[
mVert
];
assert
(
dot
(
vectPoint
,
vectTan
)
>
0
);
assert
(
dot
(
vectPoint
,
vectTan
)
>
0
);
}
}
heav
[
0
]
=
sign
(
lsn
);
heav
.
push_back
(
sign
(
lsn
));
return
heav
;
}
}
else
if
(
_nodesByJunctionNode
.
find
(
mVert
)
!=
_nodesByJunctionNode
.
end
()){
// if it is a junction node
else
if
(
_nodesByJunctionNode
.
find
(
mVert
)
!=
_nodesByJunctionNode
.
end
()){
// if it is a junction node
std
::
vector
<
GEdge
*
>
fissures
=
_fissuresByJunctionNode
[
mVert
];
std
::
vector
<
GEdge
*
>
fissures
=
_fissuresByJunctionNode
[
mVert
];
unsigned
int
size
=
fissures
.
size
();
unsigned
int
size
=
fissures
.
size
();
std
::
vector
<
int
>
heav
(
size
,
0
);
for
(
unsigned
int
i
=
0
;
i
<
size
;
i
++
){
for
(
unsigned
int
i
=
0
;
i
<
size
;
i
++
){
SVector3
vectNorm
=
_vectNormByFissure
[
fissures
[
i
]];
SVector3
vectNorm
=
_vectNormByFissure
[
fissures
[
i
]];
double
lsn
=
dot
(
vectPoint
,
vectNorm
);
double
lsn
=
dot
(
vectPoint
,
vectNorm
);
if
(
fabs
(
lsn
)
>
1e-12
)
// tolerance seem to be ok
if
(
fabs
(
lsn
)
>
1e-12
)
// tolerance seem to be ok
heav
[
i
]
=
sign
(
lsn
);
heav
.
push_back
(
sign
(
lsn
));
else
heav
.
push_back
(
0
);
}
}
return
heav
;
}
}
else
// if it is not a heaviside node
else
// if it is not a heaviside node
assert
(
false
);
assert
(
false
);
return
heav
;
}
}
//================================================================================
//================================================================================
...
@@ -540,7 +540,7 @@ void GMSH_FaultZoneMesher::CreateJointElements(GModel* gModel, GFace* gFace, std
...
@@ -540,7 +540,7 @@ void GMSH_FaultZoneMesher::CreateJointElements(GModel* gModel, GFace* gFace, std
continue
;
continue
;
SPoint3
bary
=
mElem
->
barycenter
();
SPoint3
bary
=
mElem
->
barycenter
();
std
::
vector
<
MVertex
*
>
mVerts
(
8
,
NULL
)
;
MVertex
*
mVerts
[
8
]
;
// retriving MVertices to create the new MElement
// retriving MVertices to create the new MElement
for
(
int
j
=
0
;
j
<
mElem
->
getNumVertices
();
j
++
){
for
(
int
j
=
0
;
j
<
mElem
->
getNumVertices
();
j
++
){
...
...
This diff is collapsed.
Click to expand it.
Plugin/FaultZone.h
+
5
−
5
View file @
86bd617c
...
@@ -93,10 +93,10 @@ inline bool compareHeav(const std::vector< int > heav1, const std::vector< int >
...
@@ -93,10 +93,10 @@ inline bool compareHeav(const std::vector< int > heav1, const std::vector< int >
*/
*/
//=============================================================================
//=============================================================================
inline
int
findMatchingHeav
(
const
std
::
vector
<
std
::
vector
<
int
>
>&
heavFunc
,
const
std
::
vector
<
int
>&
heav
){
inline
int
findMatchingHeav
(
const
std
::
vector
<
std
::
vector
<
int
>
>&
heavFunc
,
const
std
::
vector
<
int
>&
heav
){
for
(
unsigned
int
i
=
0
;
i
<
heavFunc
.
size
();
i
++
){
unsigned
int
i
=
0
;
if
(
compareHeav
(
heavFunc
[
i
],
heav
)
)
for
(;
i
<
heavFunc
.
size
();
i
++
)
return
i
;
if
(
compareHeav
(
heavFunc
[
i
],
heav
))
break
;
}
assert
(
i
<
heavFunc
.
size
());
assert
(
false
)
;
return
i
;
}
}
#endif
#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