Skip to content

Commit

Permalink
fix(OG-Geosciences): renaming enum attributes with lowercase names
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit2776 committed Jul 11, 2024
1 parent f6b469e commit 7ce8104
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 29 deletions.
12 changes: 6 additions & 6 deletions include/geode/geosciences/explicit/mixin/core/fault.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ namespace geode
enum struct FAULT_TYPE
{
/// Default value - No fault type defined
NO_TYPE,
NORMAL,
REVERSE,
STRIKE_SLIP,
LISTRIC,
DECOLLEMENT
no_type,
normal,
reverse,
strike_slip,
listric,
decollement
};

public:
Expand Down
10 changes: 5 additions & 5 deletions include/geode/geosciences/explicit/mixin/core/horizon.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ namespace geode
enum struct HORIZON_TYPE
{
/// Default value - No horizon type defined
NO_TYPE,
CONFORMAL,
NON_CONFORMAL,
TOPOGRAPHY,
INTRUSION
no_type,
conformal,
non_conformal,
topography,
intrusion
};

public:
Expand Down
4 changes: 2 additions & 2 deletions src/geode/geosciences/explicit/mixin/core/fault.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ namespace geode
}

private:
FAULT_TYPE fault_type_{ FAULT_TYPE::NO_TYPE };
FAULT_TYPE fault_type_{ FAULT_TYPE::no_type };
};

template < index_t dimension >
Expand All @@ -73,7 +73,7 @@ namespace geode
template < index_t dimension >
bool Fault< dimension >::has_type() const
{
return type() != FAULT_TYPE::NO_TYPE;
return type() != FAULT_TYPE::no_type;
}

template < index_t dimension >
Expand Down
4 changes: 2 additions & 2 deletions src/geode/geosciences/explicit/mixin/core/horizon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ namespace geode
}

private:
HORIZON_TYPE horizon_type_{ HORIZON_TYPE::NO_TYPE };
HORIZON_TYPE horizon_type_{ HORIZON_TYPE::no_type };
};

template < index_t dimension >
Expand All @@ -73,7 +73,7 @@ namespace geode
template < index_t dimension >
bool Horizon< dimension >::has_type() const
{
return type() != HORIZON_TYPE::NO_TYPE;
return type() != HORIZON_TYPE::no_type;
}

template < index_t dimension >
Expand Down
14 changes: 7 additions & 7 deletions tests/explicit/test-cross-section.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ void add_faults(
"[Test] Addition of a Fault in CrossSection is not correct" );

const auto& fault1 =
builder.add_fault( geode::Fault2D::FAULT_TYPE::REVERSE );
builder.add_fault( geode::Fault2D::FAULT_TYPE::reverse );
builder.set_fault_name( fault1, "fault1" );
OPENGEODE_EXCEPTION(
model.fault( fault1 ).type() == geode::Fault2D::FAULT_TYPE::REVERSE,
model.fault( fault1 ).type() == geode::Fault2D::FAULT_TYPE::reverse,
"[Test] Addition of a Fault in CrossSection is not correct (wrong "
"type)" );
OPENGEODE_EXCEPTION( model.nb_faults() == 2,
Expand All @@ -77,14 +77,14 @@ void add_horizons(
"[Test] Addition of a Horizon in CrossSection is not correct" );

const auto& horizon1 =
builder.add_horizon( geode::Horizon2D::HORIZON_TYPE::CONFORMAL );
builder.add_horizon( geode::Horizon2D::HORIZON_TYPE::conformal );
OPENGEODE_EXCEPTION( model.horizon( horizon1 ).type()
== geode::Horizon2D::HORIZON_TYPE::CONFORMAL,
== geode::Horizon2D::HORIZON_TYPE::conformal,
"[Test] Addition of a Horizon in CrossSection is not correct (wrong "
"type)" );

const auto& horizon2 =
builder.add_horizon( geode::Horizon2D::HORIZON_TYPE::NO_TYPE );
builder.add_horizon( geode::Horizon2D::HORIZON_TYPE::no_type );
builder.set_horizon_name( horizon2, "horizon2" );
OPENGEODE_EXCEPTION( !model.horizon( horizon2 ).has_type(),
"[Test] Addition of a Horizon in CrossSection is not correct (no "
Expand Down Expand Up @@ -398,7 +398,7 @@ void modify_model(
if( !fault.has_type() )
{
builder.set_fault_type(
fault.id(), geode::Fault2D::FAULT_TYPE::STRIKE_SLIP );
fault.id(), geode::Fault2D::FAULT_TYPE::strike_slip );
}
OPENGEODE_EXCEPTION(
fault.has_type(), "[Test] All faults should have a type" );
Expand All @@ -408,7 +408,7 @@ void modify_model(
if( !horizon.has_type() )
{
builder.set_horizon_type(
horizon.id(), geode::Horizon2D::HORIZON_TYPE::NON_CONFORMAL );
horizon.id(), geode::Horizon2D::HORIZON_TYPE::non_conformal );
}
OPENGEODE_EXCEPTION(
horizon.has_type(), "[Test] All horizons should have a type" );
Expand Down
14 changes: 7 additions & 7 deletions tests/explicit/test-structural-model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ void add_faults(
"[Test] Addition of a Fault in StructuralModel is not correct" );

const auto& fault1 =
builder.add_fault( geode::Fault3D::FAULT_TYPE::REVERSE );
builder.add_fault( geode::Fault3D::FAULT_TYPE::reverse );
builder.set_fault_name( fault1, "fault1" );
OPENGEODE_EXCEPTION(
model.fault( fault1 ).type() == geode::Fault3D::FAULT_TYPE::REVERSE,
model.fault( fault1 ).type() == geode::Fault3D::FAULT_TYPE::reverse,
"[Test] Addition of a Fault in StructuralModel is not correct (wrong "
"type)" );
OPENGEODE_EXCEPTION( model.nb_faults() == 2,
Expand Down Expand Up @@ -88,14 +88,14 @@ void add_horizons(
"[Test] Addition of a Horizon in StructuralModel is not correct" );

const auto& horizon1 =
builder.add_horizon( geode::Horizon3D::HORIZON_TYPE::CONFORMAL );
builder.add_horizon( geode::Horizon3D::HORIZON_TYPE::conformal );
OPENGEODE_EXCEPTION( model.horizon( horizon1 ).type()
== geode::Horizon3D::HORIZON_TYPE::CONFORMAL,
== geode::Horizon3D::HORIZON_TYPE::conformal,
"[Test] Addition of a Horizon in StructuralModel is not correct (wrong "
"type)" );

const auto& horizon2 =
builder.add_horizon( geode::Horizon3D::HORIZON_TYPE::NO_TYPE );
builder.add_horizon( geode::Horizon3D::HORIZON_TYPE::no_type );
builder.set_horizon_name( horizon2, "horizon2" );
OPENGEODE_EXCEPTION( !model.horizon( horizon2 ).has_type(),
"[Test] Addition of a Horizon in StructuralModel is not correct (no "
Expand Down Expand Up @@ -324,7 +324,7 @@ void modify_model(
if( !fault.has_type() )
{
builder.set_fault_type(
fault.id(), geode::Fault3D::FAULT_TYPE::STRIKE_SLIP );
fault.id(), geode::Fault3D::FAULT_TYPE::strike_slip );
}
OPENGEODE_EXCEPTION(
fault.has_type(), "[Test] All faults should have a type" );
Expand All @@ -334,7 +334,7 @@ void modify_model(
if( !horizon.has_type() )
{
builder.set_horizon_type(
horizon.id(), geode::Horizon3D::HORIZON_TYPE::NON_CONFORMAL );
horizon.id(), geode::Horizon3D::HORIZON_TYPE::non_conformal );
}
OPENGEODE_EXCEPTION(
horizon.has_type(), "[Test] All horizons should have a type" );
Expand Down

0 comments on commit 7ce8104

Please sign in to comment.