From ab7b8ba1b4860066ba76cc70e2819703fb68653e Mon Sep 17 00:00:00 2001 From: Ingmar Schoegl Date: Mon, 12 Aug 2024 20:03:22 -0500 Subject: [PATCH] [.NET] debugging --- interfaces/dotnet/Cantera/src/Application.cs | 5 +++-- interfaces/dotnet/Cantera/src/SpeciesCollection.cs | 10 +++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/interfaces/dotnet/Cantera/src/Application.cs b/interfaces/dotnet/Cantera/src/Application.cs index 8be8514bfab..ccc35574fb7 100644 --- a/interfaces/dotnet/Cantera/src/Application.cs +++ b/interfaces/dotnet/Cantera/src/Application.cs @@ -127,6 +127,7 @@ static void LogToConsole(object? sender, LogMessageEventArgs e) /// looking up the given name. /// public static ThermoPhase CreateThermoPhase(string filename, - string? phaseName = null) => - new ThermoPhase(filename, phaseName); + string? phaseName = null, + string? transModel = null) => + new ThermoPhase(filename, phaseName, transModel); } diff --git a/interfaces/dotnet/Cantera/src/SpeciesCollection.cs b/interfaces/dotnet/Cantera/src/SpeciesCollection.cs index 3e6138f03d1..62f475c9412 100644 --- a/interfaces/dotnet/Cantera/src/SpeciesCollection.cs +++ b/interfaces/dotnet/Cantera/src/SpeciesCollection.cs @@ -53,7 +53,7 @@ public unsafe double[] MassFractions set { var retval = LibCantera.thermo_setMassFractions(_handle, - (nuint) value.Length, value, InteropConsts.True); + value.Length, value, InteropConsts.True); InteropUtil.CheckReturn(retval); } @@ -72,7 +72,7 @@ public unsafe double[] MoleFractions set { var retval = LibCantera.thermo_setMoleFractions(_handle, - (nuint) value.Length, value, InteropConsts.True); + value.Length, value, InteropConsts.True); InteropUtil.CheckReturn(retval); } @@ -98,7 +98,7 @@ internal unsafe SpeciesCollection(ThermoPhaseHandle handle) for (var i = 0; i < count; i++) { int getName(int length, byte* buffer) => LibCantera - .thermo_getSpeciesName(handle, (nuint) i, (nuint) length, buffer); + .thermo_getSpeciesName(handle, i, length, buffer); var name = InteropUtil.GetString(10, getName); @@ -261,7 +261,7 @@ int EnsureIndexOf(string name) public void SetUnnormalizedMassFractions(double[] fractions) { var retval = LibCantera.thermo_setMassFractions(_handle, - (nuint) fractions.Length, fractions, InteropConsts.False); + fractions.Length, fractions, InteropConsts.False); InteropUtil.CheckReturn(retval); } @@ -274,7 +274,7 @@ public void SetUnnormalizedMassFractions(double[] fractions) public void SetUnnormalizedMoleFractions(double[] fractions) { var retval = LibCantera.thermo_setMoleFractions(_handle, - (nuint) fractions.Length, fractions, InteropConsts.False); + fractions.Length, fractions, InteropConsts.False); InteropUtil.CheckReturn(retval); }