Skip to content

Commit

Permalink
V3.1.0 (#37)
Browse files Browse the repository at this point in the history
functionnality:
 * WITSML2.1 Completions/Perforations
 * Property collection
 * Well collection
BugFix:
 * link between vtkDataAssembly & vtkPartitionedDataSetCollection
  • Loading branch information
cedricRobert authored Jan 4, 2024
1 parent 2b2d8e7 commit a50f272
Show file tree
Hide file tree
Showing 60 changed files with 3,538 additions and 2,168 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ cmake_minimum_required(VERSION 3.14.0)
cmake_policy(SET CMP0048 NEW)

project(Fespp
VERSION 3.0.0
VERSION 3.1.0
DESCRIPTION "Paraview plugin for importing EPC documents"
HOMEPAGE_URL "https://github.com/F2I-Consulting/fespp"
LANGUAGES C CXX
)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/modules)

# These five lines are required in order to set up installation directories
# (which also control build directory locations) and enable shared builds
# (CMake's default is for a static build).
Expand Down
23 changes: 7 additions & 16 deletions Plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@ endif (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
# DEPENDENCIES
# -----------------------------------------------------------------------------

set (FESAPI_INCLUDE_DIR FESAPI_INCLUDE_DIR-NOTFOUND CACHE PATH "Path to the directory which contains the FESAPI header files")
set (FESAPI_LIBRARY_RELEASE FESAPI_LIBRARY_RELEASE-NOTFOUND CACHE FILEPATH "Path to the FESAPI release library")
set (FESAPI_LIBRARY_DEBUG FESAPI_LIBRARY_DEBUG-NOTFOUND CACHE FILEPATH "Path to the FESAPI debug library")
find_package(FESAPI REQUIRED)

set (WITH_ETP_SSL OFF CACHE BOOL "Only if FESAPI build with ETP support... for building Fespp with ETP support.")

if (WITH_ETP_SSL)
find_package(Boost 1.66.0 REQUIRED system)
find_package(Boost 1.70)
if (NOT Boost_FOUND)
# Boost system is required for Beast untill version 1.70 : https://www.boost.org/doc/libs/1_69_0/libs/beast/doc/html/beast/introduction.html
find_package(Boost 1.66 REQUIRED system)
endif()
find_package( Threads )
if (NOT TARGET OpenSSL::SSL OR NOT TARGET OpenSSL::Crypto)
find_package(OpenSSL REQUIRED)
Expand All @@ -39,18 +41,7 @@ if (WITH_ETP_SSL)
endif ()

#AVRO
set (AVRO_INCLUDE_DIR AVRO_INCLUDE_DIR-NOTFOUND CACHE PATH "Path to the directory which contains the avro header files")
if (NOT IS_DIRECTORY ${AVRO_INCLUDE_DIR})
message(SEND_ERROR "The Avro include dir (AVRO_INCLUDE_DIR variable) does not look to be a valid directory. Please modify it.")
endif ()
set (AVRO_LIBRARY_RELEASE AVRO_LIBRARY_RELEASE-NOTFOUND CACHE FILEPATH "Path to the file which contains the avro library release")
if (NOT EXISTS ${AVRO_LIBRARY_RELEASE})
message(WARNING "The avro library (AVRO_LIBRARY_RELEASE variable) does not look to be a valid file. Please modify it.")
endif ()
set (AVRO_LIBRARY_DEBUG AVRO_LIBRARY_DEBUG-NOTFOUND CACHE FILEPATH "Path to the file which contains the AVRO library DEBUG")
if (NOT EXISTS ${AVRO_LIBRARY_DEBUG})
message(WARNING "The AVRO library (AVRO_LIBRARY_DEBUG variable) does not look to be a valid file. Please modify it.")
endif ()
find_package(AVRO REQUIRED)
endif (WITH_ETP_SSL)

# -----------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions Plugin/Energistics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ set(classes
vtkETPSource
)

FILE (GLOB FESPP_MAPPING_SOURCES ResqmlMapping/*.cxx)
FILE (GLOB FESPP_MAPPING_HEADERS ResqmlMapping/*.h)
FILE (GLOB FESPP_MAPPING_SOURCES Mapping/*.cxx)
FILE (GLOB FESPP_MAPPING_HEADERS Mapping/*.h Tools/*.h)
set (ENERGISTICS_SOURCES
${FESPP_MAPPING_SOURCES}
)
Expand Down
4 changes: 2 additions & 2 deletions Plugin/Energistics/Energistics.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<IntVectorProperty name="ConnectionTag" command="GetConnectionTag" information_only="1"></IntVectorProperty>
<IntVectorProperty name="DisconnectionTag" command="GetDisconnectionTag" information_only="1"></IntVectorProperty>

<StringVectorProperty command="setETPUrlConnection" default_values="wss://osdu-ship.msft-osdu-test.org:443/oetp/reservoir-ddms/" name="ETPUrl" label="ETP Url" number_of_elements="1" panel_visibility="default">
<StringVectorProperty command="setETPUrlConnection" default_values="ws://etp.f2i-consulting.com:9002/" name="ETPUrl" label="ETP Url" number_of_elements="1" panel_visibility="default">
<Documentation>This property specifies the string used to describe the ETP Url</Documentation>
<Hints>
<PropertyWidgetDecorator type="GenericDecorator" mode="enabled_state" property="ConnectionTag" value="0" inverse="1" />
Expand All @@ -89,7 +89,7 @@
</Hints>
</StringVectorProperty>

<IntVectorProperty name="Authentification" command="setAuthType" number_of_elements="1" default_values="0">
<IntVectorProperty name="Authentification" command="setAuthType" number_of_elements="1" default_values="1">
<EnumerationDomain name="enum">
<Entry value="0" text="Bearer"/>
<Entry value="1" text="Basic"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/*-----------------------------------------------------------------------
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"; you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-----------------------------------------------------------------------*/
#include "Mapping/CommonAbstractObjectSetToVtkPartitionedDataSetSet.h"

//----------------------------------------------------------------------------
CommonAbstractObjectSetToVtkPartitionedDataSetSet::CommonAbstractObjectSetToVtkPartitionedDataSetSet(const COMMON_NS::AbstractObject *p_abstractObject, int p_procNumber, int p_maxProc)
: _procNumber(p_procNumber),
_maxProc(p_maxProc),
_resqmlData(p_abstractObject),
_mapperSet()
{
_uuid = p_abstractObject->getUuid();
_title = p_abstractObject->getTitle();
}

CommonAbstractObjectSetToVtkPartitionedDataSetSet::~CommonAbstractObjectSetToVtkPartitionedDataSetSet()
{
for (auto &w_item : _mapperSet)
{
delete w_item;
}
_mapperSet.clear();
}

void CommonAbstractObjectSetToVtkPartitionedDataSetSet::loadVtkObject()
{
for (int w_i = _procNumber; w_i < _mapperSet.size(); w_i += _maxProc)
{
_mapperSet[w_i]->loadVtkObject();
}
}

//----------------------------------------------------------------------------
void CommonAbstractObjectSetToVtkPartitionedDataSetSet::removeCommonAbstractObjectToVtkPartitionedDataSet(const std::string &p_id)
{
for (auto w_it = _mapperSet.begin(); w_it != _mapperSet.end();)
{
CommonAbstractObjectToVtkPartitionedDataSet *w_mapper = *w_it;
if (w_mapper->getUuid() == p_id)
{
delete w_mapper;
w_it = _mapperSet.erase(w_it);

return;
}
else
{
++w_it;
}
}
}

//----------------------------------------------------------------------------
bool CommonAbstractObjectSetToVtkPartitionedDataSetSet::existUuid(const std::string &p_id)
{
for (auto w_it = _mapperSet.begin(); w_it != _mapperSet.end();)
{
CommonAbstractObjectToVtkPartitionedDataSet *w_mapper = *w_it;
if (w_mapper->getUuid() == p_id)
{
return true;
}
else
{
++w_it;
}
}
return false;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/*-----------------------------------------------------------------------
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"; you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-----------------------------------------------------------------------*/
#ifndef __CommonAbstractObjectSetToVtkPartitionedDataSetSet__h__
#define __CommonAbstractObjectSetToVtkPartitionedDataSetSet__h__

// include system
#include <string>

// include VTK library
#include <vtkSmartPointer.h>
#include <vtkPartitionedDataSet.h>

// include F2i-consulting Energistics Standards API
#include <fesapi/common/AbstractObject.h>

// include F2i-consulting Energistics ParaView Plugin
#include "Mapping/CommonAbstractObjectToVtkPartitionedDataSet.h"

/** @brief transform a RESQML abstract object set to vtkPartitionedDataSet set
*/
class CommonAbstractObjectSetToVtkPartitionedDataSetSet
{
public:
// Constructor
CommonAbstractObjectSetToVtkPartitionedDataSetSet(const COMMON_NS::AbstractObject *p_abstractObject, int p_procNumber = 0, int p_maxProc = 1);

// destructor
~CommonAbstractObjectSetToVtkPartitionedDataSetSet();

/**
*
*/
std::string getUuid() const { return _uuid; };
std::string getTitle() const { return _title; };

void loadVtkObject();
void removeCommonAbstractObjectToVtkPartitionedDataSet(const std::string &p_id);
std::vector<CommonAbstractObjectToVtkPartitionedDataSet *> getMapperSet() { return _mapperSet; }

bool existUuid(const std::string &p_id);

protected:
const COMMON_NS::AbstractObject *_resqmlData;

// for Multithreading
int _procNumber;
int _maxProc;

std::string _uuid;
std::string _title;

std::vector<CommonAbstractObjectToVtkPartitionedDataSet *> _mapperSet;
};
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*-----------------------------------------------------------------------
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"; you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-----------------------------------------------------------------------*/
#include "Mapping/CommonAbstractObjectToVtkPartitionedDataSet.h"

//----------------------------------------------------------------------------
CommonAbstractObjectToVtkPartitionedDataSet::CommonAbstractObjectToVtkPartitionedDataSet(const COMMON_NS::AbstractObject *p_abstractObject, int p_procNumber, int p_maxProc)
: _procNumber(p_procNumber),
_maxProc(p_maxProc),
_resqmlData(p_abstractObject),
_vtkData(nullptr)
{
_absUuid = getResqmlData()->getUuid();
_absTitle = getResqmlData()->getTitle();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
/*-----------------------------------------------------------------------
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"; you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-----------------------------------------------------------------------*/
#ifndef __CommonAbstractObjectTovtkPartitionedDataSet__h__
#define __CommonAbstractObjectTovtkPartitionedDataSet__h__

// include system
#include <string>

// include VTK library
#include <vtkSmartPointer.h>
#include <vtkPartitionedDataSet.h>

// include F2i-consulting Energistics Standards API
#include <fesapi/common/AbstractObject.h>

/** @brief transform a RESQML abstract object to vtkPartitionedDataSet
*/
class CommonAbstractObjectToVtkPartitionedDataSet
{
public:
/**
* Constructor
*/
CommonAbstractObjectToVtkPartitionedDataSet(const COMMON_NS::AbstractObject *p_abstractObject, int p_procNumber = 0, int p_maxProc = 1);

/**
* Destructor
*/
virtual ~CommonAbstractObjectToVtkPartitionedDataSet() = default;

/**
* load VtkPartitionedDataSet with resqml data
*/
virtual void loadVtkObject() = 0;

/**
* return the vtkPartitionedDataSet of resqml object
*/
vtkSmartPointer<vtkPartitionedDataSet> getOutput() const { return _vtkData; }

/**
*
*/
std::string getUuid() const { return _absUuid; };
std::string getTitle() const { return _absTitle; };
void setUuid(std::string p_newUuid) { _absUuid = p_newUuid; }
void setTitle(std::string p_newTitle) { _absTitle = p_newTitle; }

protected:
const COMMON_NS::AbstractObject *getResqmlData() const { return _resqmlData; }

int _procNumber;
int _maxProc;

const COMMON_NS::AbstractObject *_resqmlData;

vtkSmartPointer<vtkPartitionedDataSet> _vtkData;

std::string _absUuid;
std::string _absTitle;
};
#endif
Loading

0 comments on commit a50f272

Please sign in to comment.