Skip to content

Commit

Permalink
[.NET] Update Equilibrate
Browse files Browse the repository at this point in the history
  • Loading branch information
ischoegl committed Aug 11, 2024
1 parent c56bdb1 commit 5017f36
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 33 deletions.
4 changes: 0 additions & 4 deletions interfaces/dotnet/Cantera.Tests/src/EnumsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ public void ThermoPair_ToStringsCorrectly()
}
}

[Fact]
public void EquilibriumSolver_MapsCorrectly() =>
TestInteropEnumInvariants<EquilibriumSolver>(true, -1, 2);

[Fact]
public void LogLevel_MapsCorrectly() =>
TestInteropEnumInvariants<LogLevel>(true, 0, 2);
Expand Down
26 changes: 0 additions & 26 deletions interfaces/dotnet/Cantera/src/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,32 +103,6 @@ public static string ToInteropString(this ThermoPair thermoPair)

// the constants MUST match what CLIB is expecting

/// <summary>
/// Determines which algorithm is used to find equilibrium.
/// </summary>
public enum EquilibriumSolver
{
/// <summary>
/// Allow Cantera to determine the optimum algorithm.
/// </summary>
Auto = -1,

/// <summary>
/// Solve by using the element potential algorithm.
/// </summary>
ElementPotential,

/// <summary>
/// Solve by using the general algorithm to minimize Gibbs free energy.
/// </summary>
Gibbs,

/// <summary>
/// Solved by using the VCS algorithm to minimize Gibbs free energy.
/// </summary>
Vcs
}

/// <summary>
/// The
/// </summary>
Expand Down
5 changes: 2 additions & 3 deletions interfaces/dotnet/Cantera/src/ThermoPhase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,10 @@ internal ThermoPhase(string filename, string? phaseName)

/// <summary>
/// Simulates bringing the phase to thermodynamic equilibrium by holding the
/// specified <see cref="ThermoPair" /> constant and using the algorithm
/// identified by the given <see cref="EquilibriumSolver" />.
/// specified <see cref="ThermoPair" /> constant and using the identified algorithm.
/// </summary>
public void Equilibrate(ThermoPair thermoPair,
EquilibriumSolver solver = EquilibriumSolver.Auto,
string algorithm = "auto",
double tolerance = 1e-9, int maxSteps = 1000,
int maxIterations = 100, int logVerbosity = 0)
{
Expand Down

0 comments on commit 5017f36

Please sign in to comment.