Skip to content

Commit

Permalink
Merge pull request #101 from UG4/main
Browse files Browse the repository at this point in the history
Main
  • Loading branch information
anaegel authored Jan 14, 2025
2 parents db87e0d + 2a2e3eb commit 3c9bd98
Show file tree
Hide file tree
Showing 16 changed files with 65 additions and 58 deletions.
24 changes: 17 additions & 7 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,26 @@ build-and-test:
stage: test
image: ubuntu:24.04
timeout: 4 hours
parallel:
matrix:
- UG_BUILD_ID: build-gcc-13
UG_C_COMPILER: "gcc"
UG_CXX_COMPILER: "g++"
- UG_BUILD_ID: build-clang-15
UG_C_COMPILER: "clang-15"
UG_CXX_COMPILER: "clang++-15"
#tags:
# - ${PROVIDER}-${STACK}
#environment: $PROVIDER/$STACK
variables:
CMAKE_C_COMPILER: "gcc"
CMAKE_CXX_COMPILER: "g++"
UGHUB_DIR: "$CI_PROJECT_DIR/ughub"
UG4_OLD_DIR: "$CI_PROJECT_DIR/ug4-old"
UG4_NEW_DIR: "$CI_PROJECT_DIR/ug4-new"
before_script:
- echo "Setting up base ug4 enviroment."
- mkdir -p $UG4_NEW_DIR/ugcore
- mv * $UG4_NEW_DIR/ugcore || true
- apt-get update >/dev/null && apt-get install -y python3 git cmake build-essential >/dev/null
- apt-get update >/dev/null && apt-get install -y python3 git cmake build-essential clang-15 >/dev/null
- cd $CI_PROJECT_DIR && git clone https://gitlab.com/ug4-project/ughub.git
- export PATH="$PATH:$UGHUB_DIR"
- mkdir $UG4_OLD_DIR && cd $UG4_OLD_DIR
Expand All @@ -36,12 +45,12 @@ build-and-test:
- cp --update=none -R $UG4_OLD_DIR/* $UG4_NEW_DIR
# build ug4 in release
- cd $UG4_NEW_DIR
- mkdir -p build && cd build
- cmake .. -DENABLE_ALL_PLUGINS=ON -DDEBUG=OFF -DCMAKE_BUILD_TYPE=Release
- mkdir -p $UG_BUILD_ID && cd $UG_BUILD_ID
- cmake .. -DENABLE_ALL_PLUGINS=ON -DDEBUG=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=$UG_CXX_COMPILER -DCMAKE_C_COMPILER=$UG_C_COMPILER
- make -j 4
# build testsuite
- cd $UG4_NEW_DIR/apps/unit_tests
- mkdir -p build && cd build
- mkdir -p $UG_BUILD_ID && cd $UG_BUILD_ID
- cmake .. -DUSE_JSON=OFF -DINTERNAL_BOOST=ON -DDEBUG=OFF -DCMAKE_BUILD_TYPE=Release
- make -j 4
- cd $UG4_NEW_DIR
Expand All @@ -54,10 +63,11 @@ build-and-test:
paths:
- $UG4_NEW_DIR/report.xml
- $UG4_NEW_DIR/test.log
# - $UG4_NEW_DIR/lib/*
- $UG4_NEW_DIR/bin/*
- $UG4_NEW_DIR/bin/plugins/*
reports:
junit: report.xml
junit: $UG4_NEW_DIR/report.xml

# BUILD sources on various platforms and compilers
deploy-docker:
Expand Down
2 changes: 1 addition & 1 deletion ugbase/bridge/algebra_bridges/ordering_bridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#include "lib_algebra/lib_algebra.h"

// ordering algorithms
#include "lib_algebra/ordering_strategies/algorithms/ordering_algorithms.cpp"
#include "lib_algebra/ordering_strategies/algorithms/ordering_algorithms.h"

using namespace std;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
* GNU Lesser General Public License for more details.
*/

#ifndef __UG__LIB_ALGEBRA__ORDERING_STRATEGIES_ALGORITHMS_IORDERING_ALGORITHM__
#define __UG__LIB_ALGEBRA__ORDERING_STRATEGIES_ALGORITHMS_IORDERING_ALGORITHM__
#ifndef UG_BASE_LIB_ALGEBRA_ORDERING_STRATEGIES_ALGORITHMS_IORDERINGALGORITHM_H
#define UG_BASE_LIB_ALGEBRA_ORDERING_STRATEGIES_ALGORITHMS_IORDERINGALGORITHM_H

#include "common/util/smart_pointer.h"

Expand Down Expand Up @@ -76,6 +76,6 @@ class IOrderingAlgorithm{
virtual const char* name() const = 0;
};

} //namespace
}

#endif //guard
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
* GNU Lesser General Public License for more details.
*/

#ifndef __UG__LIB_ALGEBRA__ORDERING_STRATEGIES_ALGORITHMS_SCC_ORDERING__
#define __UG__LIB_ALGEBRA__ORDERING_STRATEGIES_ALGORITHMS_SCC_ORDERING__
#ifndef UG_BASE_LIB_ALGEBRA_ORDERING_STRATEGIES_ALGORITHMS_SCC_ORDERING_H
#define UG_BASE_LIB_ALGEBRA_ORDERING_STRATEGIES_ALGORITHMS_SCC_ORDERING_H

#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/graph_traits.hpp>
Expand All @@ -41,8 +41,8 @@
#include <boost/graph/strong_components.hpp>

#include "IOrderingAlgorithm.h"
#include "topological_ordering.cpp"
#include "util.cpp"
#include "topological_ordering.h"
#include "util.h"
#include "lib_algebra/algebra_common/permutation_util.h"

//debug
Expand Down Expand Up @@ -233,7 +233,7 @@ class SCCOrdering : public IOrderingAlgorithm<TAlgebra, O_t>
};


} //namespace
}


#endif //guard
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
* GNU Lesser General Public License for more details.
*/

#ifndef __UG__LIB_ALGEBRA__ORDERING_STRATEGIES_ALGORITHMS_BOOST_CUTHILL_MCKEE_ORDERING__
#define __UG__LIB_ALGEBRA__ORDERING_STRATEGIES_ALGORITHMS_BOOST_CUTHILL_MCKEE_ORDERING__
#ifndef UG_BASE_LIB_ALGEBRA_ORDERING_STRATEGIES_ALGORITHMS_BOOST_CUTHILL_MCKEE_ORDERING_H
#define UG_BASE_LIB_ALGEBRA_ORDERING_STRATEGIES_ALGORITHMS_BOOST_CUTHILL_MCKEE_ORDERING_H

#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/graph_traits.hpp>
Expand All @@ -40,7 +40,7 @@
#include <boost/graph/cuthill_mckee_ordering.hpp>

#include "IOrderingAlgorithm.h"
#include "util.cpp"
#include "util.h"

//debug
#include "common/error.h"
Expand Down Expand Up @@ -200,6 +200,6 @@ class BoostCuthillMcKeeOrdering : public IOrderingAlgorithm<TAlgebra, O_t>
bool m_bReverse;
};

} //namespace
}

#endif //guard
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
* GNU Lesser General Public License for more details.
*/

#ifndef __UG__LIB_ALGEBRA__ORDERING_STRATEGIES_ALGORITHMS_BOOST_MINIMUM_DEGREE_ORDERING__
#define __UG__LIB_ALGEBRA__ORDERING_STRATEGIES_ALGORITHMS_BOOST_MINIMUM_DEGREE_ORDERING__
#ifndef UG_BASE_LIB_ALGEBRA_ORDERING_STRATEGIES_ALGORITHMS_BOOST_MINIMUM_DEGREE_ORDERING_H
#define UG_BASE_LIB_ALGEBRA_ORDERING_STRATEGIES_ALGORITHMS_BOOST_MINIMUM_DEGREE_ORDERING_H

#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/graph_traits.hpp>
Expand All @@ -40,7 +40,7 @@
#include <boost/graph/minimum_degree_ordering.hpp>

#include "IOrderingAlgorithm.h"
#include "util.cpp"
#include "util.h"

//debug
#include "common/error.h"
Expand Down Expand Up @@ -170,6 +170,6 @@ class BoostMinimumDegreeOrdering final : public IOrderingAlgorithm<TAlgebra, O_t
O_t o;
};

} //namespace
}

#endif //guard
#endif
5 changes: 1 addition & 4 deletions ugbase/lib_algebra/ordering_strategies/algorithms/iters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,9 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*/

#ifndef __UG__LIB_ALGEBRA__ORDERING_STRATEGIES_ALGORITHMS_ITERS__
#define __UG__LIB_ALGEBRA__ORDERING_STRATEGIES_ALGORITHMS_ITERS__

#include <tuple>
#include <vector>

namespace ug{

Expand Down Expand Up @@ -192,4 +190,3 @@ std::tuple<non_dirichlet_iterator<TAlgebra>, non_dirichlet_iterator<TAlgebra> >

} //namespace

#endif //guard
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#ifndef __UG__LIB_ALGEBRA__ORDERING_STRATEGIES_ALGORITHMS_NATIVE_CUTHILL_MCKEE_ORDERING_CPP__
#define __UG__LIB_ALGEBRA__ORDERING_STRATEGIES_ALGORITHMS_NATIVE_CUTHILL_MCKEE_ORDERING_CPP__

#include "common/common.h"
#include "common/profiler/profiler.h"
Expand Down Expand Up @@ -294,5 +292,3 @@ void ComputeCuthillMcKeeOrder(std::vector<size_t>& vNewIndex,
}

}

#endif //guard
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
*/


#ifndef __UG__LIB_ALGEBRA__ORDERING_STRATEGIES_ALGORITHMS_NATIVE_CUTHILL_MCKEE_ORDERING__
#define __UG__LIB_ALGEBRA__ORDERING_STRATEGIES_ALGORITHMS_NATIVE_CUTHILL_MCKEE_ORDERING__
#ifndef UG_BASE_LIB_ALGEBRA_ORDERING_STRATEGIES_ALGORITHMS_NATIVE_CUTHILL_MCKEE_H
#define UG_BASE_LIB_ALGEBRA_ORDERING_STRATEGIES_ALGORITHMS_NATIVE_CUTHILL_MCKEE_H

#include <vector>

#include "IOrderingAlgorithm.h"
#include "util.cpp"
#include "util.h"

//debug
#include "common/error.h"
Expand Down Expand Up @@ -179,6 +179,6 @@ class NativeCuthillMcKeeOrdering : public IOrderingAlgorithm<TAlgebra, O_t>
};


} // end namespace ug
}

#endif

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#ifndef UG_BASE_LIB_ALGEBRA_ORDERING_STRATEGIES_ALGORITHMS_ORDERING_ALGORITHMS_H
#define UG_BASE_LIB_ALGEBRA_ORDERING_STRATEGIES_ALGORITHMS_ORDERING_ALGORITHMS_H

#include "boost_cuthill_mckee_ordering.h"
#include "boost_minimum_degree_ordering.h"
#include "native_cuthill_mckee.h"
#include "topological_ordering.h"
#include "SCC_ordering.h"

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
* GNU Lesser General Public License for more details.
*/

#ifndef __UG__LIB_ALGEBRA__ORDERING_STRATEGIES_ALGORITHMS_TOPOLOGICAL_ORDERING__
#define __UG__LIB_ALGEBRA__ORDERING_STRATEGIES_ALGORITHMS_TOPOLOGICAL_ORDERING__
#ifndef UG_BASE_LIB_ALGEBRA_ORDERING_STRATEGIES_ALGORITHMS_TOPOLOGICAL_ORDERING_H
#define UG_BASE_LIB_ALGEBRA_ORDERING_STRATEGIES_ALGORITHMS_TOPOLOGICAL_ORDERING_H

#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/graph_traits.hpp>
Expand All @@ -47,7 +47,7 @@
#include <deque>

#include "IOrderingAlgorithm.h"
#include "util.cpp"
#include "util.h"

//debug
#include "common/error.h"
Expand Down Expand Up @@ -288,6 +288,6 @@ class TopologicalOrdering : public IOrderingAlgorithm<TAlgebra, O_t>
O_t o;
};

} //namespace
}

#endif //guard
#endif
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#ifndef __UG__LIB_ALGEBRA__ORDERING_STRATEGIES_ALGORITHMS_UTIL__
#define __UG__LIB_ALGEBRA__ORDERING_STRATEGIES_ALGORITHMS_UTIL__
#ifndef UG_BASE_LIB_ALGEBRA_ORDERING_STRATEGIES_ALGORITHMS_UTIL_H
#define UG_BASE_LIB_ALGEBRA_ORDERING_STRATEGIES_ALGORITHMS_UTIL_H

#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/graph_traits.hpp>
Expand Down Expand Up @@ -51,6 +51,6 @@ bool is_permutation(O_t &o){

#endif

} //namespace
}

#endif //guard
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
#include "lib_disc/spatial_disc/user_data/user_data.h"

#include "lib_algebra/ordering_strategies/algorithms/IOrderingAlgorithm.h"
#include "lib_algebra/ordering_strategies/algorithms/util.cpp"
#include "lib_algebra/ordering_strategies/algorithms/util.h"

#include <assert.h>
#include "common/error.h"
Expand Down
2 changes: 1 addition & 1 deletion ugbase/lib_disc/ordering_strategies/algorithms/lexorder.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#include "lib_disc/function_spaces/grid_function.h"

#include "lib_algebra/ordering_strategies/algorithms/IOrderingAlgorithm.h"
#include "lib_algebra/ordering_strategies/algorithms/util.cpp"
#include "lib_algebra/ordering_strategies/algorithms/util.h"
#include "lib_disc/function_spaces/dof_position_util.h"

#include "common/error.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
#include "lib_disc/function_spaces/grid_function.h"

#include "lib_algebra/ordering_strategies/algorithms/IOrderingAlgorithm.h"
#include "lib_algebra/ordering_strategies/algorithms/util.cpp"
#include "lib_algebra/ordering_strategies/algorithms/util.h"

#include "common/error.h"

Expand Down

0 comments on commit 3c9bd98

Please sign in to comment.