├── .clang-format
├── .clang-tidy
├── .gitattributes
├── .github
├── FUNDING.yml
└── workflows
│ ├── deploy.yml
│ ├── manual_release.yml
│ ├── merge_request.yml
│ ├── pr_update.yml
│ ├── prepare_deploy.yml
│ ├── schedule.yml
│ ├── test.yml
│ └── test_pr.yml
├── .gitignore
├── .releaserc
├── .vscode
└── settings.json
├── CMakeLists.txt
├── COPYLEFT
├── LICENSE
├── README.md
├── bindings
└── python
│ ├── CMakeLists.txt
│ ├── explicit.py
│ ├── implicit.py
│ ├── requirements.in
│ ├── src
│ ├── CMakeLists.txt
│ ├── common.hpp
│ ├── explicit
│ │ ├── CMakeLists.txt
│ │ ├── explicit.cpp
│ │ ├── geometry
│ │ │ ├── crs.hpp
│ │ │ └── crs_helper.hpp
│ │ ├── mixin
│ │ │ ├── builder
│ │ │ │ ├── fault_blocks_builder.hpp
│ │ │ │ ├── faults_builder.hpp
│ │ │ │ ├── horizons_builder.hpp
│ │ │ │ └── stratigraphic_units_builder.hpp
│ │ │ └── core
│ │ │ │ ├── fault.hpp
│ │ │ │ ├── fault_block.hpp
│ │ │ │ ├── fault_blocks.hpp
│ │ │ │ ├── faults.hpp
│ │ │ │ ├── horizon.hpp
│ │ │ │ ├── horizons.hpp
│ │ │ │ ├── stratigraphic_unit.hpp
│ │ │ │ └── stratigraphic_units.hpp
│ │ └── representation
│ │ │ ├── builder
│ │ │ ├── cross_section_builder.hpp
│ │ │ └── structural_model_builder.hpp
│ │ │ ├── core
│ │ │ ├── cross_section.hpp
│ │ │ └── structural_model.hpp
│ │ │ └── io
│ │ │ ├── cross_section.hpp
│ │ │ └── structural_model.hpp
│ ├── factory.hpp
│ ├── implicit
│ │ ├── CMakeLists.txt
│ │ ├── geometry
│ │ │ └── stratigraphic_point.hpp
│ │ ├── implicit.cpp
│ │ ├── mixin
│ │ │ ├── builder
│ │ │ │ └── stratigraphic_relationships_builder.hpp
│ │ │ └── core
│ │ │ │ └── stratigraphic_relationships.hpp
│ │ └── representation
│ │ │ ├── builder
│ │ │ ├── horizons_stack_builder.hpp
│ │ │ ├── implicit_cross_section_builder.hpp
│ │ │ ├── implicit_structural_model_builder.hpp
│ │ │ ├── stratigraphic_model_builder.hpp
│ │ │ └── stratigraphic_section_builder.hpp
│ │ │ ├── core
│ │ │ ├── helpers.hpp
│ │ │ ├── horizons_stack.hpp
│ │ │ ├── implicit_cross_section.hpp
│ │ │ ├── implicit_structural_model.hpp
│ │ │ ├── stratigraphic_model.hpp
│ │ │ └── stratigraphic_section.hpp
│ │ │ └── io
│ │ │ ├── horizons_stack.hpp
│ │ │ ├── implicit_cross_section.hpp
│ │ │ ├── implicit_structural_model.hpp
│ │ │ ├── stratigraphic_model.hpp
│ │ │ └── stratigraphic_section.hpp
│ └── input.hpp
│ └── tests
│ ├── CMakeLists.txt
│ ├── explicit
│ ├── CMakeLists.txt
│ ├── test-py-cross-section.py
│ ├── test-py-geographic-coordinate-system.py
│ └── test-py-structural-model.py
│ └── implicit
│ ├── CMakeLists.txt
│ ├── test-py-horizons-stack.py
│ ├── test-py-stratigraphic-model.py
│ └── test-py-stratigraphic-section.py
├── cmake
├── Doxyfile.in
├── OpenGeode-GeosciencesConfig.cmake.in
└── version.rc.in
├── include
└── geode
│ └── geosciences
│ ├── explicit
│ ├── common.hpp
│ ├── geometry
│ │ ├── geographic_coordinate_system.hpp
│ │ └── geographic_coordinate_system_helper.hpp
│ ├── mixin
│ │ ├── builder
│ │ │ ├── fault_blocks_builder.hpp
│ │ │ ├── faults_builder.hpp
│ │ │ ├── horizons_builder.hpp
│ │ │ └── stratigraphic_units_builder.hpp
│ │ └── core
│ │ │ ├── bitsery_archive.hpp
│ │ │ ├── fault.hpp
│ │ │ ├── fault_block.hpp
│ │ │ ├── fault_blocks.hpp
│ │ │ ├── faults.hpp
│ │ │ ├── horizon.hpp
│ │ │ ├── horizons.hpp
│ │ │ ├── stratigraphic_unit.hpp
│ │ │ └── stratigraphic_units.hpp
│ └── representation
│ │ ├── builder
│ │ ├── cross_section_builder.hpp
│ │ ├── detail
│ │ │ └── copy.hpp
│ │ └── structural_model_builder.hpp
│ │ ├── core
│ │ ├── cross_section.hpp
│ │ ├── detail
│ │ │ ├── clone.hpp
│ │ │ └── helpers.hpp
│ │ └── structural_model.hpp
│ │ └── io
│ │ ├── cross_section_input.hpp
│ │ ├── cross_section_output.hpp
│ │ ├── geode
│ │ ├── geode_cross_section_input.hpp
│ │ ├── geode_cross_section_output.hpp
│ │ ├── geode_structural_model_input.hpp
│ │ └── geode_structural_model_output.hpp
│ │ ├── structural_model_input.hpp
│ │ └── structural_model_output.hpp
│ └── implicit
│ ├── common.hpp
│ ├── geometry
│ └── stratigraphic_point.hpp
│ ├── mixin
│ ├── builder
│ │ └── stratigraphic_relationships_builder.hpp
│ └── core
│ │ └── stratigraphic_relationships.hpp
│ └── representation
│ ├── builder
│ ├── horizons_stack_builder.hpp
│ ├── implicit_cross_section_builder.hpp
│ ├── implicit_structural_model_builder.hpp
│ ├── stratigraphic_model_builder.hpp
│ └── stratigraphic_section_builder.hpp
│ ├── core
│ ├── detail
│ │ └── helpers.hpp
│ ├── horizons_stack.hpp
│ ├── implicit_cross_section.hpp
│ ├── implicit_structural_model.hpp
│ ├── stratigraphic_model.hpp
│ └── stratigraphic_section.hpp
│ └── io
│ ├── geode
│ ├── geode_horizons_stack_input.hpp
│ ├── geode_horizons_stack_output.hpp
│ ├── geode_implicit_cross_section_input.hpp
│ ├── geode_implicit_cross_section_output.hpp
│ ├── geode_implicit_structural_model_input.hpp
│ └── geode_implicit_structural_model_output.hpp
│ ├── horizons_stack_input.hpp
│ ├── horizons_stack_output.hpp
│ ├── implicit_cross_section_input.hpp
│ ├── implicit_cross_section_output.hpp
│ ├── implicit_structural_model_input.hpp
│ ├── implicit_structural_model_output.hpp
│ ├── stratigraphic_model_input.hpp
│ ├── stratigraphic_model_output.hpp
│ ├── stratigraphic_section_input.hpp
│ └── stratigraphic_section_output.hpp
├── src
└── geode
│ ├── CMakeLists.txt
│ └── geosciences
│ ├── CMakeLists.txt
│ ├── explicit
│ ├── CMakeLists.txt
│ ├── common.cpp
│ ├── geometry
│ │ ├── geographic_coordinate_system.cpp
│ │ └── geographic_coordinate_system_helper.cpp
│ ├── mixin
│ │ ├── builder
│ │ │ ├── fault_blocks_builder.cpp
│ │ │ ├── faults_builder.cpp
│ │ │ ├── horizons_builder.cpp
│ │ │ └── stratigraphic_units_builder.cpp
│ │ └── core
│ │ │ ├── bitsery_archive.cpp
│ │ │ ├── fault.cpp
│ │ │ ├── fault_block.cpp
│ │ │ ├── fault_blocks.cpp
│ │ │ ├── faults.cpp
│ │ │ ├── horizon.cpp
│ │ │ ├── horizons.cpp
│ │ │ ├── stratigraphic_unit.cpp
│ │ │ └── stratigraphic_units.cpp
│ └── representation
│ │ ├── builder
│ │ ├── cross_section_builder.cpp
│ │ └── structural_model_builder.cpp
│ │ ├── core
│ │ ├── cross_section.cpp
│ │ ├── detail
│ │ │ ├── clone.cpp
│ │ │ └── helpers.cpp
│ │ └── structural_model.cpp
│ │ └── io
│ │ ├── cross_section_input.cpp
│ │ ├── cross_section_output.cpp
│ │ ├── geode
│ │ ├── geode_cross_section_input.cpp
│ │ ├── geode_cross_section_output.cpp
│ │ ├── geode_structural_model_input.cpp
│ │ └── geode_structural_model_output.cpp
│ │ ├── structural_model_input.cpp
│ │ └── structural_model_output.cpp
│ └── implicit
│ ├── CMakeLists.txt
│ ├── common.cpp
│ ├── mixin
│ ├── builder
│ │ └── stratigraphic_relationships_builder.cpp
│ └── core
│ │ └── stratigraphic_relationships.cpp
│ └── representation
│ ├── builder
│ ├── horizons_stack_builder.cpp
│ ├── implicit_cross_section_builder.cpp
│ ├── implicit_structural_model_builder.cpp
│ ├── stratigraphic_model_builder.cpp
│ └── stratigraphic_section_builder.cpp
│ ├── core
│ ├── detail
│ │ └── helpers.cpp
│ ├── horizons_stack.cpp
│ ├── implicit_cross_section.cpp
│ ├── implicit_structural_model.cpp
│ ├── stratigraphic_model.cpp
│ └── stratigraphic_section.cpp
│ └── io
│ ├── geode
│ ├── geode_horizons_stack_input.cpp
│ ├── geode_implicit_cross_section_input.cpp
│ ├── geode_implicit_cross_section_output.cpp
│ ├── geode_implicit_structural_model_input.cpp
│ └── geode_implicit_structural_model_output.cpp
│ ├── horizons_stack_input.cpp
│ ├── horizons_stack_output.cpp
│ ├── implicit_cross_section_input.cpp
│ ├── implicit_cross_section_output.cpp
│ ├── implicit_structural_model_input.cpp
│ ├── implicit_structural_model_output.cpp
│ ├── stratigraphic_model_input.cpp
│ ├── stratigraphic_model_output.cpp
│ ├── stratigraphic_section_input.cpp
│ └── stratigraphic_section_output.cpp
├── tests
├── CMakeLists.txt
├── data
│ ├── 3patches.og_tsf2d
│ ├── test_section.og_sctn
│ └── vri2.og_strm
├── explicit
│ ├── CMakeLists.txt
│ ├── test-cross-section.cpp
│ ├── test-geographic-coordinate-system.cpp
│ └── test-structural-model.cpp
├── implicit
│ ├── CMakeLists.txt
│ ├── test-horizons-stack.cpp
│ ├── test-stratigraphic-model.cpp
│ └── test-stratigraphic-section.cpp
└── tests_config.hpp.in
└── upgrade-guide.md
/.clang-tidy:
--------------------------------------------------------------------------------
1 | ---
2 | # DO NOT MODIFY DIRECTLY THIS FILE
3 | # LOOK AT https://github.com/Geode-solutions/actions
4 | # Configure clang-tidy for this project.
5 | Checks: >
6 | *,
7 | -altera*,
8 | -fuchsia*,
9 | -llvmlibc*,
10 | -llvm-header-guard,
11 | -misc-no-recursion,
12 | -modernize-use-trailing-return-type,
13 | -readability-redundant-access-specifiers,
14 | -readability-convert-member-functions-to-static,
15 | -cppcoreguidelines-avoid-const-or-ref-data-members
16 |
17 | CheckOptions:
18 | - key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
19 | value: '1'
20 | - key: readability-identifier-length.MinimumLoopCounterNameLength
21 | value: 1
22 | - key: readability-identifier-length.IgnoredVariableNames
23 | value: '^[defijkptuvw]$'
24 | # More options here: https://clang.llvm.org/extra/clang-tidy/checks/readability/identifier-naming.html
25 | - key: readability-identifier-naming.NamespaceCase
26 | value: lower_case
27 | - key: readability-identifier-naming.ClassCase
28 | value: CamelCase
29 | - key: readability-identifier-naming.StructCase
30 | value: CamelCase
31 | - key: readability-identifier-naming.FunctionCase
32 | value: lower_case
33 | - key: readability-identifier-naming.VariableCase
34 | value: lower_case
35 | - key: readability-identifier-naming.ConstexprVariableCase
36 | value: UPPER_CASE
37 | - key: readability-identifier-naming.ConstexprVariableIgnoredRegexp
38 | value: dim.*
39 | - key: readability-identifier-naming.PrivateMemberSuffix
40 | value: _
41 | - key: readability-identifier-naming.MacroDefinitionCase
42 | value: UPPER_CASE
43 | - key: readability-identifier-naming.EnumCase
44 | value: UPPER_CASE
45 | - key: readability-identifier-naming.EnumConstantCase
46 | value: lower_case
47 | - key: readability-identifier-naming.GlobalConstantCase
48 | value: UPPER_CASE
49 | - key: readability-identifier-naming.GlobalConstantIgnoredRegexp
50 | value: dimension
51 | - key: readability-identifier-naming.GlobalFunctionCase
52 | value: lower_case
53 | - key: readability-identifier-naming.MemberConstantCase
54 | value: CamelCase
55 | - key: readability-identifier-naming.StaticConstantCase
56 | value: lower_case
57 | - key: readability-function-cognitive-complexity.Threshold
58 | value: 10
59 | - key: readability-function-size.ParameterThreshold
60 | value: 4
61 | - key: misc-include-cleaner.IgnoreHeaders
62 | value: utility;cstddef;geode/.*_export\.h;geode/.*/common\.h;geode/basic/types\.h;geode/basic/assert\.h;
63 |
64 |
65 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | tests/** linguist-vendored
2 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | github: Geode-solutions
2 |
--------------------------------------------------------------------------------
/.github/workflows/deploy.yml:
--------------------------------------------------------------------------------
1 | name: Deploy
2 |
3 | on:
4 | workflow_dispatch:
5 |
6 | jobs:
7 | deploy:
8 | uses: Geode-solutions/actions/.github/workflows/cpp-deploy.yml@master
9 | with:
10 | name: OPENGEODE_GEOSCIENCES
11 | repos: ${{ vars.REPOS }}
12 | secrets: inherit
13 |
--------------------------------------------------------------------------------
/.github/workflows/manual_release.yml:
--------------------------------------------------------------------------------
1 | name: Manual release
2 |
3 | on:
4 | workflow_dispatch:
5 |
6 | jobs:
7 | release:
8 | uses: Geode-solutions/actions/.github/workflows/trigger-release.yml@master
9 | with:
10 | branch: next
11 | secrets: inherit
--------------------------------------------------------------------------------
/.github/workflows/merge_request.yml:
--------------------------------------------------------------------------------
1 | name: Merge request
2 |
3 | on:
4 | workflow_dispatch:
5 |
6 | jobs:
7 | release:
8 | uses: Geode-solutions/actions/.github/workflows/cpp-merge-request.yml@master
9 | secrets: inherit
10 |
--------------------------------------------------------------------------------
/.github/workflows/pr_update.yml:
--------------------------------------------------------------------------------
1 | name: Pull request
2 |
3 | on:
4 | pull_request:
5 | types: [opened, reopened]
6 | branches:
7 | - master
8 |
9 | jobs:
10 | update-branch:
11 | uses: Geode-solutions/actions/.github/workflows/update-branch.yml@master
12 |
--------------------------------------------------------------------------------
/.github/workflows/prepare_deploy.yml:
--------------------------------------------------------------------------------
1 | name: Prepare deploy
2 |
3 | on:
4 | workflow_dispatch:
5 |
6 | jobs:
7 | prepare:
8 | uses: Geode-solutions/actions/.github/workflows/cpp-prepare-deploy.yml@master
9 | secrets: inherit
10 |
--------------------------------------------------------------------------------
/.github/workflows/schedule.yml:
--------------------------------------------------------------------------------
1 | name: Schedule
2 |
3 | on:
4 | workflow_dispatch:
5 | inputs:
6 | branch:
7 | type: string
8 | default: "next"
9 | schedule:
10 | - cron: 0 23 * * *
11 |
12 | jobs:
13 | schedule:
14 | uses: Geode-solutions/actions/.github/workflows/cpp-schedule.yml@master
15 | with:
16 | name: OPENGEODE_GEOSCIENCES
17 | repos: ${{ vars.REPOS }}
18 | branch: ${{ inputs.branch || 'next' }}
19 | secrets:
20 | TOKEN: ${{ secrets.TOKEN }}
21 | SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
22 |
--------------------------------------------------------------------------------
/.github/workflows/test.yml:
--------------------------------------------------------------------------------
1 | name: Test
2 |
3 | on:
4 | push:
5 | branches-ignore:
6 | - master
7 | - next
8 |
9 | jobs:
10 | test:
11 | uses: Geode-solutions/actions/.github/workflows/cpp-test.yml@master
12 | with:
13 | name: OPENGEODE_GEOSCIENCES
14 | repos: ${{ vars.REPOS }}
15 | secrets: inherit
16 |
--------------------------------------------------------------------------------
/.github/workflows/test_pr.yml:
--------------------------------------------------------------------------------
1 | name: Test PR
2 |
3 | on:
4 | pull_request:
5 | types: [opened, synchronize, reopened, ready_for_review]
6 |
7 | jobs:
8 | test:
9 | uses: Geode-solutions/actions/.github/workflows/cpp-test-pr.yml@master
10 | with:
11 | name: OPENGEODE_GEOSCIENCES
12 | repos: ${{ vars.REPOS }}
13 | secrets: inherit
14 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | build
2 | .settings
3 | bindings/python/requirements.txt
--------------------------------------------------------------------------------
/.releaserc:
--------------------------------------------------------------------------------
1 | {
2 | branches: [
3 | { name: "master" },
4 | { name: "next", channel: "next", prerelease: "rc" }
5 | ],
6 | plugins: [
7 | '@semantic-release/commit-analyzer',
8 | '@semantic-release/release-notes-generator',
9 | '@semantic-release/github'
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "C_Cpp.default.cppStandard": "c++17",
3 | "C_Cpp.default.includePath": [
4 | "${workspaceFolder}/include",
5 | "${workspaceFolder}/build",
6 | "${workspaceFolder:OpenGeode}/include",
7 | "${workspaceFolder:OpenGeode}/build/opengeode/install/include"
8 | ],
9 | "files.watcherExclude": {
10 | "${workspaceFolder}/build/**": true
11 | }
12 | }
--------------------------------------------------------------------------------
/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2019 - 2025 Geode-solutions
2 | #
3 | # Permission is hereby granted, free of charge, to any person obtaining a copy
4 | # of this software and associated documentation files (the "Software"), to deal
5 | # in the Software without restriction, including without limitation the rights
6 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | # copies of the Software, and to permit persons to whom the Software is
8 | # furnished to do so, subject to the following conditions:
9 | #
10 | # The above copyright notice and this permission notice shall be included in
11 | # all copies or substantial portions of the Software.
12 | #
13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | # SOFTWARE.
20 |
21 | cmake_minimum_required(VERSION 3.15)
22 |
23 | cmake_policy(SET CMP0091 NEW)
24 | set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDLL")
25 |
26 | # Define the project
27 | project(OpenGeode-Geosciences CXX)
28 |
29 | option(OPENGEODE_GEOSCIENCES_WITH_TESTS "Compile test projects" ON)
30 | option(OPENGEODE_GEOSCIENCES_WITH_PYTHON "Compile Python bindings" OFF)
31 |
32 | # Get OpenGeode-Geosciences dependencies
33 | find_package(OpenGeode REQUIRED CONFIG)
34 | find_package(Async++ REQUIRED CONFIG)
35 | find_package(GDAL REQUIRED CONFIG)
36 |
37 | #------------------------------------------------------------------------------------------------
38 | # Configure the OpenGeode-Geosciences libraries
39 | add_subdirectory(src/geode)
40 |
41 | #------------------------------------------------------------------------------------------------
42 | # Optional modules configuration
43 | if(OPENGEODE_GEOSCIENCES_WITH_TESTS)
44 | # Enable testing with CTest
45 | enable_testing()
46 | message(STATUS "Configuring OpenGeode-Geosciences with tests")
47 | add_subdirectory(tests)
48 | endif()
49 |
50 | if(OPENGEODE_GEOSCIENCES_WITH_PYTHON)
51 | message(STATUS "Configuring OpenGeode-Geosciences with Python bindings")
52 | add_subdirectory(bindings/python)
53 | endif()
54 |
55 | #------------------------------------------------------------------------------------------------
56 | # Configure CPacks
57 | if(WIN32)
58 | set(CPACK_GENERATOR "ZIP")
59 | else()
60 | set(CPACK_GENERATOR "TGZ")
61 | endif()
62 |
63 | # This must always be last!
64 | include(CPack)
65 |
--------------------------------------------------------------------------------
/COPYLEFT:
--------------------------------------------------------------------------------
1 | ## Dependencies
2 |
3 | OpenGeode: MIT
4 | Copyright (c) 2019 - 2025 Geode-solutions
5 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 - 2025 Geode-solutions
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
OpenGeode-Geosciencesby Geode-solutions
2 | OpenGeode module for Geosciences
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | ---
31 |
32 | ## Introduction
33 |
34 | OpenGeode-Geosciences is a module of [OpenGeode] provides data structures for geological models and geological objects.
35 |
36 | [OpenGeode]: https://github.com/Geode-solutions/OpenGeode
37 |
38 | ## Documentation
39 |
40 | To check out our live documentation, visit [docs.geode-solutions.com](https://docs.geode-solutions.com).
41 |
42 | Installing OpenGeode-Geosciences is done:
43 |
44 | - either, by compiling the C++ source.
45 | - or, by using pip command `pip install OpenGeode-Geosciences` and add `import opengeode_geosciences` in your Python script.
46 |
47 | ## Questions
48 |
49 | For questions and support please use the official [slack](https://opengeode-slack-invite.herokuapp.com) and go to the channel #geosciences. The issue list of this repo is exclusively for bug reports and feature requests.
50 |
51 | ## Changelog
52 |
53 | Detailed changes for each release are documented in the [release notes](https://github.com/Geode-solutions/OpenGeode-Geosciences/releases).
54 |
55 | ## License
56 |
57 | [MIT](https://opensource.org/licenses/MIT)
58 |
59 | Copyright (c) 2019 - 2025, Geode-solutions
60 |
--------------------------------------------------------------------------------
/bindings/python/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2019 - 2025 Geode-solutions
2 | #
3 | # Permission is hereby granted, free of charge, to any person obtaining a copy
4 | # of this software and associated documentation files (the "Software"), to deal
5 | # in the Software without restriction, including without limitation the rights
6 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | # copies of the Software, and to permit persons to whom the Software is
8 | # furnished to do so, subject to the following conditions:
9 | #
10 | # The above copyright notice and this permission notice shall be included in
11 | # all copies or substantial portions of the Software.
12 | #
13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | # SOFTWARE.
20 |
21 | add_subdirectory(src)
22 |
23 | if(OPENGEODE_GEOSCIENCES_WITH_TESTS)
24 | add_subdirectory(tests)
25 | endif()
26 |
27 | add_geode_python_wheel(
28 | NAME "OpenGeode-Geosciences"
29 | DESCRIPTION
30 | "OpenGeode module for Geosciences"
31 | MODULES
32 | "explicit.py"
33 | "implicit.py"
34 | LICENSE "MIT"
35 | )
36 |
--------------------------------------------------------------------------------
/bindings/python/explicit.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2019 - 2025 Geode-solutions
2 | #
3 | # Permission is hereby granted, free of charge, to any person obtaining a copy
4 | # of this software and associated documentation files (the "Software"), to deal
5 | # in the Software without restriction, including without limitation the rights
6 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | # copies of the Software, and to permit persons to whom the Software is
8 | # furnished to do so, subject to the following conditions:
9 | #
10 | # The above copyright notice and this permission notice shall be included in
11 | # all copies or substantial portions of the Software.
12 | #
13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | # SOFTWARE.
20 |
21 | import opengeode
22 |
23 | from opengeode_geosciences_py_explicit import *
24 |
25 | GeosciencesExplicitLibrary.initialize()
26 |
--------------------------------------------------------------------------------
/bindings/python/implicit.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2019 - 2025 Geode-solutions
2 | #
3 | # Permission is hereby granted, free of charge, to any person obtaining a copy
4 | # of this software and associated documentation files (the "Software"), to deal
5 | # in the Software without restriction, including without limitation the rights
6 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | # copies of the Software, and to permit persons to whom the Software is
8 | # furnished to do so, subject to the following conditions:
9 | #
10 | # The above copyright notice and this permission notice shall be included in
11 | # all copies or substantial portions of the Software.
12 | #
13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | # SOFTWARE.
20 |
21 | import opengeode
22 |
23 | from opengeode_geosciences_py_implicit import *
24 |
25 | GeosciencesImplicitLibrary.initialize()
26 |
--------------------------------------------------------------------------------
/bindings/python/requirements.in:
--------------------------------------------------------------------------------
1 | OpenGeode-core
--------------------------------------------------------------------------------
/bindings/python/src/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2019 - 2025 Geode-solutions
2 | #
3 | # Permission is hereby granted, free of charge, to any person obtaining a copy
4 | # of this software and associated documentation files (the "Software"), to deal
5 | # in the Software without restriction, including without limitation the rights
6 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | # copies of the Software, and to permit persons to whom the Software is
8 | # furnished to do so, subject to the following conditions:
9 | #
10 | # The above copyright notice and this permission notice shall be included in
11 | # all copies or substantial portions of the Software.
12 | #
13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | # SOFTWARE.
20 |
21 | add_subdirectory(explicit)
22 | add_subdirectory(implicit)
23 |
--------------------------------------------------------------------------------
/bindings/python/src/common.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #include
25 | #include
26 | #include
27 |
28 | #include
29 | #include
30 | #include
31 |
32 | namespace pybind11
33 | {
34 | namespace detail
35 | {
36 | template < typename Type >
37 | struct type_caster< absl::FixedArray< Type > >
38 | : list_caster< absl::FixedArray< Type >, Type >
39 | {
40 | };
41 |
42 | template < typename Type, size_t dimension >
43 | struct type_caster< absl::InlinedVector< Type, dimension > >
44 | : list_caster< absl::InlinedVector< Type, dimension >, Type >
45 | {
46 | };
47 |
48 | template < typename Type >
49 | struct type_caster< absl::Span< Type > >
50 | : list_caster< absl::Span< Type >, Type >
51 | {
52 | using value_conv = make_caster< Type >;
53 |
54 | bool load( handle src, bool convert )
55 | {
56 | cpp_.clear();
57 | auto s = reinterpret_borrow< sequence >( src );
58 | cpp_.reserve( s.size() );
59 | for( auto it : s )
60 | {
61 | value_conv conv;
62 | if( !conv.load( it, convert ) )
63 | return false;
64 | cpp_.push_back( cast_op< Type&& >( std::move( conv ) ) );
65 | }
66 | this->value = absl::MakeConstSpan( cpp_ );
67 | return true;
68 | }
69 |
70 | std::vector< typename std::remove_const< Type >::type > cpp_;
71 | };
72 | } // namespace detail
73 | } // namespace pybind11
74 |
--------------------------------------------------------------------------------
/bindings/python/src/explicit/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2019 - 2025 Geode-solutions
2 | #
3 | # Permission is hereby granted, free of charge, to any person obtaining a copy
4 | # of this software and associated documentation files (the "Software"), to deal
5 | # in the Software without restriction, including without limitation the rights
6 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | # copies of the Software, and to permit persons to whom the Software is
8 | # furnished to do so, subject to the following conditions:
9 | #
10 | # The above copyright notice and this permission notice shall be included in
11 | # all copies or substantial portions of the Software.
12 | #
13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | # SOFTWARE.
20 |
21 | add_geode_python_binding(
22 | NAME "py_explicit"
23 | SOURCES
24 | "explicit.cpp"
25 | "geometry/crs.hpp"
26 | "geometry/crs_helper.hpp"
27 | "mixin/builder/fault_blocks_builder.hpp"
28 | "mixin/builder/faults_builder.hpp"
29 | "mixin/builder/horizons_builder.hpp"
30 | "mixin/builder/stratigraphic_units_builder.hpp"
31 | "mixin/core/fault.hpp"
32 | "mixin/core/fault_block.hpp"
33 | "mixin/core/fault_blocks.hpp"
34 | "mixin/core/faults.hpp"
35 | "mixin/core/horizon.hpp"
36 | "mixin/core/horizons.hpp"
37 | "mixin/core/stratigraphic_unit.hpp"
38 | "mixin/core/stratigraphic_units.hpp"
39 | "representation/builder/cross_section_builder.hpp"
40 | "representation/builder/structural_model_builder.hpp"
41 | "representation/core/cross_section.hpp"
42 | "representation/core/structural_model.hpp"
43 | "representation/io/cross_section.hpp"
44 | "representation/io/structural_model.hpp"
45 | DEPENDENCIES
46 | ${PROJECT_NAME}::explicit
47 | )
48 |
--------------------------------------------------------------------------------
/bindings/python/src/explicit/mixin/builder/fault_blocks_builder.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #include
25 |
26 | #include
27 |
28 | #define PYTHON_FAULT_BLOCKS_BUILDER( dimension ) \
29 | const auto name##dimension = \
30 | "FaultBlocksBuilder" + std::to_string( dimension ) + "D"; \
31 | pybind11::class_< FaultBlocksBuilder##dimension##D >( \
32 | module, name##dimension.c_str() ) \
33 | .def( "set_fault_block_name", \
34 | &FaultBlocksBuilder##dimension##D::set_fault_block_name )
35 |
36 | namespace geode
37 | {
38 | void define_fault_blocks_builder( pybind11::module& module )
39 | {
40 | PYTHON_FAULT_BLOCKS_BUILDER( 2 );
41 | PYTHON_FAULT_BLOCKS_BUILDER( 3 );
42 | }
43 | } // namespace geode
44 |
--------------------------------------------------------------------------------
/bindings/python/src/explicit/mixin/builder/faults_builder.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #include
25 |
26 | #include
27 |
28 | #define PYTHON_FAULTS_BUILDER( dimension ) \
29 | const auto name##dimension = \
30 | "FaultsBuilder" + std::to_string( dimension ) + "D"; \
31 | pybind11::class_< FaultsBuilder##dimension##D >( \
32 | module, name##dimension.c_str() ) \
33 | .def( "set_fault_type", &FaultsBuilder##dimension##D::set_fault_type ) \
34 | .def( "set_fault_name", &FaultsBuilder##dimension##D::set_fault_name )
35 |
36 | namespace geode
37 | {
38 | void define_faults_builder( pybind11::module& module )
39 | {
40 | PYTHON_FAULTS_BUILDER( 2 );
41 | PYTHON_FAULTS_BUILDER( 3 );
42 | }
43 | } // namespace geode
44 |
--------------------------------------------------------------------------------
/bindings/python/src/explicit/mixin/builder/horizons_builder.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #include
25 |
26 | #include
27 |
28 | #define PYTHON_HORIZONS_BUILDER( dimension ) \
29 | const auto name##dimension = \
30 | "HorizonsBuilder" + std::to_string( dimension ) + "D"; \
31 | pybind11::class_< HorizonsBuilder##dimension##D >( \
32 | module, name##dimension.c_str() ) \
33 | .def( "set_horizon_type", \
34 | &HorizonsBuilder##dimension##D::set_horizon_type ) \
35 | .def( "set_horizon_name", \
36 | &HorizonsBuilder##dimension##D::set_horizon_name )
37 |
38 | namespace geode
39 | {
40 | void define_horizons_builder( pybind11::module& module )
41 | {
42 | PYTHON_HORIZONS_BUILDER( 2 );
43 | PYTHON_HORIZONS_BUILDER( 3 );
44 | }
45 | } // namespace geode
46 |
--------------------------------------------------------------------------------
/bindings/python/src/explicit/mixin/builder/stratigraphic_units_builder.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #include
25 |
26 | #include
27 |
28 | #define PYTHON_STRATIGRAPHIC_UNITS_BUILDER( dimension ) \
29 | const auto name##dimension = \
30 | "StratigraphicUnitsBuilder" + std::to_string( dimension ) + "D"; \
31 | pybind11::class_< StratigraphicUnitsBuilder##dimension##D >( \
32 | module, name##dimension.c_str() ) \
33 | .def( "set_stratigraphic_unit_name", \
34 | &StratigraphicUnitsBuilder##dimension##D:: \
35 | set_stratigraphic_unit_name )
36 |
37 | namespace geode
38 | {
39 | void define_stratigraphic_units_builder( pybind11::module& module )
40 | {
41 | PYTHON_STRATIGRAPHIC_UNITS_BUILDER( 2 );
42 | PYTHON_STRATIGRAPHIC_UNITS_BUILDER( 3 );
43 | }
44 | } // namespace geode
45 |
--------------------------------------------------------------------------------
/bindings/python/src/explicit/mixin/core/fault.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #include
25 |
26 | #define PYTHON_FAULT( dimension ) \
27 | const auto name##dimension = "Fault" + std::to_string( dimension ) + "D"; \
28 | pybind11::class_< Fault##dimension##D, Component##dimension##D > \
29 | fault##dimension##D( module, name##dimension.c_str() ); \
30 | \
31 | fault##dimension##D.def( "has_type", &Fault##dimension##D::has_type ) \
32 | .def( "type", &Fault##dimension##D::type ) \
33 | .def( "component_id", &Fault##dimension##D::component_id ); \
34 | \
35 | pybind11::enum_< Fault##dimension##D::FAULT_TYPE >( \
36 | fault##dimension##D, "FAULT_TYPE" ) \
37 | .value( "NO_TYPE", Fault##dimension##D::FAULT_TYPE::no_type ) \
38 | .value( "NORMAL", Fault##dimension##D::FAULT_TYPE::normal ) \
39 | .value( "REVERSE", Fault##dimension##D::FAULT_TYPE::reverse ) \
40 | .value( "STRIKE_SLIP", Fault##dimension##D::FAULT_TYPE::strike_slip ) \
41 | .value( "LISTRIC", Fault##dimension##D::FAULT_TYPE::listric ) \
42 | .value( "DECOLLEMENT", Fault##dimension##D::FAULT_TYPE::decollement )
43 |
44 | namespace geode
45 | {
46 | void define_fault( pybind11::module& module )
47 | {
48 | PYTHON_FAULT( 2 );
49 | PYTHON_FAULT( 3 );
50 | }
51 | } // namespace geode
52 |
--------------------------------------------------------------------------------
/bindings/python/src/explicit/mixin/core/fault_block.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #include
25 |
26 | #define PYTHON_FAULT_BLOCK( dimension ) \
27 | const auto name##dimension = \
28 | "FaultBlock" + std::to_string( dimension ) + "D"; \
29 | pybind11::class_< FaultBlock##dimension##D, Component##dimension##D >( \
30 | module, name##dimension.c_str() ) \
31 | .def( "component_id", &FaultBlock##dimension##D::component_id )
32 |
33 | namespace geode
34 | {
35 | void define_fault_block( pybind11::module& module )
36 | {
37 | PYTHON_FAULT_BLOCK( 2 );
38 | PYTHON_FAULT_BLOCK( 3 );
39 | }
40 | } // namespace geode
41 |
--------------------------------------------------------------------------------
/bindings/python/src/explicit/mixin/core/faults.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #include
25 | #include
26 |
27 | #define PYTHON_FAULTS( dimension ) \
28 | const auto name##dimension = "Faults" + std::to_string( dimension ) + "D"; \
29 | pybind11::class_< Faults##dimension##D >( \
30 | module, name##dimension.c_str() ) \
31 | .def( "nb_faults", &Faults##dimension##D::nb_faults ) \
32 | .def( "fault", &Faults##dimension##D::fault, \
33 | pybind11::return_value_policy::reference ) \
34 | .def( \
35 | "faults", \
36 | []( const Faults##dimension##D& self ) { \
37 | std::vector< const Fault##dimension##D* > components; \
38 | for( const auto& component : self.faults() ) \
39 | { \
40 | components.push_back( &component ); \
41 | } \
42 | return components; \
43 | }, \
44 | pybind11::return_value_policy::reference )
45 |
46 | namespace geode
47 | {
48 | void define_faults( pybind11::module& module )
49 | {
50 | PYTHON_FAULTS( 2 );
51 | PYTHON_FAULTS( 3 );
52 | }
53 | } // namespace geode
54 |
--------------------------------------------------------------------------------
/bindings/python/src/explicit/mixin/core/horizon.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #include
25 |
26 | #define PYTHON_HORIZON( dimension ) \
27 | const auto name##dimension = \
28 | "Horizon" + std::to_string( dimension ) + "D"; \
29 | pybind11::class_< Horizon##dimension##D, Component##dimension##D > \
30 | horizon##dimension##D( module, name##dimension.c_str() ); \
31 | \
32 | horizon##dimension##D.def( "has_type", &Horizon##dimension##D::has_type ) \
33 | .def( "type", &Horizon##dimension##D::type ) \
34 | .def( "component_id", &Horizon##dimension##D::component_id ); \
35 | \
36 | pybind11::enum_< Horizon##dimension##D::HORIZON_TYPE >( \
37 | horizon##dimension##D, "HORIZON_TYPE" ) \
38 | .value( "NO_TYPE", Horizon##dimension##D::HORIZON_TYPE::no_type ) \
39 | .value( "CONFORMAL", Horizon##dimension##D::HORIZON_TYPE::conformal ) \
40 | .value( "NON_CONFORMAL", \
41 | Horizon##dimension##D::HORIZON_TYPE::non_conformal ) \
42 | .value( \
43 | "TOPOGRAPHY", Horizon##dimension##D::HORIZON_TYPE::topography ) \
44 | .value( "INTRUSION", Horizon##dimension##D::HORIZON_TYPE::intrusion )
45 |
46 | namespace geode
47 | {
48 | void define_horizon( pybind11::module& module )
49 | {
50 | PYTHON_HORIZON( 2 );
51 | PYTHON_HORIZON( 3 );
52 | }
53 | } // namespace geode
54 |
--------------------------------------------------------------------------------
/bindings/python/src/explicit/mixin/core/horizons.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #include
25 | #include
26 |
27 | #define PYTHON_HORIZONS( dimension ) \
28 | const auto name##dimension = \
29 | "Horizons" + std::to_string( dimension ) + "D"; \
30 | pybind11::class_< Horizons##dimension##D >( \
31 | module, name##dimension.c_str() ) \
32 | .def( "nb_horizons", &Horizons##dimension##D::nb_horizons ) \
33 | .def( "horizon", &Horizons##dimension##D::horizon, \
34 | pybind11::return_value_policy::reference ) \
35 | .def( \
36 | "horizons", \
37 | []( const Horizons##dimension##D& self ) { \
38 | std::vector< const Horizon##dimension##D* > components; \
39 | for( const auto& component : self.horizons() ) \
40 | { \
41 | components.push_back( &component ); \
42 | } \
43 | return components; \
44 | }, \
45 | pybind11::return_value_policy::reference )
46 |
47 | namespace geode
48 | {
49 | void define_horizons( pybind11::module& module )
50 | {
51 | PYTHON_HORIZONS( 2 );
52 | PYTHON_HORIZONS( 3 );
53 | }
54 | } // namespace geode
55 |
--------------------------------------------------------------------------------
/bindings/python/src/explicit/mixin/core/stratigraphic_unit.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #include
25 |
26 | #define PYTHON_STRATIGRAPHIC_UNIT( dimension ) \
27 | const auto name##dimension = \
28 | "StratigraphicUnit" + std::to_string( dimension ) + "D"; \
29 | pybind11::class_< StratigraphicUnit##dimension##D, \
30 | Component##dimension##D >( module, name##dimension.c_str() ) \
31 | .def( "component_id", &StratigraphicUnit##dimension##D::component_id )
32 |
33 | namespace geode
34 | {
35 | void define_stratigraphic_unit( pybind11::module& module )
36 | {
37 | PYTHON_STRATIGRAPHIC_UNIT( 2 );
38 | PYTHON_STRATIGRAPHIC_UNIT( 3 );
39 | }
40 | } // namespace geode
41 |
--------------------------------------------------------------------------------
/bindings/python/src/explicit/representation/io/cross_section.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #include "../../../factory.hpp"
25 | #include "../../../input.hpp"
26 |
27 | #include
28 | #include
29 |
30 | namespace geode
31 | {
32 | void define_cross_section_io( pybind11::module& module )
33 | {
34 | module.def( "save_cross_section", &save_cross_section );
35 | module.def( "load_cross_section", &load_cross_section );
36 | module.def( "check_cross_section_missing_files",
37 | &check_cross_section_missing_files );
38 | module.def( "is_cross_section_loadable", &is_cross_section_loadable );
39 | module.def( "is_cross_section_saveable", &is_cross_section_saveable );
40 | PYTHON_INPUT_CLASS( CrossSection, "CrossSection" );
41 | PYTHON_FACTORY_CLASS( CrossSectionInputFactory );
42 | PYTHON_FACTORY_CLASS( CrossSectionOutputFactory );
43 | }
44 | } // namespace geode
45 |
--------------------------------------------------------------------------------
/bindings/python/src/explicit/representation/io/structural_model.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #include "../../../factory.hpp"
25 | #include "../../../input.hpp"
26 |
27 | #include
28 | #include
29 |
30 | namespace geode
31 | {
32 | void define_structural_model_io( pybind11::module& module )
33 | {
34 | module.def( "save_structural_model", &save_structural_model );
35 | module.def( "load_structural_model", &load_structural_model );
36 | module.def( "check_structural_model_missing_files",
37 | &check_structural_model_missing_files );
38 | module.def(
39 | "is_structural_model_loadable", &is_structural_model_loadable );
40 | module.def(
41 | "is_structural_model_saveable", &is_structural_model_saveable );
42 | PYTHON_INPUT_CLASS( StructuralModel, "StructuralModel" );
43 | PYTHON_FACTORY_CLASS( StructuralModelInputFactory );
44 | PYTHON_FACTORY_CLASS( StructuralModelOutputFactory );
45 | }
46 | } // namespace geode
47 |
--------------------------------------------------------------------------------
/bindings/python/src/factory.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #include
25 |
26 | #define PYTHON_FACTORY_CLASS( type ) \
27 | pybind11::class_< type >( module, #type ) \
28 | .def( "list_creators", &type::list_creators ) \
29 | .def( "has_creator", &type::has_creator )
30 |
--------------------------------------------------------------------------------
/bindings/python/src/implicit/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2019 - 2025 Geode-solutions
2 | #
3 | # Permission is hereby granted, free of charge, to any person obtaining a copy
4 | # of this software and associated documentation files (the "Software"), to deal
5 | # in the Software without restriction, including without limitation the rights
6 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | # copies of the Software, and to permit persons to whom the Software is
8 | # furnished to do so, subject to the following conditions:
9 | #
10 | # The above copyright notice and this permission notice shall be included in
11 | # all copies or substantial portions of the Software.
12 | #
13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | # SOFTWARE.
20 |
21 | add_geode_python_binding(
22 | NAME "py_implicit"
23 | SOURCES
24 | "implicit.cpp"
25 | "geometry/stratigraphic_point.hpp"
26 | "mixin/builder/stratigraphic_relationships_builder.hpp"
27 | "mixin/core/stratigraphic_relationships.hpp"
28 | "representation/builder/implicit_cross_section_builder.hpp"
29 | "representation/builder/implicit_structural_model_builder.hpp"
30 | "representation/builder/stratigraphic_model_builder.hpp"
31 | "representation/builder/stratigraphic_section_builder.hpp"
32 | "representation/builder/horizons_stack_builder.hpp"
33 | "representation/core/helpers.hpp"
34 | "representation/core/implicit_cross_section.hpp"
35 | "representation/core/implicit_structural_model.hpp"
36 | "representation/core/stratigraphic_model.hpp"
37 | "representation/core/stratigraphic_section.hpp"
38 | "representation/core/horizons_stack.hpp"
39 | "representation/io/implicit_cross_section.hpp"
40 | "representation/io/implicit_structural_model.hpp"
41 | "representation/io/stratigraphic_model.hpp"
42 | "representation/io/stratigraphic_section.hpp"
43 | "representation/io/horizons_stack.hpp"
44 | DEPENDENCIES
45 | ${PROJECT_NAME}::implicit
46 | )
47 |
--------------------------------------------------------------------------------
/bindings/python/src/implicit/mixin/builder/stratigraphic_relationships_builder.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #include
25 |
26 | namespace geode
27 | {
28 | void define_stratigraphic_relationships_builder( pybind11::module& module )
29 | {
30 | pybind11::class_< StratigraphicRelationshipsBuilder >(
31 | module, "StratigraphicRelationshipsBuilder" )
32 | .def( pybind11::init< StratigraphicRelationships& >() )
33 | .def( "unregister_component",
34 | &StratigraphicRelationshipsBuilder::unregister_component )
35 | .def( "remove_relation",
36 | &StratigraphicRelationshipsBuilder::remove_relation );
37 | }
38 | } // namespace geode
39 |
--------------------------------------------------------------------------------
/bindings/python/src/implicit/mixin/core/stratigraphic_relationships.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #include
25 |
26 | namespace geode
27 | {
28 | void define_stratigraphic_relationships( pybind11::module& module )
29 | {
30 | pybind11::class_< StratigraphicRelationships >(
31 | module, "StratigraphicRelationships" )
32 | .def( pybind11::init<>() )
33 | .def( "is_above", &StratigraphicRelationships::is_above )
34 | .def( "above", &StratigraphicRelationships::above )
35 | .def( "under", &StratigraphicRelationships::under );
36 | }
37 | } // namespace geode
38 |
--------------------------------------------------------------------------------
/bindings/python/src/implicit/representation/builder/implicit_cross_section_builder.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #include
25 |
26 | #include
27 |
28 | namespace geode
29 | {
30 | void define_implicit_cross_section_builder( pybind11::module& module )
31 | {
32 | pybind11::class_< ImplicitCrossSectionBuilder, CrossSectionBuilder >(
33 | module, "ImplicitCrossSectionBuilder" )
34 | .def( pybind11::init< ImplicitCrossSection& >() )
35 | .def( "copy",
36 | []( ImplicitCrossSectionBuilder& builder,
37 | const ImplicitCrossSection& other_model ) {
38 | builder.copy( other_model );
39 | } )
40 | .def( "instantiate_implicit_attribute_on_surfaces",
41 | &ImplicitCrossSectionBuilder::
42 | instantiate_implicit_attribute_on_surfaces )
43 | .def( "set_implicit_value",
44 | &ImplicitCrossSectionBuilder::set_implicit_value )
45 | .def( "set_horizons_stack",
46 | []( ImplicitCrossSectionBuilder& builder,
47 | HorizonsStack2D& horizons_stack ) {
48 | builder.set_horizons_stack( horizons_stack.clone() );
49 | } )
50 | .def( "set_horizon_implicit_value",
51 | &ImplicitCrossSectionBuilder::set_horizon_implicit_value )
52 | .def( "horizons_stack_builder",
53 | &ImplicitCrossSectionBuilder::horizons_stack_builder );
54 | }
55 | } // namespace geode
--------------------------------------------------------------------------------
/bindings/python/src/implicit/representation/builder/implicit_structural_model_builder.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #include
25 |
26 | #include
27 |
28 | namespace geode
29 | {
30 | void define_implicit_structural_model_builder( pybind11::module& module )
31 | {
32 | pybind11::class_< ImplicitStructuralModelBuilder,
33 | StructuralModelBuilder >( module, "ImplicitStructuralModelBuilder" )
34 | .def( pybind11::init< ImplicitStructuralModel& >() )
35 | .def( "copy",
36 | []( ImplicitStructuralModelBuilder& builder,
37 | const ImplicitStructuralModel& other_model ) {
38 | builder.copy( other_model );
39 | } )
40 | .def( "instantiate_implicit_attribute_on_blocks",
41 | &ImplicitStructuralModelBuilder::
42 | instantiate_implicit_attribute_on_blocks )
43 | .def( "set_implicit_value",
44 | &ImplicitStructuralModelBuilder::set_implicit_value )
45 | .def( "set_horizons_stack",
46 | []( ImplicitStructuralModelBuilder& builder,
47 | HorizonsStack3D& horizons_stack ) {
48 | builder.set_horizons_stack( horizons_stack.clone() );
49 | } )
50 | .def( "set_horizon_implicit_value",
51 | &ImplicitStructuralModelBuilder::set_horizon_implicit_value )
52 | .def( "horizons_stack_builder",
53 | &ImplicitStructuralModelBuilder::horizons_stack_builder );
54 | }
55 | } // namespace geode
--------------------------------------------------------------------------------
/bindings/python/src/implicit/representation/builder/stratigraphic_model_builder.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #include
25 |
26 | #include
27 |
28 | namespace geode
29 | {
30 | void define_stratigraphic_model_builder( pybind11::module& module )
31 | {
32 | pybind11::class_< StratigraphicModelBuilder, StructuralModelBuilder >(
33 | module, "StratigraphicModelBuilder" )
34 | .def( pybind11::init< StratigraphicModel& >() )
35 | .def( "copy",
36 | []( StratigraphicModelBuilder& builder,
37 | const StratigraphicModel& other_model ) {
38 | builder.copy( other_model );
39 | } )
40 | .def( "instantiate_stratigraphic_attribute_on_blocks",
41 | &StratigraphicModelBuilder::
42 | instantiate_stratigraphic_attribute_on_blocks )
43 | .def( "set_stratigraphic_location",
44 | &StratigraphicModelBuilder::set_stratigraphic_location )
45 | .def( "set_stratigraphic_coordinates",
46 | &StratigraphicModelBuilder::set_stratigraphic_coordinates );
47 | }
48 | } // namespace geode
--------------------------------------------------------------------------------
/bindings/python/src/implicit/representation/builder/stratigraphic_section_builder.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #include
25 |
26 | #include
27 |
28 | namespace geode
29 | {
30 | void define_stratigraphic_section_builder( pybind11::module& module )
31 | {
32 | pybind11::class_< StratigraphicSectionBuilder, CrossSectionBuilder >(
33 | module, "StratigraphicSectionBuilder" )
34 | .def( pybind11::init< StratigraphicSection& >() )
35 | .def( "copy",
36 | []( StratigraphicSectionBuilder& builder,
37 | const StratigraphicSection& other_model ) {
38 | builder.copy( other_model );
39 | } )
40 | .def( "instantiate_stratigraphic_attribute_on_surfaces",
41 | &StratigraphicSectionBuilder::
42 | instantiate_stratigraphic_attribute_on_surfaces )
43 | .def( "set_stratigraphic_location",
44 | &StratigraphicSectionBuilder::set_stratigraphic_location )
45 | .def( "set_stratigraphic_coordinates",
46 | &StratigraphicSectionBuilder::set_stratigraphic_coordinates );
47 | }
48 | } // namespace geode
--------------------------------------------------------------------------------
/bindings/python/src/implicit/representation/io/implicit_cross_section.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #include "../../../factory.hpp"
25 | #include "../../../input.hpp"
26 |
27 | #include
28 | #include
29 |
30 | namespace geode
31 | {
32 | void define_implicit_cross_section_io( pybind11::module& module )
33 | {
34 | module.def(
35 | "save_implicit_cross_section", &save_implicit_cross_section );
36 | module.def(
37 | "load_implicit_cross_section", &load_implicit_cross_section );
38 | module.def( "check_implicit_cross_section_missing_files",
39 | &check_implicit_cross_section_missing_files );
40 | module.def( "is_implicit_cross_section_loadable",
41 | &is_implicit_cross_section_loadable );
42 | module.def( "is_implicit_cross_section_saveable",
43 | &is_implicit_cross_section_saveable );
44 | PYTHON_INPUT_CLASS( ImplicitCrossSection, "ImplicitCrossSection" );
45 | PYTHON_FACTORY_CLASS( ImplicitCrossSectionInputFactory );
46 | PYTHON_FACTORY_CLASS( ImplicitCrossSectionOutputFactory );
47 | }
48 | } // namespace geode
49 |
--------------------------------------------------------------------------------
/bindings/python/src/implicit/representation/io/implicit_structural_model.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #include "../../../factory.hpp"
25 | #include "../../../input.hpp"
26 |
27 | #include
28 | #include
29 |
30 | namespace geode
31 | {
32 | void define_implicit_structural_model_io( pybind11::module& module )
33 | {
34 | module.def(
35 | "save_implicit_structural_model", &save_implicit_structural_model );
36 | module.def(
37 | "load_implicit_structural_model", &load_implicit_structural_model );
38 | module.def( "check_implicit_structural_model_missing_files",
39 | &check_implicit_structural_model_missing_files );
40 | module.def( "is_implicit_structural_model_loadable",
41 | &is_implicit_structural_model_loadable );
42 | module.def( "is_implicit_structural_model_saveable",
43 | &is_implicit_structural_model_saveable );
44 | PYTHON_INPUT_CLASS(
45 | ImplicitStructuralModel, "ImplicitStructuralModel" );
46 | PYTHON_FACTORY_CLASS( ImplicitStructuralModelInputFactory );
47 | PYTHON_FACTORY_CLASS( ImplicitStructuralModelOutputFactory );
48 | }
49 | } // namespace geode
50 |
--------------------------------------------------------------------------------
/bindings/python/src/implicit/representation/io/stratigraphic_model.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #include "../../../factory.hpp"
25 | #include "../../../input.hpp"
26 |
27 | #include
28 | #include
29 |
30 | namespace geode
31 | {
32 | void define_stratigraphic_model_io( pybind11::module& module )
33 | {
34 | module.def( "save_stratigraphic_model", &save_stratigraphic_model );
35 | module.def( "load_stratigraphic_model", &load_stratigraphic_model );
36 | module.def( "check_stratigraphic_model_missing_files",
37 | &check_stratigraphic_model_missing_files );
38 | module.def( "is_stratigraphic_model_loadable",
39 | &is_stratigraphic_model_loadable );
40 | module.def( "is_stratigraphic_model_saveable",
41 | &is_stratigraphic_model_saveable );
42 | PYTHON_INPUT_CLASS( StratigraphicModel, "StratigraphicModel" );
43 | PYTHON_FACTORY_CLASS( StratigraphicModelInputFactory );
44 | PYTHON_FACTORY_CLASS( StratigraphicModelOutputFactory );
45 | }
46 | } // namespace geode
47 |
--------------------------------------------------------------------------------
/bindings/python/src/implicit/representation/io/stratigraphic_section.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #include "../../../factory.hpp"
25 | #include "../../../input.hpp"
26 |
27 | #include
28 | #include
29 |
30 | namespace geode
31 | {
32 | void define_stratigraphic_section_io( pybind11::module& module )
33 | {
34 | module.def( "save_stratigraphic_section", &save_stratigraphic_section );
35 | module.def( "load_stratigraphic_section", &load_stratigraphic_section );
36 | module.def( "check_stratigraphic_section_missing_files",
37 | &check_stratigraphic_section_missing_files );
38 | module.def( "is_stratigraphic_section_loadable",
39 | &is_stratigraphic_section_loadable );
40 | module.def( "is_stratigraphic_section_saveable",
41 | &is_stratigraphic_section_saveable );
42 | PYTHON_INPUT_CLASS( StratigraphicSection, "StratigraphicSection" );
43 | PYTHON_FACTORY_CLASS( StratigraphicSectionInputFactory );
44 | PYTHON_FACTORY_CLASS( StratigraphicSectionOutputFactory );
45 | }
46 | } // namespace geode
47 |
--------------------------------------------------------------------------------
/bindings/python/src/input.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #include
25 |
26 | #define PYTHON_INPUT_CLASS( type, name ) \
27 | pybind11::class_< Input< type >::MissingFiles >( \
28 | module, absl::StrCat( "MissingFiles", name ).c_str() ) \
29 | .def( "has_missing_files", \
30 | &Input< type >::MissingFiles::has_missing_files ) \
31 | .def_readwrite( "additional_files", \
32 | &Input< type >::MissingFiles::additional_files ) \
33 | .def_readwrite( \
34 | "mandatory_files", &Input< type >::MissingFiles::mandatory_files )
35 |
--------------------------------------------------------------------------------
/bindings/python/tests/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2019 - 2025 Geode-solutions
2 | #
3 | # Permission is hereby granted, free of charge, to any person obtaining a copy
4 | # of this software and associated documentation files (the "Software"), to deal
5 | # in the Software without restriction, including without limitation the rights
6 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | # copies of the Software, and to permit persons to whom the Software is
8 | # furnished to do so, subject to the following conditions:
9 | #
10 | # The above copyright notice and this permission notice shall be included in
11 | # all copies or substantial portions of the Software.
12 | #
13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | # SOFTWARE.
20 |
21 | add_subdirectory(explicit)
22 | add_subdirectory(implicit)
23 |
--------------------------------------------------------------------------------
/bindings/python/tests/explicit/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2019 - 2025 Geode-solutions
2 | #
3 | # Permission is hereby granted, free of charge, to any person obtaining a copy
4 | # of this software and associated documentation files (the "Software"), to deal
5 | # in the Software without restriction, including without limitation the rights
6 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | # copies of the Software, and to permit persons to whom the Software is
8 | # furnished to do so, subject to the following conditions:
9 | #
10 | # The above copyright notice and this permission notice shall be included in
11 | # all copies or substantial portions of the Software.
12 | #
13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | # SOFTWARE.
20 |
21 | add_geode_python_test(
22 | SOURCE "test-py-cross-section.py"
23 | DEPENDENCIES
24 | ${PROJECT_NAME}::py_explicit
25 | )
26 | add_geode_python_test(
27 | SOURCE "test-py-geographic-coordinate-system.py"
28 | DEPENDENCIES
29 | ${PROJECT_NAME}::py_explicit
30 | )
31 | add_geode_python_test(
32 | SOURCE "test-py-structural-model.py"
33 | DEPENDENCIES
34 | ${PROJECT_NAME}::py_explicit
35 | )
36 |
--------------------------------------------------------------------------------
/bindings/python/tests/explicit/test-py-geographic-coordinate-system.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # Copyright (c) 2019 - 2025 Geode-solutions
3 | #
4 | # Permission is hereby granted, free of charge, to any person obtaining a copy
5 | # of this software and associated documentation files (the "Software"), to deal
6 | # in the Software without restriction, including without limitation the rights
7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | # copies of the Software, and to permit persons to whom the Software is
9 | # furnished to do so, subject to the following conditions:
10 | #
11 | # The above copyright notice and this permission notice shall be included in
12 | # all copies or substantial portions of the Software.
13 | #
14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | # SOFTWARE.
21 |
22 | import os
23 | import sys
24 | import platform
25 | if sys.version_info >= (3, 8, 0) and platform.system() == "Windows":
26 | for path in [x.strip() for x in os.environ['PATH'].split(';') if x]:
27 | os.add_dll_directory(path)
28 |
29 | import opengeode
30 | import opengeode_geosciences_py_explicit as geosciences
31 |
32 | if __name__ == '__main__':
33 | geosciences.GeosciencesExplicitLibrary.initialize()
34 |
35 | infos = geosciences.GeographicCoordinateSystem3D.geographic_coordinate_systems()
36 | if len(infos) != 13181:
37 | raise ValueError("[Test] Wrong number of supported CRS")
38 |
39 | nb_points = 4
40 | manager = opengeode.AttributeManager()
41 | manager.resize(nb_points)
42 |
43 | lambert1 = geosciences.GeographicCoordinateSystem3D(
44 | manager, geosciences.GeographicCoordinateSystemInfo3D("EPSG", "27571", "I"))
45 | for p in range(nb_points):
46 | lambert1.set_point(p, opengeode.Point3D([p, p, p]))
47 | lambert2 = geosciences.GeographicCoordinateSystem3D(
48 | manager, geosciences.GeographicCoordinateSystemInfo3D("EPSG", "27572", "II"))
49 | lambert2.import_coordinates(lambert1)
50 | answers = [
51 | opengeode.Point3D([4273.64251995017, 1302920.55457198, 0]),
52 | opengeode.Point3D([4274.63159306906, 1302921.55102308, 1]),
53 | opengeode.Point3D([4275.62066620018, 1302922.54747419, 2]),
54 | opengeode.Point3D([4276.60973934352, 1302923.5439253, 3])]
55 | for p in range(nb_points):
56 | if not lambert2.point(p).inexact_equal(answers[p]):
57 | raise ValueError("[Test] Wrong coordinate conversion")
58 |
--------------------------------------------------------------------------------
/bindings/python/tests/implicit/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2019 - 2025 Geode-solutions
2 | #
3 | # Permission is hereby granted, free of charge, to any person obtaining a copy
4 | # of this software and associated documentation files (the "Software"), to deal
5 | # in the Software without restriction, including without limitation the rights
6 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | # copies of the Software, and to permit persons to whom the Software is
8 | # furnished to do so, subject to the following conditions:
9 | #
10 | # The above copyright notice and this permission notice shall be included in
11 | # all copies or substantial portions of the Software.
12 | #
13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | # SOFTWARE.
20 |
21 | add_geode_python_test(
22 | SOURCE "test-py-stratigraphic-model.py"
23 | DEPENDENCIES
24 | ${PROJECT_NAME}::py_explicit
25 | ${PROJECT_NAME}::py_implicit
26 | )
27 |
28 | add_geode_python_test(
29 | SOURCE "test-py-stratigraphic-section.py"
30 | DEPENDENCIES
31 | ${PROJECT_NAME}::py_explicit
32 | ${PROJECT_NAME}::py_implicit
33 | )
34 |
35 | add_geode_python_test(
36 | SOURCE "test-py-horizons-stack.py"
37 | DEPENDENCIES
38 | ${PROJECT_NAME}::py_explicit
39 | ${PROJECT_NAME}::py_implicit
40 | )
41 |
--------------------------------------------------------------------------------
/cmake/OpenGeode-GeosciencesConfig.cmake.in:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2019 - 2025 Geode-solutions
2 | #
3 | # Permission is hereby granted, free of charge, to any person obtaining a copy
4 | # of this software and associated documentation files (the "Software"), to deal
5 | # in the Software without restriction, including without limitation the rights
6 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | # copies of the Software, and to permit persons to whom the Software is
8 | # furnished to do so, subject to the following conditions:
9 | #
10 | # The above copyright notice and this permission notice shall be included in
11 | # all copies or substantial portions of the Software.
12 | #
13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | # SOFTWARE.
20 |
21 | @PACKAGE_INIT@
22 |
23 | include(CMakeFindDependencyMacro)
24 | find_dependency(OpenGeode CONFIG)
25 |
26 | # Load information for each target
27 | include(${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@_explicit_target.cmake)
28 | include(${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@_implicit_target.cmake)
29 |
30 | get_target_property(library_type @PROJECT_NAME@::explicit TYPE)
31 | if(library_type STREQUAL "STATIC_LIBRARY")
32 | find_dependency(Async++ CONFIG)
33 | find_dependency(PROJ CONFIG)
34 | find_dependency(GDAL CONFIG)
35 | endif()
36 |
--------------------------------------------------------------------------------
/cmake/version.rc.in:
--------------------------------------------------------------------------------
1 | #define RC_VERSION 1,0,0,0
2 |
3 | 1 VERSIONINFO
4 | FILEVERSION RC_VERSION
5 | PRODUCTVERSION RC_VERSION
6 | BEGIN
7 | BLOCK "VarFileInfo"
8 | BEGIN
9 | // English language (0x409) and the Windows Unicode codepage (1200)
10 | VALUE "Translation", 0x409, 1200
11 | END
12 | BLOCK "StringFileInfo"
13 | BEGIN
14 | BLOCK "040904b0"
15 | BEGIN
16 | VALUE "FileDescription", "Compiled with @CMAKE_CXX_COMPILER_ID@ @CMAKE_CXX_COMPILER_VERSION@\0"
17 | VALUE "ProductVersion", "@CPACK_PACKAGE_VERSION@\0"
18 | VALUE "FileVersion", "@CPACK_PACKAGE_VERSION@\0"
19 | VALUE "InternalName", "@PROJECT_LIB_NAME@\0"
20 | VALUE "ProductName", "@PROJECT_LIB_NAME@\0"
21 | VALUE "CompanyName", "Geode-solutions SAS\0"
22 | VALUE "LegalCopyright", "Copyright 2019 - 2025 Geode-solutions SAS. All rights reserved.\0"
23 | VALUE "Commentaires", "https://geode-solutions.com\0"
24 | END
25 | END
26 | END
27 |
--------------------------------------------------------------------------------
/include/geode/geosciences/explicit/common.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 | #include
28 | #include
29 |
30 | namespace geode
31 | {
32 | OPENGEODE_LIBRARY(
33 | opengeode_geosciences_explicit_api, GeosciencesExplicit );
34 | } // namespace geode
--------------------------------------------------------------------------------
/include/geode/geosciences/explicit/mixin/builder/fault_blocks_builder.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 |
28 | namespace geode
29 | {
30 | FORWARD_DECLARATION_DIMENSION_CLASS( FaultBlock );
31 | FORWARD_DECLARATION_DIMENSION_CLASS( FaultBlocks );
32 |
33 | struct uuid;
34 | } // namespace geode
35 |
36 | namespace geode
37 | {
38 | template < index_t dimension >
39 | class FaultBlocksBuilder
40 | {
41 | public:
42 | void load_fault_blocks( std::string_view directory );
43 |
44 | void set_fault_block_name( const uuid& id, std::string_view name );
45 |
46 | protected:
47 | explicit FaultBlocksBuilder( FaultBlocks< dimension >& fault_blocks )
48 | : fault_blocks_( fault_blocks )
49 | {
50 | }
51 |
52 | [[nodiscard]] const uuid& create_fault_block();
53 |
54 | void create_fault_block( uuid fault_block_id );
55 |
56 | void delete_fault_block( const FaultBlock< dimension >& fault_block );
57 |
58 | private:
59 | FaultBlocks< dimension >& fault_blocks_;
60 | };
61 | ALIAS_2D_AND_3D( FaultBlocksBuilder );
62 | } // namespace geode
63 |
--------------------------------------------------------------------------------
/include/geode/geosciences/explicit/mixin/builder/faults_builder.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 |
28 | namespace geode
29 | {
30 | FORWARD_DECLARATION_DIMENSION_CLASS( Fault );
31 | FORWARD_DECLARATION_DIMENSION_CLASS( Faults );
32 |
33 | struct uuid;
34 | } // namespace geode
35 |
36 | namespace geode
37 | {
38 | template < index_t dimension >
39 | class FaultsBuilder
40 | {
41 | public:
42 | void load_faults( std::string_view directory );
43 |
44 | void set_fault_type( const uuid& fault_id,
45 | typename Fault< dimension >::FAULT_TYPE type );
46 |
47 | void set_fault_name( const uuid& id, std::string_view name );
48 |
49 | protected:
50 | explicit FaultsBuilder( Faults< dimension >& faults )
51 | : faults_( faults )
52 | {
53 | }
54 |
55 | [[nodiscard]] const uuid& create_fault();
56 |
57 | [[nodiscard]] const uuid& create_fault(
58 | typename Fault< dimension >::FAULT_TYPE type );
59 |
60 | void create_fault( uuid fault_id );
61 |
62 | void create_fault(
63 | uuid fault_id, typename Fault< dimension >::FAULT_TYPE type );
64 |
65 | void delete_fault( const Fault< dimension >& fault );
66 |
67 | private:
68 | Faults< dimension >& faults_;
69 | };
70 | ALIAS_2D_AND_3D( FaultsBuilder );
71 | } // namespace geode
72 |
--------------------------------------------------------------------------------
/include/geode/geosciences/explicit/mixin/builder/horizons_builder.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 |
28 | namespace geode
29 | {
30 | FORWARD_DECLARATION_DIMENSION_CLASS( Horizon );
31 | FORWARD_DECLARATION_DIMENSION_CLASS( Horizons );
32 |
33 | struct uuid;
34 | } // namespace geode
35 |
36 | namespace geode
37 | {
38 | template < index_t dimension >
39 | class HorizonsBuilder
40 | {
41 | public:
42 | void load_horizons( std::string_view directory );
43 |
44 | void set_horizon_type( const uuid& horizon_id,
45 | typename Horizon< dimension >::HORIZON_TYPE type );
46 |
47 | void set_horizon_name( const uuid& id, std::string_view name );
48 |
49 | protected:
50 | explicit HorizonsBuilder( Horizons< dimension >& horizons )
51 | : horizons_( horizons )
52 | {
53 | }
54 |
55 | [[nodiscard]] const uuid& create_horizon();
56 |
57 | [[nodiscard]] const uuid& create_horizon(
58 | typename Horizon< dimension >::HORIZON_TYPE type );
59 |
60 | void create_horizon( uuid horizon_id );
61 |
62 | void create_horizon(
63 | uuid horizon_id, typename Horizon< dimension >::HORIZON_TYPE type );
64 |
65 | void delete_horizon( const Horizon< dimension >& horizon );
66 |
67 | private:
68 | Horizons< dimension >& horizons_;
69 | };
70 | ALIAS_2D_AND_3D( HorizonsBuilder );
71 | } // namespace geode
72 |
--------------------------------------------------------------------------------
/include/geode/geosciences/explicit/mixin/builder/stratigraphic_units_builder.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 |
28 | namespace geode
29 | {
30 | FORWARD_DECLARATION_DIMENSION_CLASS( StratigraphicUnit );
31 | FORWARD_DECLARATION_DIMENSION_CLASS( StratigraphicUnits );
32 |
33 | struct uuid;
34 | } // namespace geode
35 |
36 | namespace geode
37 | {
38 | template < index_t dimension >
39 | class StratigraphicUnitsBuilder
40 | {
41 | public:
42 | void load_stratigraphic_units( std::string_view directory );
43 |
44 | void set_stratigraphic_unit_name(
45 | const uuid& id, std::string_view name );
46 |
47 | protected:
48 | explicit StratigraphicUnitsBuilder(
49 | StratigraphicUnits< dimension >& stratigraphic_units )
50 | : stratigraphic_units_( stratigraphic_units )
51 | {
52 | }
53 |
54 | [[nodiscard]] const uuid& create_stratigraphic_unit();
55 |
56 | void create_stratigraphic_unit( uuid stratigraphic_unit_id );
57 |
58 | void delete_stratigraphic_unit(
59 | const StratigraphicUnit< dimension >& stratigraphic_unit );
60 |
61 | private:
62 | StratigraphicUnits< dimension >& stratigraphic_units_;
63 | };
64 | ALIAS_2D_AND_3D( StratigraphicUnitsBuilder );
65 | } // namespace geode
66 |
--------------------------------------------------------------------------------
/include/geode/geosciences/explicit/mixin/core/bitsery_archive.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 |
28 | #include
29 |
30 | namespace geode
31 | {
32 | /*!
33 | * Register all the information needed by Bitsery to serialize the objects
34 | * in the explicit library.
35 | * @param[in] context The context where to register this information.
36 | * @warning The context can be used only once per archive.
37 | */
38 | void opengeode_geosciences_explicit_api
39 | register_explicit_serialize_pcontext( PContext& context );
40 |
41 | /*!
42 | * Register all the information needed by Bitsery to deserialize the objects
43 | * in the explicit library.
44 | * @param[in] context The context where to register this information.
45 | * @warning The context can be used only once per archive.
46 | */
47 | void opengeode_geosciences_explicit_api
48 | register_explicit_deserialize_pcontext( PContext& context );
49 | } // namespace geode
50 |
--------------------------------------------------------------------------------
/include/geode/geosciences/explicit/mixin/core/fault_block.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 |
28 | #include
29 |
30 | #include
31 |
32 | namespace geode
33 | {
34 | FORWARD_DECLARATION_DIMENSION_CLASS( FaultBlocks );
35 | FORWARD_DECLARATION_DIMENSION_CLASS( FaultBlocksBuilder );
36 | } // namespace geode
37 |
38 | namespace geode
39 | {
40 | /*!
41 | * Geological component describing a Fault Block.
42 | */
43 | template < index_t dimension >
44 | class FaultBlock final : public Component< dimension >
45 | {
46 | OPENGEODE_DISABLE_COPY( FaultBlock );
47 | PASSKEY( FaultBlocks< dimension >, FaultBlocksKey );
48 | PASSKEY( FaultBlocksBuilder< dimension >, FaultBlocksBuilderKey );
49 |
50 | friend class bitsery::Access;
51 |
52 | public:
53 | FaultBlock( FaultBlock&& other ) noexcept;
54 | ~FaultBlock();
55 |
56 | [[nodiscard]] static ComponentType component_type_static()
57 | {
58 | return ComponentType{ "FaultBlock" };
59 | }
60 |
61 | [[nodiscard]] ComponentType component_type() const final
62 | {
63 | return component_type_static();
64 | }
65 |
66 | public:
67 | FaultBlock( FaultBlocksKey ) : FaultBlock() {};
68 |
69 | void set_fault_block_name(
70 | std::string_view name, FaultBlocksBuilderKey )
71 | {
72 | this->set_name( name );
73 | }
74 |
75 | private:
76 | FaultBlock();
77 |
78 | friend class bitsery::Access;
79 | template < typename Archive >
80 | void serialize( Archive& archive );
81 | };
82 | ALIAS_2D_AND_3D( FaultBlock );
83 | } // namespace geode
84 |
--------------------------------------------------------------------------------
/include/geode/geosciences/explicit/mixin/core/stratigraphic_unit.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 | #include
28 |
29 | #include
30 |
31 | namespace geode
32 | {
33 | FORWARD_DECLARATION_DIMENSION_CLASS( StratigraphicUnits );
34 | FORWARD_DECLARATION_DIMENSION_CLASS( StratigraphicUnitsBuilder );
35 | } // namespace geode
36 |
37 | namespace geode
38 | {
39 | /*!
40 | * Geological component describing a StratigraphicUnit.
41 | */
42 | template < index_t dimension >
43 | class StratigraphicUnit final : public Component< dimension >
44 | {
45 | OPENGEODE_DISABLE_COPY( StratigraphicUnit );
46 | PASSKEY( StratigraphicUnits< dimension >, StratigraphicUnitsKey );
47 | PASSKEY( StratigraphicUnitsBuilder< dimension >,
48 | StratigraphicUnitsBuilderKey );
49 |
50 | public:
51 | StratigraphicUnit( StratigraphicUnit&& other ) noexcept;
52 | ~StratigraphicUnit();
53 |
54 | [[nodiscard]] static ComponentType component_type_static()
55 | {
56 | return ComponentType{ "StratigraphicUnit" };
57 | }
58 |
59 | [[nodiscard]] ComponentType component_type() const final
60 | {
61 | return component_type_static();
62 | }
63 |
64 | public:
65 | StratigraphicUnit( StratigraphicUnitsKey ) : StratigraphicUnit() {}
66 |
67 | void set_stratigraphic_unit_name(
68 | std::string_view name, StratigraphicUnitsBuilderKey )
69 | {
70 | this->set_name( name );
71 | }
72 |
73 | private:
74 | StratigraphicUnit();
75 |
76 | friend class bitsery::Access;
77 | template < typename Archive >
78 | void serialize( Archive& archive );
79 | };
80 | ALIAS_2D_AND_3D( StratigraphicUnit );
81 | } // namespace geode
82 |
--------------------------------------------------------------------------------
/include/geode/geosciences/explicit/representation/core/detail/clone.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 |
28 | #include
29 |
30 | namespace geode
31 | {
32 | class Section;
33 | class BRep;
34 | } // namespace geode
35 |
36 | namespace geode
37 | {
38 | namespace detail
39 | {
40 | template < typename Model >
41 | void add_geology_clone_mapping(
42 | ModelCopyMapping& mapping, const Model& model );
43 |
44 | template < typename Model >
45 | [[nodiscard]] void add_horizons_clone_mapping(
46 | const Model& model, BijectiveMapping< uuid >& horizons_mapping )
47 | {
48 | for( const auto& horizon : model.horizons() )
49 | {
50 | if( !horizons_mapping.has_mapping_input( horizon.id() ) )
51 | {
52 | horizons_mapping.map( horizon.id(), horizon.id() );
53 | }
54 | }
55 | }
56 |
57 | template < typename Model >
58 | [[nodiscard]] void add_stratigraphic_units_clone_mapping(
59 | const Model& model,
60 | BijectiveMapping< uuid >& stratigraphic_units_mapping )
61 | {
62 | for( const auto& stratigraphic_unit : model.stratigraphic_units() )
63 | {
64 | if( !stratigraphic_units_mapping.has_mapping_input(
65 | stratigraphic_unit.id() ) )
66 | {
67 | stratigraphic_units_mapping.map(
68 | stratigraphic_unit.id(), stratigraphic_unit.id() );
69 | }
70 | }
71 | }
72 | } // namespace detail
73 | } // namespace geode
74 |
--------------------------------------------------------------------------------
/include/geode/geosciences/explicit/representation/core/detail/helpers.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 |
28 | #include
29 |
30 | namespace geode
31 | {
32 | class Section;
33 | class BRep;
34 | } // namespace geode
35 |
36 | namespace geode
37 | {
38 | namespace detail
39 | {
40 | template < typename Model >
41 | ModelCopyMapping transfer_geological_information(
42 | const Model& initial_model,
43 | const Model& modified_model,
44 | typename Model::Builder& model_builder,
45 | const ModelGenericMapping& components_mappings );
46 |
47 | template < index_t dimension >
48 | void add_geological_components_mappings(
49 | const ModelCopyMapping& geological_mappings,
50 | ModelGenericMapping& component_mappings );
51 | } // namespace detail
52 | } // namespace geode
53 |
--------------------------------------------------------------------------------
/include/geode/geosciences/explicit/representation/io/cross_section_input.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 |
28 | #include
29 |
30 | #include
31 |
32 | #include
33 |
34 | namespace geode
35 | {
36 | class CrossSection;
37 | class CrossSectionBuilder;
38 | } // namespace geode
39 |
40 | namespace geode
41 | {
42 | /*!
43 | * API function for loading a CrossSection.
44 | * The adequate loader is called depending on the filename extension.
45 | * @param[in] filename Path to the file to load.
46 | */
47 | [[nodiscard]] CrossSection opengeode_geosciences_explicit_api
48 | load_cross_section( std::string_view filename );
49 |
50 | class CrossSectionInput : public Input< CrossSection >
51 | {
52 | public:
53 | using Base = Input< CrossSection >;
54 | using typename Base::InputData;
55 | using typename Base::MissingFiles;
56 |
57 | protected:
58 | explicit CrossSectionInput( std::string_view filename )
59 | : Base{ filename }
60 | {
61 | }
62 | };
63 |
64 | [[nodiscard]] CrossSectionInput::MissingFiles
65 | opengeode_geosciences_explicit_api
66 | check_cross_section_missing_files( std::string_view filename );
67 |
68 | [[nodiscard]] bool opengeode_geosciences_explicit_api
69 | is_cross_section_loadable( std::string_view filename );
70 |
71 | using CrossSectionInputFactory =
72 | Factory< std::string, CrossSectionInput, std::string_view >;
73 | } // namespace geode
74 |
--------------------------------------------------------------------------------
/include/geode/geosciences/explicit/representation/io/cross_section_output.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 | #include
28 | #include
29 |
30 | #include
31 |
32 | #include
33 |
34 | #include
35 |
36 | namespace geode
37 | {
38 | class CrossSection;
39 | } // namespace geode
40 |
41 | namespace geode
42 | {
43 | /*!
44 | * API function for saving a CrossSection.
45 | * The adequate saver is called depending on the given filename extension.
46 | * @param[in] cross_section CrossSection to save.
47 | * @param[in] filename Path to the file where save the CrossSection.
48 | */
49 | std::vector< std::string >
50 | opengeode_geosciences_explicit_api save_cross_section(
51 | const CrossSection& cross_section, std::string_view filename );
52 |
53 | class CrossSectionOutput : public Output< CrossSection >
54 | {
55 | public:
56 | virtual ~CrossSectionOutput() = default;
57 |
58 | protected:
59 | explicit CrossSectionOutput( std::string_view filename )
60 | : Output< CrossSection >{ filename }
61 | {
62 | }
63 | };
64 |
65 | [[nodiscard]] bool opengeode_geosciences_explicit_api
66 | is_cross_section_saveable(
67 | const CrossSection& cross_section, std::string_view filename );
68 |
69 | using CrossSectionOutputFactory =
70 | Factory< std::string, CrossSectionOutput, std::string_view >;
71 | } // namespace geode
72 |
--------------------------------------------------------------------------------
/include/geode/geosciences/explicit/representation/io/geode/geode_cross_section_input.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 | #include
28 |
29 | namespace geode
30 | {
31 | class opengeode_geosciences_explicit_api OpenGeodeCrossSectionInput final
32 | : public CrossSectionInput
33 | {
34 | public:
35 | explicit OpenGeodeCrossSectionInput( std::string_view filename );
36 |
37 | [[nodiscard]] static std::string_view extension()
38 | {
39 | return CrossSection::native_extension_static();
40 | }
41 |
42 | [[nodiscard]] CrossSection read() final;
43 | };
44 |
45 | namespace detail
46 | {
47 | void opengeode_geosciences_explicit_api load_cross_section_files(
48 | CrossSection& cross_section, std::string_view directory );
49 | } // namespace detail
50 | } // namespace geode
51 |
--------------------------------------------------------------------------------
/include/geode/geosciences/explicit/representation/io/geode/geode_cross_section_output.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 | #include
28 |
29 | #include
30 | #include
31 |
32 | namespace geode
33 | {
34 | class ZipFile;
35 | }
36 |
37 | namespace geode
38 | {
39 | class opengeode_geosciences_explicit_api OpenGeodeCrossSectionOutput final
40 | : public CrossSectionOutput
41 | {
42 | public:
43 | explicit OpenGeodeCrossSectionOutput( std::string_view filename );
44 |
45 | [[nodiscard]] static std::string_view extension()
46 | {
47 | return CrossSection::native_extension_static();
48 | }
49 |
50 | void save_cross_section_files( const CrossSection& cross_section,
51 | std::string_view directory ) const;
52 |
53 | void archive_cross_section_files( const ZipFile& zip_writer ) const;
54 |
55 | std::vector< std::string > write(
56 | const CrossSection& cross_section ) const final;
57 | };
58 | } // namespace geode
59 |
--------------------------------------------------------------------------------
/include/geode/geosciences/explicit/representation/io/geode/geode_structural_model_input.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 | #include
28 |
29 | namespace geode
30 | {
31 | class opengeode_geosciences_explicit_api OpenGeodeStructuralModelInput final
32 | : public StructuralModelInput
33 | {
34 | public:
35 | explicit OpenGeodeStructuralModelInput( std::string_view filename );
36 |
37 | [[nodiscard]] static std::string_view extension()
38 | {
39 | return StructuralModel::native_extension_static();
40 | }
41 |
42 | [[nodiscard]] StructuralModel read() final;
43 | };
44 |
45 | namespace detail
46 | {
47 | void opengeode_geosciences_explicit_api load_structural_model_files(
48 | StructuralModel& structural_model, std::string_view directory );
49 | } // namespace detail
50 | } // namespace geode
51 |
--------------------------------------------------------------------------------
/include/geode/geosciences/explicit/representation/io/geode/geode_structural_model_output.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 | #include
28 |
29 | #include
30 | #include
31 |
32 | namespace geode
33 | {
34 | class ZipFile;
35 | }
36 |
37 | namespace geode
38 | {
39 | class opengeode_geosciences_explicit_api OpenGeodeStructuralModelOutput
40 | final : public StructuralModelOutput
41 | {
42 | public:
43 | explicit OpenGeodeStructuralModelOutput( std::string_view filename );
44 |
45 | [[nodiscard]] static std::string_view extension()
46 | {
47 | return StructuralModel::native_extension_static();
48 | }
49 |
50 | void save_structural_model_files(
51 | const StructuralModel& structural_model,
52 | std::string_view directory ) const;
53 |
54 | void archive_structural_model_files( const ZipFile& zip_writer ) const;
55 |
56 | std::vector< std::string > write(
57 | const StructuralModel& structural_model ) const final;
58 | };
59 | } // namespace geode
60 |
--------------------------------------------------------------------------------
/include/geode/geosciences/explicit/representation/io/structural_model_input.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 |
28 | #include
29 |
30 | #include
31 |
32 | #include
33 |
34 | namespace geode
35 | {
36 | class StructuralModel;
37 | class StructuralModelBuilder;
38 | } // namespace geode
39 |
40 | namespace geode
41 | {
42 | /*!
43 | * API function for loading a StructuralModel.
44 | * The adequate loader is called depending on the filename extension.
45 | * @param[in] filename Path to the file to load.
46 | */
47 | [[nodiscard]] StructuralModel opengeode_geosciences_explicit_api
48 | load_structural_model( std::string_view filename );
49 |
50 | class StructuralModelInput : public Input< StructuralModel >
51 | {
52 | public:
53 | using Base = Input< StructuralModel >;
54 | using typename Base::InputData;
55 | using typename Base::MissingFiles;
56 |
57 | protected:
58 | explicit StructuralModelInput( std::string_view filename )
59 | : Base{ filename }
60 | {
61 | }
62 | };
63 |
64 | [[nodiscard]] StructuralModelInput::MissingFiles
65 | opengeode_geosciences_explicit_api
66 | check_structural_model_missing_files( std::string_view filename );
67 |
68 | [[nodiscard]] bool opengeode_geosciences_explicit_api
69 | is_structural_model_loadable( std::string_view filename );
70 |
71 | using StructuralModelInputFactory =
72 | Factory< std::string, StructuralModelInput, std::string_view >;
73 | } // namespace geode
74 |
--------------------------------------------------------------------------------
/include/geode/geosciences/explicit/representation/io/structural_model_output.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 | #include
28 | #include
29 |
30 | #include
31 |
32 | #include
33 |
34 | #include
35 |
36 | namespace geode
37 | {
38 | class StructuralModel;
39 | } // namespace geode
40 |
41 | namespace geode
42 | {
43 | /*!
44 | * API function for saving a StructuralModel.
45 | * The adequate saver is called depending on the given filename extension.
46 | * @param[in] structural_model StructuralModel to save.
47 | * @param[in] filename Path to the file where save the StructuralModel.
48 | */
49 | std::vector< std::string > opengeode_geosciences_explicit_api
50 | save_structural_model( const StructuralModel& structural_model,
51 | std::string_view filename );
52 |
53 | class StructuralModelOutput : public Output< StructuralModel >
54 | {
55 | public:
56 | virtual ~StructuralModelOutput() = default;
57 |
58 | protected:
59 | explicit StructuralModelOutput( std::string_view filename )
60 | : Output< StructuralModel >{ filename }
61 | {
62 | }
63 | };
64 |
65 | [[nodiscard]] bool opengeode_geosciences_explicit_api
66 | is_structural_model_saveable( const StructuralModel& structural_model,
67 | std::string_view filename );
68 |
69 | using StructuralModelOutputFactory =
70 | Factory< std::string, StructuralModelOutput, std::string_view >;
71 | } // namespace geode
72 |
--------------------------------------------------------------------------------
/include/geode/geosciences/implicit/common.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 | #include
28 | #include
29 |
30 | namespace geode
31 | {
32 | OPENGEODE_LIBRARY(
33 | opengeode_geosciences_implicit_api, GeosciencesImplicit );
34 | } // namespace geode
35 |
--------------------------------------------------------------------------------
/include/geode/geosciences/implicit/representation/builder/implicit_cross_section_builder.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 | #include
28 |
29 | namespace geode
30 | {
31 | class ImplicitCrossSection;
32 | FORWARD_DECLARATION_DIMENSION_CLASS( HorizonsStack );
33 | ALIAS_2D( HorizonsStack );
34 | FORWARD_DECLARATION_DIMENSION_CLASS( HorizonsStackBuilder );
35 | ALIAS_2D( HorizonsStackBuilder );
36 | } // namespace geode
37 |
38 | namespace geode
39 | {
40 | /*!
41 | * Class managing modifications of a ImplicitCrossSection
42 | */
43 | class opengeode_geosciences_implicit_api ImplicitCrossSectionBuilder
44 | : public CrossSectionBuilder
45 | {
46 | public:
47 | explicit ImplicitCrossSectionBuilder(
48 | ImplicitCrossSection& implicit_section );
49 |
50 | ModelCopyMapping copy( const ImplicitCrossSection& implicit_model );
51 |
52 | void copy_implicit_information( ModelCopyMapping& mapping,
53 | const ImplicitCrossSection& other_model );
54 |
55 | void reinitialize_implicit_query_trees();
56 |
57 | void instantiate_implicit_attribute_on_surfaces();
58 |
59 | void set_implicit_value(
60 | const Surface2D& surface, index_t vertex_id, double value );
61 |
62 | void set_horizons_stack( HorizonsStack2D&& stack );
63 |
64 | void set_horizon_implicit_value(
65 | const Horizon2D& horizon, double isovalue );
66 |
67 | [[nodiscard]] HorizonsStackBuilder2D horizons_stack_builder();
68 |
69 | private:
70 | ImplicitCrossSection& implicit_section_;
71 | };
72 | } // namespace geode
73 |
--------------------------------------------------------------------------------
/include/geode/geosciences/implicit/representation/builder/implicit_structural_model_builder.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 | #include
28 |
29 | namespace geode
30 | {
31 | class ImplicitStructuralModel;
32 | FORWARD_DECLARATION_DIMENSION_CLASS( HorizonsStack );
33 | ALIAS_3D( HorizonsStack );
34 | FORWARD_DECLARATION_DIMENSION_CLASS( HorizonsStackBuilder );
35 | ALIAS_3D( HorizonsStackBuilder );
36 | } // namespace geode
37 |
38 | namespace geode
39 | {
40 | /*!
41 | * Class managing modifications of a ImplicitStructuralModel
42 | */
43 | class opengeode_geosciences_implicit_api ImplicitStructuralModelBuilder
44 | : public StructuralModelBuilder
45 | {
46 | public:
47 | explicit ImplicitStructuralModelBuilder(
48 | ImplicitStructuralModel& implicit_model );
49 |
50 | ModelCopyMapping copy( const ImplicitStructuralModel& implicit_model );
51 |
52 | void copy_implicit_information( ModelCopyMapping& mapping,
53 | const ImplicitStructuralModel& other_model );
54 |
55 | void reinitialize_implicit_query_trees();
56 |
57 | void instantiate_implicit_attribute_on_blocks();
58 |
59 | void set_implicit_value(
60 | const Block3D& block, index_t vertex_id, double value );
61 |
62 | void set_horizons_stack( HorizonsStack3D&& stack );
63 |
64 | void set_horizon_implicit_value(
65 | const Horizon3D& horizon, double isovalue );
66 |
67 | [[nodiscard]] HorizonsStackBuilder3D horizons_stack_builder();
68 |
69 | private:
70 | ImplicitStructuralModel& implicit_model_;
71 | };
72 | } // namespace geode
73 |
--------------------------------------------------------------------------------
/include/geode/geosciences/implicit/representation/builder/stratigraphic_model_builder.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 | #include
28 |
29 | namespace geode
30 | {
31 | class StratigraphicModel;
32 | FORWARD_DECLARATION_DIMENSION_CLASS( StratigraphicPoint );
33 | FORWARD_DECLARATION_DIMENSION_CLASS( Point );
34 | ALIAS_3D( StratigraphicPoint );
35 | ALIAS_2D( Point );
36 | } // namespace geode
37 |
38 | namespace geode
39 | {
40 | /*!
41 | * Class managing modifications of a StratigraphicModel
42 | */
43 | class opengeode_geosciences_implicit_api StratigraphicModelBuilder
44 | : public ImplicitStructuralModelBuilder
45 | {
46 | public:
47 | explicit StratigraphicModelBuilder(
48 | StratigraphicModel& stratigraphic_model_ );
49 |
50 | ModelCopyMapping copy( const StratigraphicModel& implicit_model );
51 |
52 | void reinitialize_stratigraphic_query_trees();
53 |
54 | void instantiate_stratigraphic_attribute_on_blocks();
55 |
56 | void set_stratigraphic_location(
57 | const Block3D& block, index_t vertex_id, Point2D value );
58 |
59 | void set_stratigraphic_coordinates( const Block3D& block,
60 | index_t vertex_id,
61 | const StratigraphicPoint3D& value );
62 |
63 | private:
64 | StratigraphicModel& stratigraphic_model_;
65 | };
66 | } // namespace geode
67 |
--------------------------------------------------------------------------------
/include/geode/geosciences/implicit/representation/builder/stratigraphic_section_builder.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 | #include
28 |
29 | namespace geode
30 | {
31 | class StratigraphicSection;
32 | FORWARD_DECLARATION_DIMENSION_CLASS( StratigraphicPoint );
33 | FORWARD_DECLARATION_DIMENSION_CLASS( Point );
34 | ALIAS_2D( StratigraphicPoint );
35 | ALIAS_1D( Point );
36 | } // namespace geode
37 |
38 | namespace geode
39 | {
40 | /*!
41 | * Class managing modifications of a StratigraphicSection
42 | */
43 | class opengeode_geosciences_implicit_api StratigraphicSectionBuilder
44 | : public ImplicitCrossSectionBuilder
45 | {
46 | public:
47 | explicit StratigraphicSectionBuilder(
48 | StratigraphicSection& stratigraphic_section );
49 |
50 | ModelCopyMapping copy(
51 | const StratigraphicSection& stratigraphic_section );
52 |
53 | void reinitialize_stratigraphic_query_trees();
54 |
55 | void instantiate_stratigraphic_attribute_on_surfaces();
56 |
57 | void set_stratigraphic_location(
58 | const Surface2D& surface, index_t vertex_id, Point1D value );
59 |
60 | void set_stratigraphic_coordinates( const Surface2D& surface,
61 | index_t vertex_id,
62 | const StratigraphicPoint2D& value );
63 |
64 | private:
65 | StratigraphicSection& stratigraphic_section_;
66 | };
67 | } // namespace geode
68 |
--------------------------------------------------------------------------------
/include/geode/geosciences/implicit/representation/io/geode/geode_horizons_stack_input.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 | #include
28 |
29 | namespace geode
30 | {
31 | template < index_t dimension >
32 | class OpenGeodeHorizonsStackInput final
33 | : public HorizonsStackInput< dimension >
34 | {
35 | public:
36 | explicit OpenGeodeHorizonsStackInput( std::string_view filename )
37 | : HorizonsStackInput< dimension >( filename )
38 | {
39 | }
40 |
41 | [[nodiscard]] static std::string_view extension()
42 | {
43 | return HorizonsStack< dimension >::native_extension_static();
44 | }
45 |
46 | void load_horizons_stack_files(
47 | HorizonsStack< dimension >& horizons_stack,
48 | std::string_view directory );
49 |
50 | [[nodiscard]] HorizonsStack< dimension > read() final;
51 | };
52 | ALIAS_2D_AND_3D( OpenGeodeHorizonsStackInput );
53 | } // namespace geode
54 |
--------------------------------------------------------------------------------
/include/geode/geosciences/implicit/representation/io/geode/geode_implicit_cross_section_input.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 | #include
28 |
29 | namespace geode
30 | {
31 | class opengeode_geosciences_implicit_api OpenGeodeImplicitCrossSectionInput
32 | final : public ImplicitCrossSectionInput
33 | {
34 | public:
35 | explicit OpenGeodeImplicitCrossSectionInput( std::string_view filename )
36 | : ImplicitCrossSectionInput( filename )
37 | {
38 | }
39 |
40 | [[nodiscard]] static std::string_view extension()
41 | {
42 | return ImplicitCrossSection::native_extension_static();
43 | }
44 |
45 | [[nodiscard]] ImplicitCrossSection read() final;
46 | };
47 |
48 | namespace detail
49 | {
50 | void opengeode_geosciences_implicit_api
51 | load_implicit_cross_section_files(
52 | ImplicitCrossSection& section, std::string_view directory );
53 | } // namespace detail
54 | } // namespace geode
55 |
--------------------------------------------------------------------------------
/include/geode/geosciences/implicit/representation/io/geode/geode_implicit_cross_section_output.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 | #include
28 |
29 | #include
30 | #include
31 |
32 | namespace geode
33 | {
34 | class ZipFile;
35 | }
36 |
37 | namespace geode
38 | {
39 | class opengeode_geosciences_implicit_api OpenGeodeImplicitCrossSectionOutput
40 | final : public ImplicitCrossSectionOutput
41 | {
42 | public:
43 | explicit OpenGeodeImplicitCrossSectionOutput(
44 | std::string_view filename )
45 | : ImplicitCrossSectionOutput( filename )
46 | {
47 | }
48 |
49 | [[nodiscard]] static std::string_view extension()
50 | {
51 | return ImplicitCrossSection::native_extension_static();
52 | }
53 |
54 | void archive_implicit_section_files( const ZipFile& zip_writer ) const;
55 |
56 | void save_implicit_section_files(
57 | const ImplicitCrossSection& implicit_section,
58 | std::string_view directory ) const;
59 |
60 | std::vector< std::string > write(
61 | const ImplicitCrossSection& implicit_section ) const final;
62 | };
63 | } // namespace geode
64 |
--------------------------------------------------------------------------------
/include/geode/geosciences/implicit/representation/io/geode/geode_implicit_structural_model_input.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 | #include
28 |
29 | namespace geode
30 | {
31 | class opengeode_geosciences_implicit_api
32 | OpenGeodeImplicitStructuralModelInput final
33 | : public ImplicitStructuralModelInput
34 | {
35 | public:
36 | explicit OpenGeodeImplicitStructuralModelInput(
37 | std::string_view filename )
38 | : ImplicitStructuralModelInput( filename )
39 | {
40 | }
41 |
42 | [[nodiscard]] static std::string_view extension()
43 | {
44 | return ImplicitStructuralModel::native_extension_static();
45 | }
46 |
47 | [[nodiscard]] ImplicitStructuralModel read() final;
48 | };
49 |
50 | namespace detail
51 | {
52 | void opengeode_geosciences_implicit_api
53 | load_implicit_structural_model_files(
54 | ImplicitStructuralModel& model, std::string_view directory );
55 | } // namespace detail
56 | } // namespace geode
57 |
--------------------------------------------------------------------------------
/include/geode/geosciences/implicit/representation/io/geode/geode_implicit_structural_model_output.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 | #include
28 |
29 | #include
30 | #include
31 |
32 | namespace geode
33 | {
34 | class ZipFile;
35 | }
36 |
37 | namespace geode
38 | {
39 | class opengeode_geosciences_implicit_api
40 | OpenGeodeImplicitStructuralModelOutput final
41 | : public ImplicitStructuralModelOutput
42 | {
43 | public:
44 | explicit OpenGeodeImplicitStructuralModelOutput(
45 | std::string_view filename )
46 | : ImplicitStructuralModelOutput( filename )
47 | {
48 | }
49 |
50 | [[nodiscard]] static std::string_view extension()
51 | {
52 | return ImplicitStructuralModel::native_extension_static();
53 | }
54 |
55 | void archive_implicit_model_files( const ZipFile& zip_writer ) const;
56 |
57 | void save_implicit_model_files(
58 | const ImplicitStructuralModel& implicit_model,
59 | std::string_view directory ) const;
60 |
61 | std::vector< std::string > write(
62 | const ImplicitStructuralModel& implicit_model ) const final;
63 | };
64 | } // namespace geode
65 |
--------------------------------------------------------------------------------
/include/geode/geosciences/implicit/representation/io/horizons_stack_input.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 |
28 | #include
29 | #include
30 |
31 | #include
32 |
33 | namespace geode
34 | {
35 | FORWARD_DECLARATION_DIMENSION_CLASS( HorizonsStack );
36 | FORWARD_DECLARATION_DIMENSION_CLASS( HorizonsStackBuilder );
37 | } // namespace geode
38 |
39 | namespace geode
40 | {
41 | /*!
42 | * API function for loading a HorizonsStack.
43 | * The adequate loader is called depending on the filename extension.
44 | * @param[in] filename Path to the file to load.
45 | * @return Loaded HorizonsStack.
46 | */
47 | template < index_t dimension >
48 | [[nodiscard]] HorizonsStack< dimension > load_horizons_stack(
49 | std::string_view filename );
50 |
51 | template < index_t dimension >
52 | class HorizonsStackInput : public Input< HorizonsStack< dimension > >
53 | {
54 | public:
55 | using Base = Input< HorizonsStack< dimension > >;
56 | using typename Base::InputData;
57 | using typename Base::MissingFiles;
58 |
59 | protected:
60 | explicit HorizonsStackInput( std::string_view filename )
61 | : Base{ filename }
62 | {
63 | }
64 | };
65 |
66 | template < index_t dimension >
67 | [[nodiscard]] typename HorizonsStackInput< dimension >::MissingFiles
68 | check_horizons_stack_missing_files( std::string_view filename );
69 |
70 | template < index_t dimension >
71 | [[nodiscard]] bool is_horizons_stack_loadable( std::string_view filename );
72 |
73 | template < index_t dimension >
74 | using HorizonsStackInputFactory = Factory< std::string,
75 | HorizonsStackInput< dimension >,
76 | std::string_view >;
77 | ALIAS_2D_AND_3D( HorizonsStackInputFactory );
78 | } // namespace geode
79 |
--------------------------------------------------------------------------------
/include/geode/geosciences/implicit/representation/io/horizons_stack_output.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 | #include
28 | #include
29 |
30 | #include
31 | #include
32 |
33 | #include
34 |
35 | namespace geode
36 | {
37 | FORWARD_DECLARATION_DIMENSION_CLASS( HorizonsStack );
38 | FORWARD_DECLARATION_DIMENSION_CLASS( HorizonsStackBuilder );
39 | } // namespace geode
40 |
41 | namespace geode
42 | {
43 | /*!
44 | * API function for saving a HorizonsStack.
45 | * The adequate saver is called depending on the given filename extension.
46 | * @param[in] horizons_stack HorizonsStack to save.
47 | * @param[in] filename Path to the file where save the brep.
48 | */
49 | template < index_t dimension >
50 | std::vector< std::string > save_horizons_stack(
51 | const HorizonsStack< dimension >& horizons_stack,
52 | std::string_view filename );
53 |
54 | template < index_t dimension >
55 | class HorizonsStackOutput : public Output< HorizonsStack< dimension > >
56 | {
57 | protected:
58 | explicit HorizonsStackOutput( std::string_view filename )
59 | : Output< HorizonsStack< dimension > >{ filename }
60 | {
61 | }
62 | };
63 | ALIAS_2D_AND_3D( HorizonsStackOutput );
64 |
65 | template < index_t dimension >
66 | using HorizonsStackOutputFactory = Factory< std::string,
67 | HorizonsStackOutput< dimension >,
68 | std::string_view >;
69 | ALIAS_2D_AND_3D( HorizonsStackOutputFactory );
70 | } // namespace geode
71 |
--------------------------------------------------------------------------------
/include/geode/geosciences/implicit/representation/io/implicit_cross_section_input.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 |
28 | #include
29 | #include
30 |
31 | #include
32 |
33 | namespace geode
34 | {
35 | class ImplicitCrossSection;
36 | } // namespace geode
37 |
38 | namespace geode
39 | {
40 | /*!
41 | * API function for loading an ImplicitCrossSection.
42 | * The adequate loader is called depending on the filename extension.
43 | * @param[in] filename Path to the file to load.
44 | */
45 | [[nodiscard]] ImplicitCrossSection opengeode_geosciences_implicit_api
46 | load_implicit_cross_section( std::string_view filename );
47 |
48 | class ImplicitCrossSectionInput : public Input< ImplicitCrossSection >
49 | {
50 | public:
51 | using Base = Input< ImplicitCrossSection >;
52 | using typename Base::InputData;
53 | using typename Base::MissingFiles;
54 |
55 | protected:
56 | explicit ImplicitCrossSectionInput( std::string_view filename )
57 | : Base{ filename }
58 | {
59 | }
60 | };
61 |
62 | [[nodiscard]] ImplicitCrossSectionInput::MissingFiles
63 | opengeode_geosciences_implicit_api
64 | check_implicit_cross_section_missing_files( std::string_view filename );
65 |
66 | [[nodiscard]] bool opengeode_geosciences_implicit_api
67 | is_implicit_cross_section_loadable( std::string_view filename );
68 |
69 | using ImplicitCrossSectionInputFactory =
70 | Factory< std::string, ImplicitCrossSectionInput, std::string_view >;
71 | } // namespace geode
72 |
--------------------------------------------------------------------------------
/include/geode/geosciences/implicit/representation/io/implicit_cross_section_output.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 | #include
28 | #include
29 |
30 | #include
31 | #include
32 |
33 | #include
34 |
35 | namespace geode
36 | {
37 | class ImplicitCrossSection;
38 | } // namespace geode
39 |
40 | namespace geode
41 | {
42 | /*!
43 | * API function for saving an ImplicitCrossSection.
44 | * The adequate saver is called depending on the given filename extension.
45 | * @param[in] implicit_model ImplicitCrossSection to save.
46 | * @param[in] filename Path to the file where save the
47 | * ImplicitCrossSection.
48 | */
49 | std::vector< std::string > opengeode_geosciences_implicit_api
50 | save_implicit_cross_section( const ImplicitCrossSection& implicit_model,
51 | std::string_view filename );
52 |
53 | class ImplicitCrossSectionOutput : public Output< ImplicitCrossSection >
54 | {
55 | public:
56 | virtual ~ImplicitCrossSectionOutput() = default;
57 |
58 | protected:
59 | explicit ImplicitCrossSectionOutput( std::string_view filename )
60 | : Output< ImplicitCrossSection >{ filename }
61 | {
62 | }
63 | };
64 |
65 | [[nodiscard]] bool opengeode_geosciences_implicit_api
66 | is_implicit_cross_section_saveable(
67 | const ImplicitCrossSection& section, std::string_view filename );
68 |
69 | using ImplicitCrossSectionOutputFactory =
70 | Factory< std::string, ImplicitCrossSectionOutput, std::string_view >;
71 | } // namespace geode
72 |
--------------------------------------------------------------------------------
/include/geode/geosciences/implicit/representation/io/implicit_structural_model_input.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 |
28 | #include
29 | #include
30 |
31 | #include
32 |
33 | namespace geode
34 | {
35 | class ImplicitStructuralModel;
36 | } // namespace geode
37 |
38 | namespace geode
39 | {
40 | /*!
41 | * API function for loading an ImplicitStructuralModel.
42 | * The adequate loader is called depending on the filename extension.
43 | * @param[in] filename Path to the file to load.
44 | */
45 | [[nodiscard]] ImplicitStructuralModel opengeode_geosciences_implicit_api
46 | load_implicit_structural_model( std::string_view filename );
47 |
48 | class ImplicitStructuralModelInput : public Input< ImplicitStructuralModel >
49 | {
50 | public:
51 | using Base = Input< ImplicitStructuralModel >;
52 | using typename Base::InputData;
53 | using typename Base::MissingFiles;
54 |
55 | protected:
56 | explicit ImplicitStructuralModelInput( std::string_view filename )
57 | : Base{ filename }
58 | {
59 | }
60 | };
61 |
62 | [[nodiscard]] ImplicitStructuralModelInput::MissingFiles
63 | opengeode_geosciences_implicit_api
64 | check_implicit_structural_model_missing_files(
65 | std::string_view filename );
66 |
67 | [[nodiscard]] bool opengeode_geosciences_implicit_api
68 | is_implicit_structural_model_loadable( std::string_view filename );
69 |
70 | using ImplicitStructuralModelInputFactory =
71 | Factory< std::string, ImplicitStructuralModelInput, std::string_view >;
72 | } // namespace geode
73 |
--------------------------------------------------------------------------------
/include/geode/geosciences/implicit/representation/io/implicit_structural_model_output.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 | #include
28 | #include
29 |
30 | #include
31 | #include
32 |
33 | #include
34 |
35 | namespace geode
36 | {
37 | class ImplicitStructuralModel;
38 | } // namespace geode
39 |
40 | namespace geode
41 | {
42 | /*!
43 | * API function for saving an ImplicitStructuralModel.
44 | * The adequate saver is called depending on the given filename extension.
45 | * @param[in] implicit_model ImplicitStructuralModel to save.
46 | * @param[in] filename Path to the file where save the
47 | * ImplicitStructuralModel.
48 | */
49 | std::vector< std::string >
50 | opengeode_geosciences_implicit_api save_implicit_structural_model(
51 | const ImplicitStructuralModel& implicit_model,
52 | std::string_view filename );
53 |
54 | class opengeode_geosciences_implicit_api ImplicitStructuralModelOutput
55 | : public Output< ImplicitStructuralModel >
56 | {
57 | public:
58 | virtual ~ImplicitStructuralModelOutput() = default;
59 |
60 | protected:
61 | explicit ImplicitStructuralModelOutput( std::string_view filename )
62 | : Output< ImplicitStructuralModel >{ filename }
63 | {
64 | }
65 | };
66 |
67 | [[nodiscard]] bool opengeode_geosciences_implicit_api
68 | is_implicit_structural_model_saveable(
69 | const ImplicitStructuralModel& implicit_model,
70 | std::string_view filename );
71 |
72 | using ImplicitStructuralModelOutputFactory =
73 | Factory< std::string, ImplicitStructuralModelOutput, std::string_view >;
74 | } // namespace geode
75 |
--------------------------------------------------------------------------------
/include/geode/geosciences/implicit/representation/io/stratigraphic_model_input.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 |
28 | #include
29 | #include
30 |
31 | #include
32 |
33 | namespace geode
34 | {
35 | class StratigraphicModel;
36 | } // namespace geode
37 |
38 | namespace geode
39 | {
40 | /*!
41 | * API function for loading a StratigraphicModel.
42 | * The adequate loader is called depending on the filename extension.
43 | * @param[in] filename Path to the file to load.
44 | */
45 | [[nodiscard]] StratigraphicModel opengeode_geosciences_implicit_api
46 | load_stratigraphic_model( std::string_view filename );
47 |
48 | class StratigraphicModelInput : public Input< StratigraphicModel >
49 | {
50 | public:
51 | using Base = Input< StratigraphicModel >;
52 | using typename Base::InputData;
53 | using typename Base::MissingFiles;
54 |
55 | protected:
56 | explicit StratigraphicModelInput( std::string_view filename )
57 | : Base{ filename }
58 | {
59 | }
60 | };
61 |
62 | [[nodiscard]] StratigraphicModelInput::MissingFiles
63 | opengeode_geosciences_implicit_api
64 | check_stratigraphic_model_missing_files( std::string_view filename );
65 |
66 | [[nodiscard]] bool opengeode_geosciences_implicit_api
67 | is_stratigraphic_model_loadable( std::string_view filename );
68 |
69 | using StratigraphicModelInputFactory =
70 | Factory< std::string, StratigraphicModelInput, std::string_view >;
71 | } // namespace geode
72 |
--------------------------------------------------------------------------------
/include/geode/geosciences/implicit/representation/io/stratigraphic_model_output.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 | #include
28 | #include
29 |
30 | #include
31 | #include
32 |
33 | #include
34 |
35 | namespace geode
36 | {
37 | class StratigraphicModel;
38 | } // namespace geode
39 |
40 | namespace geode
41 | {
42 | /*!
43 | * API function for saving a StratigraphicModel.
44 | * The adequate saver is called depending on the given filename extension.
45 | * @param[in] stratigraphic_model StratigraphicModel to save.
46 | * @param[in] filename Path to the file where save the
47 | * StratigraphicModel.
48 | */
49 | std::vector< std::string > opengeode_geosciences_implicit_api
50 | save_stratigraphic_model( const StratigraphicModel& stratigraphic_model,
51 | std::string_view filename );
52 |
53 | class opengeode_geosciences_implicit_api StratigraphicModelOutput
54 | : public Output< StratigraphicModel >
55 | {
56 | public:
57 | virtual ~StratigraphicModelOutput() = default;
58 |
59 | protected:
60 | explicit StratigraphicModelOutput( std::string_view filename )
61 | : Output< StratigraphicModel >{ filename }
62 | {
63 | }
64 | };
65 |
66 | [[nodiscard]] bool opengeode_geosciences_implicit_api
67 | is_stratigraphic_model_saveable(
68 | const StratigraphicModel& stratigraphic_model,
69 | std::string_view filename );
70 |
71 | using StratigraphicModelOutputFactory =
72 | Factory< std::string, StratigraphicModelOutput, std::string_view >;
73 | } // namespace geode
74 |
--------------------------------------------------------------------------------
/include/geode/geosciences/implicit/representation/io/stratigraphic_section_input.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 |
28 | #include
29 | #include
30 |
31 | #include
32 |
33 | namespace geode
34 | {
35 | class StratigraphicSection;
36 | } // namespace geode
37 |
38 | namespace geode
39 | {
40 | /*!
41 | * API function for loading a StratigraphicSection.
42 | * The adequate loader is called depending on the filename extension.
43 | * @param[in] filename Path to the file to load.
44 | */
45 | [[nodiscard]] StratigraphicSection opengeode_geosciences_implicit_api
46 | load_stratigraphic_section( std::string_view filename );
47 |
48 | class StratigraphicSectionInput : public Input< StratigraphicSection >
49 | {
50 | public:
51 | using Base = Input< StratigraphicSection >;
52 | using typename Base::InputData;
53 | using typename Base::MissingFiles;
54 |
55 | protected:
56 | explicit StratigraphicSectionInput( std::string_view filename )
57 | : Base{ filename }
58 | {
59 | }
60 | };
61 |
62 | [[nodiscard]] StratigraphicSectionInput::MissingFiles
63 | opengeode_geosciences_implicit_api
64 | check_stratigraphic_section_missing_files( std::string_view filename );
65 |
66 | [[nodiscard]] bool opengeode_geosciences_implicit_api
67 | is_stratigraphic_section_loadable( std::string_view filename );
68 |
69 | using StratigraphicSectionInputFactory =
70 | Factory< std::string, StratigraphicSectionInput, std::string_view >;
71 | } // namespace geode
72 |
--------------------------------------------------------------------------------
/include/geode/geosciences/implicit/representation/io/stratigraphic_section_output.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 | #include
28 | #include
29 |
30 | #include
31 | #include
32 |
33 | #include
34 |
35 | namespace geode
36 | {
37 | class StratigraphicSection;
38 | } // namespace geode
39 |
40 | namespace geode
41 | {
42 | /*!
43 | * API function for saving a StratigraphicSection.
44 | * The adequate saver is called depending on the given filename extension.
45 | * @param[in] stratigraphic_section StratigraphicSection to save.
46 | * @param[in] filename Path to the file where save the
47 | * StratigraphicSection.
48 | */
49 | std::vector< std::string >
50 | opengeode_geosciences_implicit_api save_stratigraphic_section(
51 | const StratigraphicSection& stratigraphic_section,
52 | std::string_view filename );
53 |
54 | class StratigraphicSectionOutput : public Output< StratigraphicSection >
55 | {
56 | public:
57 | virtual ~StratigraphicSectionOutput() = default;
58 |
59 | protected:
60 | explicit StratigraphicSectionOutput( std::string_view filename )
61 | : Output< StratigraphicSection >{ filename }
62 | {
63 | }
64 | };
65 |
66 | [[nodiscard]] bool opengeode_geosciences_implicit_api
67 | is_stratigraphic_section_saveable(
68 | const StratigraphicSection& stratigraphic_section,
69 | std::string_view filename );
70 |
71 | using StratigraphicSectionOutputFactory =
72 | Factory< std::string, StratigraphicSectionOutput, std::string_view >;
73 | } // namespace geode
74 |
--------------------------------------------------------------------------------
/src/geode/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2019 - 2025 Geode-solutions
2 | #
3 | # Permission is hereby granted, free of charge, to any person obtaining a copy
4 | # of this software and associated documentation files (the "Software"), to deal
5 | # in the Software without restriction, including without limitation the rights
6 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | # copies of the Software, and to permit persons to whom the Software is
8 | # furnished to do so, subject to the following conditions:
9 | #
10 | # The above copyright notice and this permission notice shall be included in
11 | # all copies or substantial portions of the Software.
12 | #
13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | # SOFTWARE.
20 |
21 | add_subdirectory(geosciences)
22 |
--------------------------------------------------------------------------------
/src/geode/geosciences/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2019 - 2025 Geode-solutions
2 | #
3 | # Permission is hereby granted, free of charge, to any person obtaining a copy
4 | # of this software and associated documentation files (the "Software"), to deal
5 | # in the Software without restriction, including without limitation the rights
6 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | # copies of the Software, and to permit persons to whom the Software is
8 | # furnished to do so, subject to the following conditions:
9 | #
10 | # The above copyright notice and this permission notice shall be included in
11 | # all copies or substantial portions of the Software.
12 | #
13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | # SOFTWARE.
20 |
21 | add_subdirectory(explicit)
22 | add_subdirectory(implicit)
23 |
--------------------------------------------------------------------------------
/src/geode/geosciences/explicit/mixin/builder/fault_blocks_builder.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #include
25 |
26 | #include
27 | #include
28 |
29 | namespace geode
30 | {
31 | template < index_t dimension >
32 | const uuid& FaultBlocksBuilder< dimension >::create_fault_block()
33 | {
34 | return fault_blocks_.create_fault_block( {} );
35 | }
36 |
37 | template < index_t dimension >
38 | void FaultBlocksBuilder< dimension >::create_fault_block(
39 | uuid fault_block_id )
40 | {
41 | fault_blocks_.create_fault_block( std::move( fault_block_id ), {} );
42 | }
43 |
44 | template < index_t dimension >
45 | void FaultBlocksBuilder< dimension >::delete_fault_block(
46 | const FaultBlock< dimension >& fault_block )
47 | {
48 | fault_blocks_.delete_fault_block( fault_block, {} );
49 | }
50 |
51 | template < index_t dimension >
52 | void FaultBlocksBuilder< dimension >::load_fault_blocks(
53 | std::string_view directory )
54 | {
55 | return fault_blocks_.load_fault_blocks( directory, {} );
56 | }
57 |
58 | template < index_t dimension >
59 | void FaultBlocksBuilder< dimension >::set_fault_block_name(
60 | const uuid& id, std::string_view name )
61 | {
62 | fault_blocks_.modifiable_fault_block( id, {} ).set_fault_block_name(
63 | name, typename FaultBlock< dimension >::FaultBlocksBuilderKey{} );
64 | }
65 |
66 | template class opengeode_geosciences_explicit_api FaultBlocksBuilder< 2 >;
67 | template class opengeode_geosciences_explicit_api FaultBlocksBuilder< 3 >;
68 | } // namespace geode
69 |
--------------------------------------------------------------------------------
/src/geode/geosciences/explicit/mixin/core/fault_block.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #include
25 |
26 | #include
27 |
28 | namespace geode
29 | {
30 | template < index_t dimension >
31 | FaultBlock< dimension >::FaultBlock() = default;
32 |
33 | template < index_t dimension >
34 | FaultBlock< dimension >::FaultBlock( FaultBlock&& ) noexcept = default;
35 |
36 | template < index_t dimension >
37 | FaultBlock< dimension >::~FaultBlock() = default;
38 |
39 | template < index_t dimension >
40 | template < typename Archive >
41 | void FaultBlock< dimension >::serialize( Archive& archive )
42 | {
43 | archive.ext( *this,
44 | Growable< Archive, FaultBlock >{
45 | { []( Archive& a, FaultBlock& fault_block ) {
46 | a.ext( fault_block,
47 | bitsery::ext::BaseClass< Component< dimension > >{} );
48 | } } } );
49 | }
50 |
51 | template class opengeode_geosciences_explicit_api FaultBlock< 2 >;
52 | template class opengeode_geosciences_explicit_api FaultBlock< 3 >;
53 |
54 | SERIALIZE_BITSERY_ARCHIVE(
55 | opengeode_geosciences_explicit_api, FaultBlock< 2 > );
56 | SERIALIZE_BITSERY_ARCHIVE(
57 | opengeode_geosciences_explicit_api, FaultBlock< 3 > );
58 | } // namespace geode
59 |
--------------------------------------------------------------------------------
/src/geode/geosciences/explicit/mixin/core/stratigraphic_unit.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #include
25 |
26 | #include
27 |
28 | namespace geode
29 | {
30 | template < index_t dimension >
31 | StratigraphicUnit< dimension >::StratigraphicUnit() = default;
32 | template < index_t dimension >
33 | StratigraphicUnit< dimension >::StratigraphicUnit(
34 | StratigraphicUnit&& ) noexcept = default;
35 |
36 | template < index_t dimension >
37 | StratigraphicUnit< dimension >::~StratigraphicUnit() = default;
38 |
39 | template < index_t dimension >
40 | template < typename Archive >
41 | void StratigraphicUnit< dimension >::serialize( Archive& archive )
42 | {
43 | archive.ext( *this,
44 | Growable< Archive, StratigraphicUnit >{
45 | { []( Archive& a, StratigraphicUnit& strati_unit ) {
46 | a.ext( strati_unit,
47 | bitsery::ext::BaseClass< Component< dimension > >{} );
48 | } } } );
49 | }
50 |
51 | template class opengeode_geosciences_explicit_api StratigraphicUnit< 2 >;
52 | template class opengeode_geosciences_explicit_api StratigraphicUnit< 3 >;
53 |
54 | SERIALIZE_BITSERY_ARCHIVE(
55 | opengeode_geosciences_explicit_api, StratigraphicUnit< 2 > );
56 | SERIALIZE_BITSERY_ARCHIVE(
57 | opengeode_geosciences_explicit_api, StratigraphicUnit< 3 > );
58 | } // namespace geode
59 |
--------------------------------------------------------------------------------
/src/geode/geosciences/explicit/representation/io/cross_section_output.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #include
25 |
26 | #include
27 | #include
28 | #include
29 |
30 | #include
31 | #include
32 | #include
33 |
34 | #include
35 |
36 | #include
37 |
38 | namespace geode
39 | {
40 | std::vector< std::string > save_cross_section(
41 | const CrossSection& cross_section, std::string_view filename )
42 | {
43 | constexpr auto TYPE = "CrossSection";
44 | try
45 | {
46 | return detail::geode_object_output_impl<
47 | CrossSectionOutputFactory >( TYPE, cross_section, filename );
48 | }
49 | catch( const OpenGeodeException& e )
50 | {
51 | Logger::error( e.what() );
52 | print_available_extensions< CrossSectionOutputFactory >( TYPE );
53 | Logger::info( "Other extensions are available in parent classes." );
54 | print_available_extensions< SectionOutputFactory >( "Section" );
55 | throw OpenGeodeException{ "Cannot save CrossSection in file: ",
56 | filename };
57 | }
58 | }
59 |
60 | bool is_cross_section_saveable(
61 | const CrossSection& cross_section, std::string_view filename )
62 | {
63 | const auto output =
64 | detail::geode_object_output_writer< CrossSectionOutputFactory >(
65 | filename );
66 | return output->is_saveable( cross_section );
67 | }
68 | } // namespace geode
69 |
--------------------------------------------------------------------------------
/src/geode/geosciences/explicit/representation/io/structural_model_output.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #include
25 |
26 | #include
27 | #include
28 | #include
29 |
30 | #include
31 | #include
32 | #include
33 |
34 | #include
35 |
36 | #include
37 |
38 | namespace geode
39 | {
40 | std::vector< std::string > save_structural_model(
41 | const StructuralModel& structural_model, std::string_view filename )
42 | {
43 | constexpr auto TYPE = "StructuralModel";
44 | try
45 | {
46 | return detail::geode_object_output_impl<
47 | StructuralModelOutputFactory >(
48 | TYPE, structural_model, filename );
49 | }
50 | catch( const OpenGeodeException& e )
51 | {
52 | Logger::error( e.what() );
53 | print_available_extensions< StructuralModelOutputFactory >( TYPE );
54 | Logger::info( "Other extensions are available in parent classes." );
55 | print_available_extensions< BRepOutputFactory >( "BRep" );
56 | throw OpenGeodeException{ "Cannot save StructuralModel in file: ",
57 | filename };
58 | }
59 | }
60 |
61 | bool is_structural_model_saveable(
62 | const StructuralModel& structural_model, std::string_view filename )
63 | {
64 | const auto output =
65 | detail::geode_object_output_writer< StructuralModelOutputFactory >(
66 | filename );
67 | return output->is_saveable( structural_model );
68 | }
69 | } // namespace geode
70 |
--------------------------------------------------------------------------------
/tests/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2019 - 2025 Geode-solutions
2 | #
3 | # Permission is hereby granted, free of charge, to any person obtaining a copy
4 | # of this software and associated documentation files (the "Software"), to deal
5 | # in the Software without restriction, including without limitation the rights
6 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | # copies of the Software, and to permit persons to whom the Software is
8 | # furnished to do so, subject to the following conditions:
9 | #
10 | # The above copyright notice and this permission notice shall be included in
11 | # all copies or substantial portions of the Software.
12 | #
13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | # SOFTWARE.
20 |
21 | cmake_minimum_required(VERSION 3.15)
22 |
23 | if(NOT TARGET OpenGeode-Geosciences::implicit)
24 | project(OpenGeode-Geosciences CXX)
25 | find_package(OpenGeode REQUIRED CONFIG)
26 | find_package(OpenGeode-Geosciences REQUIRED CONFIG)
27 | enable_testing()
28 | endif()
29 |
30 | set(DATA_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/data)
31 | set(test_config_file_in ${CMAKE_CURRENT_LIST_DIR}/tests_config.hpp.in)
32 | set(test_config_file ${PROJECT_BINARY_DIR}/geode/tests_config.hpp)
33 | configure_file(${test_config_file_in} ${test_config_file})
34 | include_directories(${PROJECT_BINARY_DIR})
35 |
36 | add_subdirectory(explicit)
37 | add_subdirectory(implicit)
38 |
--------------------------------------------------------------------------------
/tests/data/3patches.og_tsf2d:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Geode-solutions/OpenGeode-Geosciences/22f465b5d391e9b80bea1e7cb6a1527dd4ea4f58/tests/data/3patches.og_tsf2d
--------------------------------------------------------------------------------
/tests/data/test_section.og_sctn:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Geode-solutions/OpenGeode-Geosciences/22f465b5d391e9b80bea1e7cb6a1527dd4ea4f58/tests/data/test_section.og_sctn
--------------------------------------------------------------------------------
/tests/data/vri2.og_strm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Geode-solutions/OpenGeode-Geosciences/22f465b5d391e9b80bea1e7cb6a1527dd4ea4f58/tests/data/vri2.og_strm
--------------------------------------------------------------------------------
/tests/explicit/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2019 - 2025 Geode-solutions
2 | #
3 | # Permission is hereby granted, free of charge, to any person obtaining a copy
4 | # of this software and associated documentation files (the "Software"), to deal
5 | # in the Software without restriction, including without limitation the rights
6 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | # copies of the Software, and to permit persons to whom the Software is
8 | # furnished to do so, subject to the following conditions:
9 | #
10 | # The above copyright notice and this permission notice shall be included in
11 | # all copies or substantial portions of the Software.
12 | #
13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | # SOFTWARE.
20 |
21 | add_geode_test(
22 | SOURCE "test-cross-section.cpp"
23 | DEPENDENCIES
24 | OpenGeode::basic
25 | OpenGeode::model
26 | ${PROJECT_NAME}::explicit
27 | )
28 |
29 | add_geode_test(
30 | SOURCE "test-geographic-coordinate-system.cpp"
31 | DEPENDENCIES
32 | OpenGeode::basic
33 | ${PROJECT_NAME}::explicit
34 | )
35 |
36 | add_geode_test(
37 | SOURCE "test-structural-model.cpp"
38 | DEPENDENCIES
39 | OpenGeode::basic
40 | OpenGeode::model
41 | ${PROJECT_NAME}::explicit
42 | ESSENTIAL
43 | )
44 |
--------------------------------------------------------------------------------
/tests/implicit/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2019 - 2025 Geode-solutions
2 | #
3 | # Permission is hereby granted, free of charge, to any person obtaining a copy
4 | # of this software and associated documentation files (the "Software"), to deal
5 | # in the Software without restriction, including without limitation the rights
6 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | # copies of the Software, and to permit persons to whom the Software is
8 | # furnished to do so, subject to the following conditions:
9 | #
10 | # The above copyright notice and this permission notice shall be included in
11 | # all copies or substantial portions of the Software.
12 | #
13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | # SOFTWARE.
20 |
21 |
22 | add_geode_test(
23 | SOURCE "test-horizons-stack.cpp"
24 | DEPENDENCIES
25 | OpenGeode::basic
26 | OpenGeode::geometry
27 | OpenGeode::mesh
28 | OpenGeode::model
29 | ${PROJECT_NAME}::explicit
30 | ${PROJECT_NAME}::implicit
31 | )
32 |
33 | add_geode_test(
34 | SOURCE "test-stratigraphic-section.cpp"
35 | DEPENDENCIES
36 | OpenGeode::basic
37 | OpenGeode::geometry
38 | OpenGeode::mesh
39 | OpenGeode::model
40 | ${PROJECT_NAME}::explicit
41 | ${PROJECT_NAME}::implicit
42 | )
43 |
44 | add_geode_test(
45 | SOURCE "test-stratigraphic-model.cpp"
46 | DEPENDENCIES
47 | OpenGeode::basic
48 | OpenGeode::geometry
49 | OpenGeode::mesh
50 | OpenGeode::model
51 | ${PROJECT_NAME}::explicit
52 | ${PROJECT_NAME}::implicit
53 | ESSENTIAL
54 | )
55 |
--------------------------------------------------------------------------------
/tests/tests_config.hpp.in:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 - 2025 Geode-solutions
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | *
22 | */
23 |
24 | #pragma once
25 |
26 | #include
27 |
28 | namespace geode
29 | {
30 | /* Absolute path to test source directory */
31 | static constexpr auto DATA_PATH = "@DATA_DIRECTORY@/";
32 | } // namespace geode
33 |
--------------------------------------------------------------------------------
/upgrade-guide.md:
--------------------------------------------------------------------------------
1 | # Upgrade Guide
2 |
3 | ## Upgrading from OpenGeode-Geosciences v4.x.x to v5.0.0
4 |
5 | ### Motivations
6 |
7 | This new major release adds a new library for implicit DataModels, and renames the previous library.
8 |
9 | ### Breaking Changes
10 |
11 | - Replace import files previously from `geode/geosciences/*` to `geode/geosciences/explicit/*`.
12 |
13 |
14 | ## Upgrading from OpenGeode-Geosciences v3.x.x to v4.0.0
15 |
16 | ### Motivations
17 |
18 | This new major release is to formalize PyPI support for OpenGeode.
19 |
20 | ### Breaking Changes
21 |
22 | - **CMake**: CMake minimum requirement has been upgraded to 3.14 to ease import of PyPI modules.
23 |
24 |
25 | ## Upgrading from OpenGeode-Geosciences v2.x.x to v3.0.0
26 |
27 | ### Motivations
28 |
29 | Homogenize CMake project and macro names with repository name.
30 |
31 | ### Breaking Changes
32 |
33 | - Replace `OpenGeode_Geosciences` by `OpenGeode-Geosciences`. For example:
34 | `OpenGeode_Geosciences::geosciences` is replaced by `OpenGeode-Geosciences::geosciences`.
35 |
36 |
37 | ## Upgrading from OpenGeode-Geosciences v1.x.x to v2.0.0
38 |
39 | ### Motivations
40 |
41 | Following the same organization principle than OpenGeode v2.
42 |
43 | ### Breaking Changes
44 |
45 | - Files have been reorganized by adding two folders: mixin and representation.
46 |
--------------------------------------------------------------------------------