Skip to content

Commit 47dc91f

Browse files
committed
feat(Registry): integrate OpenGeode component registry
1 parent b0d9783 commit 47dc91f

18 files changed

+229
-142
lines changed

include/geode/geosciences/explicit/mixin/core/fault_blocks.hpp

+6
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ namespace geode
4646

4747
public:
4848
using Builder = FaultBlocksBuilder< dimension >;
49+
using Type = FaultBlock< dimension >;
4950

5051
class opengeode_geosciences_explicit_api FaultBlockRangeBase
5152
{
@@ -97,6 +98,11 @@ namespace geode
9798

9899
[[nodiscard]] FaultBlockRange fault_blocks() const;
99100

101+
[[nodiscard]] FaultBlockRange components() const
102+
{
103+
return fault_blocks();
104+
}
105+
100106
void save_fault_blocks( std::string_view directory ) const;
101107

102108
protected:

include/geode/geosciences/explicit/mixin/core/faults.hpp

+6
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ namespace geode
4646

4747
public:
4848
using Builder = FaultsBuilder< dimension >;
49+
using Type = Fault< dimension >;
4950

5051
class opengeode_geosciences_explicit_api FaultRangeBase
5152
{
@@ -96,6 +97,11 @@ namespace geode
9697

9798
[[nodiscard]] FaultRange faults() const;
9899

100+
[[nodiscard]] FaultRange components() const
101+
{
102+
return faults();
103+
}
104+
99105
void save_faults( std::string_view directory ) const;
100106

101107
protected:

include/geode/geosciences/explicit/mixin/core/horizons.hpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ namespace geode
4646

4747
public:
4848
using Builder = HorizonsBuilder< dimension >;
49-
friend Builder;
49+
using Type = Horizon< dimension >;
5050

5151
class opengeode_geosciences_explicit_api HorizonRangeBase
5252
{
@@ -98,6 +98,11 @@ namespace geode
9898

9999
[[nodiscard]] HorizonRange horizons() const;
100100

101+
[[nodiscard]] HorizonRange components() const
102+
{
103+
return horizons();
104+
}
105+
101106
void save_horizons( std::string_view directory ) const;
102107

103108
protected:

include/geode/geosciences/explicit/mixin/core/stratigraphic_units.hpp

+6
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ namespace geode
4747

4848
public:
4949
using Builder = StratigraphicUnitsBuilder< dimension >;
50+
using Type = StratigraphicUnit< dimension >;
5051

5152
class opengeode_geosciences_explicit_api StratigraphicUnitRangeBase
5253
{
@@ -103,6 +104,11 @@ namespace geode
103104

104105
[[nodiscard]] StratigraphicUnitRange stratigraphic_units() const;
105106

107+
[[nodiscard]] StratigraphicUnitRange components() const
108+
{
109+
return stratigraphic_units();
110+
}
111+
106112
void save_stratigraphic_units( std::string_view directory ) const;
107113

108114
protected:

include/geode/geosciences/explicit/representation/builder/cross_section_builder.hpp

+7-6
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,10 @@ namespace geode
7070
[[nodiscard]] const uuid& add_fault(
7171
typename Fault2D::FAULT_TYPE type );
7272

73-
void add_fault( uuid fault_id );
73+
void add_fault( const uuid& fault_id );
7474

75-
void add_fault( uuid fault_id, typename Fault2D::FAULT_TYPE type );
75+
void add_fault(
76+
const uuid& fault_id, typename Fault2D::FAULT_TYPE type );
7677

7778
index_t add_line_in_fault( const Line2D& line, const Fault2D& fault );
7879

@@ -83,10 +84,10 @@ namespace geode
8384
[[nodiscard]] const uuid& add_horizon(
8485
typename Horizon2D::HORIZON_TYPE type );
8586

86-
void add_horizon( uuid horizon_id );
87+
void add_horizon( const uuid& horizon_id );
8788

8889
void add_horizon(
89-
uuid horizon_id, typename Horizon2D::HORIZON_TYPE type );
90+
const uuid& horizon_id, typename Horizon2D::HORIZON_TYPE type );
9091

9192
index_t add_line_in_horizon(
9293
const Line2D& line, const Horizon2D& horizon );
@@ -95,7 +96,7 @@ namespace geode
9596

9697
[[nodiscard]] const uuid& add_fault_block();
9798

98-
void add_fault_block( uuid fault_block_id );
99+
void add_fault_block( const uuid& fault_block_id );
99100

100101
index_t add_surface_in_fault_block(
101102
const Surface2D& surface, const FaultBlock2D& fault_block );
@@ -104,7 +105,7 @@ namespace geode
104105

105106
[[nodiscard]] const uuid& add_stratigraphic_unit();
106107

107-
void add_stratigraphic_unit( uuid stratigraphic_unit_id );
108+
void add_stratigraphic_unit( const uuid& stratigraphic_unit_id );
108109

109110
index_t add_surface_in_stratigraphic_unit( const Surface2D& surface,
110111
const StratigraphicUnit2D& stratigraphic_unit );

include/geode/geosciences/explicit/representation/builder/structural_model_builder.hpp

+7-6
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,10 @@ namespace geode
7070
[[nodiscard]] const uuid& add_fault(
7171
typename Fault3D::FAULT_TYPE type );
7272

73-
void add_fault( uuid fault_id );
73+
void add_fault( const uuid& fault_id );
7474

75-
void add_fault( uuid fault_id, typename Fault3D::FAULT_TYPE type );
75+
void add_fault(
76+
const uuid& fault_id, typename Fault3D::FAULT_TYPE type );
7677

7778
index_t add_surface_in_fault(
7879
const Surface3D& surface, const Fault3D& fault );
@@ -84,10 +85,10 @@ namespace geode
8485
[[nodiscard]] const uuid& add_horizon(
8586
typename Horizon3D::HORIZON_TYPE type );
8687

87-
void add_horizon( uuid horizon_id );
88+
void add_horizon( const uuid& horizon_id );
8889

8990
void add_horizon(
90-
uuid horizon_id, typename Horizon3D::HORIZON_TYPE type );
91+
const uuid& horizon_id, typename Horizon3D::HORIZON_TYPE type );
9192

9293
index_t add_surface_in_horizon(
9394
const Surface3D& surface, const Horizon3D& horizon );
@@ -96,7 +97,7 @@ namespace geode
9697

9798
[[nodiscard]] const uuid& add_fault_block();
9899

99-
void add_fault_block( uuid fault_block_id );
100+
void add_fault_block( const uuid& fault_block_id );
100101

101102
index_t add_block_in_fault_block(
102103
const Block3D& block, const FaultBlock3D& fault_block );
@@ -105,7 +106,7 @@ namespace geode
105106

106107
[[nodiscard]] const uuid& add_stratigraphic_unit();
107108

108-
void add_stratigraphic_unit( uuid stratigraphic_unit_id );
109+
void add_stratigraphic_unit( const uuid& stratigraphic_unit_id );
109110

110111
index_t add_block_in_stratigraphic_unit( const Block3D& block,
111112
const StratigraphicUnit3D& stratigraphic_unit );

include/geode/geosciences/explicit/representation/core/cross_section.hpp

+6-5
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,12 @@ namespace geode
139139
public:
140140
static constexpr index_t dim{ 2 };
141141
using Builder = CrossSectionBuilder;
142-
using Components = tuple_cat< Section::Components,
143-
std::tuple< Fault2D,
144-
Horizon2D,
145-
FaultBlock2D,
146-
StratigraphicUnit2D > >;
142+
using CollectionComponents = tuple_cat< Section::CollectionComponents,
143+
std::tuple< Faults2D,
144+
Horizons2D,
145+
FaultBlocks2D,
146+
StratigraphicUnits2D > >;
147+
using Components = tuple_cat< MeshComponents, CollectionComponents >;
147148

148149
CrossSection() = default;
149150
CrossSection( CrossSection&& ) noexcept = default;

include/geode/geosciences/explicit/representation/core/structural_model.hpp

+6-5
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,12 @@ namespace geode
142142
public:
143143
static constexpr index_t dim{ 3 };
144144
using Builder = StructuralModelBuilder;
145-
using Components = tuple_cat< BRep::Components,
146-
std::tuple< Fault3D,
147-
Horizon3D,
148-
FaultBlock3D,
149-
StratigraphicUnit3D > >;
145+
using CollectionComponents = tuple_cat< BRep::CollectionComponents,
146+
std::tuple< Faults3D,
147+
Horizons3D,
148+
FaultBlocks3D,
149+
StratigraphicUnits3D > >;
150+
using Components = tuple_cat< MeshComponents, CollectionComponents >;
150151

151152
StructuralModel() = default;
152153
StructuralModel( StructuralModel&& ) noexcept = default;

include/geode/geosciences/explicit/representation/io/geode/geode_cross_section_input.hpp

+6-3
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,12 @@ namespace geode
3939
return CrossSection::native_extension_static();
4040
}
4141

42-
void load_cross_section_files(
43-
CrossSection& cross_section, std::string_view directory );
44-
4542
[[nodiscard]] CrossSection read() final;
4643
};
44+
45+
namespace detail
46+
{
47+
void load_cross_section_files(
48+
CrossSection& cross_section, std::string_view directory );
49+
} // namespace detail
4750
} // namespace geode

include/geode/geosciences/explicit/representation/io/geode/geode_structural_model_input.hpp

+6-3
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,12 @@ namespace geode
3939
return StructuralModel::native_extension_static();
4040
}
4141

42-
void load_structural_model_files(
43-
StructuralModel& structural_model, std::string_view directory );
44-
4542
[[nodiscard]] StructuralModel read() final;
4643
};
44+
45+
namespace detail
46+
{
47+
void load_structural_model_files(
48+
StructuralModel& structural_model, std::string_view directory );
49+
} // namespace detail
4750
} // namespace geode

include/geode/geosciences/implicit/representation/io/geode/geode_implicit_cross_section_input.hpp

+6-3
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,12 @@ namespace geode
4242
return ImplicitCrossSection::native_extension_static();
4343
}
4444

45-
void load_implicit_cross_section_files(
46-
ImplicitCrossSection& section, std::string_view directory );
47-
4845
[[nodiscard]] ImplicitCrossSection read() final;
4946
};
47+
48+
namespace detail
49+
{
50+
void load_implicit_cross_section_files(
51+
ImplicitCrossSection& section, std::string_view directory );
52+
} // namespace detail
5053
} // namespace geode

include/geode/geosciences/implicit/representation/io/geode/geode_implicit_structural_model_input.hpp

+6-3
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,12 @@ namespace geode
4444
return ImplicitStructuralModel::native_extension_static();
4545
}
4646

47-
void load_implicit_structural_model_files(
48-
ImplicitStructuralModel& model, std::string_view directory );
49-
5047
[[nodiscard]] ImplicitStructuralModel read() final;
5148
};
49+
50+
namespace detail
51+
{
52+
void load_implicit_structural_model_files(
53+
ImplicitStructuralModel& model, std::string_view directory );
54+
} // namespace detail
5255
} // namespace geode

0 commit comments

Comments
 (0)