Skip to content

Commit 748b5c1

Browse files
committed
fix python
1 parent 727aded commit 748b5c1

3 files changed

Lines changed: 11 additions & 6 deletions

File tree

bindings/python/src/implicit/representation/core/helpers.hpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,14 @@ namespace geode
6767
.def( "horizon_id_from_name_2d", &horizon_id_from_name< 2 > )
6868
.def( "horizon_id_from_name_3d", &horizon_id_from_name< 3 > )
6969
.def( "implicit_section_from_cross_section_scalar_field",
70-
[]( CrossSection& model, std::string_view attribute_name ) {
70+
[]( CrossSection& model, const uuid& attribute_id ) {
7171
return implicit_section_from_cross_section_scalar_field(
72-
model.clone(), attribute_name );
72+
model.clone(), attribute_id );
7373
} )
7474
.def( "implicit_model_from_structural_model_scalar_field",
75-
[]( StructuralModel& model,
76-
std::string_view attribute_name ) {
75+
[]( StructuralModel& model, const uuid& attribute_id ) {
7776
return implicit_model_from_structural_model_scalar_field(
78-
model.clone(), attribute_name );
77+
model.clone(), attribute_id );
7978
} )
8079
.def( "stratigraphic_model_from_implicit_model_and_coords",
8180
[]( ImplicitStructuralModel& implicit_model,

bindings/python/tests/implicit/test-py-stratigraphic-section.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,12 @@ def import_section_with_stratigraphy():
4343

4444
for surface in stratigraphic_section.surfaces():
4545
mesh = surface.mesh()
46-
scalar_attribute = mesh.vertex_attribute_manager().find_attribute_double(
46+
scalar_attributes = mesh.vertex_attribute_manager().attribute_ids_matching_name(
4747
"curvature_min"
4848
)
49+
scalar_attribute = mesh.vertex_attribute_manager().find_read_only_attribute_double(
50+
scalar_attributes[0]
51+
)
4952
for vertex_id in range(mesh.nb_vertices()):
5053
model_builder.set_stratigraphic_coordinates(
5154
surface,

tests/implicit/test-stratigraphic-model.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,14 +259,17 @@ int main()
259259
{
260260
geode::Logger::info( "Starting test" );
261261
geode::OpenGeodeGeosciencesImplicitLibrary::initialize();
262+
geode::Logger::set_level( geode::Logger::LEVEL::debug );
262263
geode::StratigraphicModel model{ geode::load_structural_model(
263264
absl::StrCat( geode::DATA_PATH, "vri2.og_strm" ) ) };
264265
const geode::uuid block1_id{ "00000000-c271-42e7-8000-00002c3147ed" };
265266
add_horizons_stack_to_model( model, block1_id );
266267
test_model( model, block1_id );
267268
geode::Logger::info( "Testing copy" );
268269
test_copy( model, block1_id );
270+
DEBUG( "Testing save stratigraphic surfaces" );
269271
test_save_stratigraphic_surfaces( model );
272+
DEBUG( "Testing IO" );
270273
test_io( model, block1_id );
271274

272275
geode::Logger::info( "TEST SUCCESS" );

0 commit comments

Comments
 (0)