-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
functionnality: * WITSML2.1 Completions/Perforations * Property collection * Well collection BugFix: * link between vtkDataAssembly & vtkPartitionedDataSetCollection
- Loading branch information
1 parent
2b2d8e7
commit a50f272
Showing
60 changed files
with
3,538 additions
and
2,168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 85 additions & 0 deletions
85
Plugin/Energistics/Mapping/CommonAbstractObjectSetToVtkPartitionedDataSetSet.cxx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
70 changes: 70 additions & 0 deletions
70
Plugin/Energistics/Mapping/CommonAbstractObjectSetToVtkPartitionedDataSetSet.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
30 changes: 30 additions & 0 deletions
30
Plugin/Energistics/Mapping/CommonAbstractObjectToVtkPartitionedDataSet.cxx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} |
78 changes: 78 additions & 0 deletions
78
Plugin/Energistics/Mapping/CommonAbstractObjectToVtkPartitionedDataSet.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.