Skip to content

Commit

Permalink
Change geosx to geos in macros, include guards, namespace... (#2392)
Browse files Browse the repository at this point in the history
This patch aims at shrinking `GEOSX` into `GEOS`.
- The `geosx` namespace is renamed `geos`.
- All the `GEOSX_ASSERT`, `GEOSX_LOG`, … are renamed `GEOS_…`
- All the include guards are modified.
- All the paths to the old `http://gihub.com/GEOSX/GEOSX` are renamed appropriately
- Mention to `GEOSX` in the text of the documentation is changed to `GEOS`
Meanwhile, `GEOSX` is kept for the following cases
- The executable is still named `geosx`, the examples in the doc still reflect the current naming.
- All the tools named after `geosx` kept their `geosx` (_e.g._ `pygeox`, `geosx_xml_tools`)
- All the `cmake` configuration flags (_e.g._ `GEOSX_TPL_DIR`, `GEOSX_USE_CUDA`) are unchanged.
- The `host-config` files are not changed.
- The variables names, classes or files containing `GEOSX` are not modified.
  • Loading branch information
TotoGaz authored Apr 15, 2023
1 parent 51bbcc0 commit 478ff4e
Show file tree
Hide file tree
Showing 1,192 changed files with 14,937 additions and 14,928 deletions.
6 changes: 3 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ stages:
.build_script:
script:
# Change submodule paths to absolute github paths (default is relative to GEOSX gitlab path)
- git submodule set-url src/coreComponents/LvArray https://github.com/GEOSX/LvArray.git
- git submodule set-url src/coreComponents/LvArray https://github.com/GEOS-DEV/LvArray.git
- git submodule set-url src/cmake/blt https://github.com/LLNL/blt.git
- git submodule set-url src/coreComponents/constitutive/PVTPackage https://github.com/GEOSX/PVTPackage.git
- git submodule set-url src/coreComponents/constitutive/PVTPackage https://github.com/GEOS-DEV/PVTPackage.git
- git submodule set-url integratedTests [email protected]:GEOSX/integratedTests.git
- git submodule set-url src/coreComponents/fileIO/coupling/hdf5_interface https://github.com/GEOSX/hdf5_interface.git
- git submodule set-url src/coreComponents/fileIO/coupling/hdf5_interface https://github.com/GEOS-DEV/hdf5_interface.git

# Update submodules
- git submodule update --init --recursive src/cmake/blt
Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ title: "GEOSX"
version: 0.2.1
doi: 10.5281/zenodo.7151032
date-released: 2022-10-06
url: "https://github.com/GEOSX/GEOSX"
url: "https://github.com/GEOS-DEV/GEOS"
2 changes: 1 addition & 1 deletion CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ CONTRIBUTORS
A current list of individuals who have contributed source code to the
GEOSX project is available at:

https://github.com/GEOSX/GEOSX/graphs/contributors
https://github.com/GEOS-DEV/GEOS/graphs/contributors
12 changes: 6 additions & 6 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
[comment]: # (All right reserved)
[comment]: #
[comment]: # (For more details see:)
[comment]: # ( https://github.com/GEOSX/GEOSX/LICENSE)
[comment]: # ( https://github.com/GEOSX/GEOSX/COPYRIGHT)
[comment]: # ( https://github.com/GEOSX/GEOSX/CONTRIBUTORS)
[comment]: # ( https://github.com/GEOSX/GEOSX/NOTICE)
[comment]: # ( https://github.com/GEOSX/GEOSX/ACKNOWLEDGEMENTS)
[comment]: # ( https://github.com/GEOSX/GEOSX/RELEASE)
[comment]: # ( https://github.com/GEOS-DEV/GEOS/LICENSE)
[comment]: # ( https://github.com/GEOS-DEV/GEOS/COPYRIGHT)
[comment]: # ( https://github.com/GEOS-DEV/GEOS/CONTRIBUTORS)
[comment]: # ( https://github.com/GEOS-DEV/GEOS/NOTICE)
[comment]: # ( https://github.com/GEOS-DEV/GEOS/ACKNOWLEDGEMENTS)
[comment]: # ( https://github.com/GEOS-DEV/GEOS/RELEASE)


Version v0.2.0 -- Release date 2020-06-20
Expand Down
8 changes: 4 additions & 4 deletions examples/ObjectCatalog/Base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ class Parameter
Parameter( Parameter const & source ):
member( source.member )
{
GEOSX_LOG( "called copy constructor for Parameter" );
GEOS_LOG( "called copy constructor for Parameter" );
}

#if ( __cplusplus >= 201103L )
Parameter( Parameter && source ):
member( std::move( source.member ))
{
GEOSX_LOG( "called move constructor for Parameter" );
GEOS_LOG( "called move constructor for Parameter" );
}
#endif

Expand All @@ -47,12 +47,12 @@ class Base
public:
Base( int junk, double const & junk2, Parameter& pbv )
{
GEOSX_LOG( "calling Base constructor with arguments (" << junk << " " << junk2 << ")" );
GEOS_LOG( "calling Base constructor with arguments (" << junk << " " << junk2 << ")" );
}

~Base()
{
GEOSX_LOG( "calling Base destructor" );
GEOS_LOG( "calling Base destructor" );
}

using CatalogInterface = dataRepository::CatalogInterface< Base, int, double const &, Parameter& >;
Expand Down
4 changes: 2 additions & 2 deletions examples/ObjectCatalog/Derived1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
Derived1::Derived1( int junk, double const & junk2, Parameter& param ):
Base( junk, junk2, param )
{
GEOSX_LOG( "calling Derived1 constructor with arguments ("<<junk<<" "<<junk2<<")" );
GEOS_LOG( "calling Derived1 constructor with arguments ("<<junk<<" "<<junk2<<")" );
}

Derived1::~Derived1()
{
GEOSX_LOG( "calling Derived1 destructor" );
GEOS_LOG( "calling Derived1 destructor" );
}

REGISTER_CATALOG_ENTRY( Base, Derived1, int, double const &, Parameter& )
4 changes: 2 additions & 2 deletions examples/ObjectCatalog/Derived2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
Derived2::Derived2( int junk, double const & junk2, Parameter& param ):
Base( junk, junk2, param )
{
GEOSX_LOG( "calling Derived2 constructor with arguments ("<<junk<<" "<<junk2<<")" );
GEOS_LOG( "calling Derived2 constructor with arguments ("<<junk<<" "<<junk2<<")" );
}

Derived2::~Derived2()
{
GEOSX_LOG( "calling Derived2 destructor" );
GEOS_LOG( "calling Derived2 destructor" );
}

REGISTER_CATALOG_ENTRY( Base, Derived2, int, double const &, Parameter& )
8 changes: 4 additions & 4 deletions examples/ObjectCatalog/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@

int main( int argc, char *argv[] )
{
GEOSX_LOG( "EXECUTING MAIN" );
GEOS_LOG( "EXECUTING MAIN" );
int junk = 1;
double junk2 = 3.14;
double junk3 = 2*3.14;
Parameter param;


GEOSX_LOG( "Attempting to create a Derived1 object" );
GEOS_LOG( "Attempting to create a Derived1 object" );
std::unique_ptr<Base> derived1 = Base::CatalogInterface::Factory( "derived1", junk, junk2, param );
GEOSX_LOG( "Attempting to create a Derived2 object" );
GEOS_LOG( "Attempting to create a Derived2 object" );
std::unique_ptr<Base> derived2 = Base::CatalogInterface::Factory( "derived2", junk, junk3, param );

Base::CatalogInterface::catalog_cast<Derived1>( *(derived2.get()));
GEOSX_LOG( "EXITING MAIN" );
GEOS_LOG( "EXITING MAIN" );
}
2 changes: 1 addition & 1 deletion ide_files/clion_codestyle.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<code_scheme name="GEOSX" version="173">
<code_scheme name="GEOS" version="173">
<Objective-C>
<option name="INDENT_NAMESPACE_MEMBERS" value="0" />
<option name="INDENT_C_STRUCT_MEMBERS" value="2" />
Expand Down
4 changes: 2 additions & 2 deletions scripts/uberenv/packages/geosx/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ def cmake_cache_option(name, boolean_value, comment=""):
class Geosx(CMakePackage, CudaPackage):
"""GEOSX simulation framework."""

homepage = "https://github.com/GEOSX/GEOSX"
git = "https://github.com/GEOSX/GEOSX.git"
homepage = "https://github.com/GEOS-DEV/GEOS"
git = "https://github.com/GEOS-DEV/GEOS.git"

version('develop', branch='develop', submodules='True')

Expand Down
2 changes: 1 addition & 1 deletion src/coreComponents/LvArray
22 changes: 11 additions & 11 deletions src/coreComponents/codingUtilities/EnumStrings.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
* of these strings, like stream insertion/extraction operators.
*/

#ifndef GEOSX_CODINGUTILITIES_ENUMSTRINGS_HPP
#define GEOSX_CODINGUTILITIES_ENUMSTRINGS_HPP
#ifndef GEOS_CODINGUTILITIES_ENUMSTRINGS_HPP
#define GEOS_CODINGUTILITIES_ENUMSTRINGS_HPP

#include "StringUtilities.hpp"
#include "common/DataTypes.hpp"
Expand All @@ -32,7 +32,7 @@
#include <type_traits>
#include <algorithm>

namespace geosx
namespace geos
{

namespace internal
Expand Down Expand Up @@ -135,9 +135,9 @@ struct EnumStrings
auto const & strings = get();
std::size_t size = std::distance( std::begin( strings ), std::end( strings ) );
base_type const index = static_cast< base_type >( e );
GEOSX_THROW_IF( index >= LvArray::integerConversion< base_type >( size ),
"Invalid value " << index << " of type " << TypeName< ENUM >::brief() << ". Valid range is 0.." << size - 1,
InputError );
GEOS_THROW_IF( index >= LvArray::integerConversion< base_type >( size ),
"Invalid value " << index << " of type " << TypeName< ENUM >::brief() << ". Valid range is 0.." << size - 1,
InputError );
return strings[ index ];
}

Expand All @@ -150,9 +150,9 @@ struct EnumStrings
{
auto const & strings = get();
auto const it = std::find( std::begin( strings ), std::end( strings ), s );
GEOSX_THROW_IF( it == std::end( strings ),
"Invalid value '" << s << "' of type " << TypeName< enum_type >::brief() << ". Valid options are: " << concat( ", " ),
InputError );
GEOS_THROW_IF( it == std::end( strings ),
"Invalid value '" << s << "' of type " << TypeName< enum_type >::brief() << ". Valid options are: " << concat( ", " ),
InputError );
enum_type const e = static_cast< enum_type >( LvArray::integerConversion< base_type >( std::distance( std::begin( strings ), it ) ) );
return e;
}
Expand All @@ -179,6 +179,6 @@ struct TypeRegex< ENUM, std::enable_if_t< internal::HasEnumStrings< ENUM > > >
}
};

} // namespace geosx
} // namespace geos

#endif //GEOSX_CODINGUTILITIES_ENUMSTRINGS_HPP
#endif //GEOS_CODINGUTILITIES_ENUMSTRINGS_HPP
4 changes: 2 additions & 2 deletions src/coreComponents/codingUtilities/Parsing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include <cstdlib>

namespace geosx
namespace geos
{

namespace
Expand Down Expand Up @@ -83,4 +83,4 @@ INST_PARSEVALUE( long long );

#undef INST_PARSEVALUE

} // namespace geosx
} // namespace geos
24 changes: 12 additions & 12 deletions src/coreComponents/codingUtilities/Parsing.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
* @file Parsing.hpp
*/

#ifndef GEOSX_CODINGUTILITIES_PARSING_HPP_
#define GEOSX_CODINGUTILITIES_PARSING_HPP_
#ifndef GEOS_CODINGUTILITIES_PARSING_HPP_
#define GEOS_CODINGUTILITIES_PARSING_HPP_

#include "common/DataTypes.hpp"

#include <fstream>

namespace geosx
namespace geos
{

/**
Expand Down Expand Up @@ -129,18 +129,18 @@ void parseFile( string const & filename,
if( ptr != end )
{
std::ptrdiff_t const left = std::distance( ptr, end );
GEOSX_THROW( GEOSX_FMT( "Unable to parse value in file {} at position {}: {}...",
filename, static_cast< std::streamoff >( inputStream.tellg() ) - left,
string( ptr, std::min( left, std::ptrdiff_t{32} ) ) ),
std::runtime_error );
GEOS_THROW( GEOS_FMT( "Unable to parse value in file {} at position {}: {}...",
filename, static_cast< std::streamoff >( inputStream.tellg() ) - left,
string( ptr, std::min( left, std::ptrdiff_t{32} ) ) ),
std::runtime_error );
}
}

GEOSX_THROW_IF( inputStream.fail() && !inputStream.eof(),
GEOSX_FMT( "Error while reading file {}: {}", filename, std::strerror( errno ) ),
std::runtime_error );
GEOS_THROW_IF( inputStream.fail() && !inputStream.eof(),
GEOS_FMT( "Error while reading file {}: {}", filename, std::strerror( errno ) ),
std::runtime_error );
}

} // namespace geosx
} // namespace geos

#endif //GEOSX_CODINGUTILITIES_PARSING_HPP_
#endif //GEOS_CODINGUTILITIES_PARSING_HPP_
6 changes: 3 additions & 3 deletions src/coreComponents/codingUtilities/SFINAE_Macros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* @file SFINAE_Macros.hpp
*/

#ifndef GEOSX_CODINGUTILITIES_SFINAE_MACROS_HPP_
#define GEOSX_CODINGUTILITIES_SFINAE_MACROS_HPP_
#ifndef GEOS_CODINGUTILITIES_SFINAE_MACROS_HPP_
#define GEOS_CODINGUTILITIES_SFINAE_MACROS_HPP_

#include "LvArray/src/Macros.hpp"
#include "LvArray/src/typeManipulation.hpp"
Expand Down Expand Up @@ -59,4 +59,4 @@
IS_VALID_EXPRESSION( HasAlias_ ## NAME, CLASS, !std::is_enum< typename CLASS::NAME >::value )


#endif /* GEOSX_CODINGUTILITIES_SFINAE_MACROS_HPP_ */
#endif /* GEOS_CODINGUTILITIES_SFINAE_MACROS_HPP_ */
6 changes: 3 additions & 3 deletions src/coreComponents/codingUtilities/StringUtilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <cstdlib>
#include <cmath>

namespace geosx
namespace geos
{
namespace stringutilities
{
Expand Down Expand Up @@ -89,8 +89,8 @@ string toMetricPrefixString( T const & value )
snprintf( temp, 8, "%5.*f %c", p, scaledValue, prefixes[a+5] );
rval = temp;

GEOSX_ERROR_IF( rval.empty(),
GEOSX_FMT( "The value of {} was not able to be converted with a metric prefix", value ) );
GEOS_ERROR_IF( rval.empty(),
GEOS_FMT( "The value of {} was not able to be converted with a metric prefix", value ) );


return rval;
Expand Down
10 changes: 5 additions & 5 deletions src/coreComponents/codingUtilities/StringUtilities.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
* @file StringUtilities.hpp
*/

#ifndef GEOSX_CODINGUTILITIES_STRINGUTILITIES_HPP_
#define GEOSX_CODINGUTILITIES_STRINGUTILITIES_HPP_
#ifndef GEOS_CODINGUTILITIES_STRINGUTILITIES_HPP_
#define GEOS_CODINGUTILITIES_STRINGUTILITIES_HPP_

#include "common/DataTypes.hpp"

#include <iomanip>
#include <sstream>

namespace geosx
namespace geos
{
namespace stringutilities
{
Expand Down Expand Up @@ -208,6 +208,6 @@ template< typename T >
string toMetricPrefixString( T const & value );

} // namespace stringutilities
} // namespace geosx
} // namespace geos

#endif /* GEOSX_CODINGUTILITIES_STRINGUTILITIES_HPP_ */
#endif /* GEOS_CODINGUTILITIES_STRINGUTILITIES_HPP_ */
16 changes: 8 additions & 8 deletions src/coreComponents/codingUtilities/UnitTestUtilities.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* @file UnitTestUtilities.hpp
*/

#ifndef GEOSX_CODINGUTILITIES_UNITTESTUTILITIES_HPP_
#define GEOSX_CODINGUTILITIES_UNITTESTUTILITIES_HPP_
#ifndef GEOS_CODINGUTILITIES_UNITTESTUTILITIES_HPP_
#define GEOS_CODINGUTILITIES_UNITTESTUTILITIES_HPP_

#include "common/DataTypes.hpp"

Expand All @@ -35,12 +35,12 @@
} while( false )

#define SKIP_TEST_IN_SERIAL( REASON ) \
SKIP_TEST_IF( geosx::MpiWrapper::commSize() == 1, REASON )
SKIP_TEST_IF( geos::MpiWrapper::commSize() == 1, REASON )

#define SKIP_TEST_IN_PARALLEL( REASON ) \
SKIP_TEST_IF( geosx::MpiWrapper::commSize() != 1, REASON )
SKIP_TEST_IF( geos::MpiWrapper::commSize() != 1, REASON )

namespace geosx
namespace geos
{

namespace testing
Expand Down Expand Up @@ -70,7 +70,7 @@ T expected( T expectedSerial,
}
else
{
GEOSX_ASSERT( expectedParallel.size() == std::size_t( mpiSize ) );
GEOS_ASSERT( expectedParallel.size() == std::size_t( mpiSize ) );
std::vector< T > tmp( expectedParallel );
return tmp[MpiWrapper::commRank( comm )];
}
Expand Down Expand Up @@ -218,6 +218,6 @@ void compareLocalMatrices( CRSMatrixView< T const, COL_INDEX const > const & mat

} // namespace testing

} // namespace geosx
} // namespace geos

#endif //GEOSX_CODINGUTILITIES_UNITTESTUTILITIES_HPP_
#endif //GEOS_CODINGUTILITIES_UNITTESTUTILITIES_HPP_
Loading

0 comments on commit 478ff4e

Please sign in to comment.