Skip to content

Commit 885dc78

Browse files
committed
thank god for unit tests
1 parent 2f9d857 commit 885dc78

File tree

4 files changed

+1
-55
lines changed

4 files changed

+1
-55
lines changed

crates/feos-core/src/parameter/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ where
5050
pure_records: Vec<PureRecord<Self::Pure>>,
5151
binary_record: Option<Self::Binary>,
5252
) -> FeosResult<Self> {
53-
let binary_record = binary_record.into_iter().map(|r| ([0, 0], r)).collect();
53+
let binary_record = binary_record.into_iter().map(|r| ([0, 1], r)).collect();
5454
Self::from_records(pure_records, binary_record)
5555
}
5656

crates/feos/src/epcsaft/parameters.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -209,24 +209,6 @@ impl ElectrolytePcSaftBinaryRecord {
209209
}
210210
}
211211

212-
impl From<f64> for ElectrolytePcSaftBinaryRecord {
213-
fn from(k_ij: f64) -> Self {
214-
Self {
215-
k_ij: vec![k_ij, 0., 0., 0.],
216-
association: None,
217-
}
218-
}
219-
}
220-
221-
impl From<Vec<f64>> for ElectrolytePcSaftBinaryRecord {
222-
fn from(k_ij: Vec<f64>) -> Self {
223-
Self {
224-
k_ij,
225-
association: None,
226-
}
227-
}
228-
}
229-
230212
impl From<ElectrolytePcSaftBinaryRecord> for f64 {
231213
fn from(binary_record: ElectrolytePcSaftBinaryRecord) -> Self {
232214
match binary_record.k_ij.first() {

crates/feos/src/saftvrmie/parameters.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -177,22 +177,6 @@ impl SaftVRMieBinaryRecord {
177177
}
178178
}
179179

180-
impl From<f64> for SaftVRMieBinaryRecord {
181-
fn from(k_ij: f64) -> Self {
182-
Self {
183-
k_ij,
184-
gamma_ij: f64::default(),
185-
association: None,
186-
}
187-
}
188-
}
189-
190-
impl From<SaftVRMieBinaryRecord> for f64 {
191-
fn from(binary_record: SaftVRMieBinaryRecord) -> Self {
192-
binary_record.k_ij
193-
}
194-
}
195-
196180
impl std::fmt::Display for SaftVRMieBinaryRecord {
197181
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
198182
let mut tokens = vec![];

crates/feos/src/saftvrqmie/parameters.rs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -109,26 +109,6 @@ impl std::fmt::Display for SaftVRQMieBinaryRecord {
109109
}
110110
}
111111

112-
impl TryFrom<f64> for SaftVRQMieBinaryRecord {
113-
type Error = FeosError;
114-
115-
fn try_from(_f: f64) -> Result<Self, Self::Error> {
116-
Err(FeosError::IncompatibleParameters(
117-
"Cannot infer k_ij and l_ij from single float.".to_string(),
118-
))
119-
}
120-
}
121-
122-
impl TryFrom<SaftVRQMieBinaryRecord> for f64 {
123-
type Error = FeosError;
124-
125-
fn try_from(_f: SaftVRQMieBinaryRecord) -> Result<Self, Self::Error> {
126-
Err(FeosError::IncompatibleParameters(
127-
"Cannot infer k_ij and l_ij from single float.".to_string(),
128-
))
129-
}
130-
}
131-
132112
/// Parameter set required for the SAFT-VRQ Mie equation of state and Helmholtz energy functional.
133113
pub struct SaftVRQMieParameters {
134114
pub molarweight: Array1<f64>,

0 commit comments

Comments
 (0)