Skip to content

Commit 3d63532

Browse files
authored
Merge pull request #454 from pdziekan/wspace_cleanup
Wspace cleanup
2 parents d6c8049 + 5c07bf6 commit 3d63532

File tree

102 files changed

+3536
-3536
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+3536
-3536
lines changed

libmpdata++/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,28 @@ project(libmpdata++ CXX)
55
# using include() istead of find_package(libmpdata++) to use local CMake code
66
# and not the system-installed one
77
include(${CMAKE_SOURCE_DIR}/../libmpdata++-config.cmake)
8-
if (NOT libmpdataxx_FOUND)
8+
if (NOT libmpdataxx_FOUND)
99
message(FATAL_ERROR "local libmpdata++-config.cmake not found!")
1010
endif()
1111

1212
# generate a header file with git revision id
1313
if (EXISTS "${CMAKE_SOURCE_DIR}/../.git")
1414
execute_process(COMMAND
1515
bash -c "git log -1 --format=\"format:#define LIBMPDATAXX_GIT_REVISION \\\"%H\\\"%n\" HEAD > git_revision.hpp"
16-
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
16+
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
1717
)
1818
endif()
1919

2020
install(
2121
DIRECTORY
2222
bcond concurr formulae output solvers
23-
DESTINATION
23+
DESTINATION
2424
include/libmpdata++
2525
)
2626
install(
2727
FILES
2828
blitz.hpp git_revision.hpp kahan_reduction.hpp opts.hpp
29-
DESTINATION
29+
DESTINATION
3030
include/libmpdata++
3131
)
3232
install(

libmpdata++/bcond/cyclic_1d.hpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ namespace libmpdataxx
1111
{
1212
namespace bcond
1313
{
14-
template <typename real_t, int halo, bcond_e knd, drctn_e dir, int n_dims, int dim>
14+
template <typename real_t, int halo, bcond_e knd, drctn_e dir, int n_dims, int dim>
1515
class bcond< real_t, halo, knd, dir, n_dims, dim,
1616
typename std::enable_if<
17-
knd == cyclic &&
18-
dir == left &&
17+
knd == cyclic &&
18+
dir == left &&
1919
n_dims == 1
2020
>::type
2121
> : public detail::bcond_common<real_t, halo, n_dims>
@@ -28,14 +28,14 @@ namespace libmpdataxx
2828

2929
void fill_halos_sclr(arr_t &a, const bool deriv = false)
3030
{
31-
a(this->left_halo_sclr) = a(this->rght_intr_sclr);
31+
a(this->left_halo_sclr) = a(this->rght_intr_sclr);
3232
}
3333

3434
void fill_halos_vctr_alng(arrvec_t<arr_t> &av, const bool ad = false)
3535
{
36-
av[0](this->left_halo_vctr) = av[0](this->rght_intr_vctr);
36+
av[0](this->left_halo_vctr) = av[0](this->rght_intr_vctr);
3737
}
38-
38+
3939
void fill_halos_vctr_alng_cyclic(arrvec_t<arr_t> &av, const bool ad = false)
4040
{
4141
fill_halos_vctr_alng(av, ad);
@@ -59,14 +59,14 @@ namespace libmpdataxx
5959

6060
void fill_halos_sclr(arr_t &a, const bool deriv = false)
6161
{
62-
a(this->rght_halo_sclr) = a(this->left_intr_sclr);
62+
a(this->rght_halo_sclr) = a(this->left_intr_sclr);
6363
}
6464

6565
void fill_halos_vctr_alng(arrvec_t<arr_t> &av, const bool ad = false)
6666
{
67-
av[0](this->rght_halo_vctr) = av[0](this->left_intr_vctr);
67+
av[0](this->rght_halo_vctr) = av[0](this->left_intr_vctr);
6868
}
69-
69+
7070
void fill_halos_vctr_alng_cyclic(arrvec_t<arr_t> &av, const bool ad = false)
7171
{
7272
fill_halos_vctr_alng(av, ad);

libmpdata++/bcond/cyclic_2d.hpp

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ namespace libmpdataxx
1212
namespace bcond
1313
{
1414
template <typename real_t, int halo, bcond_e knd, drctn_e dir, int n_dims, int d>
15-
class bcond< real_t, halo, knd, dir, n_dims, d,
15+
class bcond< real_t, halo, knd, dir, n_dims, d,
1616
typename std::enable_if<
1717
knd == cyclic &&
1818
dir == left &&
1919
n_dims == 2
2020
>::type
2121
> : public detail::bcond_common<real_t, halo, n_dims>
22-
{
22+
{
2323
using parent_t = detail::bcond_common<real_t, halo, n_dims>;
2424
using arr_t = blitz::Array<real_t, 2>;
2525
using parent_t::parent_t; // inheriting ctor
@@ -28,37 +28,37 @@ namespace libmpdataxx
2828

2929
void fill_halos_sclr(arr_t &a, const rng_t &j, const bool deriv = false)
3030
{
31-
using namespace idxperm;
32-
a(pi<d>(this->left_halo_sclr, j)) = a(pi<d>(this->rght_intr_sclr, j));
31+
using namespace idxperm;
32+
a(pi<d>(this->left_halo_sclr, j)) = a(pi<d>(this->rght_intr_sclr, j));
3333
}
3434

3535
void fill_halos_pres(arr_t &a, const rng_t &j)
3636
{
3737
fill_halos_sclr(a, j);
3838
}
39-
39+
4040
void save_edge_vel(const arr_t &, const rng_t &) {}
4141

4242
void set_edge_pres(arr_t &, const rng_t &, int) {}
4343

4444
void fill_halos_vctr_alng(arrvec_t<arr_t> &av, const rng_t &j, const bool ad = false)
4545
{
46-
using namespace idxperm;
46+
using namespace idxperm;
4747
av[d](pi<d>(this->left_halo_vctr, j)) = av[d](pi<d>(this->rght_intr_vctr, j));
4848
}
49-
49+
5050
void fill_halos_sgs_div(arr_t &a, const rng_t &j)
5151
{
5252
fill_halos_sclr(a, j);
5353
}
5454

5555
void fill_halos_sgs_vctr(arrvec_t<arr_t> &av, const arr_t &, const rng_t &j, const int offset = 0)
5656
{
57-
using namespace idxperm;
57+
using namespace idxperm;
5858
// the same logic as fill_halos_vctr_alng but have to consider offset ... TODO: find a way to reuse !
5959
av[d + offset](pi<d>(this->left_halo_vctr, j)) = av[d + offset](pi<d>(this->rght_intr_vctr, j));
6060
}
61-
61+
6262
void fill_halos_sgs_tnsr(arrvec_t<arr_t> &av, const arr_t &, const arr_t &, const rng_t &j, const real_t)
6363
{
6464
fill_halos_vctr_alng(av, j);
@@ -68,7 +68,7 @@ namespace libmpdataxx
6868
{
6969
fill_halos_sclr(a, j);
7070
}
71-
71+
7272
void fill_halos_vctr_alng_cyclic(arrvec_t<arr_t> &av, const rng_t &j, const bool ad = false)
7373
{
7474
fill_halos_vctr_alng(av, j, ad);
@@ -81,14 +81,14 @@ namespace libmpdataxx
8181
};
8282

8383
template <typename real_t, int halo, bcond_e knd, drctn_e dir, int n_dims, int d>
84-
class bcond< real_t, halo, knd, dir, n_dims, d,
84+
class bcond< real_t, halo, knd, dir, n_dims, d,
8585
typename std::enable_if<
8686
knd == cyclic &&
8787
dir == rght &&
8888
n_dims == 2
8989
>::type
9090
> : public detail::bcond_common<real_t, halo, n_dims>
91-
{
91+
{
9292
using parent_t = detail::bcond_common<real_t, halo, n_dims>;
9393
using arr_t = blitz::Array<real_t, 2>;
9494
using parent_t::parent_t; // inheriting ctor
@@ -97,47 +97,47 @@ namespace libmpdataxx
9797

9898
void fill_halos_sclr(arr_t &a, const rng_t &j, const bool deriv = false)
9999
{
100-
using namespace idxperm;
101-
a(pi<d>(this->rght_halo_sclr, j)) = a(pi<d>(this->left_intr_sclr, j));
100+
using namespace idxperm;
101+
a(pi<d>(this->rght_halo_sclr, j)) = a(pi<d>(this->left_intr_sclr, j));
102102
}
103-
103+
104104
void fill_halos_pres(arr_t &a, const rng_t &j)
105105
{
106106
fill_halos_sclr(a, j);
107107
}
108-
108+
109109
void save_edge_vel(const arr_t &, const rng_t &) {}
110110

111111
void set_edge_pres(arr_t &, const rng_t &, int) {}
112112

113113
void fill_halos_vctr_alng(arrvec_t<arr_t> &av, const rng_t &j, const bool ad = false)
114114
{
115-
using namespace idxperm;
115+
using namespace idxperm;
116116
av[d](pi<d>(this->rght_halo_vctr, j)) = av[d](pi<d>(this->left_intr_vctr, j));
117117
}
118-
118+
119119
void fill_halos_sgs_div(arr_t &a, const rng_t &j)
120120
{
121121
fill_halos_sclr(a, j);
122122
}
123123

124124
void fill_halos_sgs_vctr(arrvec_t<arr_t> &av, const arr_t &, const rng_t &j, const int offset = 0)
125125
{
126-
using namespace idxperm;
126+
using namespace idxperm;
127127
// the same logic as fill_halos_vctr_alng but have to consider offset ... TODO: find a way to reuse !
128128
av[d + offset](pi<d>(this->rght_halo_vctr, j)) = av[d + offset](pi<d>(this->left_intr_vctr, j));
129129
}
130-
130+
131131
void fill_halos_sgs_tnsr(arrvec_t<arr_t> &av, const arr_t &, const arr_t &, const rng_t &j, const real_t)
132132
{
133133
fill_halos_vctr_alng(av, j);
134134
}
135-
135+
136136
void fill_halos_vctr_nrml(arr_t &a, const rng_t &j)
137137
{
138138
fill_halos_sclr(a, j);
139139
}
140-
140+
141141
void fill_halos_vctr_alng_cyclic(arrvec_t<arr_t> &av, const rng_t &j, const bool ad = false)
142142
{
143143
fill_halos_vctr_alng(av, j, ad);

libmpdata++/bcond/cyclic_3d.hpp

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ namespace libmpdataxx
1212
namespace bcond
1313
{
1414
template <typename real_t, int halo, bcond_e knd, drctn_e dir, int n_dims, int d>
15-
class bcond< real_t, halo, knd, dir, n_dims, d,
15+
class bcond< real_t, halo, knd, dir, n_dims, d,
1616
typename std::enable_if<
1717
knd == cyclic &&
1818
dir == left &&
1919
n_dims == 3
2020
>::type
2121
> : public detail::bcond_common<real_t, halo, n_dims>
22-
{
22+
{
2323
using parent_t = detail::bcond_common<real_t, halo, n_dims>;
2424
using arr_t = blitz::Array<real_t, 3>;
2525
using parent_t::parent_t; // inheriting ctor
@@ -28,37 +28,37 @@ namespace libmpdataxx
2828

2929
void fill_halos_sclr(arr_t &a, const rng_t &j, const rng_t &k, const bool deriv = false)
3030
{
31-
using namespace idxperm;
32-
a(pi<d>(this->left_halo_sclr, j, k)) = a(pi<d>(this->rght_intr_sclr, j, k));
31+
using namespace idxperm;
32+
a(pi<d>(this->left_halo_sclr, j, k)) = a(pi<d>(this->rght_intr_sclr, j, k));
3333
}
3434

3535
void fill_halos_pres(arr_t &a, const rng_t &j, const rng_t &k)
3636
{
3737
fill_halos_sclr(a, j, k);
3838
}
39-
39+
4040
void save_edge_vel(const arr_t &, const rng_t &, const rng_t &) {}
41-
41+
4242
void set_edge_pres(arr_t &, const rng_t &, const rng_t &, int) {}
4343

4444
void fill_halos_vctr_alng(arrvec_t<arr_t> &av, const rng_t &j, const rng_t &k, const bool ad = false)
4545
{
46-
using namespace idxperm;
46+
using namespace idxperm;
4747
av[d](pi<d>(this->left_halo_vctr, j, k)) = av[d](pi<d>(this->rght_intr_vctr, j, k));
4848
}
49-
49+
5050
void fill_halos_sgs_div(arr_t &a, const rng_t &j, const rng_t &k)
5151
{
5252
fill_halos_sclr(a, j, k);
5353
}
54-
54+
5555
void fill_halos_sgs_vctr(arrvec_t<arr_t> &av, const arr_t &, const rng_t &j, const rng_t &k, const int offset = 0)
5656
{
57-
using namespace idxperm;
57+
using namespace idxperm;
5858
// the same logic as fill_halos_vctr_alng but have to consider offset ... TODO: find a way to reuse !
5959
av[d + offset](pi<d>(this->left_halo_vctr, j, k)) = av[d + offset](pi<d>(this->rght_intr_vctr, j, k));
6060
}
61-
61+
6262
void fill_halos_sgs_tnsr(arrvec_t<arr_t> &av, const arr_t &, const arr_t &, const rng_t &j, const rng_t &k, const real_t)
6363
{
6464
fill_halos_vctr_alng(av, j, k);
@@ -68,7 +68,7 @@ namespace libmpdataxx
6868
{
6969
fill_halos_sclr(a, j, k);
7070
}
71-
71+
7272
void fill_halos_vctr_alng_cyclic(arrvec_t<arr_t> &av, const rng_t &j, const rng_t &k, const bool ad = false)
7373
{
7474
fill_halos_vctr_alng(av, j, k, ad);
@@ -81,7 +81,7 @@ namespace libmpdataxx
8181
};
8282

8383
template <typename real_t, int halo, bcond_e knd, drctn_e dir, int n_dims, int d>
84-
class bcond< real_t, halo, knd, dir, n_dims, d,
84+
class bcond< real_t, halo, knd, dir, n_dims, d,
8585
typename std::enable_if<
8686
knd == cyclic &&
8787
dir == rght &&
@@ -97,37 +97,37 @@ namespace libmpdataxx
9797

9898
void fill_halos_sclr(arr_t &a, const rng_t &j, const rng_t &k, const bool deriv = false)
9999
{
100-
using namespace idxperm;
101-
a(pi<d>(this->rght_halo_sclr, j, k)) = a(pi<d>(this->left_intr_sclr, j, k));
100+
using namespace idxperm;
101+
a(pi<d>(this->rght_halo_sclr, j, k)) = a(pi<d>(this->left_intr_sclr, j, k));
102102
}
103103

104104
void fill_halos_pres(arr_t &a, const rng_t &j, const rng_t &k)
105105
{
106106
fill_halos_sclr(a, j, k);
107107
}
108-
108+
109109
void save_edge_vel(const arr_t &, const rng_t &, const rng_t &) {}
110-
110+
111111
void set_edge_pres(arr_t &, const rng_t &, const rng_t &, int) {}
112-
112+
113113
void fill_halos_vctr_alng(arrvec_t<arr_t> &av, const rng_t &j, const rng_t &k, const bool ad = false)
114114
{
115-
using namespace idxperm;
115+
using namespace idxperm;
116116
av[d](pi<d>(this->rght_halo_vctr, j, k)) = av[d](pi<d>(this->left_intr_vctr, j, k));
117117
}
118-
118+
119119
void fill_halos_sgs_div(arr_t &a, const rng_t &j, const rng_t &k)
120120
{
121121
fill_halos_sclr(a, j, k);
122122
}
123-
123+
124124
void fill_halos_sgs_vctr(arrvec_t<arr_t> &av, const arr_t &, const rng_t &j, const rng_t &k, const int offset = 0)
125125
{
126-
using namespace idxperm;
126+
using namespace idxperm;
127127
// the same logic as fill_halos_vctr_alng but have to consider offset ... TODO: find a way to reuse !
128128
av[d + offset](pi<d>(this->rght_halo_vctr, j, k)) = av[d + offset](pi<d>(this->left_intr_vctr, j, k));
129129
}
130-
130+
131131
void fill_halos_sgs_tnsr(arrvec_t<arr_t> &av, const arr_t &, const arr_t &, const rng_t &j, const rng_t &k, const real_t)
132132
{
133133
fill_halos_vctr_alng(av, j, k);
@@ -137,7 +137,7 @@ namespace libmpdataxx
137137
{
138138
fill_halos_sclr(a, j, k);
139139
}
140-
140+
141141
void fill_halos_vctr_alng_cyclic(arrvec_t<arr_t> &av, const rng_t &j, const rng_t &k, const bool ad = false)
142142
{
143143
fill_halos_vctr_alng(av, j, k, ad);

0 commit comments

Comments
 (0)