Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
169 changes: 48 additions & 121 deletions .github/workflows/github-actions.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ set (FESAPI_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
# version mechanism
set (Fesapi_VERSION_MAJOR 2)
set (Fesapi_VERSION_MINOR 14)
set (Fesapi_VERSION_PATCH 0)
set (Fesapi_VERSION_PATCH 1)
set (Fesapi_VERSION_TWEAK 0)

set (Fesapi_VERSION ${Fesapi_VERSION_MAJOR}.${Fesapi_VERSION_MINOR}.${Fesapi_VERSION_PATCH}.${Fesapi_VERSION_TWEAK})
Expand Down Expand Up @@ -63,13 +63,13 @@ ELSE()
MESSAGE(FATAL_ERROR "Wrong HDF5_VERSION=${HDF5_VERSION}")
ENDIF()
IF(HDF5_PREFER_PARALLEL)
if(NOT HDF5_IS_PARALLEL)
if (NOT (HDF5_IS_PARALLEL OR HDF5_PROVIDES_PARALLEL))
message(WARNING
"Parallel HDF5 is preferred but only serial version found!"
)
ENDIF()
ELSE()
IF(HDF5_IS_PARALLEL)
IF(HDF5_IS_PARALLEL OR HDF5_PROVIDES_PARALLEL)
message(WARNING
"Serial HDF5 is preferred but only parallel version found!"
)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

# Prepare the dependencies
Download (build and install if necessary) third party libraries:
- HDF5: Versions of 1.8.* (starting from 1.8.18), 1.10.* ([starting from 1.10.2](https://www.hdfgroup.org/2018/04/why-should-i-care-about-the-hdf5-1-10-2-release/)), all 1.12.* and all 1.14.* should be ok. https://support.hdfgroup.org/ftp/HDF5/releases/
- HDF5: Versions of 1.8.* (starting from 1.8.18), 1.10.* ([starting from 1.10.2](https://www.hdfgroup.org/2018/04/why-should-i-care-about-the-hdf5-1-10-2-release/)), all 1.12.\*, 1.14.\* and 2.0.\* should be ok. https://support.hdfgroup.org/ftp/HDF5/releases/
- MINIZIP : Version 1.1 is needed : it is the official version included in [current zlib distribution](https://www.zlib.net/) (look into "contrib" folder). You can directly install minizip development package on most of Linux distributions (https://packages.ubuntu.com/xenial/libminizip-dev). On Windows (or older Linux distributions), you can copy the CMakeLists.txt file from fesapi/cmake/minizip to the zlib minizip directory to help you to build minizip (we also provide a copy of minizip 1.1 with cmake files on github : https://github.com/F2I-Consulting/Minizip). It is also highly recommended to link minizip to the same zlib library than the one associated to your HDF5 library.
- BOOST (uuid) : Starting from version 1.44.0 (and at least 1.67.0 if you don't want to face [valgrid false positives](https://www.boost.org/doc/libs/1_66_0/libs/uuid/doc/uuid.html#Design%20notes)). FYI, on windows, boost uuid depends on bcrypt library.

Expand Down
100 changes: 99 additions & 1 deletion cmake/FesapiJavaExample.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Licensed to the Apache Software Foundation (ASF) under one
import com.f2i_consulting.fesapi.eml23__IndexableElement;
import com.f2i_consulting.fesapi.eml23__LengthUom;
import com.f2i_consulting.fesapi.eml23__MassPerLengthUom;
import com.f2i_consulting.fesapi.eml23__QuantityClassKind;
import com.f2i_consulting.fesapi.eml23__ReferencePointKind;
import com.f2i_consulting.fesapi.eml23__WellStatus;
import com.f2i_consulting.fesapi.fesapi;
Expand All @@ -52,6 +53,7 @@ Licensed to the Apache Software Foundation (ASF) under one
import com.f2i_consulting.fesapi.common.EpcDocument;
import com.f2i_consulting.fesapi.eml2.AbstractHdfProxy;
import com.f2i_consulting.fesapi.eml2.AbstractLocal3dCrs;
import com.f2i_consulting.fesapi.eml2.ColumnBasedTable;
import com.f2i_consulting.fesapi.eml2.GraphicalInformationSet;
import com.f2i_consulting.fesapi.eml2.PropertyKind;
import com.f2i_consulting.fesapi.eml2_3.Eml23_LocalEngineeringCompoundCrs;
Expand Down Expand Up @@ -655,6 +657,84 @@ private static void serializeGraphicalInformationSet(DataObjectRepository repo,
graphicalInformationSet.setContinuousColorMap(contColMapContProp, contColMap);
}
${COMMENT_END}
private static void serializeColumnBasedTable(DataObjectRepository repo)
{
ColumnBasedTable cbt = repo.createColumnBasedTable("866841eb-0c56-4b7d-96d6-f15f385deaf9", "KrPc");

PropertyKind pwls3Saturation = repo.createPropertyKind("cfe9293f-d5a9-486d-815a-a957cace90b6", "saturation", eml23__QuantityClassKind.dimensionless);
PropertyKind pwls3RelPerm = repo.createPropertyKind("8e3c5579-7efd-40d0-ab03-bc79452dd2db", "relative permeability", eml23__QuantityClassKind.unitless);
PropertyKind pwls3CapPressure = repo.createPropertyKind("a816a113-1544-4f58-bc6d-7c030b65627b", "capillary pressure", eml23__QuantityClassKind.pressure);

cbt.pushBackColumnHeader(true, "Water Saturation", pwls3Saturation);
cbt.pushBackColumnHeader(false, "Water Relative Permeability", pwls3RelPerm);
cbt.pushBackColumnHeader(false, "Oil Relative Permeability", pwls3RelPerm);
cbt.pushBackColumnHeader(false, "Oil Water Capillary Pressure", pwls3CapPressure);

SWIGTYPE_p_double watSat = fesapi.new_DoubleArray(7);
try {
fesapi.DoubleArray_setitem(watSat, 0, 0);
fesapi.DoubleArray_setitem(watSat, 1, 0.157);
fesapi.DoubleArray_setitem(watSat, 2, 0.173);
fesapi.DoubleArray_setitem(watSat, 3, 0.174325);
fesapi.DoubleArray_setitem(watSat, 4, 0.19);
fesapi.DoubleArray_setitem(watSat, 5, 0.19165);
fesapi.DoubleArray_setitem(watSat, 6, 0.207);

cbt.setDoubleValues(0, watSat, 7);
}
finally {
fesapi.delete_DoubleArray(watSat);
}

SWIGTYPE_p_double watRelPerm = fesapi.new_DoubleArray(7);
try {
fesapi.DoubleArray_setitem(watRelPerm, 0, 0);
fesapi.DoubleArray_setitem(watRelPerm, 1, 0);
fesapi.DoubleArray_setitem(watRelPerm, 2, 0.000356);
fesapi.DoubleArray_setitem(watRelPerm, 3, 0.0004392);
fesapi.DoubleArray_setitem(watRelPerm, 4, 0.0014241);
fesapi.DoubleArray_setitem(watRelPerm, 5, 0.0015969);
fesapi.DoubleArray_setitem(watRelPerm, 6, 0.0032041);

cbt.setDoubleValues(1, watRelPerm, 7);
}
finally {
fesapi.delete_DoubleArray(watRelPerm);
}

SWIGTYPE_p_double oilRelPerm = fesapi.new_DoubleArray(7);
try {
fesapi.DoubleArray_setitem(oilRelPerm, 0, 1);
fesapi.DoubleArray_setitem(oilRelPerm, 1, 0.99);
fesapi.DoubleArray_setitem(oilRelPerm, 2, 0.886131);
fesapi.DoubleArray_setitem(oilRelPerm, 3, 0.8767012);
fesapi.DoubleArray_setitem(oilRelPerm, 4, 0.7764308);
fesapi.DoubleArray_setitem(oilRelPerm, 5, 0.765876);
fesapi.DoubleArray_setitem(oilRelPerm, 6, 0.6778755);

cbt.setDoubleValues(2, oilRelPerm, 7);
}
finally {
fesapi.delete_DoubleArray(oilRelPerm);
}

SWIGTYPE_p_double capPressure = fesapi.new_DoubleArray(7);
try {
fesapi.DoubleArray_setitem(capPressure, 0, 0);
fesapi.DoubleArray_setitem(capPressure, 1, 0);
fesapi.DoubleArray_setitem(capPressure, 2, 0);
fesapi.DoubleArray_setitem(capPressure, 3, 0);
fesapi.DoubleArray_setitem(capPressure, 4, 0);
fesapi.DoubleArray_setitem(capPressure, 5, 0);
fesapi.DoubleArray_setitem(capPressure, 6, 0);

cbt.setDoubleValues(3, capPressure, 7);
}
finally {
fesapi.delete_DoubleArray(capPressure);
}
}

private static void serialize()
{
try (DataObjectRepository repo = new DataObjectRepository()) {
Expand All @@ -672,6 +752,7 @@ private static void serialize()
${COMMENT_START}
serializeGraphicalInformationSet(repo, hdfProxy);
${COMMENT_END}
serializeColumnBasedTable(repo);

EpcDocument pck = new EpcDocument(storageDirectory + File.separator + epcName + ".epc");
pck.serializeFrom(repo);
Expand Down Expand Up @@ -800,7 +881,8 @@ private static void deserialize()
}
}
}
${COMMENT_END}
${COMMENT_END}
deserializeColumnBasedTable(repo);
}
}

Expand Down Expand Up @@ -921,6 +1003,22 @@ private static void deserializeIjkGrid(DataObjectRepository repo) {
}
}

private static void deserializeColumnBasedTable(DataObjectRepository repo) {
System.out.println("COLUMN BASED TABLE");
long cbtCount = repo.getColumnBasedTableCount();
for (long cbtIdx = 0; cbtIdx < cbtCount; ++cbtIdx) {
ColumnBasedTable cbt = repo.getColumnBasedTable(cbtIdx);
System.out.println("\tCOLUMN BASED TABLE : " + cbt.getTitle());
for (long columnIdx = 0; columnIdx < cbt.getColumnCount(); ++columnIdx) {
System.out.println("\t\tPropKind : " + cbt.getPropertyKind(columnIdx).getTitle());
for (double dbl : cbt.getDoubleValues(columnIdx)) {
System.out.print(dbl + " ");
}
System.out.println();
}
}
}

public static void main(String[] args) {
serialize();
deserialize();
Expand Down
13 changes: 3 additions & 10 deletions cmake/swigCsInclude.i
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Basically this file add methods resqml2_0_instantiate* which will create the rig
CHANNEL,
CHANNELSET,
CMPLINEFEATURE,
COLUMNBASEDTABLE,
COMMENTPROPERTY,
CONTINUOUSCOLORMAP,
CONTINUOUSPROPERTY,
Expand Down Expand Up @@ -125,11 +126,9 @@ Basically this file add methods resqml2_0_instantiate* which will create the rig
if (xmlNs.Equals("resqml20")) {
return new F2iConsulting.Fesapi.${FESAPI_RESQML2_0_1_NS}.Activity(cPtr, owner);
}
${COMMENT_START}
else if (xmlNs.Equals("eml23")) {
return new F2iConsulting.Fesapi.${FESAPI_EML2_3_NS}.Activity(cPtr, owner);
}
${COMMENT_END}

return null;
}
Expand All @@ -140,11 +139,9 @@ ${COMMENT_END}
if (xmlNs.Equals("resqml20")) {
return new F2iConsulting.Fesapi.${FESAPI_RESQML2_0_1_NS}.ActivityTemplate(cPtr, owner);
}
${COMMENT_START}
else if (xmlNs.Equals("eml23")) {
return new F2iConsulting.Fesapi.${FESAPI_EML2_3_NS}.ActivityTemplate(cPtr, owner);
}
${COMMENT_END}

return null;
}
Expand All @@ -160,11 +157,9 @@ ${COMMENT_END}
if (xmlNs.Equals("resqml20")) {
return new F2iConsulting.Fesapi.${FESAPI_RESQML2_0_1_NS}.PropertyKind(cPtr, owner);
}
${COMMENT_START}
else if (xmlNs.Equals("eml23")) {
return new F2iConsulting.Fesapi.${FESAPI_EML2_3_NS}.PropertyKind(cPtr, owner);
}
${COMMENT_END}

return null;
}
Expand All @@ -175,11 +170,9 @@ ${COMMENT_END}
if (xmlNs.Equals("resqml20")) {
return new F2iConsulting.Fesapi.${FESAPI_RESQML2_0_1_NS}.TimeSeries(cPtr, owner);
}
${COMMENT_START}
else if (xmlNs.Equals("eml23")) {
return new F2iConsulting.Fesapi.${FESAPI_EML2_3_NS}.TimeSeries(cPtr, owner);
}
${COMMENT_END}

return null;
}
Expand Down Expand Up @@ -867,6 +860,7 @@ ${COMMENT_END}
${COMMENT_START}
case DataObjectName.CMPLINEFEATURE : return new F2iConsulting.Fesapi.${FESAPI_RESQML2_2_NS}.CmpLineFeature(cPtr, owner);
${COMMENT_END}
case DataObjectName.COLUMNBASEDTABLE : return new F2iConsulting.Fesapi.${FESAPI_EML2_3_NS}.ColumnBasedTable(cPtr, owner);
case DataObjectName.COMMENTPROPERTY : return resqml2_instantiateCommentProperty(cPtr, owner);
${COMMENT_START}
case DataObjectName.CONTINUOUSCOLORMAP : return new F2iConsulting.Fesapi.${FESAPI_RESQML2_2_NS}.ContinuousColorMap(cPtr, owner);
Expand Down Expand Up @@ -983,8 +977,7 @@ namespace COMMON_NS

namespace EML2_NS
{
%typemap(csout, excode=SWIGEXCODE) Activity*, ActivityTemplate*, EpcExternalPartReference*, PropertyKind*, TimeSeries*, AbstractLocal3dCrs*
,GraphicalInformationSet*
%typemap(csout, excode=SWIGEXCODE) Activity*, ActivityTemplate*, EpcExternalPartReference*, PropertyKind*, TimeSeries*, AbstractLocal3dCrs*, GraphicalInformationSet*, ColumnBasedTable*
{
global::System.IntPtr cPtr = $imcall;
$csclassname ret = ($csclassname) $modulePINVOKE.eml2_instantiateConcreteObject(cPtr, $owner);$excode
Expand Down
13 changes: 3 additions & 10 deletions cmake/swigJavaInclude.i
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Basically this file add methods resqml2_0_instantiate* which will create the rig
CHANNEL,
CHANNELSET,
CMPLINEFEATURE,
COLUMNBASEDTABLE,
COMMENTPROPERTY,
CONTINUOUSCOLORMAP,
CONTINUOUSPROPERTY,
Expand Down Expand Up @@ -125,11 +126,9 @@ Basically this file add methods resqml2_0_instantiate* which will create the rig
if ("resqml20".equals(xmlNs)) {
return new com.f2i_consulting.fesapi.${FESAPI_RESQML2_0_1_NS}.Resqml20_Activity(cPtr, owner);
}
${COMMENT_START}
else if ("eml23".equals(xmlNs)) {
return new com.f2i_consulting.fesapi.${FESAPI_EML2_3_NS}.Eml23_Activity(cPtr, owner);
}
${COMMENT_END}

return null;
}
Expand All @@ -140,11 +139,9 @@ ${COMMENT_END}
if ("resqml20".equals(xmlNs)) {
return new com.f2i_consulting.fesapi.${FESAPI_RESQML2_0_1_NS}.Resqml20_ActivityTemplate(cPtr, owner);
}
${COMMENT_START}
else if ("eml23".equals(xmlNs)) {
return new com.f2i_consulting.fesapi.${FESAPI_EML2_3_NS}.Eml23_ActivityTemplate(cPtr, owner);
}
${COMMENT_END}

return null;
}
Expand All @@ -160,11 +157,9 @@ ${COMMENT_END}
if ("resqml20".equals(xmlNs)) {
return new com.f2i_consulting.fesapi.${FESAPI_RESQML2_0_1_NS}.Resqml20_PropertyKind(cPtr, owner);
}
${COMMENT_START}
else if ("eml23".equals(xmlNs)) {
return new com.f2i_consulting.fesapi.${FESAPI_EML2_3_NS}.Eml23_PropertyKind(cPtr, owner);
}
${COMMENT_END}

return null;
}
Expand All @@ -175,11 +170,9 @@ ${COMMENT_END}
if ("resqml20".equals(xmlNs)) {
return new com.f2i_consulting.fesapi.${FESAPI_RESQML2_0_1_NS}.Resqml20_TimeSeries(cPtr, owner);
}
${COMMENT_START}
else if ("eml23".equals(xmlNs)) {
return new com.f2i_consulting.fesapi.${FESAPI_EML2_3_NS}.Eml23_TimeSeries(cPtr, owner);
}
${COMMENT_END}

return null;
}
Expand Down Expand Up @@ -867,6 +860,7 @@ ${COMMENT_END}
${COMMENT_START}
case CMPLINEFEATURE : return new com.f2i_consulting.fesapi.${FESAPI_RESQML2_2_NS}.Resqml22_CmpLineFeature(cPtr, owner);
${COMMENT_END}
case COLUMNBASEDTABLE : return new com.f2i_consulting.fesapi.${FESAPI_EML2_3_NS}.Eml23_ColumnBasedTable(cPtr, owner);
case COMMENTPROPERTY : return resqml2_instantiateCommentProperty(cPtr, owner);
${COMMENT_START}
case CONTINUOUSCOLORMAP : return new com.f2i_consulting.fesapi.${FESAPI_RESQML2_2_NS}.Resqml22_ContinuousColorMap(cPtr, owner);
Expand Down Expand Up @@ -987,8 +981,7 @@ namespace COMMON_NS

namespace EML2_NS
{
%typemap(javaout) Activity*, ActivityTemplate*, EpcExternalPartReference*, PropertyKind*, TimeSeries*, AbstractLocal3dCrs*
,GraphicalInformationSet*
%typemap(javaout) Activity*, ActivityTemplate*, EpcExternalPartReference*, PropertyKind*, TimeSeries*, AbstractLocal3dCrs*, GraphicalInformationSet*, ColumnBasedTable*
{
long cPtr = $jnicall;
$javaclassname ret = ($javaclassname) fesapiJNI.eml2_instantiateConcreteObject(cPtr, $owner);
Expand Down
2 changes: 1 addition & 1 deletion cmake/swigPythonInclude.i.in
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ namespace EML2_NS
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), outtype, 0);
}

%typemap(out) Activity*, ActivityTemplate*, PropertyKind*, TimeSeries*
%typemap(out) Activity*, ActivityTemplate*, PropertyKind*, TimeSeries*, ColumnBasedTable*
#ifdef WITH_RESQML2_2
,GraphicalInformationSet*
#endif
Expand Down
Loading
Loading