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
mpim-sw
cdo
Commits
8b908e44
Commit
8b908e44
authored
Nov 30, 2017
by
Uwe Schulzweida
Browse files
clipping update.
parent
e0c91feb
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/clipping/clipping.c
View file @
8b908e44
...
...
@@ -41,7 +41,7 @@
#include
"ensure_array_size.h"
#include
"utils.h"
//#define VERBOSE
//#define
YAC_
VERBOSE
_CLIPPING
static
double
const
tol
=
1.0e-12
;
...
...
@@ -126,7 +126,7 @@ void yac_compute_overlap_areas (unsigned N,
//partial_areas[n] = pole_area (overlap_buffer[n]);
}
#ifdef VERBOSE
#ifdef
YAC_
VERBOSE
_CLIPPING
for
(
unsigned
n
=
0
;
n
<
N
;
n
++
)
printf
(
"overlap area : %lf
\n
"
,
partial_areas
[
n
]);
#endif
...
...
@@ -244,7 +244,7 @@ void yac_compute_concave_overlap_areas (unsigned N,
}
}
#ifdef VERBOSE
#ifdef
YAC_
VERBOSE
_CLIPPING
for
(
unsigned
n
=
0
;
n
<
N
;
n
++
)
printf
(
"overlap area %i: %lf
\n
"
,
n
,
partial_areas
[
n
]);
#endif
...
...
@@ -1071,7 +1071,7 @@ void yac_correct_weights ( unsigned nSourceCells, double * weight ) {
unsigned
iter
;
double
weight_diff
;
#ifdef VERBOSE
#ifdef
YAC_
VERBOSE
_CLIPPING
double
weight_sum
;
#endif
...
...
@@ -1082,7 +1082,7 @@ void yac_correct_weights ( unsigned nSourceCells, double * weight ) {
for
(
n
=
0
;
n
<
nSourceCells
;
n
++
)
weight_diff
-=
weight
[
n
];
#ifdef VERBOSE
#ifdef
YAC_
VERBOSE
_CLIPPING
for
(
n
=
0
;
n
<
nSourceCells
;
n
++
)
weight_sum
+=
weight
[
n
];
...
...
@@ -1098,7 +1098,7 @@ void yac_correct_weights ( unsigned nSourceCells, double * weight ) {
for
(
n
=
0
;
n
<
nSourceCells
;
n
++
)
weight
[
n
]
+=
weight
[
n
]
*
weight_diff
;
}
#ifdef VERBOSE
#ifdef
YAC_
VERBOSE
_CLIPPING
if
(
fabs
(
weight_diff
)
>
tol
)
printf
(
"weight sum is %.15f
\n
"
,
weight_sum
);
#endif
...
...
src/clipping/grid_cell.c
View file @
8b908e44
...
...
@@ -92,7 +92,7 @@ void yac_free_grid_cell(struct grid_cell * cell) {
yac_init_grid_cell
(
cell
);
}
#ifdef DEBUG
#ifdef
YAC_
DEBUG
_GRID_CELL
void
print_grid_cell
(
FILE
*
stream
,
struct
grid_cell
cell
,
char
*
name
)
{
char
*
out
=
NULL
;
...
...
src/clipping/grid_cell.h
View file @
8b908e44
...
...
@@ -76,7 +76,7 @@ void yac_copy_grid_cell(struct grid_cell in_cell, struct grid_cell * out_cell);
*/
void
yac_free_grid_cell
(
struct
grid_cell
*
cell
);
#ifdef DEBUG
#ifdef
YAC_
DEBUG
_GRIC_CELL
/**
* prints out info about a grid_cell object and reinitialised, used for debugging
* interpolation_method_conserv and interpolation_method_patch
...
...
src/clipping/intersection.c
View file @
8b908e44
...
...
@@ -1481,6 +1481,8 @@ int yac_gcxlatc(struct edge edge_a, struct edge edge_b,
* p and q will be identically, but only the p bits will be set
**/
#pragma intel optimization_level 0
int
yac_gcxlatc_vec
(
double
a
[
3
],
double
b
[
3
],
double
c
[
3
],
double
d
[
3
],
double
p
[
3
],
double
q
[
3
])
{
...
...
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