Skip to content

Commit 1c430c7

Browse files
authored
Merge pull request #384 from pdziekan/new_puddle
New puddle
2 parents 04cc7ea + 1fbc42d commit 1c430c7

Some content is hidden

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

41 files changed

+214
-193
lines changed

bindings/python/lgrngn.hpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,12 @@ namespace libcloudphxx
8181
const bp::dict &ambient_chem
8282
)
8383
{
84-
typedef std::map<enum lgr::chem_species_t, const lgr::arrinfo_t<real_t> > map_t;
84+
typedef std::map<enum cmn::chem::chem_species_t, const lgr::arrinfo_t<real_t> > map_t;
8585
map_t map;
8686

8787
for (int i = 0; i < len(ambient_chem.keys()); ++i)
8888
map.insert(typename map_t::value_type(
89-
bp::extract<enum lgr::chem_species_t>(ambient_chem.keys()[i]),
89+
bp::extract<enum cmn::chem::chem_species_t>(ambient_chem.keys()[i]),
9090
np2ai<real_t>(bp::extract<bp_array>(ambient_chem.values()[i]), sz(*arg))
9191
));
9292

@@ -117,12 +117,12 @@ namespace libcloudphxx
117117
bp::dict &ambient_chem
118118
)
119119
{
120-
typedef std::map<enum lgr::chem_species_t, lgr::arrinfo_t<real_t> > map_t;
120+
typedef std::map<enum cmn::chem::chem_species_t, lgr::arrinfo_t<real_t> > map_t;
121121
map_t map;
122122

123123
for (int i = 0; i < len(ambient_chem.keys()); ++i)
124124
map.insert(typename map_t::value_type(
125-
bp::extract<enum lgr::chem_species_t>(ambient_chem.keys()[i]),
125+
bp::extract<enum cmn::chem::chem_species_t>(ambient_chem.keys()[i]),
126126
np2ai<real_t>(bp::extract<bp_array>(ambient_chem.values()[i]), sz(*arg))
127127
));
128128
lgr::arrinfo_t<real_t>
@@ -155,12 +155,12 @@ namespace libcloudphxx
155155
bp::dict &ambient_chem
156156
)
157157
{
158-
typedef std::map<enum lgr::chem_species_t, lgr::arrinfo_t<real_t> > map_t;
158+
typedef std::map<enum cmn::chem::chem_species_t, lgr::arrinfo_t<real_t> > map_t;
159159
map_t map;
160160

161161
for (int i = 0; i < len(ambient_chem.keys()); ++i)
162162
map.insert(typename map_t::value_type(
163-
bp::extract<enum lgr::chem_species_t>(ambient_chem.keys()[i]),
163+
bp::extract<enum cmn::chem::chem_species_t>(ambient_chem.keys()[i]),
164164
np2ai<real_t>(bp::extract<bp_array>(ambient_chem.values()[i]), sz(*arg))
165165
));
166166
lgr::arrinfo_t<real_t>
@@ -188,12 +188,12 @@ namespace libcloudphxx
188188
bp::dict &ambient_chem
189189
)
190190
{
191-
typedef std::map<enum lgr::chem_species_t, lgr::arrinfo_t<real_t> > map_t;
191+
typedef std::map<enum cmn::chem::chem_species_t, lgr::arrinfo_t<real_t> > map_t;
192192
map_t map;
193193

194194
for (int i = 0; i < len(ambient_chem.keys()); ++i)
195195
map.insert(typename map_t::value_type(
196-
bp::extract<enum lgr::chem_species_t>(ambient_chem.keys()[i]),
196+
bp::extract<enum cmn::chem::chem_species_t>(ambient_chem.keys()[i]),
197197
np2ai<real_t>(bp::extract<bp_array>(ambient_chem.values()[i]), sz(*arg))
198198
));
199199

@@ -211,7 +211,7 @@ namespace libcloudphxx
211211
template <typename real_t>
212212
bp::dict diag_puddle(lgr::particles_proto_t<real_t> *arg)
213213
{
214-
typedef std::map<enum lgr::output_t, real_t> map_t;
214+
typedef std::map<enum cmn::output_t, real_t> map_t;
215215
map_t map = arg->diag_puddle();
216216
bp::dict dict;
217217
for(auto& x : map)

bindings/python/lib.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -228,15 +228,15 @@ BOOST_PYTHON_MODULE(libcloudphxx)
228228
.value("euler", lgr::as_t::euler)
229229
.value("pred_corr", lgr::as_t::pred_corr);
230230

231-
bp::enum_<lgr::chem_species_t>("chem_species_t")
232-
.value("H", lgr::H)
233-
.value("SO2", lgr::SO2)
234-
.value("O3", lgr::O3)
235-
.value("H2O2", lgr::H2O2)
236-
.value("CO2", lgr::CO2)
237-
.value("NH3", lgr::NH3)
238-
.value("HNO3", lgr::HNO3)
239-
.value("S_VI", lgr::S_VI);
231+
bp::enum_<cmn::chem::chem_species_t>("chem_species_t")
232+
.value("H", cmn::chem::H)
233+
.value("SO2", cmn::chem::SO2)
234+
.value("O3", cmn::chem::O3)
235+
.value("H2O2", cmn::chem::H2O2)
236+
.value("CO2", cmn::chem::CO2)
237+
.value("NH3", cmn::chem::NH3)
238+
.value("HNO3", cmn::chem::HNO3)
239+
.value("S_VI", cmn::chem::S_VI);
240240
// classes
241241
bp::class_<lgr::opts_t<real_t>>("opts_t")
242242
.def_readwrite("adve", &lgr::opts_t<real_t>::adve)

include/libcloudph++/blk_1m/adj_cellwise.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#pragma once
1010

11-
#include <libcloudph++/blk_1m/extincl.hpp>
11+
#include "extincl.hpp"
1212

1313
namespace libcloudphxx
1414
{

include/libcloudph++/blk_1m/extincl.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
#include <boost/numeric/odeint.hpp>
66

7-
#include <libcloudph++/common/const_cp.hpp>
8-
#include <libcloudph++/common/theta_dry.hpp>
9-
#include <libcloudph++/common/detail/zip.hpp>
7+
#include "../common/const_cp.hpp"
8+
#include "../common/theta_dry.hpp"
9+
#include "../common/detail/zip.hpp"
1010

11-
#include <libcloudph++/blk_1m/formulae.hpp>
11+
#include "formulae.hpp"

include/libcloudph++/blk_1m/formulae.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#pragma once
1010

11-
#include <libcloudph++/common/moist_air.hpp>
11+
#include "../common/moist_air.hpp"
1212

1313
namespace libcloudphxx
1414
{

include/libcloudph++/blk_1m/rhs_cellwise.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#pragma once
99

10-
#include <libcloudph++/blk_1m/extincl.hpp>
10+
#include "extincl.hpp"
1111

1212
namespace libcloudphxx
1313
{

include/libcloudph++/blk_1m/rhs_columnwise.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#pragma once
1010

11-
#include <libcloudph++/blk_1m/extincl.hpp>
11+
#include "extincl.hpp"
1212

1313
namespace libcloudphxx
1414
{
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#pragma once
2+
3+
namespace libcloudphxx
4+
{
5+
namespace common
6+
{
7+
namespace chem
8+
{
9+
enum chem_species_t
10+
{
11+
HNO3, NH3, CO2, SO2, H2O2, O3, // both gas and total dissolved chem species
12+
// (must be first as gas species vectors use only these!)
13+
S_VI, // must be after above and before the below to use odeint
14+
// on a part of the vector only - odeint uses SO2 --> S_VI!
15+
H, // not used in the odeint vector
16+
17+
chem_gas_n = O3 + 1,
18+
chem_rhs_beg = SO2,
19+
chem_rhs_fin = S_VI + 1,
20+
chem_all = H + 1
21+
};
22+
};
23+
};
24+
};

include/libcloudph++/common/const_cp.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#pragma once
22

3-
#include <libcloudph++/common/units.hpp> // TODO: do detail?
4-
#include <libcloudph++/common/macros.hpp> // TODO: do detail?
5-
#include <libcloudph++/common/moist_air.hpp>
3+
#include "units.hpp" // TODO: do detail?
4+
#include "macros.hpp" // TODO: do detail?
5+
#include "moist_air.hpp"
66

77
namespace libcloudphxx
88
{

include/libcloudph++/common/dissoc.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#pragma once
22

3-
#include <libcloudph++/common/units.hpp>
4-
#include <libcloudph++/common/macros.hpp>
3+
#include "units.hpp"
4+
#include "macros.hpp"
55

66
namespace libcloudphxx
77
{

0 commit comments

Comments
 (0)