Commit e6c27ec0 authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

temporary fix coarsen

parent f9dd2471
Pipeline #8356 passed with stages
in 3 minutes and 52 seconds
......@@ -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)
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment