summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2019-03-25 18:51:33 +0100
committerAnton Khirnov <anton@khirnov.net>2019-03-25 18:51:33 +0100
commitc31ff38461861d397580cf3f7aa397c5c1cfdfe7 (patch)
tree1f73273d5b912d991ae91d059dabfc5d8d43c2ea
parentb742ce05034ab8e844487c0c767d470b706cb71f (diff)
egs: reindent
-rw-r--r--ell_grid_solve.c68
1 files changed, 34 insertions, 34 deletions
diff --git a/ell_grid_solve.c b/ell_grid_solve.c
index 5b4fade..12863d0 100644
--- a/ell_grid_solve.c
+++ b/ell_grid_solve.c
@@ -187,48 +187,48 @@ static void boundaries_apply(EGSContext *ctx, int init)
start = gettime();
for (int order_idx = 0; order_idx < ARRAY_ELEMS(bnd_type_order); order_idx++) {
- for (int i = 0; i < ARRAY_ELEMS(ctx->boundaries); i++) {
- MG2DBoundary *bnd = ctx->boundaries[i];
+ for (int i = 0; i < ARRAY_ELEMS(ctx->boundaries); i++) {
+ MG2DBoundary *bnd = ctx->boundaries[i];
- const int ci = mg2d_bnd_coord_idx(i);
- const ptrdiff_t stride_boundary = strides[!ci];
- const ptrdiff_t stride_offset = strides[ci];
- const size_t size_boundary = ctx->domain_size[!ci];
- const size_t size_offset = ctx->domain_size[ci];
+ const int ci = mg2d_bnd_coord_idx(i);
+ const ptrdiff_t stride_boundary = strides[!ci];
+ const ptrdiff_t stride_offset = strides[ci];
+ const size_t size_boundary = ctx->domain_size[!ci];
+ const size_t size_offset = ctx->domain_size[ci];
- double *dst = ctx->u->data + mg2d_bnd_is_upper(i) * ((size_offset - 1) * stride_offset);
- const ptrdiff_t dst_strides[] = { stride_boundary, mg2d_bnd_out_dir(i) * stride_offset };
+ double *dst = ctx->u->data + mg2d_bnd_is_upper(i) * ((size_offset - 1) * stride_offset);
+ const ptrdiff_t dst_strides[] = { stride_boundary, mg2d_bnd_out_dir(i) * stride_offset };
- if (bnd->type != bnd_type_order[order_idx])
- continue;
+ if (bnd->type != bnd_type_order[order_idx])
+ continue;
- switch (bnd->type) {
- case MG2D_BC_TYPE_FIXVAL:
- if (init && !priv->bnd_zero[i]) {
+ switch (bnd->type) {
+ case MG2D_BC_TYPE_FIXVAL:
+ if (init && !priv->bnd_zero[i]) {
+ start_bnd = gettime();
+ boundaries_apply_fixval(dst, dst_strides, bnd->val,
+ bnd->val_stride, size_boundary);
+ ctx->time_bnd_fixval += gettime() - start_bnd;
+ ctx->count_bnd_fixval++;
+ }
+ break;
+ case MG2D_BC_TYPE_REFLECT:
start_bnd = gettime();
- boundaries_apply_fixval(dst, dst_strides, bnd->val,
- bnd->val_stride, size_boundary);
- ctx->time_bnd_fixval += gettime() - start_bnd;
- ctx->count_bnd_fixval++;
+ boundaries_apply_reflect(dst, dst_strides, bnd->val,
+ bnd->val_stride, size_boundary);
+ ctx->time_bnd_reflect += gettime() - start_bnd;
+ ctx->count_bnd_reflect++;
+ break;
+ case MG2D_BC_TYPE_FALLOFF:
+ start_bnd = gettime();
+ boundaries_apply_falloff(dst, dst_strides, bnd->val,
+ bnd->val_stride, size_boundary, ctx);
+ ctx->time_bnd_falloff += gettime() - start_bnd;
+ ctx->count_bnd_falloff++;
+ break;
}
- break;
- case MG2D_BC_TYPE_REFLECT:
- start_bnd = gettime();
- boundaries_apply_reflect(dst, dst_strides, bnd->val,
- bnd->val_stride, size_boundary);
- ctx->time_bnd_reflect += gettime() - start_bnd;
- ctx->count_bnd_reflect++;
- break;
- case MG2D_BC_TYPE_FALLOFF:
- start_bnd = gettime();
- boundaries_apply_falloff(dst, dst_strides, bnd->val,
- bnd->val_stride, size_boundary, ctx);
- ctx->time_bnd_falloff += gettime() - start_bnd;
- ctx->count_bnd_falloff++;
- break;
}
}
- }
/* fill in the corner ghosts */
start_bnd = gettime();