mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3930 Octave : Fix includes and replace deprecated functions
This commit is contained in:
@@ -30,11 +30,11 @@ void setEclipseProperty(const NDArray& propertyFrames, const QString &hostName,
|
||||
|
||||
QString command = QString("SetGridProperty %1 %2 %3 %4").arg(caseId).arg(gridIndex).arg(propertyName).arg(porosityModel);
|
||||
|
||||
for (int i = 0; i < timeStepIndices.length(); ++i)
|
||||
for (int i = 0; i < timeStepIndices.numel(); ++i)
|
||||
{
|
||||
if (i == 0) command += " ";
|
||||
command += QString::number(static_cast<int>(timeStepIndices.elem(i)) - 1); // To make the index 0-based
|
||||
if (i != timeStepIndices.length() -1) command += " ";
|
||||
if (i != timeStepIndices.numel() -1) command += " ";
|
||||
}
|
||||
|
||||
QByteArray cmdBytes = command.toLatin1();
|
||||
@@ -237,7 +237,7 @@ DEFUN_DLD (riSetGridProperty, args, nargout,
|
||||
if (argIndices[4] >= 0) timeStepIndices = args(argIndices[4]).int32_array_value();
|
||||
if (argIndices[5] >= 0) porosityModel = args(argIndices[5]).string_value();
|
||||
|
||||
if (timeStepIndices.length() > 1)
|
||||
if (timeStepIndices.numel() > 1)
|
||||
{
|
||||
if (mxDims.length() == 3)
|
||||
{
|
||||
@@ -247,7 +247,7 @@ DEFUN_DLD (riSetGridProperty, args, nargout,
|
||||
}
|
||||
|
||||
int timeStepCount = mxDims.elem(3);
|
||||
if (timeStepIndices.length() != timeStepCount)
|
||||
if (timeStepIndices.numel() != timeStepCount)
|
||||
{
|
||||
error("riSetGridProperty: The number of time steps in the input matrix must match the number of time steps in the TimeStepIndices array.");
|
||||
print_usage();
|
||||
|
||||
Reference in New Issue
Block a user