mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-09 23:16:00 -06:00
Octave Interface : Unit test. Still Work in progress
But several bugs have been discovered.
This commit is contained in:
parent
230561573e
commit
cf3cf7c3f9
@ -55,7 +55,7 @@
|
|||||||
%! assert(ACInfo1 == ACInfo4);
|
%! assert(ACInfo1 == ACInfo4);
|
||||||
|
|
||||||
### Matrix[numCoarseGroups][6] riGetCoarseningInfo([CaseId])
|
### Matrix[numCoarseGroups][6] riGetCoarseningInfo([CaseId])
|
||||||
%!xtest
|
%!test
|
||||||
%! printf ("===== Testing ====> riGetCoarseningInfo\n");
|
%! printf ("===== Testing ====> riGetCoarseningInfo\n");
|
||||||
%! CoarseInfo1 = riGetCoarseningInfo();
|
%! CoarseInfo1 = riGetCoarseningInfo();
|
||||||
%! assert(rows(CoarseInfo1) == 0);
|
%! assert(rows(CoarseInfo1) == 0);
|
||||||
@ -69,6 +69,7 @@
|
|||||||
%! GridDims1 = riGetGridDimensions();
|
%! GridDims1 = riGetGridDimensions();
|
||||||
%! assert(rows(GridDims1) == 1);
|
%! assert(rows(GridDims1) == 1);
|
||||||
%! assert(columns(GridDims1) == 3);
|
%! assert(columns(GridDims1) == 3);
|
||||||
|
|
||||||
%! GridDims2 = riGetGridDimensions(0);
|
%! GridDims2 = riGetGridDimensions(0);
|
||||||
%! assert(rows(GridDims2) == 2);
|
%! assert(rows(GridDims2) == 2);
|
||||||
%! assert(columns(GridDims2) == 3);
|
%! assert(columns(GridDims2) == 3);
|
||||||
@ -76,110 +77,246 @@
|
|||||||
%! assert( GridDims2(2,3) == 36);
|
%! assert( GridDims2(2,3) == 36);
|
||||||
|
|
||||||
### Vector[TimeStepDate] riGetTimestepDates([CaseId])
|
### Vector[TimeStepDate] riGetTimestepDates([CaseId])
|
||||||
printf ("===== Testing ====> riGetTimestepDates\n");
|
%!test
|
||||||
TimeStepDates1 = riGetTimeStepDates();
|
%! printf ("===== Testing ====> riGetTimestepDates\n");
|
||||||
TimeStepDates2 = riGetTimeStepDates(1);
|
%! TimeStepDates1 = riGetTimeStepDates();
|
||||||
|
%! assert(rows(TimeStepDates1) == 11);
|
||||||
|
%! assert(TimeStepDates1(2).Year == 1997);
|
||||||
|
%! assert(TimeStepDates1(2).Month == 01);
|
||||||
|
%! assert(TimeStepDates1(2).Day == 31);
|
||||||
|
%! assert(TimeStepDates1(2).Hour == 0);
|
||||||
|
%! assert(TimeStepDates1(2).Minute == 0);
|
||||||
|
%! assert(TimeStepDates1(2).Second == 0);
|
||||||
|
%! TimeStepDates2 = riGetTimeStepDates(1);
|
||||||
|
%! assert(TimeStepDates2(7).Year == 1997);
|
||||||
|
%! assert(TimeStepDates2(7).Month == 06);
|
||||||
|
%! assert(TimeStepDates2(7).Day == 30);
|
||||||
|
%! assert(TimeStepDates2(7).Hour == 0);
|
||||||
|
%! assert(TimeStepDates2(7).Minute == 0);
|
||||||
|
%! assert(TimeStepDates2(7).Second == 0);
|
||||||
|
|
||||||
### Vector[DecimalDay] riGetTimestepDays([CaseId])
|
### Vector[DecimalDay] riGetTimestepDays([CaseId])
|
||||||
printf ("===== Testing ====> riGetTimestepDays\n");
|
%!test
|
||||||
TimeStepDays1 = riGetTimeStepDays();
|
%! printf ("===== Testing ====> riGetTimestepDays\n");
|
||||||
TimeStepDays2 = riGetTimeStepDays(1);
|
%! TimeStepDays1 = riGetTimeStepDays();
|
||||||
|
%! assert(TimeStepDays1(1) == 0);
|
||||||
|
%! assert(TimeStepDays1(2) == 30);
|
||||||
|
%! assert(rows(TimeStepDays1) == 11);
|
||||||
|
%! TimeStepDays2 = riGetTimeStepDays(1);
|
||||||
|
%! assert(rows(TimeStepDays2) == 11);
|
||||||
|
|
||||||
|
|
||||||
### Vector[PropertyInfo] riGetPropertyNames([CaseId] ], [PorosityModel = "Matrix"|"Fracture"])
|
### Vector[PropertyInfo] riGetPropertyNames([CaseId] ], [PorosityModel = "Matrix"|"Fracture"])
|
||||||
printf ("===== Testing ====> riGetPropertyNames\n");
|
%!xtest
|
||||||
PropertyInfos1 = riGetPropertyNames();
|
%! printf ("===== Testing ====> riGetPropertyNames\n");
|
||||||
PropertyInfos2 = riGetPropertyNames(1);
|
%! PropertyInfos1 = riGetPropertyNames();
|
||||||
PropertyInfos3 = riGetPropertyNames("Matrix");
|
%! PropertyInfos2 = riGetPropertyNames(1);
|
||||||
PropertyInfos4 = riGetPropertyNames(1, "Matrix");
|
%! PropertyInfos3 = riGetPropertyNames("Matrix");
|
||||||
|
%! PropertyInfos4 = riGetPropertyNames(1, "Matrix");
|
||||||
|
%! assert(rows(PropertyInfos1) == 26)
|
||||||
|
%! assert(PropertyInfos1(1).PropName == "PRESSURE");
|
||||||
|
%! assert(PropertyInfos1(1).PropType == "DynamicNative");
|
||||||
|
%! assert(PropertyInfos1(26).PropType == "StaticNative");
|
||||||
|
|
||||||
### Matrix[numActiveCells][numTimestepsRequested] riGetActiveCellProperty([CaseId], PropertyName, [RequestedTimeSteps], [PorosityModel = "Matrix"|"Fracture"])
|
### Matrix[numActiveCells][numTimestepsRequested] riGetActiveCellProperty([CaseId], PropertyName, [RequestedTimeSteps], [PorosityModel = "Matrix"|"Fracture"])
|
||||||
printf ("===== Testing ====> riGetActiveCellProperty\n");
|
%!test
|
||||||
ActivePropData1 = riGetActiveCellProperty("SOIL");
|
%! printf ("===== Testing ====> riGetActiveCellProperty\n");
|
||||||
ActivePropData2 = riGetActiveCellProperty("SOIL", "Matrix");
|
%! ActivePropData1 = riGetActiveCellProperty("SOIL");
|
||||||
ActivePropData3 = riGetActiveCellProperty("SOIL", [1,3]);
|
%! assert (rows(ActivePropData1) == rows(riGetActiveCellInfo()));
|
||||||
ActivePropData4 = riGetActiveCellProperty("SOIL", [1,3], "Matrix");
|
%! assert (columns(ActivePropData1) == rows(riGetTimeStepDays()));
|
||||||
|
%! ActivePropData2 = riGetActiveCellProperty("SOIL", "Matrix");
|
||||||
ActivePropData5 = riGetActiveCellProperty(1, "SOIL");
|
%! assert (ActivePropData2 == ActivePropData1);
|
||||||
ActivePropData6 = riGetActiveCellProperty(1, "SOIL", [1,3]);
|
%! ActivePropData3 = riGetActiveCellProperty("SOIL", [1,3]);
|
||||||
ActivePropData7 = riGetActiveCellProperty(1, "SOIL", [1,3], "Matrix");
|
%! assert (columns(ActivePropData3) == 2);
|
||||||
ActivePropData8 = riGetActiveCellProperty(1, "SOIL", "Matrix");
|
%! assert (ActivePropData3(:,2) == ActivePropData1(:,3));
|
||||||
|
%! ActivePropData4 = riGetActiveCellProperty("SOIL", [1,3], "Matrix");
|
||||||
|
%! assert (ActivePropData3 == ActivePropData4);
|
||||||
|
%! ActivePropData5 = riGetActiveCellProperty(1, "SOIL");
|
||||||
|
%! assert (ActivePropData5 == ActivePropData1);
|
||||||
|
%! ActivePropData6 = riGetActiveCellProperty(1, "SOIL", [1,3]);
|
||||||
|
%! assert (ActivePropData6 == ActivePropData3);
|
||||||
|
%! ActivePropData7 = riGetActiveCellProperty(1, "SOIL", [1,3], "Matrix");
|
||||||
|
%! assert (ActivePropData7 == ActivePropData3);
|
||||||
|
%! ActivePropData8 = riGetActiveCellProperty(1, "SOIL", "Matrix");
|
||||||
|
%! assert (ActivePropData8 == ActivePropData1);
|
||||||
|
|
||||||
### Matrix[numI][numJ][numK][numTimestepsRequested] riGetGridProperty([CaseId], GridIndex , PropertyName, [RequestedTimeSteps], [PorosityModel = "Matrix"|"Fracture"])
|
### Matrix[numI][numJ][numK][numTimestepsRequested] riGetGridProperty([CaseId], GridIndex , PropertyName, [RequestedTimeSteps], [PorosityModel = "Matrix"|"Fracture"])
|
||||||
printf ("===== Testing ====> riGetGridProperty\n");
|
%!test
|
||||||
GridProps1 = riGetGridProperty( 0 , "SOIL" );
|
%! printf ("===== Testing ====> riGetGridProperty\n");
|
||||||
GridProps2 = riGetGridProperty( 0 , "SOIL", [1,3]);
|
%! GridProps1 = riGetGridProperty( 0 , "SOIL" );
|
||||||
GridProps3 = riGetGridProperty( 0 , "SOIL", [1,3], "Matrix");
|
%! assert( ndims (GridProps1) == 4);
|
||||||
GridProps4 = riGetGridProperty( 0 , "SOIL", "Matrix");
|
%! [ni, nj, nk, nts ] = size(GridProps1);
|
||||||
GridProps5 = riGetGridProperty(1, 0 , "SOIL" );
|
%! disp(nts);
|
||||||
GridProps6 = riGetGridProperty(1, 0 , "SOIL", [1,3]);
|
%! assert(nts == 11);
|
||||||
GridProps7 = riGetGridProperty(1, 0 , "SOIL", [1,3], "Matrix");
|
%! assert(ni == 139);
|
||||||
GridProps8 = riGetGridProperty(1, 0 , "SOIL", "Matrix");
|
%! assert(nj == 48);
|
||||||
|
%! assert(nk == 9);
|
||||||
|
%! assert(GridProps1(62,30,1,3), 0.59058, 0.00001);
|
||||||
|
|
||||||
|
%! GridProps2 = riGetGridProperty( 0 , "SOIL", [1,3]);
|
||||||
|
%! assert( ndims (GridProps2) == 4);
|
||||||
|
%! [ni, nj, nk, nts ] = size(GridProps2);
|
||||||
|
%! assert(nts == 2);
|
||||||
|
%! assert(ni == 139);
|
||||||
|
%! assert(nj == 48);
|
||||||
|
%! assert(nk == 9);
|
||||||
|
%! assert(GridProps2(62,30,1,2), 0.59058, 0.00001);
|
||||||
|
|
||||||
### riSetActiveCellProperty( Matrix[numActiveCells][numTimeSteps], [CaseId], PropertyName, [TimeStepIndices], [PorosityModel = "Matrix"|"Fracture"])
|
%! GridProps3 = riGetGridProperty( 0 , "SOIL", [1,3], "Matrix");
|
||||||
printf ("===== Testing ====> riSetActiveCellProperty\n");
|
%! GridProps4 = riGetGridProperty( 0 , "SOIL", "Matrix");
|
||||||
riSetActiveCellProperty( ActivePropData1, "PropertyName1" );
|
%! GridProps5 = riGetGridProperty(1, 0 , "SOIL" );
|
||||||
|
%! GridProps6 = riGetGridProperty(1, 0 , "SOIL", [1,3]);
|
||||||
|
%! GridProps7 = riGetGridProperty(1, 0 , "SOIL", [1,3], "Matrix");
|
||||||
|
%! GridProps8 = riGetGridProperty(1, 0 , "SOIL", "Matrix");
|
||||||
|
|
||||||
riSetActiveCellProperty( ActivePropData3, "PropertyName2", [1,3]);
|
%! assert(GridProps3 == GridProps2);
|
||||||
riSetActiveCellProperty( ActivePropData3, "PropertyName3", [1,3], "Matrix");
|
%! assert(GridProps4 == GridProps1);
|
||||||
riSetActiveCellProperty( ActivePropData1, "PropertyName4", "Matrix");
|
%! assert(GridProps5 == GridProps1);
|
||||||
riSetActiveCellProperty( ActivePropData1, 1, "PropertyName5" );
|
%! assert(GridProps6 == GridProps2);
|
||||||
riSetActiveCellProperty( ActivePropData3, 1, "PropertyName6", [1,3]);
|
%! assert(GridProps7 == GridProps2);
|
||||||
riSetActiveCellProperty( ActivePropData3, 1, "PropertyName7", [1,3], "Matrix");
|
%! assert(GridProps8 == GridProps1);
|
||||||
riSetActiveCellProperty( ActivePropData1, 1, "PropertyName8", "Matrix");
|
|
||||||
|
|
||||||
|
### riSetActiveCellProperty( Matrix[numActiveCells][numTimeSteps], [CaseId], PropertyName, [TimeStepIndices], [PorosityModel = "Matrix"|"Fracture"])
|
||||||
|
%!test
|
||||||
|
%! printf ("===== Testing ====> riSetActiveCellProperty\n");
|
||||||
|
%! ActivePropData1 = riGetActiveCellProperty("SOIL");
|
||||||
|
%! ActivePropData3 = riGetActiveCellProperty("SOIL", [1,3]);
|
||||||
|
|
||||||
|
%! riSetActiveCellProperty( ActivePropData1, "PropertyName1" );
|
||||||
|
%! riSetActiveCellProperty( ActivePropData3, "PropertyName2", [1,3]);
|
||||||
|
%! riSetActiveCellProperty( ActivePropData3, "PropertyName3", [1,3], "Matrix");
|
||||||
|
%! riSetActiveCellProperty( ActivePropData1, "PropertyName4", "Matrix");
|
||||||
|
%! riSetActiveCellProperty( ActivePropData1, 1, "PropertyName5" );
|
||||||
|
%! riSetActiveCellProperty( ActivePropData3, 1, "PropertyName6", [1,3]);
|
||||||
|
%! riSetActiveCellProperty( ActivePropData3, 1, "PropertyName7", [1,3], "Matrix");
|
||||||
|
%! riSetActiveCellProperty( ActivePropData1, 1, "PropertyName8", "Matrix");
|
||||||
|
|
||||||
|
%! assert(ActivePropData1 == riGetActiveCellProperty("PropertyName1"));
|
||||||
|
%! assert(ActivePropData3 == riGetActiveCellProperty("PropertyName2", [1,3]));
|
||||||
|
%! assert(ActivePropData3 == riGetActiveCellProperty("PropertyName3", [1,3]));
|
||||||
|
%! assert(ActivePropData1 == riGetActiveCellProperty("PropertyName4", "Matrix"));
|
||||||
|
%! assert(ActivePropData1 == riGetActiveCellProperty("PropertyName5"));
|
||||||
|
%! assert(ActivePropData3 == riGetActiveCellProperty( 1, "PropertyName6", [1,3]));
|
||||||
|
%! assert(ActivePropData3 == riGetActiveCellProperty( 1, "PropertyName7", [1,3], "Matrix"));
|
||||||
|
%! assert(ActivePropData1 == riGetActiveCellProperty( 1, "PropertyName8", "Matrix"));
|
||||||
|
|
||||||
### riSetGridProperty( Matrix[numI][numJ][numK][numTimeSteps], [CaseId], GridIndex, PropertyName, [TimeStepIndices], [PorosityModel = "Matrix"|"Fracture"])
|
### riSetGridProperty( Matrix[numI][numJ][numK][numTimeSteps], [CaseId], GridIndex, PropertyName, [TimeStepIndices], [PorosityModel = "Matrix"|"Fracture"])
|
||||||
printf ("===== Testing ====> riSetGridProperty\n");
|
%!test
|
||||||
riSetGridProperty( GridProps1, 0, "PropertyName11" );
|
%! printf ("===== Testing ====> riSetGridProperty\n");
|
||||||
riSetGridProperty( GridProps2, 0, "PropertyName12", [1,3]);
|
%! GridProps1 = riGetGridProperty( 0 , "SOIL" );
|
||||||
riSetGridProperty( GridProps2, 0, "PropertyName13", [1,3], "Matrix");
|
%! GridProps2 = riGetGridProperty( 0 , "SOIL", [1,3]);
|
||||||
riSetGridProperty( GridProps1, 0, "PropertyName14", "Matrix");
|
|
||||||
riSetGridProperty( GridProps1, 1, 0, "PropertyName15" );
|
%! riSetGridProperty( GridProps1, 0, "PropertyName11" );
|
||||||
riSetGridProperty( GridProps2, 1, 0, "PropertyName16", [1,3]);
|
%! riSetGridProperty( GridProps2, 0, "PropertyName12", [1,3]);
|
||||||
riSetGridProperty( GridProps2, 1, 0, "PropertyName17", [1,3], "Matrix");
|
%! riSetGridProperty( GridProps2, 0, "PropertyName13", [1,3], "Matrix");
|
||||||
riSetGridProperty( GridProps1, 1, 0, "PropertyName18", "Matrix");
|
%! riSetGridProperty( GridProps1, 0, "PropertyName14", "Matrix");
|
||||||
|
%! riSetGridProperty( GridProps1, 1, 0, "PropertyName15" );
|
||||||
|
%! riSetGridProperty( GridProps2, 1, 0, "PropertyName16", [1,3]);
|
||||||
|
%! riSetGridProperty( GridProps2, 1, 0, "PropertyName17", [1,3], "Matrix");
|
||||||
|
%! riSetGridProperty( GridProps1, 1, 0, "PropertyName18", "Matrix");
|
||||||
|
|
||||||
|
%! assert(GridProps1 == riGetGridProperty( 0, "PropertyName11"));
|
||||||
|
%! assert(GridProps2 == riGetGridProperty( 0, "PropertyName12", [1,3]));
|
||||||
|
%! assert(GridProps2 == riGetGridProperty( 0, "PropertyName13", [1,3], "Matrix"));
|
||||||
|
%! assert(GridProps1 == riGetGridProperty( 0, "PropertyName14", "Matrix"));
|
||||||
|
%! assert(GridProps1 == riGetGridProperty( 1, 0, "PropertyName15"));
|
||||||
|
%! assert(GridProps2 == riGetGridProperty( 1, 0, "PropertyName16", [1,3]));
|
||||||
|
%! assert(GridProps2 == riGetGridProperty( 1, 0, "PropertyName17", [1,3], "Matrix"));
|
||||||
|
%! assert(GridProps1 == riGetGridProperty( 1, 0, "PropertyName18", "Matrix"));
|
||||||
|
|
||||||
|
|
||||||
### Matrix[numI][numJ][numK][3] riGetCellCenters([CaseId], GridIndex)
|
### Matrix[numI][numJ][numK][3] riGetCellCenters([CaseId], GridIndex)
|
||||||
printf ("===== Testing ====> riGetCellCenters\n");
|
%!test
|
||||||
CellCenters1 = riGetCellCenters(0);
|
%! printf ("===== Testing ====> riGetCellCenters\n");
|
||||||
CellCenters2 = riGetCellCenters(1, 0);
|
%! CellCenters1 = riGetCellCenters(0);
|
||||||
|
%! CellCenters2 = riGetCellCenters(1, 0);
|
||||||
|
%! assert( ndims (CellCenters1) == 4);
|
||||||
|
%! [ni, nj, nk, idx ] = size(CellCenters1);
|
||||||
|
%! assert(idx == 3);
|
||||||
|
%! assert(ni == 139);
|
||||||
|
%! assert(nj == 48);
|
||||||
|
%! assert(nk == 9);
|
||||||
|
%! assert(CellCenters1(62,30,1, 1), 3489.2, 0.1);
|
||||||
|
%! assert(CellCenters1(62,30,1, 2), 1.5909e+004, 0.1);
|
||||||
|
%! assert(CellCenters1(62,30,1, 3), -5458.8, 0.1);
|
||||||
|
%! assert(CellCenters1 == CellCenters2);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Matrix[ActiveCells][3] riGetActiveCellCenters([CaseId], [PorosityModel = "Matrix"|"Fracture"])
|
### Matrix[ActiveCells][3] riGetActiveCellCenters([CaseId], [PorosityModel = "Matrix"|"Fracture"])
|
||||||
printf ("===== Testing ====> riGetActiveCellCenters\n");
|
%!test
|
||||||
ActiveCellCenters1 = riGetActiveCellCenters();
|
%! printf ("===== Testing ====> riGetActiveCellCenters\n");
|
||||||
ActiveCellCenters2 = riGetActiveCellCenters("Matrix");
|
%! ActiveCellCenters1 = riGetActiveCellCenters();
|
||||||
ActiveCellCenters3 = riGetActiveCellCenters(1, "Matrix");
|
%! ActiveCellCenters2 = riGetActiveCellCenters("Matrix");
|
||||||
|
%! ActiveCellCenters3 = riGetActiveCellCenters(1, "Matrix");
|
||||||
|
|
||||||
|
%! assert (rows(ActiveCellCenters1), rows(riGetActiveCellInfo()));
|
||||||
|
%! assert (columns(ActiveCellCenters1) == 3);
|
||||||
|
%! assert (ActiveCellCenters1(500,:) ,[3493.7, 9184.6, -6074.4], [0.1, 0.1, 0.1]);
|
||||||
|
%! assert (ActiveCellCenters1 == ActiveCellCenters2);
|
||||||
|
%! assert (ActiveCellCenters1 == ActiveCellCenters3);
|
||||||
|
|
||||||
|
|
||||||
### Matrix[numI][numJ][numK][8][3] riGetCellCorners([CaseId], GridIndex)
|
### Matrix[numI][numJ][numK][8][3] riGetCellCorners([CaseId], GridIndex)
|
||||||
printf ("===== Testing ====> riGetCellCorners\n");
|
%!test
|
||||||
CellCorners1 = riGetCellCorners(0);
|
%! printf ("===== Testing ====> riGetCellCorners\n");
|
||||||
CellCorners2 = riGetCellCorners(1, 0);
|
%! CellCorners1 = riGetCellCorners(0);
|
||||||
|
%! CellCorners2 = riGetCellCorners(1, 0);
|
||||||
|
|
||||||
|
%! assert( ndims (CellCorners1) == 5);
|
||||||
|
%! [ni, nj, nk, cidx, idx ] = size(CellCorners1);
|
||||||
|
%! assert(idx == 3);
|
||||||
|
%! assert(cidx == 8);
|
||||||
|
%! assert(ni == 139);
|
||||||
|
%! assert(nj == 48);
|
||||||
|
%! assert(nk == 9);
|
||||||
|
%! assert(CellCorners1(62,30,1, 1, 1), 3207.4, 0.1);
|
||||||
|
%! assert(CellCorners1(62,30,1, 1, 2), 1.5781e+004, 1);
|
||||||
|
%! assert(CellCorners1(62,30,1, 1, 3), -5466.1, 0.1);
|
||||||
|
%! assert (CellCorners1 == CellCorners2);
|
||||||
|
|
||||||
|
|
||||||
### Matrix[ActiveCells][8][3] riGetActiveCellCorners([CaseId], [PorosityModel = "Matrix"|"Fracture"])
|
### Matrix[ActiveCells][8][3] riGetActiveCellCorners([CaseId], [PorosityModel = "Matrix"|"Fracture"])
|
||||||
printf ("===== Testing ====> riGetActiveCellCorners\n");
|
%!test
|
||||||
ActiveCellCorners1 = riGetActiveCellCorners();
|
%! printf ("===== Testing ====> riGetActiveCellCorners\n");
|
||||||
ActiveCellCorners2 = riGetActiveCellCorners(1);
|
%! ActiveCellCorners1 = riGetActiveCellCorners();
|
||||||
ActiveCellCorners3 = riGetActiveCellCorners(1, "Matrix");
|
%! ActiveCellCorners2 = riGetActiveCellCorners(1);
|
||||||
ActiveCellCorners4 = riGetActiveCellCorners("Matrix");
|
%! ActiveCellCorners3 = riGetActiveCellCorners(1, "Matrix");
|
||||||
|
%! ActiveCellCorners4 = riGetActiveCellCorners("Matrix");
|
||||||
|
|
||||||
|
%! assert( ndims (ActiveCellCorners1) == 3);
|
||||||
|
%! [nactive, cidx, idx ] = size(ActiveCellCorners1);
|
||||||
|
%! assert(idx == 3);
|
||||||
|
%! assert(cidx == 8);
|
||||||
|
%! assert(nactive , rows(riGetActiveCellInfo()));
|
||||||
|
|
||||||
|
%! assert (ActiveCellCorners1(500,1,:) ,[3493.7, 9184.6, -6074.4], [0.1, 0.1, 0.1]);
|
||||||
|
%! assert (ActiveCellCorners1 , ActiveCellCorners2);
|
||||||
|
%! assert (ActiveCellCorners1 , ActiveCellCorners3);
|
||||||
|
%! assert (ActiveCellCorners1 , ActiveCellCorners4);
|
||||||
|
|
||||||
### Vector[WellNames] riGetWellNames([CaseId])
|
### Vector[WellNames] riGetWellNames([CaseId])
|
||||||
printf ("===== Testing ====> riGetWellNames\n");
|
%!test
|
||||||
|
%! printf ("===== Testing ====> riGetWellNames\n");
|
||||||
WellNames1 = riGetWellNames();
|
%! WellNames1 = riGetWellNames();
|
||||||
WellNames2 = riGetWellNames(1);
|
%! WellNames2 = riGetWellNames(1);
|
||||||
|
%! assert (rows(WellNames1), 60);
|
||||||
|
%! assert (WellNames1 == WellNames2);
|
||||||
|
|
||||||
### Vector[WellCellInfo] riGetWellCells([CaseId], WellName, TimeStep)
|
### Vector[WellCellInfo] riGetWellCells([CaseId], WellName, TimeStep)
|
||||||
printf ("===== Testing ====> riGetWellCells\n");
|
%!xtest
|
||||||
WellCellInfos1 = riGetWellCells(1, WellNames1(1,:), 3);
|
%! printf ("===== Testing ====> riGetWellCells\n");
|
||||||
WellCellInfos2 = riGetWellCells(WellNames1(1,:), 3);
|
%! WellCellInfos1 = riGetWellCells(1, WellNames1(1,:), 3);
|
||||||
|
%! WellCellInfos2 = riGetWellCells(WellNames1(1,:), 3);
|
||||||
|
|
||||||
|
|
||||||
### Vector[WellStatus] riGetWellStatus ([CaseId], WellName, [RequestedTimeSteps])
|
### Vector[WellStatus] riGetWellStatus ([CaseId], WellName, [RequestedTimeSteps])
|
||||||
printf ("===== Testing ====> riGetWellStatus\n");
|
%!xtest
|
||||||
WellStatuses1 = riGetWellStatus(1, WellNames1(1,:), [1,3]);
|
%! printf ("===== Testing ====> riGetWellStatus\n");
|
||||||
disp(WellStatuses1(1));
|
%! WellStatuses1 = riGetWellStatus(1, WellNames1(1,:), [1,3]);
|
||||||
WellStatuses2 = riGetWellStatus( WellNames1(1,:), [1,3]);
|
%! disp(WellStatuses1(1));
|
||||||
WellStatuses3 = riGetWellStatus(WellNames1(1,:));
|
%! WellStatuses2 = riGetWellStatus( WellNames1(1,:), [1,3]);
|
||||||
|
%! WellStatuses3 = riGetWellStatus(WellNames1(1,:));
|
||||||
|
|
||||||
endif
|
endif
|
Loading…
Reference in New Issue
Block a user