Skip to content

Commit

Permalink
[.NET] debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
ischoegl committed Aug 13, 2024
1 parent cd5a0ce commit ab7b8ba
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions interfaces/dotnet/Cantera/src/Application.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ static void LogToConsole(object? sender, LogMessageEventArgs e)
/// looking up the given name.
/// </summary>
public static ThermoPhase CreateThermoPhase(string filename,
string? phaseName = null) =>
new ThermoPhase(filename, phaseName);
string? phaseName = null,
string? transModel = null) =>
new ThermoPhase(filename, phaseName, transModel);
}
10 changes: 5 additions & 5 deletions interfaces/dotnet/Cantera/src/SpeciesCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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);
}
Expand All @@ -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);

Expand Down Expand Up @@ -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);
}
Expand All @@ -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);
}
Expand Down

0 comments on commit ab7b8ba

Please sign in to comment.