Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jonathan Lambrechts
seamsh
Commits
e6c27ec0
Commit
e6c27ec0
authored
Sep 24, 2020
by
Jonathan Lambrechts
Browse files
temporary fix coarsen
parent
f9dd2471
Pipeline
#8356
passed with stages
in 3 minutes and 52 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
seamsh/geometry.py
View file @
e6c27ec0
...
...
@@ -364,7 +364,8 @@ def coarsen_boundaries(domain: Domain, x0: typing.Tuple[float, float],
str2tag
=
{}
def
mesh_size_half
(
x
,
p
):
return
mesh_size
(
x
,
p
)
*
0.5
return
mesh_size
(
x
,
p
)
*
0.25
for
curve
in
domain
.
_curves
:
cs
=
_curve_sample
(
curve
,
mesh_size_half
,
domain
.
_projection
)
sampled
.
append
(
cs
)
...
...
seamshlib/seamsh.c
View file @
e6c27ec0
...
...
@@ -478,7 +478,6 @@ static void orient_triangles(const double *x, int n_tri, int *tri) {
}
}
static
int
*
color_triangles
(
const
double
*
x
,
int
n_tri
,
const
int
*
tri
,
const
int
*
neigh
,
int
first
,
const
double
*
length
)
{
int
*
tri_color
=
malloc
(
sizeof
(
int
)
*
n_tri
);
for
(
int
i
=
0
;
i
<
n_tri
;
++
i
)
{
...
...
@@ -498,7 +497,7 @@ static int *color_triangles(const double *x, int n_tri, const int *tri, const in
const
double
*
p0
=
x
+
2
*
i0
;
const
double
*
p1
=
x
+
2
*
i1
;
double
d2
=
(
p1
[
0
]
-
p0
[
0
])
*
(
p1
[
0
]
-
p0
[
0
])
+
(
p1
[
1
]
-
p0
[
1
])
*
(
p1
[
1
]
-
p0
[
1
]);
double
lmin
=
fmin
(
length
[
i0
],
length
[
i1
]);
double
lmin
=
fmin
(
length
[
i0
],
length
[
i1
])
*
1
.
2
;
//*1.1
;
if
(
d2
>
lmin
*
lmin
)
{
tri_color
[
n
]
=
1
;
stack
[
++
stack_p
]
=
n
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment