Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
teqp_fork_old
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sven Michael Pohl
teqp_fork_old
Commits
50b61af0
Commit
50b61af0
authored
3 years ago
by
Ian Bell
Browse files
Options
Downloads
Patches
Plain Diff
Expose the mix_VLE_Tx routine to Python
parent
e0f556ec
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
interface/pybind11_wrapper.cpp
+7
-0
7 additions, 0 deletions
interface/pybind11_wrapper.cpp
interface/pybind11_wrapper.hpp
+1
-0
1 addition, 0 deletions
interface/pybind11_wrapper.hpp
with
8 additions
and
0 deletions
interface/pybind11_wrapper.cpp
+
7
−
0
View file @
50b61af0
...
@@ -53,6 +53,13 @@ void init_teqp(py::module& m) {
...
@@ -53,6 +53,13 @@ void init_teqp(py::module& m) {
.
def_readwrite
(
"integration_order"
,
&
TVLEOptions
::
integration_order
)
.
def_readwrite
(
"integration_order"
,
&
TVLEOptions
::
integration_order
)
;
;
py
::
enum_
<
VLE_return_code
>
(
m
,
"VLE_return_code"
)
.
value
(
"unset"
,
VLE_return_code
::
unset
)
.
value
(
"xtol_satisfied"
,
VLE_return_code
::
xtol_satisfied
)
.
value
(
"functol_satisfied"
,
VLE_return_code
::
functol_satisfied
)
.
value
(
"maxiter_met"
,
VLE_return_code
::
maxiter_met
)
;
// Some functions for timing overhead of interface
// Some functions for timing overhead of interface
m
.
def
(
"___mysummer"
,
[](
const
double
&
c
,
const
Eigen
::
ArrayXd
&
x
)
{
return
c
*
x
.
sum
();
});
m
.
def
(
"___mysummer"
,
[](
const
double
&
c
,
const
Eigen
::
ArrayXd
&
x
)
{
return
c
*
x
.
sum
();
});
using
RAX
=
Eigen
::
Ref
<
Eigen
::
ArrayXd
>
;
using
RAX
=
Eigen
::
Ref
<
Eigen
::
ArrayXd
>
;
...
...
This diff is collapsed.
Click to expand it.
interface/pybind11_wrapper.hpp
+
1
−
0
View file @
50b61af0
...
@@ -53,6 +53,7 @@ void add_derivatives(py::module &m, Wrapper &cls) {
...
@@ -53,6 +53,7 @@ void add_derivatives(py::module &m, Wrapper &cls) {
m
.
def
(
"extrapolate_from_critical"
,
&
extrapolate_from_critical
<
Model
,
double
>
);
m
.
def
(
"extrapolate_from_critical"
,
&
extrapolate_from_critical
<
Model
,
double
>
);
m
.
def
(
"pure_VLE_T"
,
&
pure_VLE_T
<
Model
,
double
>
);
m
.
def
(
"pure_VLE_T"
,
&
pure_VLE_T
<
Model
,
double
>
);
m
.
def
(
"mix_VLE_Tx"
,
&
mix_VLE_Tx
<
Model
,
double
,
Eigen
::
ArrayXd
>
);
m
.
def
(
"get_drhovecdp_Tsat"
,
&
get_drhovecdp_Tsat
<
Model
,
double
,
RAX
>
,
py
::
arg
(
"model"
),
py
::
arg
(
"T"
),
py
::
arg
(
"rhovecL"
).
noconvert
(),
py
::
arg
(
"rhovecV"
).
noconvert
());
m
.
def
(
"get_drhovecdp_Tsat"
,
&
get_drhovecdp_Tsat
<
Model
,
double
,
RAX
>
,
py
::
arg
(
"model"
),
py
::
arg
(
"T"
),
py
::
arg
(
"rhovecL"
).
noconvert
(),
py
::
arg
(
"rhovecV"
).
noconvert
());
m
.
def
(
"trace_VLE_isotherm_binary"
,
&
trace_VLE_isotherm_binary
<
Model
,
double
,
Eigen
::
ArrayXd
>
,
py
::
arg
(
"model"
),
py
::
arg
(
"T"
),
py
::
arg
(
"rhovecL0"
).
noconvert
(),
py
::
arg
(
"rhovecV0"
).
noconvert
(),
py
::
arg_v
(
"options"
,
std
::
nullopt
,
"None"
));
m
.
def
(
"trace_VLE_isotherm_binary"
,
&
trace_VLE_isotherm_binary
<
Model
,
double
,
Eigen
::
ArrayXd
>
,
py
::
arg
(
"model"
),
py
::
arg
(
"T"
),
py
::
arg
(
"rhovecL0"
).
noconvert
(),
py
::
arg
(
"rhovecV0"
).
noconvert
(),
py
::
arg_v
(
"options"
,
std
::
nullopt
,
"None"
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment