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
da723c5c
Commit
da723c5c
authored
2 years ago
by
Ian Bell
Browse files
Options
Downloads
Patches
Plain Diff
A few JSON [] to .at()
parent
06a99aad
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/teqp/models/multifluid_reducing.hpp
+6
-6
6 additions, 6 deletions
include/teqp/models/multifluid_reducing.hpp
with
6 additions
and
6 deletions
include/teqp/models/multifluid_reducing.hpp
+
6
−
6
View file @
da723c5c
...
@@ -10,7 +10,7 @@ namespace teqp {
...
@@ -10,7 +10,7 @@ namespace teqp {
// If force-estimate is provided in flags, the estimation will over-ride the provided model(s)
// If force-estimate is provided in flags, the estimation will over-ride the provided model(s)
if
(
flags
.
contains
(
"force-estimate"
))
{
if
(
flags
.
contains
(
"force-estimate"
))
{
std
::
string
scheme
=
flags
[
"estimate"
]
;
std
::
string
scheme
=
flags
.
at
(
"estimate"
)
;
if
(
scheme
==
"Lorentz-Berthelot"
)
{
if
(
scheme
==
"Lorentz-Berthelot"
)
{
return
std
::
make_tuple
(
nlohmann
::
json
({
return
std
::
make_tuple
(
nlohmann
::
json
({
{
"betaT"
,
1.0
},
{
"gammaT"
,
1.0
},
{
"betaV"
,
1.0
},
{
"gammaV"
,
1.0
},
{
"F"
,
0.0
}
{
"betaT"
,
1.0
},
{
"gammaT"
,
1.0
},
{
"betaV"
,
1.0
},
{
"gammaV"
,
1.0
},
{
"F"
,
0.0
}
...
@@ -28,8 +28,8 @@ namespace teqp {
...
@@ -28,8 +28,8 @@ namespace teqp {
std
::
string
comp0
=
toupper
(
identifiers
[
0
]);
std
::
string
comp0
=
toupper
(
identifiers
[
0
]);
std
::
string
comp1
=
toupper
(
identifiers
[
1
]);
std
::
string
comp1
=
toupper
(
identifiers
[
1
]);
for
(
auto
&
el
:
collection
)
{
for
(
auto
&
el
:
collection
)
{
std
::
string
name1
=
toupper
(
el
[
"Name1"
]
);
std
::
string
name1
=
toupper
(
el
.
at
(
"Name1"
)
);
std
::
string
name2
=
toupper
(
el
[
"Name2"
]
);
std
::
string
name2
=
toupper
(
el
.
at
(
"Name2"
)
);
if
(
comp0
==
name1
&&
comp1
==
name2
)
{
if
(
comp0
==
name1
&&
comp1
==
name2
)
{
return
std
::
make_tuple
(
el
,
false
);
return
std
::
make_tuple
(
el
,
false
);
}
}
...
@@ -39,8 +39,8 @@ namespace teqp {
...
@@ -39,8 +39,8 @@ namespace teqp {
}
}
// Second pass, check CAS#
// Second pass, check CAS#
for
(
auto
&
el
:
collection
)
{
for
(
auto
&
el
:
collection
)
{
std
::
string
CAS1
=
el
[
"CAS1"
]
;
std
::
string
CAS1
=
el
.
at
(
"CAS1"
)
;
std
::
string
CAS2
=
el
[
"CAS2"
]
;
std
::
string
CAS2
=
el
.
at
(
"CAS2"
)
;
if
(
identifiers
[
0
]
==
CAS1
&&
identifiers
[
1
]
==
CAS2
)
{
if
(
identifiers
[
0
]
==
CAS1
&&
identifiers
[
1
]
==
CAS2
)
{
return
std
::
make_tuple
(
el
,
false
);
return
std
::
make_tuple
(
el
,
false
);
}
}
...
@@ -51,7 +51,7 @@ namespace teqp {
...
@@ -51,7 +51,7 @@ namespace teqp {
// If estimate is provided in flags, it will be the fallback solution for filling in interaction parameters
// If estimate is provided in flags, it will be the fallback solution for filling in interaction parameters
if
(
flags
.
contains
(
"estimate"
))
{
if
(
flags
.
contains
(
"estimate"
))
{
std
::
string
scheme
=
flags
[
"estimate"
]
;
std
::
string
scheme
=
flags
.
at
(
"estimate"
)
;
if
(
scheme
==
"Lorentz-Berthelot"
)
{
if
(
scheme
==
"Lorentz-Berthelot"
)
{
return
std
::
make_tuple
(
nlohmann
::
json
({
return
std
::
make_tuple
(
nlohmann
::
json
({
{
"betaT"
,
1.0
},
{
"gammaT"
,
1.0
},
{
"betaV"
,
1.0
},
{
"gammaV"
,
1.0
},
{
"F"
,
0.0
}
{
"betaT"
,
1.0
},
{
"gammaT"
,
1.0
},
{
"betaV"
,
1.0
},
{
"gammaV"
,
1.0
},
{
"F"
,
0.0
}
...
...
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