Class ColumnMeshResidual
java.lang.Object
neqsim.process.equipment.distillation.ColumnMeshResidual
- All Implemented Interfaces:
Serializable
Immutable residual vector for distillation column MESH diagnostics.
Residuals are scaled to dimensionless values where possible. The object stores equation type, tray index, and optional component labels so tests and future solvers can inspect the structure without reparsing the column state.
- Version:
- 1.0
- Author:
- esol
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String[]Component label per residual; null for non-component equations.private final ColumnMeshEquationType[]Equation type per residual.private static final longSerialization version UID.private final int[]Tray index per residual; -1 for column-level equations.private final double[]Residual values. -
Constructor Summary
ConstructorsConstructorDescriptionColumnMeshResidual(double[] values, ColumnMeshEquationType[] equationTypes, int[] trayIndices, String[] componentNames) Create a residual vector. -
Method Summary
Modifier and TypeMethodDescription(package private) intcount(ColumnMeshEquationType type) Count residuals of a given equation type.(package private) String[]Get component names for the residual entries.(package private) ColumnMeshEquationType[]Get equation types for the residual entries.(package private) doubleGet the infinity norm of all residuals.(package private) doubleGet the infinity norm for a subset of residuals.(package private) doubleGet the Euclidean norm of all residuals.(package private) int[]Get tray indices for the residual entries.(package private) double[]Get a copy of the residual vector.(package private) booleanisFinite()Check whether all residuals are finite numbers.(package private) intsize()Get the number of residual equations.toString()
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
values
private final double[] valuesResidual values. -
equationTypes
Equation type per residual. -
trayIndices
private final int[] trayIndicesTray index per residual; -1 for column-level equations. -
componentNames
Component label per residual; null for non-component equations.
-
-
Constructor Details
-
ColumnMeshResidual
ColumnMeshResidual(double[] values, ColumnMeshEquationType[] equationTypes, int[] trayIndices, String[] componentNames) Create a residual vector.- Parameters:
values- residual valuesequationTypes- equation type per residualtrayIndices- tray index per residualcomponentNames- component label per residual
-
-
Method Details
-
getValues
double[] getValues()Get a copy of the residual vector.- Returns:
- residual values
-
getEquationTypes
ColumnMeshEquationType[] getEquationTypes()Get equation types for the residual entries.- Returns:
- equation type metadata
-
getTrayIndices
int[] getTrayIndices()Get tray indices for the residual entries.- Returns:
- tray index metadata
-
getComponentNames
String[] getComponentNames()Get component names for the residual entries.- Returns:
- component label metadata
-
size
int size()Get the number of residual equations.- Returns:
- residual count
-
isFinite
boolean isFinite()Check whether all residuals are finite numbers.- Returns:
trueif every residual is finite
-
getInfinityNorm
double getInfinityNorm()Get the infinity norm of all residuals.- Returns:
- maximum absolute residual
-
getInfinityNorm
Get the infinity norm for a subset of residuals.- Parameters:
type- equation type to include- Returns:
- maximum absolute residual for the requested type
-
getL2Norm
double getL2Norm()Get the Euclidean norm of all residuals.- Returns:
- L2 norm
-
count
Count residuals of a given equation type.- Parameters:
type- equation type to count- Returns:
- number of residuals with the requested type
-
toString
-