diff --git a/Allclean b/Allclean index b535a616..9569d0a1 100755 --- a/Allclean +++ b/Allclean @@ -26,5 +26,9 @@ wclean applications/solvers/fsi/fluidFoam wclean applications/solvers/fsi/solidFoam wclean applications/solvers/fsi/fsiFluidFoam wclean applications/solvers/fsi/fsiSolidFoam -wclean src/tests/app +wclean src/tests/testsuite-dealii +wclean src/tests/testsuite-fsi +wclean src/tests/testsuite-rbf +wclean src/tests/testsuite-sdc +wclean src/tests/testsuite-spacemapping wclean src/tests/tubeflow diff --git a/Allwmake b/Allwmake index b07a828b..1eafcb2f 100755 --- a/Allwmake +++ b/Allwmake @@ -30,7 +30,11 @@ wmake applications/solvers/unsteadyPUCoupledFoam wmake applications/solvers/fsi/fsiFoam wmake applications/solvers/fsi/solidFoam wmake applications/solvers/fsi/fluidFoam -wmake src/tests/app +wmake src/tests/testsuite-dealii +wmake src/tests/testsuite-fsi +wmake src/tests/testsuite-rbf +wmake src/tests/testsuite-sdc +wmake src/tests/testsuite-spacemapping wmake src/tests/tubeflow wmake applications/solvers/fsi/fsiSolidFoam wmake applications/solvers/fsi/fsiFluidFoam diff --git a/README.md b/README.md index 9d6aab98..60092bce 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ FOAM-FSI ======== +[![wercker status](https://app.wercker.com/status/80ce1a6b7a23e394c5f07a3f27b5b43e/s/master "wercker status")](https://app.wercker.com/project/bykey/80ce1a6b7a23e394c5f07a3f27b5b43e) + Features ----------- @@ -41,6 +43,12 @@ With this grep command, you can ensure that the `mpicxx` compiler is used during sed -i s/"CC = g++ -m64"/"CC = mpicxx -m64"/g foam-extend-3.2/wmake/rules/linux64Gcc/c++ ``` +Set the environment variable `$FOAM_INST_DIR` in case foam-extend is installed in a non-standard location: + +``` bash +export FOAM_INST_DIR=`pwd` +``` + Finally, the compilation process of `foam-extend` is started with ``` bash diff --git a/applications/solvers/fsi/fluidFoam/fluidFoam.C b/applications/solvers/fsi/fluidFoam/fluidFoam.C index 651796a0..8816c189 100644 --- a/applications/solvers/fsi/fluidFoam/fluidFoam.C +++ b/applications/solvers/fsi/fluidFoam/fluidFoam.C @@ -179,7 +179,7 @@ int main( int minSweeps = piesConfig["min-sweeps"].as(); int maxSweeps = piesConfig["max-sweeps"].as(); - timeSolver = std::shared_ptr ( new sdc::PIES( solver, rho, delta, tol, minSweeps, maxSweeps ) ); + timeSolver = std::shared_ptr ( new sdc::PIES( solver, rho, delta, tol, minSweeps, maxSweeps ) ); } } diff --git a/applications/solvers/fsi/fsiFoam/Make/options b/applications/solvers/fsi/fsiFoam/Make/options index 1a851f56..d57a985f 100644 --- a/applications/solvers/fsi/fsiFoam/Make/options +++ b/applications/solvers/fsi/fsiFoam/Make/options @@ -20,7 +20,6 @@ EXE_INC = -std=c++11 \ -isystem ../../../../src/thirdParty/yaml-cpp/include \ -isystem ../../../../src/RBFMeshMotionSolver/lnInclude/ \ $(WM_DECOMP_INC) \ - -isystem $(LIB_SRC)/tetFiniteElement/lnInclude \ -isystem ../../../../src/thirdParty/boost \ -isystem ../../../../src/boundaryConditions/lnInclude \ -isystem ../../../../src/thirdParty/deal-fsi/include \ @@ -36,22 +35,17 @@ EXE_LIBS = \ -ldynamicFvMesh \ -ltopoChangerFvMesh \ -ldynamicMesh \ - -lmeshTools \ -lfiniteVolume \ -lincompressibleTransportModels \ -lincompressibleTurbulenceModel \ -lincompressibleRASModels \ -lincompressibleLESModels \ - -llduSolvers \ -lfvSchemes \ -lboundaryConditions \ -lsolidModels \ - -lsampling \ - -llagrangian \ -lyaml-cpp \ -lRBFMeshMotionSolver \ -lfsi \ - -ltetFiniteElement \ -lbasicThermophysicalModels \ -lspecie \ -lcompressibleRASModels \ diff --git a/applications/solvers/fsi/fsiFoam/fsiFoam.C b/applications/solvers/fsi/fsiFoam/fsiFoam.C index ea9d4a3d..0e5b20ad 100644 --- a/applications/solvers/fsi/fsiFoam/fsiFoam.C +++ b/applications/solvers/fsi/fsiFoam/fsiFoam.C @@ -848,7 +848,7 @@ int main( int minSweeps = piesConfig["min-sweeps"].as(); int maxSweeps = piesConfig["max-sweeps"].as(); - timeSolver = std::shared_ptr ( new sdc::PIES( sdcFsiSolver, rho, delta, tol, minSweeps, maxSweeps ) ); + timeSolver = std::shared_ptr ( new sdc::PIES( sdcFsiSolver, rho, delta, tol, minSweeps, maxSweeps ) ); } assert( timeSolver ); diff --git a/applications/solvers/fsi/solidFoam/solidFoam.C b/applications/solvers/fsi/solidFoam/solidFoam.C index dc8b17f2..75a5a505 100644 --- a/applications/solvers/fsi/solidFoam/solidFoam.C +++ b/applications/solvers/fsi/solidFoam/solidFoam.C @@ -151,7 +151,7 @@ int main( int minSweeps = piesConfig["min-sweeps"].as(); int maxSweeps = piesConfig["max-sweeps"].as(); - timeSolver = std::shared_ptr ( new sdc::PIES( solver, rho, delta, tol, minSweeps, maxSweeps ) ); + timeSolver = std::shared_ptr ( new sdc::PIES( solver, rho, delta, tol, minSweeps, maxSweeps ) ); } assert( solid || timeSolver ); diff --git a/src/fsi/ClenshawCurtis.C b/src/fsi/ClenshawCurtis.C new file mode 100644 index 00000000..f2b81a3d --- /dev/null +++ b/src/fsi/ClenshawCurtis.C @@ -0,0 +1,11 @@ + +#include "ClenshawCurtis.H" +#include "fvCFD.H" + +namespace fsi +{ + namespace quadrature + { + template class ClenshawCurtis; + } +} diff --git a/src/fsi/DataStorage.C b/src/fsi/DataStorage.C new file mode 100644 index 00000000..8263b4a2 --- /dev/null +++ b/src/fsi/DataStorage.C @@ -0,0 +1,150 @@ + +/* + * Author + * David Blom, TU Delft. All rights reserved. + */ + + #include "DataStorage.H" + + namespace sdc + { + DataStorage::DataStorage( + std::shared_ptr > quadrature, + int N ) + : + quadrature( quadrature ), + F( quadrature->get_num_nodes(), N ), + solStages( quadrature->get_num_nodes(), N ) + { + assert( quadrature ); + } + + DataStorage::~DataStorage() + { + + } + + const fsi::matrix DataStorage::integrate( const std::vector & nodes, scalar dt ) const + { + std::vector quadratureNodes = quadrature->get_nodes(); + + if ( not quadrature->left_is_node() ) + quadratureNodes.erase( quadratureNodes.begin() ); + + fsi::quadrature::Matrix q_matrix = fsi::quadrature::compute_q_matrix( quadratureNodes, nodes ); + + if ( not quadrature->left_is_node() ) + { + fsi::quadrature::Matrix q_mat2( q_matrix.rows(), q_matrix.cols() + 1 ); + q_mat2.setZero(); + q_mat2.rightCols( q_matrix.cols() ) = q_matrix; + q_matrix = q_mat2; + } + + fsi::quadrature::Matrix data = dt * q_matrix * getFunctions(); + + for ( int i = 0; i < data.rows(); i++ ) + data.row( i ) += getSolutions().row( 0 ); + + return data; + } + + template + static fsi::quadrature::Matrix compute_interpolation_matrix( + const std::vector & from, + const std::vector & to + ) + { + const size_t to_size = to.size(); + const size_t from_size = from.size(); + assert( to_size >= 1 && from_size >= 1 ); + + fsi::quadrature::Matrix q_mat = fsi::quadrature::Matrix::Zero( to_size, from_size ); + + for ( size_t m = 0; m < from_size; ++m ) + { + fsi::quadrature::Polynomial p = fsi::quadrature::build_polynomial( m, from ); + + auto den = p.evaluate( from[m] ); + + for ( size_t j = 0; j < to_size; ++j ) + { + q_mat( j, m ) = p.evaluate( to[j] ) / den; + } + } + + return q_mat; + } + + const fsi::matrix DataStorage::interpolate( + const fsi::matrix functions, + const std::vector & nodes ) const + { + std::vector quadratureNodes = quadrature->get_nodes(); + fsi::quadrature::Matrix q_matrix = compute_interpolation_matrix( quadratureNodes, nodes ); + + return q_matrix * functions; + } + + const fsi::matrix & DataStorage::getFunctions() const + { + assert( F.rows() > 0 ); + assert( F.cols() > 0 ); + return F; + } + + const fsi::matrix & DataStorage::getSolutions() const + { + assert( solStages.rows() > 0 ); + return solStages; + } + + const fsi::vector DataStorage::getFunction( int substep ) const + { + assert( substep <= F.rows() ); + assert( F.cols() > 0 ); + assert( F.rows() > 0 ); + return F.row( substep ); + } + + const fsi::vector DataStorage::getSolution( int substep ) const + { + assert( substep <= solStages.rows() ); + assert( solStages.cols() > 0 ); + assert( solStages.rows() > 0 ); + return solStages.row( substep ); + } + + const fsi::vector DataStorage::getLastSolution() const + { + return getSolution( quadrature->get_num_nodes() - 1 ); + } + + void DataStorage::initialize( int k, int N ) + { + assert( N > 0 ); + assert( k >= 2 ); + F.resize( k, N ); + solStages.resize( k, N ); + F.setZero(); + solStages.setZero(); + } + + void DataStorage::storeFunction( const fsi::vector & f, int substep ) + { + assert( f.rows() == F.cols() ); + assert( substep <= F.rows() ); + assert( F.cols() > 0 ); + assert( F.rows() > 0 ); + F.row( substep ) = f; + } + + void DataStorage::storeSolution( const fsi::vector & sol, int substep ) + { + assert( sol.rows() == solStages.cols() ); + assert( substep <= solStages.rows() ); + assert( solStages.cols() > 0 ); + assert( solStages.rows() > 0 ); + solStages.row( substep ) = sol; + } + } diff --git a/src/fsi/DataStorage.H b/src/fsi/DataStorage.H new file mode 100644 index 00000000..a55b4e4c --- /dev/null +++ b/src/fsi/DataStorage.H @@ -0,0 +1,52 @@ + +/* + * Author + * David Blom, TU Delft. All rights reserved. + */ + +#pragma once + +#include "SDCSolver.H" +#include "QuadratureInterface.H" + +namespace sdc +{ + class DataStorage + { + public: + DataStorage( + std::shared_ptr >, + int N ); + + ~DataStorage(); + + const fsi::matrix & getFunctions() const; + + const fsi::matrix & getSolutions() const; + + const fsi::matrix integrate( const std::vector & nodes, scalar dt ) const; + + const fsi::matrix interpolate( + const fsi::matrix functions, + const std::vector & nodes ) const; + + const fsi::vector getFunction( int substep ) const; + + const fsi::vector getSolution( int substep ) const; + + const fsi::vector getLastSolution() const; + + void initialize( int k, int N ); + + void storeFunction( const fsi::vector & f, int substep ); + + void storeSolution( const fsi::vector & sol, int substep ); + + private: + + + + std::shared_ptr > quadrature; + fsi::matrix F, solStages; + }; +} diff --git a/src/fsi/GaussLobatto.C b/src/fsi/GaussLobatto.C new file mode 100644 index 00000000..ef022e06 --- /dev/null +++ b/src/fsi/GaussLobatto.C @@ -0,0 +1,11 @@ + +#include "GaussLobatto.H" +#include "fvCFD.H" + +namespace fsi +{ + namespace quadrature + { + template class GaussLobatto; + } +} diff --git a/src/fsi/GaussRadau.C b/src/fsi/GaussRadau.C new file mode 100644 index 00000000..17f4a289 --- /dev/null +++ b/src/fsi/GaussRadau.C @@ -0,0 +1,11 @@ + +#include "GaussRadau.H" +#include "fvCFD.H" + +namespace fsi +{ + namespace quadrature + { + template class GaussRadau; + } +} diff --git a/src/fsi/Make/files b/src/fsi/Make/files index a8ad18b2..daf6f29b 100644 --- a/src/fsi/Make/files +++ b/src/fsi/Make/files @@ -20,11 +20,19 @@ AitkenPostProcessing.C DataValues.C AndersonPostProcessing.C SDC.C +DataStorage.C ESDIRK.C AdaptiveTimeStepper.C PIES.C SDCFsiSolver.C version.Cver +Polynomial.C +QuadratureInterface.C +Uniform.C +GaussRadau.C +GaussLobatto.C +ClenshawCurtis.C + fluidSolvers/CoupledFluidSolver.C fluidSolvers/FluidSolver.C diff --git a/src/fsi/PIES.C b/src/fsi/PIES.C index dbfaa14c..91b1ad77 100644 --- a/src/fsi/PIES.C +++ b/src/fsi/PIES.C @@ -1,300 +1,8 @@ -/* - * Author - * David Blom, TU Delft. All rights reserved. - * - * This class implements the Picard Integral Exponential Solver as proposed - * in D. Kushnir and V. Rokhlin, "A Highly Accurate Solver for Stiff Ordinary - * Differential Equations" (2011). - * The basis functionality is implemented in the SDC class. The method - * updateCoefficients() computes the coefficients for the PIES solver. - */ - #include "PIES.H" -#include -#include "GaussRadau.H" namespace sdc { - PIES::PIES( - std::shared_ptr solver, - scalar rho, - scalar delta, - scalar tol, - int minSweeps, - int maxSweeps - ) - : - SDC( solver, std::shared_ptr >( new fsi::quadrature::GaussRadau(2) ), tol, minSweeps, maxSweeps ), - rho( rho ), - delta( delta ) - { - assert( rho > 0 ); - - std::clock_t start; - double duration; - - start = std::clock(); - - computeCoefficients(); - - duration = (std::clock() - start) / (double) CLOCKS_PER_SEC; - - k = nodes.rows(); - - Info << "Picard Integral Exponential Solver: number of nodes = " << k << ", timing = " << duration << " s" << endl; - - dsdc.resize( nodes.rows() - 1 ); - - for ( int i = 0; i < dsdc.rows(); i++ ) - dsdc( i ) = nodes( i + 1 ) - nodes( i ); - - solver->setNumberOfImplicitStages( k - 1 ); - } - - PIES::PIES( - scalar rho, - scalar delta, - scalar tol - ) - : - SDC( std::shared_ptr >( new fsi::quadrature::GaussRadau(2) ), tol ), - rho( rho ), - delta( delta ) - { - assert( rho > 0 ); - - computeCoefficients(); - - k = nodes.rows(); - - dsdc.resize( nodes.rows() - 1 ); - - for ( int i = 0; i < dsdc.rows(); i++ ) - dsdc( i ) = nodes( i + 1 ) - nodes( i ); - } - - PIES::~PIES() - {} - - void PIES::computeCoefficients() - { - // Initialize variables - longDouble tstart, tend, tinterval, rho, delta, eps; - int N, M; - - const longDouble pi = boost::math::constants::pi(); - - tstart = -1; - tend = 1; - tinterval = tend - tstart; - - // Fine discretization of the semi-disk - N = 800; - M = N; - - // Radius of the complex semi-disk S - rho = longDouble( this->rho ); - - // Selection criteria of nodes on the semi-desik S - eps = 1.0e-18; - delta = longDouble( this->delta ); - - // Skeletonization of a semi-disk in the complex plane - - // Compute the number of points on the arc - longDouble length = longDouble( 0.5 ) * pi * rho + rho; - longDouble dx = length / N; - - // Travel from the origin over the semi circle - - vector50c gamma( N + 3 ); - gamma.setZero(); - gamma( N ) = std::complex( -rho, 0 ); - gamma( N + 1 ) = std::complex( 0, -rho ); - gamma( N + 2 ) = std::complex( 0, rho ); - - for ( int i = 0; i < N; i++ ) - { - longDouble distanceTravelled = i * dx; - - if ( distanceTravelled <= rho ) - gamma( i ) = std::complex( 0, distanceTravelled ); - else - { - longDouble distanceTravelledOnDisk = distanceTravelled - rho + 0.5 * M_PI * rho; - longDouble theta = distanceTravelledOnDisk / rho; - longDouble x = cos( theta ) * rho; - longDouble y = sin( theta ) * rho; - gamma( i ) = std::complex( x, y ); - } - } - - // Discretize the time interval - longDouble dt = tinterval / (M - 1); - vector50 t( M ); - t.setZero(); - - for ( int i = 0; i < t.rows(); i++ ) - t( i ) = tstart + dt * i; - - // Compute the matrix A - matrix50c A( t.rows(), gamma.rows() ); - - for ( int i = 0; i < A.rows(); i++ ) - for ( int j = 0; j < A.cols(); j++ ) - A( i, j ) = sdc::exp( gamma( j ) * t( i ) ); - - // Matrix compression by QR decomposition with full pivoting - Eigen::FullPivHouseholderQR qr = A.fullPivHouseholderQr(); - - matrix50c R = qr.matrixQR().triangularView(); - - int k = 0; - - for ( int i = 0; i < R.rows() - 1; i++ ) - { - k = i; - - if ( std::abs( R( i + 1, i + 1 ) ) / std::abs( R( 0, 0 ) ) < delta ) - { - k = i + 1; - break; - } - } - - assert( k > 0 ); - - int nbNodes = 0; - - Eigen::VectorXi idx = qr.colsPermutation().indices(); - - for ( int i = 0; i < k; i++ ) - { - if ( idx( i ) == 0 or idx( i ) == N or idx( i ) == N + 1 or idx( i ) == N + 2 ) - nbNodes += 1; - else - nbNodes += 2; - } - - vector50c gamma_k( nbNodes ); - - int index = 0; - int zeroIndex = -1; - - for ( int i = 0; i < k; i++ ) - { - std::complex value = gamma( idx( i ) ); - - if ( idx( i ) == 0 ) - zeroIndex = index; - - if ( idx( i ) == 0 or idx( i ) == N or idx( i ) == N + 1 or idx( i ) == N + 2 ) - { - gamma_k( index ) = value; - index += 1; - } - else - { - gamma_k( index ) = value; - gamma_k( index + 1 ) = std::complex( std::real( value ), -std::imag( value ) ); - index += 2; - } - } - - // Compute the coefficients omega - - // One extra node due to adding of constraint - nbNodes += 1; - - for ( int iter = 0; iter < 20; iter++ ) - { - M = nbNodes; - dt = tinterval / (M - 1); - t.resize( M ); - t.setZero(); - - for ( int i = 0; i < t.rows(); i++ ) - t( i ) = tstart + dt * i; - - A.resize( gamma_k.rows() + 1, M ); - A.setZero(); - - // Ensure that the system is never over-determined - assert( A.rows() <= A.cols() ); - - for ( int i = 0; i < gamma_k.rows(); i++ ) - for ( int j = 0; j < M; j++ ) - A( i, j ) = sdc::exp( gamma_k( i ) * t( j ) ); - - // Enforce right-hand-rule based nodes, which results in - // a L-stable time integration scheme - A( gamma_k.rows(), 0 ) = 1; - - matrix50c b( A.rows(), A.cols() ); - b.setZero(); - - for ( int i = 0; i < gamma_k.rows(); i++ ) - { - for ( int j = 1; j < M; j++ ) - { - std::complex gamma = gamma_k( i ); - longDouble t0 = t( j - 1 ); - longDouble t1 = t( j ); - - if ( i == zeroIndex ) - b( i, j ) = t1 - t0; - else - b( i, j ) = -( sdc::exp( gamma * t0 ) - sdc::exp( gamma * t1 ) ) / gamma; - } - } - - matrix50c smatOmega = A.fullPivHouseholderQr().solve( b ); - matrix50 smatReal = smatOmega.real().transpose(); - matrix50 smatWeights = smatReal.bottomLeftCorner( smatReal.rows() - 1, smatReal.cols() ); - smatWeights /= tinterval; - - // Compute the qmat matrix ( t = 0 .. 1 ) - - b.setZero(); - - for ( int i = 0; i < gamma_k.rows(); i++ ) - { - for ( int j = 1; j < M; j++ ) - { - std::complex gamma = gamma_k( i ); - longDouble t0 = tstart; - longDouble t1 = t( j ); - - if ( i == zeroIndex ) - b( i, j ) = t1 - t0; - else - b( i, j ) = -( sdc::exp( gamma * t0 ) - sdc::exp( gamma * t1 ) ) / gamma; - } - } - - matrix50c qmatOmega = A.fullPivHouseholderQr().solve( b ); - matrix50 qmatReal = qmatOmega.real().transpose(); - matrix50 qmatWeights = qmatReal.bottomLeftCorner( qmatReal.rows() - 1, qmatReal.cols() ); - qmatWeights /= tinterval; - - t.array() += -tstart; - t /= tinterval; - - nodes = t.cast(); - smat = smatWeights.cast(); - qmat = qmatWeights.cast(); - - longDouble residual = (A * qmatOmega - b).norm(); - std::cout << "PIES: residual = " << residual; - std::cout << ", number of nodes = " << nbNodes; - std::cout << ", delta = " << delta; - std::cout << std::endl; - - if ( residual < eps ) - break; - - nbNodes++; - } - } + template class PIES; + template class PIES; } diff --git a/src/fsi/PIES.H b/src/fsi/PIES.H index 60bfe86d..beca8290 100644 --- a/src/fsi/PIES.H +++ b/src/fsi/PIES.H @@ -7,8 +7,7 @@ * Picard Integral Exponential Solver (PIES) */ -#ifndef PIES_H -#define PIES_H +#pragma once #include "SDC.H" #include @@ -18,14 +17,6 @@ namespace sdc { - namespace mp = boost::multiprecision; - - typedef mp::cpp_dec_float_50 longDouble; - typedef Eigen::Matrix, Eigen::Dynamic, Eigen::Dynamic> matrix50c; - typedef Eigen::Matrix matrix50; - typedef Eigen::Matrix, Eigen::Dynamic, 1> vector50c; - typedef Eigen::Matrix vector50; - template inline std::complex exp( const std::complex & x ) @@ -35,6 +26,7 @@ namespace sdc return std::polar( r, x.imag() ); } + template class PIES : public SDC { public: @@ -65,5 +57,4 @@ private: }; } - -#endif +#include "PIES.tpp" diff --git a/src/fsi/PIES.tpp b/src/fsi/PIES.tpp new file mode 100644 index 00000000..e79792f6 --- /dev/null +++ b/src/fsi/PIES.tpp @@ -0,0 +1,324 @@ + +/* + * Author + * David Blom, TU Delft. All rights reserved. + * + * This class implements the Picard Integral Exponential Solver as proposed + * in D. Kushnir and V. Rokhlin, "A Highly Accurate Solver for Stiff Ordinary + * Differential Equations" (2011). + * The basis functionality is implemented in the SDC class. The method + * updateCoefficients() computes the coefficients for the PIES solver. + */ + +#include +#include "GaussRadau.H" + +namespace sdc +{ + template + PIES::PIES( + std::shared_ptr solver, + scalar rho, + scalar delta, + scalar tol, + int minSweeps, + int maxSweeps + ) + : + SDC( solver, std::shared_ptr >( new fsi::quadrature::GaussRadau(2) ), tol, minSweeps, maxSweeps ), + rho( rho ), + delta( delta ) + { + assert( rho > 0 ); + + std::clock_t start; + double duration; + + start = std::clock(); + + computeCoefficients(); + + duration = (std::clock() - start) / (double) CLOCKS_PER_SEC; + + k = nodes.rows(); + + Info << "Picard Integral Exponential Solver: number of nodes = " << k << ", timing = " << duration << " s" << Foam::endl; + + dsdc.resize( nodes.rows() - 1 ); + + for ( int i = 0; i < dsdc.rows(); i++ ) + dsdc( i ) = nodes( i + 1 ) - nodes( i ); + + solver->setNumberOfImplicitStages( k - 1 ); + + data->initialize( k, solver->getDOF() ); + } + + template + PIES::PIES( + scalar rho, + scalar delta, + scalar tol + ) + : + SDC( std::shared_ptr >( new fsi::quadrature::GaussRadau(2) ), tol ), + rho( rho ), + delta( delta ) + { + assert( rho > 0 ); + + computeCoefficients(); + + k = nodes.rows(); + + dsdc.resize( nodes.rows() - 1 ); + + for ( int i = 0; i < dsdc.rows(); i++ ) + dsdc( i ) = nodes( i + 1 ) - nodes( i ); + } + + template + PIES::~PIES() + {} + + template + void PIES::computeCoefficients() + { + typedef Eigen::Matrix, Eigen::Dynamic, Eigen::Dynamic> matrix50c; + typedef Eigen::Matrix matrix50; + typedef Eigen::Matrix, Eigen::Dynamic, 1> vector50c; + typedef Eigen::Matrix vector50; + + Info << "PIES: compute integration coefficients" << Foam::endl; + + // Initialize variables + precision tstart, tend, tinterval, rho, delta, eps; + int N, M; + + const precision pi = boost::math::constants::pi(); + + tstart = -1; + tend = 1; + tinterval = tend - tstart; + + // Fine discretization of the semi-disk + N = 800; + M = N; + + // Radius of the complex semi-disk S + rho = precision( this->rho ); + + // Selection criteria of nodes on the semi-desik S + eps = 1.0e-18; + delta = precision( this->delta ); + + // Skeletonization of a semi-disk in the complex plane + + // Compute the number of points on the arc + precision length = precision( 0.5 ) * pi * rho + rho; + precision dx = length / N; + + // Travel from the origin over the semi circle + + vector50c gamma( N + 3 ); + gamma.setZero(); + gamma( N ) = std::complex( -rho, 0 ); + gamma( N + 1 ) = std::complex( 0, -rho ); + gamma( N + 2 ) = std::complex( 0, rho ); + + Info << "PIES: discretize gamma on semi-disk" << Foam::endl; + + for ( int i = 0; i < N; i++ ) + { + precision distanceTravelled = i * dx; + + if ( distanceTravelled <= rho ) + gamma( i ) = std::complex( 0, distanceTravelled ); + else + { + using std::cos; + using std::sin; + precision distanceTravelledOnDisk = distanceTravelled - rho + 0.5 * M_PI * rho; + precision theta = distanceTravelledOnDisk / rho; + precision x = cos( theta ) * rho; + precision y = sin( theta ) * rho; + gamma( i ) = std::complex( x, y ); + } + } + + // Discretize the time interval + precision dt = tinterval / (M - 1); + vector50 t( M ); + t.setZero(); + + for ( int i = 0; i < t.rows(); i++ ) + t( i ) = tstart + dt * i; + + Info << "PIES: build matrix A of size " << t.rows() << " x " << gamma.rows() << Foam::endl; + + // Compute the matrix A + matrix50c A( t.rows(), gamma.rows() ); + + for ( int i = 0; i < A.rows(); i++ ) + for ( int j = 0; j < A.cols(); j++ ) + A( i, j ) = sdc::exp( gamma( j ) * t( i ) ); + + Info << "PIES: compute QR decomposition of A" << Foam::endl; + + // Matrix compression by QR decomposition with full pivoting + Eigen::FullPivHouseholderQR qr = A.fullPivHouseholderQr(); + + matrix50c R = qr.matrixQR().template triangularView(); + + int k = 0; + + for ( int i = 0; i < R.rows() - 1; i++ ) + { + k = i; + + if ( std::abs( R( i + 1, i + 1 ) ) / std::abs( R( 0, 0 ) ) < delta ) + { + k = i + 1; + break; + } + } + + assert( k > 0 ); + + int nbNodes = 0; + + Eigen::VectorXi idx = qr.colsPermutation().indices(); + + for ( int i = 0; i < k; i++ ) + { + if ( idx( i ) == 0 or idx( i ) == N or idx( i ) == N + 1 or idx( i ) == N + 2 ) + nbNodes += 1; + else + nbNodes += 2; + } + + vector50c gamma_k( nbNodes ); + + int index = 0; + int zeroIndex = -1; + + Info << "PIES: build subset lambda" << Foam::endl; + + for ( int i = 0; i < k; i++ ) + { + std::complex value = gamma( idx( i ) ); + + if ( idx( i ) == 0 ) + zeroIndex = index; + + if ( idx( i ) == 0 or idx( i ) == N or idx( i ) == N + 1 or idx( i ) == N + 2 ) + { + gamma_k( index ) = value; + index += 1; + } + else + { + gamma_k( index ) = value; + gamma_k( index + 1 ) = std::complex( std::real( value ), -std::imag( value ) ); + index += 2; + } + } + + // Compute the coefficients omega + + // One extra node due to adding of constraint + nbNodes += 1; + + Info << "PIES: compute the coeffients omega" << Foam::endl; + + for ( int iter = 0; iter < 20; iter++ ) + { + M = nbNodes; + dt = tinterval / (M - 1); + t.resize( M ); + t.setZero(); + + for ( int i = 0; i < t.rows(); i++ ) + t( i ) = tstart + dt * i; + + A.resize( gamma_k.rows() + 1, M ); + A.setZero(); + + // Ensure that the system is never over-determined + assert( A.rows() <= A.cols() ); + + for ( int i = 0; i < gamma_k.rows(); i++ ) + for ( int j = 0; j < M; j++ ) + A( i, j ) = sdc::exp( gamma_k( i ) * t( j ) ); + + // Enforce right-hand-rule based nodes, which results in + // a L-stable time integration scheme + A( gamma_k.rows(), 0 ) = 1; + + matrix50c b( A.rows(), A.cols() ); + b.setZero(); + + for ( int i = 0; i < gamma_k.rows(); i++ ) + { + for ( int j = 1; j < M; j++ ) + { + std::complex gamma = gamma_k( i ); + precision t0 = t( j - 1 ); + precision t1 = t( j ); + + if ( i == zeroIndex ) + b( i, j ) = t1 - t0; + else + b( i, j ) = -( sdc::exp( gamma * t0 ) - sdc::exp( gamma * t1 ) ) / gamma; + } + } + + matrix50c smatOmega = A.fullPivHouseholderQr().solve( b ); + matrix50 smatReal = smatOmega.real().transpose(); + matrix50 smatWeights = smatReal.bottomLeftCorner( smatReal.rows() - 1, smatReal.cols() ); + smatWeights /= tinterval; + + // Compute the qmat matrix ( t = 0 .. 1 ) + + b.setZero(); + + for ( int i = 0; i < gamma_k.rows(); i++ ) + { + for ( int j = 1; j < M; j++ ) + { + std::complex gamma = gamma_k( i ); + precision t0 = tstart; + precision t1 = t( j ); + + if ( i == zeroIndex ) + b( i, j ) = t1 - t0; + else + b( i, j ) = -( sdc::exp( gamma * t0 ) - sdc::exp( gamma * t1 ) ) / gamma; + } + } + + matrix50c qmatOmega = A.fullPivHouseholderQr().solve( b ); + matrix50 qmatReal = qmatOmega.real().transpose(); + matrix50 qmatWeights = qmatReal.bottomLeftCorner( qmatReal.rows() - 1, qmatReal.cols() ); + qmatWeights /= tinterval; + + t.array() += -tstart; + t /= tinterval; + + nodes = t.template cast(); + smat = smatWeights.template cast(); + qmat = qmatWeights.template cast(); + + precision residual = (A * qmatOmega - b).norm(); + std::cout << "PIES: residual = " << residual; + std::cout << ", number of nodes = " << nbNodes; + std::cout << ", delta = " << delta; + std::cout << std::endl; + + if ( residual < eps ) + break; + + nbNodes++; + } + } +} diff --git a/src/fsi/Polynomial.C b/src/fsi/Polynomial.C new file mode 100644 index 00000000..e79d55ee --- /dev/null +++ b/src/fsi/Polynomial.C @@ -0,0 +1,11 @@ + +#include "Polynomial.H" +#include "fvCFD.H" + +namespace fsi +{ + namespace quadrature + { + template class Polynomial; + } +} diff --git a/src/fsi/QuadratureInterface.C b/src/fsi/QuadratureInterface.C new file mode 100644 index 00000000..ffaf3dba --- /dev/null +++ b/src/fsi/QuadratureInterface.C @@ -0,0 +1,11 @@ + +#include "QuadratureInterface.H" +#include "fvCFD.H" + +namespace fsi +{ + namespace quadrature + { + template class IQuadrature; + } +} diff --git a/src/fsi/SDC.C b/src/fsi/SDC.C index 5bed9b0d..8fa32729 100644 --- a/src/fsi/SDC.C +++ b/src/fsi/SDC.C @@ -36,15 +36,13 @@ namespace sdc dsdc(), corrector( false ), stageIndex( 0 ), - F(), - Fold(), Sj(), - solStages(), convergence( false ), timeIndex( 0 ), minSweeps( minSweeps ), maxSweeps( maxSweeps ), - quadrature( quadrature ) + quadrature( quadrature ), + data( new DataStorage( quadrature, N ) ) { assert( solver ); assert( dt > 0 ); @@ -81,15 +79,13 @@ namespace sdc dsdc(), corrector( false ), stageIndex( 0 ), - F(), - Fold(), Sj(), - solStages(), convergence( false ), timeIndex( 0 ), minSweeps( 0 ), maxSweeps( 0 ), - quadrature( quadrature ) + quadrature( quadrature ), + data( new DataStorage( quadrature, 0 ) ) { assert( tol > 0 ); assert( tol < 1 ); @@ -148,20 +144,19 @@ namespace sdc solver->nextTimeStep(); fsi::vector dtsdc = this->dt * dsdc; - fsi::matrix solStages( k, N ), F( k, N ), Fembedded( nodesEmbedded.rows(), N ), residual; - fsi::matrix qj( 1, solStages.cols() ), qjEmbedded( 1, solStages.cols() ); + fsi::matrix residual; fsi::vector errorEstimate( N ); - fsi::vector sol( N ), f( N ); - solver->getSolution( sol, f ); - solStages.row( 0 ) = sol; - scalar t = t0; + fsi::vector sol( N ), f( N ); + solver->getSolution( sol, f ); solver->evaluateFunction( 0, sol, t, f ); - F.row( 0 ) = f; - fsi::vector rhs( N ), result( N ), qold( N ); + data->storeFunction( f, 0 ); + data->storeSolution( sol, 0 ); + + fsi::vector rhs( N ), result( N ); rhs.setZero(); solver->initTimeStep(); @@ -171,14 +166,12 @@ namespace sdc scalar dt = dtsdc( j ); t += dt; - qold = solStages.row( j ); - Info << "\nTime = " << t << ", SDC sweep = 1, SDC substep = " << j + 1 << nl << endl; - solver->implicitSolve( false, j, j, t, dt, qold, rhs, f, result ); + solver->implicitSolve( false, j, j, t, dt, data->getSolution(j), rhs, f, result ); - solStages.row( j + 1 ) = result; - F.row( j + 1 ) = f; + data->storeFunction( f, j + 1 ); + data->storeSolution( result, j + 1 ); } // Compute successive corrections @@ -187,7 +180,7 @@ namespace sdc { t = t0; - fsi::matrix Sj = this->dt * (smat * F); + fsi::matrix Sj = this->dt * (smat * data->getFunctions()); // SDC sweep for ( int p = 0; p < k - 1; p++ ) @@ -197,23 +190,21 @@ namespace sdc Info << "\nTime = " << t << ", SDC sweep = " << j + 2 << ", SDC substep = " << p + 1 << nl << endl; - qold = solStages.row( p ); - // Form right hand side - rhs.noalias() = -dt * F.row( p + 1 ) + Sj.row( p ); + rhs.noalias() = -dt * data->getFunctions().row( p + 1 ) + Sj.row( p ); - solver->implicitSolve( true, p, p, t, dt, qold, rhs, f, result ); + solver->implicitSolve( true, p, p, t, dt, data->getSolution(p), rhs, f, result ); - solStages.row( p + 1 ) = result; - F.row( p + 1 ) = f; + data->storeFunction( f, p + 1 ); + data->storeSolution( result, p + 1 ); } // Compute the SDC residual - residual = dt * (qmat * F); + residual = dt * (qmat * data->getFunctions()); for ( int i = 0; i < residual.rows(); i++ ) - residual.row( i ) += solStages.row( 0 ) - solStages.row( i + 1 ); + residual.row( i ) += data->getSolutions().row( 0 ) - data->getSolutions().row( i + 1 ); scalarList squaredNormResidual( Pstream::nProcs(), scalar( 0 ) ); labelList dof( Pstream::nProcs(), label( 0 ) ); @@ -329,7 +320,6 @@ namespace sdc void SDC::computeResidual( const fsi::matrix & qmat, - const fsi::matrix & F, const scalar dt, fsi::matrix & qj ) @@ -337,15 +327,15 @@ namespace sdc // fsi::matrix Qj = dt * (qmat * F); // Only compute row k-2 of matrix Qj for efficiency - int k = F.rows(); + int k = data->getFunctions().rows(); int ii = k - 2, jj, kk; - for ( jj = 0; jj < F.cols(); ++jj ) + for ( jj = 0; jj < data->getFunctions().cols(); ++jj ) { qj( 0, jj ) = 0; - for ( kk = 0; kk < F.rows(); ++kk ) - qj( 0, jj ) += qmat( ii, kk ) * F( kk, jj ); + for ( kk = 0; kk < data->getFunctions().rows(); ++kk ) + qj( 0, jj ) += qmat( ii, kk ) * data->getFunctions()( kk, jj ); qj( 0, jj ) *= dt; } @@ -360,9 +350,8 @@ namespace sdc ) { assert( k <= this->k - 1 ); - assert( solStages.rows() > 0 ); - qold = solStages.row( k ); + qold = data->getSolution( k ); // Compute the time step from the stage deltaT if ( dt < 0 ) @@ -379,12 +368,9 @@ namespace sdc if ( corrector ) { if ( (k == 0 && stageIndex != 0) || (k == 0 && nbNodes == 2) ) - { - Sj = dt * (smat * F); - Fold = F; - } + Sj = dt * (smat * data->getFunctions()); - rhs.noalias() = -dt * dsdc( k ) * Fold.row( k + 1 ) + Sj.row( k ); + rhs.noalias() = -dt * dsdc( k ) * data->getFunctions().row( k + 1 ) + Sj.row( k ); } this->stageIndex = k; @@ -402,20 +388,11 @@ namespace sdc assert( f.rows() == result.rows() ); assert( k <= this->k - 1 ); - if ( F.cols() == 0 ) - { - F.resize( this->k, f.rows() ); - F.setZero(); - } - - if ( solStages.cols() == 0 ) - { - solStages.resize( this->k, f.rows() ); - solStages.setZero(); - } + if ( data->getFunctions().cols() == 0 ) + data->initialize( this->k, f.rows() ); - F.row( k + 1 ) = f; - solStages.row( k + 1 ) = result; + data->storeFunction( f, k + 1 ); + data->storeSolution( result, k + 1 ); } void SDC::setOldSolution( @@ -425,23 +402,24 @@ namespace sdc { assert( timeIndex >= this->timeIndex ); - if ( solStages.cols() == 0 ) + if ( data->getSolutions().cols() == 0 ) { - solStages.resize( this->k, result.rows() ); - solStages.setZero(); - solStages.row( 0 ) = result; + data->initialize( this->k, result.rows() ); + data->storeSolution( result, 0 ); } else if ( timeIndex > this->timeIndex ) - solStages.row( 0 ) = solStages.bottomRows( 1 ); + data->storeSolution( data->getLastSolution(), 0 ); this->timeIndex = timeIndex; } void SDC::outputResidual( std::string name ) { - fsi::matrix Qj = dt * (qmat * F); - fsi::matrix residual = solStages.row( 0 ) + Qj.row( k - 2 ) - solStages.row( k - 1 ); + fsi::matrix residual = dt * (qmat * data->getFunctions()); + + for ( int i = 0; i < residual.rows(); i++ ) + residual.row( i ) += data->getSolutions().row( 0 ) - data->getSolutions().row( i + 1 ); scalarList squaredNormResidual( Pstream::nProcs(), scalar( 0 ) ); labelList dof( Pstream::nProcs(), label( 0 ) ); diff --git a/src/fsi/SDC.H b/src/fsi/SDC.H index 995594a0..ec668ead 100644 --- a/src/fsi/SDC.H +++ b/src/fsi/SDC.H @@ -12,6 +12,7 @@ #include "fvCFD.H" #include "TimeIntegrationScheme.H" #include "QuadratureInterface.H" +#include "DataStorage.H" namespace sdc { @@ -40,6 +41,12 @@ public: virtual void run(); + void computeResidual( + const fsi::matrix & qmat, + const scalar dt, + fsi::matrix & qj + ); + virtual void getSourceTerm( const bool corrector, const int k, @@ -82,29 +89,18 @@ public: fsi::matrix qmatEmbedded; fsi::vector dsdc; -private: - - void computeResidual( - const fsi::matrix & qmat, - const fsi::matrix & F, - const scalar dt, - fsi::matrix & qj - ); - // Store function in memory in case the source term is requested // by the solver bool corrector; int stageIndex; - fsi::matrix F; - fsi::matrix Fold; fsi::matrix Sj; - fsi::matrix solStages; bool convergence; int timeIndex; const int minSweeps; const int maxSweeps; std::shared_ptr > quadrature; + std::shared_ptr data; }; } diff --git a/src/fsi/Uniform.C b/src/fsi/Uniform.C new file mode 100644 index 00000000..1e15d618 --- /dev/null +++ b/src/fsi/Uniform.C @@ -0,0 +1,11 @@ + +#include "Uniform.H" +#include "fvCFD.H" + +namespace fsi +{ + namespace quadrature + { + template class Uniform; + } +} diff --git a/src/fsi/solidSolvers/dealiiSolidSolver.C b/src/fsi/solidSolvers/dealiiSolidSolver.C index 2b6d48f7..cde14c1b 100644 --- a/src/fsi/solidSolvers/dealiiSolidSolver.C +++ b/src/fsi/solidSolvers/dealiiSolidSolver.C @@ -5,3 +5,8 @@ */ #include "dealiiSolidSolver.H" + +namespace fsi +{ + template class dealiiSolidSolver<2>; +} diff --git a/src/tests/app/ASMILS.C b/src/tests/app/ASMILS.C deleted file mode 120000 index 0fc6638c..00000000 --- a/src/tests/app/ASMILS.C +++ /dev/null @@ -1 +0,0 @@ -../../fsi/ASMILS.C \ No newline at end of file diff --git a/src/tests/app/ASMILS.H b/src/tests/app/ASMILS.H deleted file mode 120000 index 947768c9..00000000 --- a/src/tests/app/ASMILS.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/ASMILS.H \ No newline at end of file diff --git a/src/tests/app/AbsoluteConvergenceMeasure.C b/src/tests/app/AbsoluteConvergenceMeasure.C deleted file mode 120000 index 49bff135..00000000 --- a/src/tests/app/AbsoluteConvergenceMeasure.C +++ /dev/null @@ -1 +0,0 @@ -../../fsi/AbsoluteConvergenceMeasure.C \ No newline at end of file diff --git a/src/tests/app/AbsoluteConvergenceMeasure.H b/src/tests/app/AbsoluteConvergenceMeasure.H deleted file mode 120000 index b8e73073..00000000 --- a/src/tests/app/AbsoluteConvergenceMeasure.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/AbsoluteConvergenceMeasure.H \ No newline at end of file diff --git a/src/tests/app/AdaptiveTimeStepper.C b/src/tests/app/AdaptiveTimeStepper.C deleted file mode 120000 index 11a6ab40..00000000 --- a/src/tests/app/AdaptiveTimeStepper.C +++ /dev/null @@ -1 +0,0 @@ -../../fsi/AdaptiveTimeStepper.C \ No newline at end of file diff --git a/src/tests/app/AdaptiveTimeStepper.H b/src/tests/app/AdaptiveTimeStepper.H deleted file mode 120000 index 3a9c4cfc..00000000 --- a/src/tests/app/AdaptiveTimeStepper.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/AdaptiveTimeStepper.H \ No newline at end of file diff --git a/src/tests/app/AggressiveSpaceMapping.C b/src/tests/app/AggressiveSpaceMapping.C deleted file mode 120000 index cbb49d0b..00000000 --- a/src/tests/app/AggressiveSpaceMapping.C +++ /dev/null @@ -1 +0,0 @@ -../../fsi/AggressiveSpaceMapping.C \ No newline at end of file diff --git a/src/tests/app/AggressiveSpaceMapping.H b/src/tests/app/AggressiveSpaceMapping.H deleted file mode 120000 index bc293f98..00000000 --- a/src/tests/app/AggressiveSpaceMapping.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/AggressiveSpaceMapping.H \ No newline at end of file diff --git a/src/tests/app/AitkenPostProcessing.C b/src/tests/app/AitkenPostProcessing.C deleted file mode 120000 index b89914a4..00000000 --- a/src/tests/app/AitkenPostProcessing.C +++ /dev/null @@ -1 +0,0 @@ -../../fsi/AitkenPostProcessing.C \ No newline at end of file diff --git a/src/tests/app/AitkenPostProcessing.H b/src/tests/app/AitkenPostProcessing.H deleted file mode 120000 index c4117bb2..00000000 --- a/src/tests/app/AitkenPostProcessing.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/AitkenPostProcessing.H \ No newline at end of file diff --git a/src/tests/app/AndersonPostProcessing.C b/src/tests/app/AndersonPostProcessing.C deleted file mode 120000 index 7c0875da..00000000 --- a/src/tests/app/AndersonPostProcessing.C +++ /dev/null @@ -1 +0,0 @@ -../../fsi/AndersonPostProcessing.C \ No newline at end of file diff --git a/src/tests/app/AndersonPostProcessing.H b/src/tests/app/AndersonPostProcessing.H deleted file mode 120000 index d54f4e83..00000000 --- a/src/tests/app/AndersonPostProcessing.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/AndersonPostProcessing.H \ No newline at end of file diff --git a/src/tests/app/BaseMultiLevelSolver.H b/src/tests/app/BaseMultiLevelSolver.H deleted file mode 120000 index af4c6b04..00000000 --- a/src/tests/app/BaseMultiLevelSolver.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/BaseMultiLevelSolver.H \ No newline at end of file diff --git a/src/tests/app/BroydenPostProcessing.C b/src/tests/app/BroydenPostProcessing.C deleted file mode 120000 index c9b55850..00000000 --- a/src/tests/app/BroydenPostProcessing.C +++ /dev/null @@ -1 +0,0 @@ -../../fsi/BroydenPostProcessing.C \ No newline at end of file diff --git a/src/tests/app/BroydenPostProcessing.H b/src/tests/app/BroydenPostProcessing.H deleted file mode 120000 index 3861f2b0..00000000 --- a/src/tests/app/BroydenPostProcessing.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/BroydenPostProcessing.H \ No newline at end of file diff --git a/src/tests/app/ClenshawCurtis.H b/src/tests/app/ClenshawCurtis.H deleted file mode 120000 index deab3857..00000000 --- a/src/tests/app/ClenshawCurtis.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/ClenshawCurtis.H \ No newline at end of file diff --git a/src/tests/app/ClenshawCurtis.tpp b/src/tests/app/ClenshawCurtis.tpp deleted file mode 120000 index ab5e36cd..00000000 --- a/src/tests/app/ClenshawCurtis.tpp +++ /dev/null @@ -1 +0,0 @@ -../../fsi/ClenshawCurtis.tpp \ No newline at end of file diff --git a/src/tests/app/ConvergenceMeasure.H b/src/tests/app/ConvergenceMeasure.H deleted file mode 120000 index a08cc941..00000000 --- a/src/tests/app/ConvergenceMeasure.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/ConvergenceMeasure.H \ No newline at end of file diff --git a/src/tests/app/DataValues.C b/src/tests/app/DataValues.C deleted file mode 120000 index 921485bb..00000000 --- a/src/tests/app/DataValues.C +++ /dev/null @@ -1 +0,0 @@ -../../fsi/DataValues.C \ No newline at end of file diff --git a/src/tests/app/DataValues.H b/src/tests/app/DataValues.H deleted file mode 120000 index ed330df4..00000000 --- a/src/tests/app/DataValues.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/DataValues.H \ No newline at end of file diff --git a/src/tests/app/ESDIRK.C b/src/tests/app/ESDIRK.C deleted file mode 120000 index c0081e5b..00000000 --- a/src/tests/app/ESDIRK.C +++ /dev/null @@ -1 +0,0 @@ -../../fsi/ESDIRK.C \ No newline at end of file diff --git a/src/tests/app/ESDIRK.H b/src/tests/app/ESDIRK.H deleted file mode 120000 index f7d23258..00000000 --- a/src/tests/app/ESDIRK.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/ESDIRK.H \ No newline at end of file diff --git a/src/tests/app/FsiSolver.C b/src/tests/app/FsiSolver.C deleted file mode 120000 index 99589d01..00000000 --- a/src/tests/app/FsiSolver.C +++ /dev/null @@ -1 +0,0 @@ -../../fsi/FsiSolver.C \ No newline at end of file diff --git a/src/tests/app/FsiSolver.H b/src/tests/app/FsiSolver.H deleted file mode 120000 index 4672b436..00000000 --- a/src/tests/app/FsiSolver.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/FsiSolver.H \ No newline at end of file diff --git a/src/tests/app/GaussLobatto.H b/src/tests/app/GaussLobatto.H deleted file mode 120000 index ff987a2c..00000000 --- a/src/tests/app/GaussLobatto.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/GaussLobatto.H \ No newline at end of file diff --git a/src/tests/app/GaussLobatto.tpp b/src/tests/app/GaussLobatto.tpp deleted file mode 120000 index f84f5194..00000000 --- a/src/tests/app/GaussLobatto.tpp +++ /dev/null @@ -1 +0,0 @@ -../../fsi/GaussLobatto.tpp \ No newline at end of file diff --git a/src/tests/app/GaussRadau.H b/src/tests/app/GaussRadau.H deleted file mode 120000 index 51210d74..00000000 --- a/src/tests/app/GaussRadau.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/GaussRadau.H \ No newline at end of file diff --git a/src/tests/app/GaussRadau.tpp b/src/tests/app/GaussRadau.tpp deleted file mode 120000 index 44588ed8..00000000 --- a/src/tests/app/GaussRadau.tpp +++ /dev/null @@ -1 +0,0 @@ -../../fsi/GaussRadau.tpp \ No newline at end of file diff --git a/src/tests/app/ImplicitMultiLevelFsiSolver.C b/src/tests/app/ImplicitMultiLevelFsiSolver.C deleted file mode 120000 index 7758f68f..00000000 --- a/src/tests/app/ImplicitMultiLevelFsiSolver.C +++ /dev/null @@ -1 +0,0 @@ -../../fsi/ImplicitMultiLevelFsiSolver.C \ No newline at end of file diff --git a/src/tests/app/ImplicitMultiLevelFsiSolver.H b/src/tests/app/ImplicitMultiLevelFsiSolver.H deleted file mode 120000 index 08bf4616..00000000 --- a/src/tests/app/ImplicitMultiLevelFsiSolver.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/ImplicitMultiLevelFsiSolver.H \ No newline at end of file diff --git a/src/tests/app/MLIQNILSSolver.C b/src/tests/app/MLIQNILSSolver.C deleted file mode 120000 index 3557d08e..00000000 --- a/src/tests/app/MLIQNILSSolver.C +++ /dev/null @@ -1 +0,0 @@ -../../fsi/MLIQNILSSolver.C \ No newline at end of file diff --git a/src/tests/app/MLIQNILSSolver.H b/src/tests/app/MLIQNILSSolver.H deleted file mode 120000 index 56b7a4ec..00000000 --- a/src/tests/app/MLIQNILSSolver.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/MLIQNILSSolver.H \ No newline at end of file diff --git a/src/tests/app/Make/files b/src/tests/app/Make/files deleted file mode 100644 index be715e21..00000000 --- a/src/tests/app/Make/files +++ /dev/null @@ -1,82 +0,0 @@ -AbsoluteConvergenceMeasure.C -TubeFlowFluidSolver.C -TubeFlowSolidSolver.C -TubeFlowLinearizedSolidSolver.C -TubeFlowLinearSolidSolver.C -TubeFlowLinearizedFluidSolver.C -MonolithicFsiSolver.C -FsiSolver.C -RelativeConvergenceMeasure.C -ResidualRelativeConvergenceMeasure.C -MinIterationConvergenceMeasure.C -ManifoldMapping.C -MultiLevelSolver.C -SpaceMappingSolver.C -ImplicitMultiLevelFsiSolver.C -MultiLevelFsiSolver.C -MultiLevelSpaceMappingSolver.C -MLIQNILSSolver.C -OutputSpaceMapping.C -SpaceMapping.C -PostProcessing.C -BroydenPostProcessing.C -AggressiveSpaceMapping.C -ASMILS.C -AitkenPostProcessing.C -DataValues.C -AndersonPostProcessing.C -SDC.C -ESDIRK.C -Piston.C -AdaptiveTimeStepper.C -Cos.C -Oscillator.C -PIES.C -SDCFsiSolver.C - -tests.C -test_fluidsolver.C -test_solidsolver.C -test_fsisolver.C -test_implicitfsisolver.C -test_manifoldmapping.C -test_multilevelsolver.C -test_rbfinterpolation.C -test_monolithicfsisolver.C -test_manifoldmappingsolver.C -test_relativeconvergencemeasure.C -test_miniterationconvergencemeasure.C -test_multilevelmanifoldmappingsolver.C -test_mliqnilssolver.C -test_parallelcoupling.C -test_multilevelimplicitfsisolver.C -test_broydenpostprocessing.C -test_aggressivespacemapping.C -test_multilevelaggressivespacemappingsolver.C -test_asmils.C -test_multilevelasmils.C -test_aitkenpostprocessing.C -test_outputspacemapping.C -test_multileveloutputspacemappingsolver.C -test_andersonpostprocessing.C -test_linearizedsolidsolver.C -test_linearsolidsolver.C -test_fsilinearizedsolidsolver.C -test_implicitfsilinearizedsolidsolver.C -test_linearizedfluidsolver.C -test_manifoldmappinglinearizedfsisolver.C -test_rbfcoarsening.C -test_multilevelspacemapping.C -test_multilevelmliqnilssolver.C -test_sdc.C -test_esdirk.C -test_pies.C -test_absoluteconvergencemeasure.C -test_residualrelativeconvergencemeasure.C -test_dealiisolidsolver.C -test_gaussradau.C -test_uniform.C -test_quadrature.C -test_gausslobatto.C - -EXE = $(FOAM_APPBIN)/tests diff --git a/src/tests/app/ManifoldMapping.C b/src/tests/app/ManifoldMapping.C deleted file mode 120000 index d1afe704..00000000 --- a/src/tests/app/ManifoldMapping.C +++ /dev/null @@ -1 +0,0 @@ -../../fsi/ManifoldMapping.C \ No newline at end of file diff --git a/src/tests/app/ManifoldMapping.H b/src/tests/app/ManifoldMapping.H deleted file mode 120000 index 83f8895e..00000000 --- a/src/tests/app/ManifoldMapping.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/ManifoldMapping.H \ No newline at end of file diff --git a/src/tests/app/MinIterationConvergenceMeasure.C b/src/tests/app/MinIterationConvergenceMeasure.C deleted file mode 120000 index db812e88..00000000 --- a/src/tests/app/MinIterationConvergenceMeasure.C +++ /dev/null @@ -1 +0,0 @@ -../../fsi/MinIterationConvergenceMeasure.C \ No newline at end of file diff --git a/src/tests/app/MinIterationConvergenceMeasure.H b/src/tests/app/MinIterationConvergenceMeasure.H deleted file mode 120000 index c9c79eaa..00000000 --- a/src/tests/app/MinIterationConvergenceMeasure.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/MinIterationConvergenceMeasure.H \ No newline at end of file diff --git a/src/tests/app/MultiLevelFsiSolver.C b/src/tests/app/MultiLevelFsiSolver.C deleted file mode 120000 index dd20cbea..00000000 --- a/src/tests/app/MultiLevelFsiSolver.C +++ /dev/null @@ -1 +0,0 @@ -../../fsi/MultiLevelFsiSolver.C \ No newline at end of file diff --git a/src/tests/app/MultiLevelFsiSolver.H b/src/tests/app/MultiLevelFsiSolver.H deleted file mode 120000 index b947cd65..00000000 --- a/src/tests/app/MultiLevelFsiSolver.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/MultiLevelFsiSolver.H \ No newline at end of file diff --git a/src/tests/app/MultiLevelSolver.C b/src/tests/app/MultiLevelSolver.C deleted file mode 120000 index 2c42e1d0..00000000 --- a/src/tests/app/MultiLevelSolver.C +++ /dev/null @@ -1 +0,0 @@ -../../fsi/MultiLevelSolver.C \ No newline at end of file diff --git a/src/tests/app/MultiLevelSolver.H b/src/tests/app/MultiLevelSolver.H deleted file mode 120000 index a250bcd4..00000000 --- a/src/tests/app/MultiLevelSolver.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/MultiLevelSolver.H \ No newline at end of file diff --git a/src/tests/app/MultiLevelSpaceMappingSolver.C b/src/tests/app/MultiLevelSpaceMappingSolver.C deleted file mode 120000 index ce23b777..00000000 --- a/src/tests/app/MultiLevelSpaceMappingSolver.C +++ /dev/null @@ -1 +0,0 @@ -../../fsi/MultiLevelSpaceMappingSolver.C \ No newline at end of file diff --git a/src/tests/app/MultiLevelSpaceMappingSolver.H b/src/tests/app/MultiLevelSpaceMappingSolver.H deleted file mode 120000 index 39cf8073..00000000 --- a/src/tests/app/MultiLevelSpaceMappingSolver.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/MultiLevelSpaceMappingSolver.H \ No newline at end of file diff --git a/src/tests/app/OutputSpaceMapping.C b/src/tests/app/OutputSpaceMapping.C deleted file mode 120000 index adbf06b5..00000000 --- a/src/tests/app/OutputSpaceMapping.C +++ /dev/null @@ -1 +0,0 @@ -../../fsi/OutputSpaceMapping.C \ No newline at end of file diff --git a/src/tests/app/OutputSpaceMapping.H b/src/tests/app/OutputSpaceMapping.H deleted file mode 120000 index 87811d91..00000000 --- a/src/tests/app/OutputSpaceMapping.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/OutputSpaceMapping.H \ No newline at end of file diff --git a/src/tests/app/PIES.C b/src/tests/app/PIES.C deleted file mode 120000 index e5743d99..00000000 --- a/src/tests/app/PIES.C +++ /dev/null @@ -1 +0,0 @@ -../../fsi/PIES.C \ No newline at end of file diff --git a/src/tests/app/PIES.H b/src/tests/app/PIES.H deleted file mode 120000 index 33a6fee5..00000000 --- a/src/tests/app/PIES.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/PIES.H \ No newline at end of file diff --git a/src/tests/app/Polynomial.H b/src/tests/app/Polynomial.H deleted file mode 120000 index 8d6872b2..00000000 --- a/src/tests/app/Polynomial.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/Polynomial.H \ No newline at end of file diff --git a/src/tests/app/Polynomial.tpp b/src/tests/app/Polynomial.tpp deleted file mode 120000 index dd263e02..00000000 --- a/src/tests/app/Polynomial.tpp +++ /dev/null @@ -1 +0,0 @@ -../../fsi/Polynomial.tpp \ No newline at end of file diff --git a/src/tests/app/PostProcessing.C b/src/tests/app/PostProcessing.C deleted file mode 120000 index 4950eb94..00000000 --- a/src/tests/app/PostProcessing.C +++ /dev/null @@ -1 +0,0 @@ -../../fsi/PostProcessing.C \ No newline at end of file diff --git a/src/tests/app/PostProcessing.H b/src/tests/app/PostProcessing.H deleted file mode 120000 index 520264d2..00000000 --- a/src/tests/app/PostProcessing.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/PostProcessing.H \ No newline at end of file diff --git a/src/tests/app/QuadratureInterface.H b/src/tests/app/QuadratureInterface.H deleted file mode 120000 index 47d1b628..00000000 --- a/src/tests/app/QuadratureInterface.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/QuadratureInterface.H \ No newline at end of file diff --git a/src/tests/app/QuadratureInterface.tpp b/src/tests/app/QuadratureInterface.tpp deleted file mode 120000 index ebe277fe..00000000 --- a/src/tests/app/QuadratureInterface.tpp +++ /dev/null @@ -1 +0,0 @@ -../../fsi/QuadratureInterface.tpp \ No newline at end of file diff --git a/src/tests/app/RelativeConvergenceMeasure.C b/src/tests/app/RelativeConvergenceMeasure.C deleted file mode 120000 index ac3ead45..00000000 --- a/src/tests/app/RelativeConvergenceMeasure.C +++ /dev/null @@ -1 +0,0 @@ -../../fsi/RelativeConvergenceMeasure.C \ No newline at end of file diff --git a/src/tests/app/RelativeConvergenceMeasure.H b/src/tests/app/RelativeConvergenceMeasure.H deleted file mode 120000 index f1676726..00000000 --- a/src/tests/app/RelativeConvergenceMeasure.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/RelativeConvergenceMeasure.H \ No newline at end of file diff --git a/src/tests/app/ResidualRelativeConvergenceMeasure.C b/src/tests/app/ResidualRelativeConvergenceMeasure.C deleted file mode 120000 index 580e81e8..00000000 --- a/src/tests/app/ResidualRelativeConvergenceMeasure.C +++ /dev/null @@ -1 +0,0 @@ -../../fsi/ResidualRelativeConvergenceMeasure.C \ No newline at end of file diff --git a/src/tests/app/ResidualRelativeConvergenceMeasure.H b/src/tests/app/ResidualRelativeConvergenceMeasure.H deleted file mode 120000 index 849cd804..00000000 --- a/src/tests/app/ResidualRelativeConvergenceMeasure.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/ResidualRelativeConvergenceMeasure.H \ No newline at end of file diff --git a/src/tests/app/SDC.C b/src/tests/app/SDC.C deleted file mode 120000 index b57fcfe2..00000000 --- a/src/tests/app/SDC.C +++ /dev/null @@ -1 +0,0 @@ -../../fsi/SDC.C \ No newline at end of file diff --git a/src/tests/app/SDC.H b/src/tests/app/SDC.H deleted file mode 120000 index 14edb6df..00000000 --- a/src/tests/app/SDC.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/SDC.H \ No newline at end of file diff --git a/src/tests/app/SDCFsiSolver.C b/src/tests/app/SDCFsiSolver.C deleted file mode 120000 index 9e1659f7..00000000 --- a/src/tests/app/SDCFsiSolver.C +++ /dev/null @@ -1 +0,0 @@ -../../fsi/SDCFsiSolver.C \ No newline at end of file diff --git a/src/tests/app/SDCFsiSolver.H b/src/tests/app/SDCFsiSolver.H deleted file mode 120000 index e3d6b7c1..00000000 --- a/src/tests/app/SDCFsiSolver.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/SDCFsiSolver.H \ No newline at end of file diff --git a/src/tests/app/SDCFsiSolverInterface.H b/src/tests/app/SDCFsiSolverInterface.H deleted file mode 120000 index 645331f7..00000000 --- a/src/tests/app/SDCFsiSolverInterface.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/SDCFsiSolverInterface.H \ No newline at end of file diff --git a/src/tests/app/SDCSolver.H b/src/tests/app/SDCSolver.H deleted file mode 120000 index d2577dc9..00000000 --- a/src/tests/app/SDCSolver.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/SDCSolver.H \ No newline at end of file diff --git a/src/tests/app/Solver.H b/src/tests/app/Solver.H deleted file mode 120000 index a0ef2c71..00000000 --- a/src/tests/app/Solver.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/Solver.H \ No newline at end of file diff --git a/src/tests/app/SpaceMapping.C b/src/tests/app/SpaceMapping.C deleted file mode 120000 index 02e46deb..00000000 --- a/src/tests/app/SpaceMapping.C +++ /dev/null @@ -1 +0,0 @@ -../../fsi/SpaceMapping.C \ No newline at end of file diff --git a/src/tests/app/SpaceMapping.H b/src/tests/app/SpaceMapping.H deleted file mode 120000 index d6f8182c..00000000 --- a/src/tests/app/SpaceMapping.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/SpaceMapping.H \ No newline at end of file diff --git a/src/tests/app/SpaceMappingSolver.C b/src/tests/app/SpaceMappingSolver.C deleted file mode 120000 index 7a4ad108..00000000 --- a/src/tests/app/SpaceMappingSolver.C +++ /dev/null @@ -1 +0,0 @@ -../../fsi/SpaceMappingSolver.C \ No newline at end of file diff --git a/src/tests/app/SpaceMappingSolver.H b/src/tests/app/SpaceMappingSolver.H deleted file mode 120000 index 5a4d4f23..00000000 --- a/src/tests/app/SpaceMappingSolver.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/SpaceMappingSolver.H \ No newline at end of file diff --git a/src/tests/app/SurrogateModel.H b/src/tests/app/SurrogateModel.H deleted file mode 120000 index 0aa97014..00000000 --- a/src/tests/app/SurrogateModel.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/SurrogateModel.H \ No newline at end of file diff --git a/src/tests/app/TimeIntegrationScheme.H b/src/tests/app/TimeIntegrationScheme.H deleted file mode 120000 index 2fe84c68..00000000 --- a/src/tests/app/TimeIntegrationScheme.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/TimeIntegrationScheme.H \ No newline at end of file diff --git a/src/tests/app/Uniform.H b/src/tests/app/Uniform.H deleted file mode 120000 index 49c0ef7b..00000000 --- a/src/tests/app/Uniform.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/Uniform.H \ No newline at end of file diff --git a/src/tests/app/Uniform.tpp b/src/tests/app/Uniform.tpp deleted file mode 120000 index 613a24bc..00000000 --- a/src/tests/app/Uniform.tpp +++ /dev/null @@ -1 +0,0 @@ -../../fsi/Uniform.tpp \ No newline at end of file diff --git a/src/tests/app/dealiiSolidSolver.H b/src/tests/app/dealiiSolidSolver.H deleted file mode 120000 index e2a61af0..00000000 --- a/src/tests/app/dealiiSolidSolver.H +++ /dev/null @@ -1 +0,0 @@ -../../fsi/solidSolvers/dealiiSolidSolver.H \ No newline at end of file diff --git a/src/tests/app/runTests.sh b/src/tests/app/runTests.sh deleted file mode 100755 index 4c3f4529..00000000 --- a/src/tests/app/runTests.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -set -e -rm -rf out -wclean -wmake -tests --gtest_throw_on_failure -lcov -c --directory . --output-file coverage.info -genhtml coverage.info --output-directory out --demangle-cpp --no-function-coverage -rm coverage.info -kde-open out/index.html diff --git a/src/tests/app/solidSolvers/dealiiSolidSolver.tpp b/src/tests/app/solidSolvers/dealiiSolidSolver.tpp deleted file mode 120000 index 6007a8d7..00000000 --- a/src/tests/app/solidSolvers/dealiiSolidSolver.tpp +++ /dev/null @@ -1 +0,0 @@ -../../../fsi/solidSolvers/dealiiSolidSolver.tpp \ No newline at end of file diff --git a/src/tests/runTests.py b/src/tests/runTests.py index 93783c6f..a352f3ff 100755 --- a/src/tests/runTests.py +++ b/src/tests/runTests.py @@ -1,22 +1,37 @@ #!/usr/bin/env python -import os, subprocess, multiprocessing +import os, subprocess, multiprocessing, time, sys, argparse -nbCores = multiprocessing.cpu_count() +nbCores = int( os.environ['WM_NCOMPPROCS'] ) + +parser = argparse.ArgumentParser( description='Run the test suite' ) +parser.add_argument('testsuite', help='which testsuite: testsuite-dealii, testsuite-rbf, testsuite-spacemapping, testsuite-fsi, or testsuite-sdc' ) +args = parser.parse_args() runs = [] for i in range( nbCores ): - run = subprocess.Popen( "GTEST_TOTAL_SHARDS=" + str(nbCores) + " GTEST_SHARD_INDEX=" + str(i) + " tests > tests_" + str(i) + ".log 2>&1", shell = True ) + run = subprocess.Popen( "GTEST_TOTAL_SHARDS=" + str(nbCores) + " GTEST_SHARD_INDEX=" + str(i) + " " + args.testsuite + " --gtest_throw_on_failure > tests_" + str(i) + ".log 2>&1", shell = True ) runs.append( run ) returnCode = 0 for run in runs: - code = run.wait() - if code > returnCode: - returnCode = code + code = None + while code is None: + print '.' + sys.stdout.flush() + code = run.poll() + if code > returnCode: + returnCode = code + if code is not None: + break + time.sleep( 5 ) for i in range( nbCores ): - subprocess.call("tail -n 4 tests_" + str(i) + ".log 2>&1", shell=True) + subprocess.call("tail -n 20 tests_" + str(i) + ".log 2>&1", shell=True) +if returnCode == 0: + print "Finished successfully" +else: + print "Tests failed" exit( returnCode ) diff --git a/src/tests/testsuite-dealii/Make/files b/src/tests/testsuite-dealii/Make/files new file mode 100644 index 00000000..63e9f497 --- /dev/null +++ b/src/tests/testsuite-dealii/Make/files @@ -0,0 +1,4 @@ +tests.C +test_dealiisolidsolver.C + +EXE = $(FOAM_APPBIN)/testsuite-dealii diff --git a/src/tests/app/Make/options b/src/tests/testsuite-dealii/Make/options similarity index 86% rename from src/tests/app/Make/options rename to src/tests/testsuite-dealii/Make/options index b023a448..f8042207 100644 --- a/src/tests/app/Make/options +++ b/src/tests/testsuite-dealii/Make/options @@ -1,6 +1,9 @@ c++WARN = -Wall -Wextra -Werror -Wno-literal-suffix -EXE_INC = --coverage -fprofile-arcs -ftest-coverage -g -std=c++11 \ +EXE_INC = -std=c++11 \ + -I ../../fsi \ + -I ../../fsi/lnInclude \ + -I ../../fsi/solidSolvers \ -DEIGEN_INITIALIZE_MATRICES_BY_NAN \ -I ../../RBFmeshInterpolation/lnInclude/ \ -isystem $(LIB_SRC)/finiteVolume/lnInclude \ @@ -16,11 +19,9 @@ EXE_INC = --coverage -fprofile-arcs -ftest-coverage -g -std=c++11 \ -isystem ../../thirdParty/boost \ -isystem ../../thirdParty/gtest/include \ $(WM_DECOMP_INC) \ - -isystem $(LIB_SRC)/tetFiniteElement/lnInclude \ -I ../../RBFMeshMotionSolver/lnInclude/ \ -isystem $(LIB_SRC)/meshTools/lnInclude \ -isystem $(LIB_SRC)/solidModels/lnInclude \ - -isystem $(LIB_SRC)/VectorN/lnInclude \ -isystem ../../thirdParty/deal-fsi/include \ -isystem ../../thirdParty/dealii/bin/include \ -isystem ../../thirdParty/dealii/bin/include/deal.II/bundled \ @@ -42,14 +43,11 @@ EXE_LIBS = \ -lincompressibleRASModels \ -lincompressibleLESModels \ -lfiniteVolume \ - -llduSolvers \ -lsolidModels \ - -lsampling \ - -lgcov \ - -ltetFiniteElement \ -lRBFMeshMotionSolver \ - -ltetFiniteElement \ -lbasicThermophysicalModels \ -lspecie \ -lcompressibleRASModels \ - -ldeal_II + -ldeal_II \ + -lfsi \ + -lboundaryConditions diff --git a/src/tests/app/test_dealiisolidsolver.C b/src/tests/testsuite-dealii/test_dealiisolidsolver.C similarity index 100% rename from src/tests/app/test_dealiisolidsolver.C rename to src/tests/testsuite-dealii/test_dealiisolidsolver.C diff --git a/src/tests/app/tests.C b/src/tests/testsuite-dealii/tests.C similarity index 100% rename from src/tests/app/tests.C rename to src/tests/testsuite-dealii/tests.C diff --git a/src/tests/testsuite-fsi/Make/files b/src/tests/testsuite-fsi/Make/files new file mode 100644 index 00000000..480b7fef --- /dev/null +++ b/src/tests/testsuite-fsi/Make/files @@ -0,0 +1,28 @@ +test_absoluteconvergencemeasure.C +test_aitkenpostprocessing.C +test_andersonpostprocessing.C +test_broydenpostprocessing.C +test_fluidsolver.C +test_fsilinearizedsolidsolver.C +test_fsisolver.C +test_implicitfsilinearizedsolidsolver.C +test_implicitfsisolver.C +test_linearizedfluidsolver.C +test_linearizedsolidsolver.C +test_linearsolidsolver.C +test_miniterationconvergencemeasure.C +test_monolithicfsisolver.C +test_parallelcoupling.C +test_relativeconvergencemeasure.C +test_residualrelativeconvergencemeasure.C +test_solidsolver.C +tests.C + +MonolithicFsiSolver.C +TubeFlowFluidSolver.C +TubeFlowLinearizedFluidSolver.C +TubeFlowLinearizedSolidSolver.C +TubeFlowLinearSolidSolver.C +TubeFlowSolidSolver.C + +EXE = $(FOAM_APPBIN)/testsuite-fsi diff --git a/src/tests/testsuite-fsi/Make/options b/src/tests/testsuite-fsi/Make/options new file mode 100644 index 00000000..f8042207 --- /dev/null +++ b/src/tests/testsuite-fsi/Make/options @@ -0,0 +1,53 @@ +c++WARN = -Wall -Wextra -Werror -Wno-literal-suffix + +EXE_INC = -std=c++11 \ + -I ../../fsi \ + -I ../../fsi/lnInclude \ + -I ../../fsi/solidSolvers \ + -DEIGEN_INITIALIZE_MATRICES_BY_NAN \ + -I ../../RBFmeshInterpolation/lnInclude/ \ + -isystem $(LIB_SRC)/finiteVolume/lnInclude \ + -isystem $(LIB_SRC)/dynamicMesh/lnInclude \ + -isystem $(LIB_SRC)/dynamicMesh/dynamicFvMesh/lnInclude \ + -isystem $(LIB_SRC)/dynamicMesh/dynamicMesh/lnInclude \ + -isystem $(LIB_SRC)/transportModels \ + -isystem $(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ + -isystem $(LIB_SRC)/turbulenceModels \ + -isystem $(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -isystem $(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \ + -isystem ../../thirdParty/eigen \ + -isystem ../../thirdParty/boost \ + -isystem ../../thirdParty/gtest/include \ + $(WM_DECOMP_INC) \ + -I ../../RBFMeshMotionSolver/lnInclude/ \ + -isystem $(LIB_SRC)/meshTools/lnInclude \ + -isystem $(LIB_SRC)/solidModels/lnInclude \ + -isystem ../../thirdParty/deal-fsi/include \ + -isystem ../../thirdParty/dealii/bin/include \ + -isystem ../../thirdParty/dealii/bin/include/deal.II/bundled \ + -isystem ../../thirdParty/dealii/bundled/umfpack/UMFPACK/Include \ + -isystem ../../thirdParty/dealii/bundled/umfpack/AMD/Include \ + -isystem ../../thirdParty/petsc/include \ + -isystem ../../thirdParty/petsc/x86_64/include + +EXE_LIBS = \ + -L$(FOAM_USER_LIBBIN) \ + -L../../thirdParty/gtest \ + -lgtest \ + -ldynamicFvMesh \ + -ltopoChangerFvMesh \ + -ldynamicMesh \ + -lmeshTools \ + -lincompressibleTransportModels \ + -lincompressibleTurbulenceModel \ + -lincompressibleRASModels \ + -lincompressibleLESModels \ + -lfiniteVolume \ + -lsolidModels \ + -lRBFMeshMotionSolver \ + -lbasicThermophysicalModels \ + -lspecie \ + -lcompressibleRASModels \ + -ldeal_II \ + -lfsi \ + -lboundaryConditions diff --git a/src/tests/app/MonolithicFsiSolver.C b/src/tests/testsuite-fsi/MonolithicFsiSolver.C similarity index 100% rename from src/tests/app/MonolithicFsiSolver.C rename to src/tests/testsuite-fsi/MonolithicFsiSolver.C diff --git a/src/tests/app/MonolithicFsiSolver.H b/src/tests/testsuite-fsi/MonolithicFsiSolver.H similarity index 100% rename from src/tests/app/MonolithicFsiSolver.H rename to src/tests/testsuite-fsi/MonolithicFsiSolver.H diff --git a/src/tests/app/TubeFlowFluidSolver.C b/src/tests/testsuite-fsi/TubeFlowFluidSolver.C similarity index 100% rename from src/tests/app/TubeFlowFluidSolver.C rename to src/tests/testsuite-fsi/TubeFlowFluidSolver.C diff --git a/src/tests/app/TubeFlowFluidSolver.H b/src/tests/testsuite-fsi/TubeFlowFluidSolver.H similarity index 100% rename from src/tests/app/TubeFlowFluidSolver.H rename to src/tests/testsuite-fsi/TubeFlowFluidSolver.H diff --git a/src/tests/app/TubeFlowLinearSolidSolver.C b/src/tests/testsuite-fsi/TubeFlowLinearSolidSolver.C similarity index 100% rename from src/tests/app/TubeFlowLinearSolidSolver.C rename to src/tests/testsuite-fsi/TubeFlowLinearSolidSolver.C diff --git a/src/tests/app/TubeFlowLinearSolidSolver.H b/src/tests/testsuite-fsi/TubeFlowLinearSolidSolver.H similarity index 100% rename from src/tests/app/TubeFlowLinearSolidSolver.H rename to src/tests/testsuite-fsi/TubeFlowLinearSolidSolver.H diff --git a/src/tests/app/TubeFlowLinearizedFluidSolver.C b/src/tests/testsuite-fsi/TubeFlowLinearizedFluidSolver.C similarity index 100% rename from src/tests/app/TubeFlowLinearizedFluidSolver.C rename to src/tests/testsuite-fsi/TubeFlowLinearizedFluidSolver.C diff --git a/src/tests/app/TubeFlowLinearizedFluidSolver.H b/src/tests/testsuite-fsi/TubeFlowLinearizedFluidSolver.H similarity index 100% rename from src/tests/app/TubeFlowLinearizedFluidSolver.H rename to src/tests/testsuite-fsi/TubeFlowLinearizedFluidSolver.H diff --git a/src/tests/app/TubeFlowLinearizedSolidSolver.C b/src/tests/testsuite-fsi/TubeFlowLinearizedSolidSolver.C similarity index 100% rename from src/tests/app/TubeFlowLinearizedSolidSolver.C rename to src/tests/testsuite-fsi/TubeFlowLinearizedSolidSolver.C diff --git a/src/tests/app/TubeFlowLinearizedSolidSolver.H b/src/tests/testsuite-fsi/TubeFlowLinearizedSolidSolver.H similarity index 100% rename from src/tests/app/TubeFlowLinearizedSolidSolver.H rename to src/tests/testsuite-fsi/TubeFlowLinearizedSolidSolver.H diff --git a/src/tests/app/TubeFlowSolidSolver.C b/src/tests/testsuite-fsi/TubeFlowSolidSolver.C similarity index 100% rename from src/tests/app/TubeFlowSolidSolver.C rename to src/tests/testsuite-fsi/TubeFlowSolidSolver.C diff --git a/src/tests/app/TubeFlowSolidSolver.H b/src/tests/testsuite-fsi/TubeFlowSolidSolver.H similarity index 100% rename from src/tests/app/TubeFlowSolidSolver.H rename to src/tests/testsuite-fsi/TubeFlowSolidSolver.H diff --git a/src/tests/app/test_absoluteconvergencemeasure.C b/src/tests/testsuite-fsi/test_absoluteconvergencemeasure.C similarity index 100% rename from src/tests/app/test_absoluteconvergencemeasure.C rename to src/tests/testsuite-fsi/test_absoluteconvergencemeasure.C diff --git a/src/tests/app/test_aitkenpostprocessing.C b/src/tests/testsuite-fsi/test_aitkenpostprocessing.C similarity index 100% rename from src/tests/app/test_aitkenpostprocessing.C rename to src/tests/testsuite-fsi/test_aitkenpostprocessing.C diff --git a/src/tests/app/test_andersonpostprocessing.C b/src/tests/testsuite-fsi/test_andersonpostprocessing.C similarity index 100% rename from src/tests/app/test_andersonpostprocessing.C rename to src/tests/testsuite-fsi/test_andersonpostprocessing.C diff --git a/src/tests/app/test_broydenpostprocessing.C b/src/tests/testsuite-fsi/test_broydenpostprocessing.C similarity index 100% rename from src/tests/app/test_broydenpostprocessing.C rename to src/tests/testsuite-fsi/test_broydenpostprocessing.C diff --git a/src/tests/app/test_fluidsolver.C b/src/tests/testsuite-fsi/test_fluidsolver.C similarity index 100% rename from src/tests/app/test_fluidsolver.C rename to src/tests/testsuite-fsi/test_fluidsolver.C diff --git a/src/tests/app/test_fsilinearizedsolidsolver.C b/src/tests/testsuite-fsi/test_fsilinearizedsolidsolver.C similarity index 100% rename from src/tests/app/test_fsilinearizedsolidsolver.C rename to src/tests/testsuite-fsi/test_fsilinearizedsolidsolver.C diff --git a/src/tests/app/test_fsisolver.C b/src/tests/testsuite-fsi/test_fsisolver.C similarity index 100% rename from src/tests/app/test_fsisolver.C rename to src/tests/testsuite-fsi/test_fsisolver.C diff --git a/src/tests/app/test_implicitfsilinearizedsolidsolver.C b/src/tests/testsuite-fsi/test_implicitfsilinearizedsolidsolver.C similarity index 100% rename from src/tests/app/test_implicitfsilinearizedsolidsolver.C rename to src/tests/testsuite-fsi/test_implicitfsilinearizedsolidsolver.C diff --git a/src/tests/app/test_implicitfsisolver.C b/src/tests/testsuite-fsi/test_implicitfsisolver.C similarity index 100% rename from src/tests/app/test_implicitfsisolver.C rename to src/tests/testsuite-fsi/test_implicitfsisolver.C diff --git a/src/tests/app/test_linearizedfluidsolver.C b/src/tests/testsuite-fsi/test_linearizedfluidsolver.C similarity index 100% rename from src/tests/app/test_linearizedfluidsolver.C rename to src/tests/testsuite-fsi/test_linearizedfluidsolver.C diff --git a/src/tests/app/test_linearizedsolidsolver.C b/src/tests/testsuite-fsi/test_linearizedsolidsolver.C similarity index 100% rename from src/tests/app/test_linearizedsolidsolver.C rename to src/tests/testsuite-fsi/test_linearizedsolidsolver.C diff --git a/src/tests/app/test_linearsolidsolver.C b/src/tests/testsuite-fsi/test_linearsolidsolver.C similarity index 100% rename from src/tests/app/test_linearsolidsolver.C rename to src/tests/testsuite-fsi/test_linearsolidsolver.C diff --git a/src/tests/app/test_miniterationconvergencemeasure.C b/src/tests/testsuite-fsi/test_miniterationconvergencemeasure.C similarity index 100% rename from src/tests/app/test_miniterationconvergencemeasure.C rename to src/tests/testsuite-fsi/test_miniterationconvergencemeasure.C diff --git a/src/tests/app/test_monolithicfsisolver.C b/src/tests/testsuite-fsi/test_monolithicfsisolver.C similarity index 100% rename from src/tests/app/test_monolithicfsisolver.C rename to src/tests/testsuite-fsi/test_monolithicfsisolver.C diff --git a/src/tests/app/test_parallelcoupling.C b/src/tests/testsuite-fsi/test_parallelcoupling.C similarity index 100% rename from src/tests/app/test_parallelcoupling.C rename to src/tests/testsuite-fsi/test_parallelcoupling.C diff --git a/src/tests/app/test_relativeconvergencemeasure.C b/src/tests/testsuite-fsi/test_relativeconvergencemeasure.C similarity index 100% rename from src/tests/app/test_relativeconvergencemeasure.C rename to src/tests/testsuite-fsi/test_relativeconvergencemeasure.C diff --git a/src/tests/app/test_residualrelativeconvergencemeasure.C b/src/tests/testsuite-fsi/test_residualrelativeconvergencemeasure.C similarity index 100% rename from src/tests/app/test_residualrelativeconvergencemeasure.C rename to src/tests/testsuite-fsi/test_residualrelativeconvergencemeasure.C diff --git a/src/tests/app/test_solidsolver.C b/src/tests/testsuite-fsi/test_solidsolver.C similarity index 100% rename from src/tests/app/test_solidsolver.C rename to src/tests/testsuite-fsi/test_solidsolver.C diff --git a/src/tests/testsuite-fsi/tests.C b/src/tests/testsuite-fsi/tests.C new file mode 100644 index 00000000..113a1875 --- /dev/null +++ b/src/tests/testsuite-fsi/tests.C @@ -0,0 +1,17 @@ + +/* + * Author + * David Blom, TU Delft. All rights reserved. + */ + +#include "gtest/gtest.h" +#include + +int main( + int argc, + char ** argv + ) +{ + ::testing::InitGoogleTest( &argc, argv ); + return RUN_ALL_TESTS(); +} diff --git a/src/tests/testsuite-rbf/Make/files b/src/tests/testsuite-rbf/Make/files new file mode 100644 index 00000000..72345e0f --- /dev/null +++ b/src/tests/testsuite-rbf/Make/files @@ -0,0 +1,5 @@ +tests.C +test_rbfcoarsening.C +test_rbfinterpolation.C + +EXE = $(FOAM_APPBIN)/testsuite-rbf diff --git a/src/tests/testsuite-rbf/Make/options b/src/tests/testsuite-rbf/Make/options new file mode 100644 index 00000000..f8042207 --- /dev/null +++ b/src/tests/testsuite-rbf/Make/options @@ -0,0 +1,53 @@ +c++WARN = -Wall -Wextra -Werror -Wno-literal-suffix + +EXE_INC = -std=c++11 \ + -I ../../fsi \ + -I ../../fsi/lnInclude \ + -I ../../fsi/solidSolvers \ + -DEIGEN_INITIALIZE_MATRICES_BY_NAN \ + -I ../../RBFmeshInterpolation/lnInclude/ \ + -isystem $(LIB_SRC)/finiteVolume/lnInclude \ + -isystem $(LIB_SRC)/dynamicMesh/lnInclude \ + -isystem $(LIB_SRC)/dynamicMesh/dynamicFvMesh/lnInclude \ + -isystem $(LIB_SRC)/dynamicMesh/dynamicMesh/lnInclude \ + -isystem $(LIB_SRC)/transportModels \ + -isystem $(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ + -isystem $(LIB_SRC)/turbulenceModels \ + -isystem $(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -isystem $(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \ + -isystem ../../thirdParty/eigen \ + -isystem ../../thirdParty/boost \ + -isystem ../../thirdParty/gtest/include \ + $(WM_DECOMP_INC) \ + -I ../../RBFMeshMotionSolver/lnInclude/ \ + -isystem $(LIB_SRC)/meshTools/lnInclude \ + -isystem $(LIB_SRC)/solidModels/lnInclude \ + -isystem ../../thirdParty/deal-fsi/include \ + -isystem ../../thirdParty/dealii/bin/include \ + -isystem ../../thirdParty/dealii/bin/include/deal.II/bundled \ + -isystem ../../thirdParty/dealii/bundled/umfpack/UMFPACK/Include \ + -isystem ../../thirdParty/dealii/bundled/umfpack/AMD/Include \ + -isystem ../../thirdParty/petsc/include \ + -isystem ../../thirdParty/petsc/x86_64/include + +EXE_LIBS = \ + -L$(FOAM_USER_LIBBIN) \ + -L../../thirdParty/gtest \ + -lgtest \ + -ldynamicFvMesh \ + -ltopoChangerFvMesh \ + -ldynamicMesh \ + -lmeshTools \ + -lincompressibleTransportModels \ + -lincompressibleTurbulenceModel \ + -lincompressibleRASModels \ + -lincompressibleLESModels \ + -lfiniteVolume \ + -lsolidModels \ + -lRBFMeshMotionSolver \ + -lbasicThermophysicalModels \ + -lspecie \ + -lcompressibleRASModels \ + -ldeal_II \ + -lfsi \ + -lboundaryConditions diff --git a/src/tests/app/test_rbfcoarsening.C b/src/tests/testsuite-rbf/test_rbfcoarsening.C similarity index 100% rename from src/tests/app/test_rbfcoarsening.C rename to src/tests/testsuite-rbf/test_rbfcoarsening.C diff --git a/src/tests/app/test_rbfinterpolation.C b/src/tests/testsuite-rbf/test_rbfinterpolation.C similarity index 100% rename from src/tests/app/test_rbfinterpolation.C rename to src/tests/testsuite-rbf/test_rbfinterpolation.C diff --git a/src/tests/testsuite-rbf/tests.C b/src/tests/testsuite-rbf/tests.C new file mode 100644 index 00000000..113a1875 --- /dev/null +++ b/src/tests/testsuite-rbf/tests.C @@ -0,0 +1,17 @@ + +/* + * Author + * David Blom, TU Delft. All rights reserved. + */ + +#include "gtest/gtest.h" +#include + +int main( + int argc, + char ** argv + ) +{ + ::testing::InitGoogleTest( &argc, argv ); + return RUN_ALL_TESTS(); +} diff --git a/src/tests/app/Cos.C b/src/tests/testsuite-sdc/Cos.C similarity index 100% rename from src/tests/app/Cos.C rename to src/tests/testsuite-sdc/Cos.C diff --git a/src/tests/app/Cos.H b/src/tests/testsuite-sdc/Cos.H similarity index 100% rename from src/tests/app/Cos.H rename to src/tests/testsuite-sdc/Cos.H diff --git a/src/tests/testsuite-sdc/Make/files b/src/tests/testsuite-sdc/Make/files new file mode 100644 index 00000000..0d2671f3 --- /dev/null +++ b/src/tests/testsuite-sdc/Make/files @@ -0,0 +1,15 @@ +test_esdirk.C +test_gausslobatto.C +test_gaussradau.C +test_pies.C +test_quadrature.C +test_sdc.C +test_sdcinterpolation.C +test_uniform.C +tests.C + +Piston.C +Cos.C +Oscillator.C + +EXE = $(FOAM_APPBIN)/testsuite-sdc diff --git a/src/tests/testsuite-sdc/Make/options b/src/tests/testsuite-sdc/Make/options new file mode 100644 index 00000000..f8042207 --- /dev/null +++ b/src/tests/testsuite-sdc/Make/options @@ -0,0 +1,53 @@ +c++WARN = -Wall -Wextra -Werror -Wno-literal-suffix + +EXE_INC = -std=c++11 \ + -I ../../fsi \ + -I ../../fsi/lnInclude \ + -I ../../fsi/solidSolvers \ + -DEIGEN_INITIALIZE_MATRICES_BY_NAN \ + -I ../../RBFmeshInterpolation/lnInclude/ \ + -isystem $(LIB_SRC)/finiteVolume/lnInclude \ + -isystem $(LIB_SRC)/dynamicMesh/lnInclude \ + -isystem $(LIB_SRC)/dynamicMesh/dynamicFvMesh/lnInclude \ + -isystem $(LIB_SRC)/dynamicMesh/dynamicMesh/lnInclude \ + -isystem $(LIB_SRC)/transportModels \ + -isystem $(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ + -isystem $(LIB_SRC)/turbulenceModels \ + -isystem $(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -isystem $(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \ + -isystem ../../thirdParty/eigen \ + -isystem ../../thirdParty/boost \ + -isystem ../../thirdParty/gtest/include \ + $(WM_DECOMP_INC) \ + -I ../../RBFMeshMotionSolver/lnInclude/ \ + -isystem $(LIB_SRC)/meshTools/lnInclude \ + -isystem $(LIB_SRC)/solidModels/lnInclude \ + -isystem ../../thirdParty/deal-fsi/include \ + -isystem ../../thirdParty/dealii/bin/include \ + -isystem ../../thirdParty/dealii/bin/include/deal.II/bundled \ + -isystem ../../thirdParty/dealii/bundled/umfpack/UMFPACK/Include \ + -isystem ../../thirdParty/dealii/bundled/umfpack/AMD/Include \ + -isystem ../../thirdParty/petsc/include \ + -isystem ../../thirdParty/petsc/x86_64/include + +EXE_LIBS = \ + -L$(FOAM_USER_LIBBIN) \ + -L../../thirdParty/gtest \ + -lgtest \ + -ldynamicFvMesh \ + -ltopoChangerFvMesh \ + -ldynamicMesh \ + -lmeshTools \ + -lincompressibleTransportModels \ + -lincompressibleTurbulenceModel \ + -lincompressibleRASModels \ + -lincompressibleLESModels \ + -lfiniteVolume \ + -lsolidModels \ + -lRBFMeshMotionSolver \ + -lbasicThermophysicalModels \ + -lspecie \ + -lcompressibleRASModels \ + -ldeal_II \ + -lfsi \ + -lboundaryConditions diff --git a/src/tests/app/Oscillator.C b/src/tests/testsuite-sdc/Oscillator.C similarity index 100% rename from src/tests/app/Oscillator.C rename to src/tests/testsuite-sdc/Oscillator.C diff --git a/src/tests/app/Oscillator.H b/src/tests/testsuite-sdc/Oscillator.H similarity index 100% rename from src/tests/app/Oscillator.H rename to src/tests/testsuite-sdc/Oscillator.H diff --git a/src/tests/app/Piston.C b/src/tests/testsuite-sdc/Piston.C similarity index 100% rename from src/tests/app/Piston.C rename to src/tests/testsuite-sdc/Piston.C diff --git a/src/tests/app/Piston.H b/src/tests/testsuite-sdc/Piston.H similarity index 100% rename from src/tests/app/Piston.H rename to src/tests/testsuite-sdc/Piston.H diff --git a/src/tests/app/test_adaptivetime.C b/src/tests/testsuite-sdc/test_adaptivetime.C similarity index 100% rename from src/tests/app/test_adaptivetime.C rename to src/tests/testsuite-sdc/test_adaptivetime.C diff --git a/src/tests/app/test_esdirk.C b/src/tests/testsuite-sdc/test_esdirk.C similarity index 100% rename from src/tests/app/test_esdirk.C rename to src/tests/testsuite-sdc/test_esdirk.C diff --git a/src/tests/app/test_gausslobatto.C b/src/tests/testsuite-sdc/test_gausslobatto.C similarity index 100% rename from src/tests/app/test_gausslobatto.C rename to src/tests/testsuite-sdc/test_gausslobatto.C diff --git a/src/tests/app/test_gaussradau.C b/src/tests/testsuite-sdc/test_gaussradau.C similarity index 100% rename from src/tests/app/test_gaussradau.C rename to src/tests/testsuite-sdc/test_gaussradau.C diff --git a/src/tests/app/test_pies.C b/src/tests/testsuite-sdc/test_pies.C similarity index 87% rename from src/tests/app/test_pies.C rename to src/tests/testsuite-sdc/test_pies.C index 545b5b6c..957a81e1 100644 --- a/src/tests/app/test_pies.C +++ b/src/tests/testsuite-sdc/test_pies.C @@ -32,7 +32,7 @@ protected: piston = std::shared_ptr ( new Piston( nbTimeSteps, dt, q0, qdot0, As, Ac, omega ) ); - pies = std::shared_ptr ( new sdc::PIES( piston, rho, delta, tol, nbNodes, 10 * nbNodes ) ); + pies = std::shared_ptr> ( new sdc::PIES( piston, rho, delta, tol, nbNodes, 10 * nbNodes ) ); } virtual void TearDown() @@ -41,7 +41,7 @@ protected: piston.reset(); } - std::shared_ptr pies; + std::shared_ptr> pies; std::shared_ptr piston; }; @@ -84,7 +84,7 @@ protected: delta = 1.0e-9; rho = 3.15; - pies = std::shared_ptr ( new sdc::PIES( rho, delta, tol ) ); + pies = std::shared_ptr> ( new sdc::PIES( rho, delta, tol ) ); piston = std::shared_ptr ( new Piston( nbTimeSteps, dt, q0, qdot0, As, Ac, omega, pies, pies->nodes.rows() ) ); } @@ -95,7 +95,7 @@ protected: piston.reset(); } - std::shared_ptr pies; + std::shared_ptr> pies; std::shared_ptr piston; }; diff --git a/src/tests/app/test_quadrature.C b/src/tests/testsuite-sdc/test_quadrature.C similarity index 100% rename from src/tests/app/test_quadrature.C rename to src/tests/testsuite-sdc/test_quadrature.C diff --git a/src/tests/app/test_sdc.C b/src/tests/testsuite-sdc/test_sdc.C similarity index 99% rename from src/tests/app/test_sdc.C rename to src/tests/testsuite-sdc/test_sdc.C index 7af0fc41..e1c9257c 100644 --- a/src/tests/app/test_sdc.C +++ b/src/tests/testsuite-sdc/test_sdc.C @@ -299,7 +299,7 @@ TEST( CosTest, SDC ) // rule = "uniform"; // rule = "clenshaw-curtis"; int nbNodes = 3; - scalar tol = 1.0e-25; + scalar tol = 1.0e-15; int nbTimeSteps = 5; scalar endTime = 0.05; @@ -341,7 +341,7 @@ TEST( OscillatorTest, SDC ) { std::string rule = "gauss-lobatto"; int nbNodes = 3; - scalar tol = 1.0e-25; + scalar tol = 1.0e-15; int nbTimeSteps = 100; scalar endTime = 10; diff --git a/src/tests/testsuite-sdc/test_sdcinterpolation.C b/src/tests/testsuite-sdc/test_sdcinterpolation.C new file mode 100644 index 00000000..770c6740 --- /dev/null +++ b/src/tests/testsuite-sdc/test_sdcinterpolation.C @@ -0,0 +1,226 @@ + +#include +#include "SDC.H" +#include "gtest/gtest.h" +#include "GaussRadau.H" +#include "GaussLobatto.H" +#include "Piston.H" + +TEST( SDC, interpolation ) +{ + scalar dt, q0, qdot0, As, Ac, omega, endTime, tol; + + int nbTimeSteps = 1; + + endTime = 10; + dt = endTime / nbTimeSteps; + As = 100; + Ac = As; + omega = 1; + q0 = -As; + qdot0 = -As; + tol = 1.0e-17; + + int nbNodes = 10; + std::shared_ptr > quadrature; + quadrature = std::shared_ptr >( new fsi::quadrature::GaussRadau( nbNodes ) ); + + std::shared_ptr piston ( new Piston( nbTimeSteps, dt, q0, qdot0, As, Ac, omega ) ); + std::shared_ptr sdc ( new SDC( piston, quadrature, tol, 5, 10 * nbNodes ) ); + + sdc->run(); + + fsi::vector solution( 2 ), f; + piston->getSolution( solution, f ); + scalar result = solution( 1 ); + scalar ref = piston->referenceSolution( endTime ); + scalar error = std::abs( result - ref ) / std::abs( ref ); + + std::vector nodes = {0.856, 0.365, 1.0}; + + const fsi::matrix interp = sdc->data->integrate( nodes, dt ); + + for ( unsigned int i = 0; i < nodes.size(); i++ ) + { + scalar ref = piston->referenceSolution( nodes[i] * endTime ); + scalar errori = abs( interp(i,1) - ref ) / abs( ref ); + std::cout << "error" << i << " = " << errori << std::endl; + if( i == 2 ) ASSERT_NEAR( error, errori, 1.0e-13 ); + } +} + +TEST( SDC, interpolationOrder ) +{ + scalar dt, q0, qdot0, As, Ac, omega, endTime, tol; + + int nbTimeSteps = 1; + + endTime = 1; + dt = endTime / nbTimeSteps; + As = 100; + Ac = As; + omega = 1; + q0 = -As; + qdot0 = -As; + tol = 1.0e-17; + + int nbNodes = 2; + std::shared_ptr > quadrature; + quadrature = std::shared_ptr >( new fsi::quadrature::GaussRadau( nbNodes ) ); + + std::shared_ptr piston1 ( new Piston( nbTimeSteps, dt, q0, qdot0, As, Ac, omega ) ); + std::shared_ptr sdc1 ( new SDC( piston1, quadrature, tol, 5, 10 * nbNodes ) ); + std::shared_ptr piston2 ( new Piston( nbTimeSteps * 2, dt / 2.0, q0, qdot0, As, Ac, omega ) ); + std::shared_ptr sdc2 ( new SDC( piston2, quadrature, tol, 5, 10 * nbNodes ) ); + + sdc1->run(); + sdc2->run(); + + std::vector nodes1 = {0.8}; + std::vector nodes2 = {0.6}; + + const fsi::matrix interp1 = sdc1->data->integrate( nodes1, dt ); + const fsi::matrix interp2 = sdc2->data->integrate( nodes2, 0.5 * dt ); + + scalar ref1 = piston1->referenceSolution( nodes1[0] * endTime ); + scalar ref2 = piston2->referenceSolution( nodes1[0] * endTime ); + + scalar error1 = std::abs( interp1(0,1) - ref1 ) / std::abs( ref1 ); + scalar error2 = std::abs( interp2(0,1) - ref2 ) / std::abs( ref2 ); + + scalar order = ( std::log10( error1 ) - std::log10( error2 ) ) / ( std::log10( nbTimeSteps * 2 ) - std::log10( nbTimeSteps ) ); + + ASSERT_GE( order, 3 ); +} + +TEST( SDC, interpolationGaussLobatto ) +{ + scalar dt, q0, qdot0, As, Ac, omega, endTime, tol; + + int nbTimeSteps = 1; + + endTime = 1; + dt = endTime / nbTimeSteps; + As = 100; + Ac = As; + omega = 1; + q0 = -As; + qdot0 = -As; + tol = 1.0e-17; + + int nbNodes = 2; + std::shared_ptr > quadrature; + quadrature = std::shared_ptr >( new fsi::quadrature::GaussLobatto( nbNodes ) ); + + std::shared_ptr piston1 ( new Piston( nbTimeSteps, dt, q0, qdot0, As, Ac, omega ) ); + std::shared_ptr sdc1 ( new SDC( piston1, quadrature, tol, 5, 10 * nbNodes ) ); + std::shared_ptr piston2 ( new Piston( nbTimeSteps * 2, dt / 2.0, q0, qdot0, As, Ac, omega ) ); + std::shared_ptr sdc2 ( new SDC( piston2, quadrature, tol, 5, 10 * nbNodes ) ); + + sdc1->run(); + sdc2->run(); + + std::vector nodes1 = {0.8}; + std::vector nodes2 = {0.6}; + + const fsi::matrix interp1 = sdc1->data->integrate( nodes1, dt ); + const fsi::matrix interp2 = sdc2->data->integrate( nodes2, 0.5 * dt ); + + scalar ref1 = piston1->referenceSolution( nodes1[0] * endTime ); + scalar ref2 = piston2->referenceSolution( nodes1[0] * endTime ); + + scalar error1 = std::abs( interp1(0,1) - ref1 ) / std::abs( ref1 ); + scalar error2 = std::abs( interp2(0,1) - ref2 ) / std::abs( ref2 ); + + scalar order = ( std::log10( error1 ) - std::log10( error2 ) ) / ( std::log10( nbTimeSteps * 2 ) - std::log10( nbTimeSteps ) ); + + ASSERT_GE( order, 4 ); +} + +TEST( SDC, polynomialInterpolationGaussLobatto ) +{ + scalar dt, q0, qdot0, As, Ac, omega, endTime, tol; + + int nbTimeSteps = 1; + + endTime = 10; + dt = endTime / nbTimeSteps; + As = 100; + Ac = As; + omega = 1; + q0 = -As; + qdot0 = -As; + tol = 1.0e-17; + + int nbNodes = 10; + std::shared_ptr > quadrature; + quadrature = std::shared_ptr >( new fsi::quadrature::GaussLobatto( nbNodes ) ); + + std::shared_ptr piston ( new Piston( nbTimeSteps, dt, q0, qdot0, As, Ac, omega ) ); + std::shared_ptr sdc ( new SDC( piston, quadrature, tol, 5, 10 * nbNodes ) ); + + fsi::matrix functions ( quadrature->get_num_nodes(), 1 ); + int i = 0; + for ( auto node : quadrature->get_nodes() ) + { + functions( i, 0 ) = std::sin( node ); + i++; + } + + std::vector nodes = {0, 0.5, 0.3645, quadrature->get_nodes()[1]}; + + const fsi::matrix interp = sdc->data->interpolate( functions, nodes ); + + i = 0; + for ( auto node : nodes ) + { + scalar ref = std::sin( node ); + scalar error = abs( interp( i , 0 ) - ref ) / abs( ref + SMALL ); + ASSERT_LE( error, 1.0e-10 ); + i++; + } +} + +TEST( SDC, polynomialInterpolationGaussRadau ) +{ + scalar dt, q0, qdot0, As, Ac, omega, endTime, tol; + + int nbTimeSteps = 1; + + endTime = 10; + dt = endTime / nbTimeSteps; + As = 100; + Ac = As; + omega = 1; + q0 = -As; + qdot0 = -As; + tol = 1.0e-17; + + int nbNodes = 10; + std::shared_ptr > quadrature; + quadrature = std::shared_ptr >( new fsi::quadrature::GaussRadau( nbNodes ) ); + + std::shared_ptr piston ( new Piston( nbTimeSteps, dt, q0, qdot0, As, Ac, omega ) ); + std::shared_ptr sdc ( new SDC( piston, quadrature, tol, 5, 10 * nbNodes ) ); + + fsi::matrix functions ( quadrature->get_num_nodes(), 1 ); + int i = 0; + for ( auto node : quadrature->get_nodes() ) + { + functions( i, 0 ) = std::sin( node ); + i++; + } + + std::vector nodes = {0, 0.5, 0.3645, quadrature->get_nodes()[1]}; + + const fsi::matrix interp = sdc->data->interpolate( functions, nodes ); + + i = 0; + for ( auto node : nodes ) + { + scalar ref = std::sin( node ); + scalar error = abs( interp( i , 0 ) - ref ) / abs( ref + SMALL ); + ASSERT_LE( error, 1.0e-10 ); + i++; + } +} diff --git a/src/tests/app/test_uniform.C b/src/tests/testsuite-sdc/test_uniform.C similarity index 100% rename from src/tests/app/test_uniform.C rename to src/tests/testsuite-sdc/test_uniform.C diff --git a/src/tests/testsuite-sdc/tests.C b/src/tests/testsuite-sdc/tests.C new file mode 100644 index 00000000..113a1875 --- /dev/null +++ b/src/tests/testsuite-sdc/tests.C @@ -0,0 +1,17 @@ + +/* + * Author + * David Blom, TU Delft. All rights reserved. + */ + +#include "gtest/gtest.h" +#include + +int main( + int argc, + char ** argv + ) +{ + ::testing::InitGoogleTest( &argc, argv ); + return RUN_ALL_TESTS(); +} diff --git a/src/tests/testsuite-spacemapping/Make/files b/src/tests/testsuite-spacemapping/Make/files new file mode 100644 index 00000000..f02f3179 --- /dev/null +++ b/src/tests/testsuite-spacemapping/Make/files @@ -0,0 +1,25 @@ +tests.C +test_aggressivespacemapping.C +test_asmils.C +test_manifoldmapping.C +test_manifoldmappinglinearizedfsisolver.C +test_manifoldmappingsolver.C +test_mliqnilssolver.C +test_multilevelaggressivespacemappingsolver.C +test_multilevelasmils.C +test_multilevelimplicitfsisolver.C +test_multilevelmanifoldmappingsolver.C +test_multilevelmliqnilssolver.C +test_multileveloutputspacemappingsolver.C +test_multilevelsolver.C +test_multilevelspacemapping.C +test_outputspacemapping.C + +MonolithicFsiSolver.C +TubeFlowFluidSolver.C +TubeFlowLinearizedFluidSolver.C +TubeFlowLinearizedSolidSolver.C +TubeFlowLinearSolidSolver.C +TubeFlowSolidSolver.C + +EXE = $(FOAM_APPBIN)/testsuite-spacemapping diff --git a/src/tests/testsuite-spacemapping/Make/options b/src/tests/testsuite-spacemapping/Make/options new file mode 100644 index 00000000..f8042207 --- /dev/null +++ b/src/tests/testsuite-spacemapping/Make/options @@ -0,0 +1,53 @@ +c++WARN = -Wall -Wextra -Werror -Wno-literal-suffix + +EXE_INC = -std=c++11 \ + -I ../../fsi \ + -I ../../fsi/lnInclude \ + -I ../../fsi/solidSolvers \ + -DEIGEN_INITIALIZE_MATRICES_BY_NAN \ + -I ../../RBFmeshInterpolation/lnInclude/ \ + -isystem $(LIB_SRC)/finiteVolume/lnInclude \ + -isystem $(LIB_SRC)/dynamicMesh/lnInclude \ + -isystem $(LIB_SRC)/dynamicMesh/dynamicFvMesh/lnInclude \ + -isystem $(LIB_SRC)/dynamicMesh/dynamicMesh/lnInclude \ + -isystem $(LIB_SRC)/transportModels \ + -isystem $(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ + -isystem $(LIB_SRC)/turbulenceModels \ + -isystem $(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -isystem $(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \ + -isystem ../../thirdParty/eigen \ + -isystem ../../thirdParty/boost \ + -isystem ../../thirdParty/gtest/include \ + $(WM_DECOMP_INC) \ + -I ../../RBFMeshMotionSolver/lnInclude/ \ + -isystem $(LIB_SRC)/meshTools/lnInclude \ + -isystem $(LIB_SRC)/solidModels/lnInclude \ + -isystem ../../thirdParty/deal-fsi/include \ + -isystem ../../thirdParty/dealii/bin/include \ + -isystem ../../thirdParty/dealii/bin/include/deal.II/bundled \ + -isystem ../../thirdParty/dealii/bundled/umfpack/UMFPACK/Include \ + -isystem ../../thirdParty/dealii/bundled/umfpack/AMD/Include \ + -isystem ../../thirdParty/petsc/include \ + -isystem ../../thirdParty/petsc/x86_64/include + +EXE_LIBS = \ + -L$(FOAM_USER_LIBBIN) \ + -L../../thirdParty/gtest \ + -lgtest \ + -ldynamicFvMesh \ + -ltopoChangerFvMesh \ + -ldynamicMesh \ + -lmeshTools \ + -lincompressibleTransportModels \ + -lincompressibleTurbulenceModel \ + -lincompressibleRASModels \ + -lincompressibleLESModels \ + -lfiniteVolume \ + -lsolidModels \ + -lRBFMeshMotionSolver \ + -lbasicThermophysicalModels \ + -lspecie \ + -lcompressibleRASModels \ + -ldeal_II \ + -lfsi \ + -lboundaryConditions diff --git a/src/tests/testsuite-spacemapping/MonolithicFsiSolver.C b/src/tests/testsuite-spacemapping/MonolithicFsiSolver.C new file mode 120000 index 00000000..95811a4c --- /dev/null +++ b/src/tests/testsuite-spacemapping/MonolithicFsiSolver.C @@ -0,0 +1 @@ +../testsuite-fsi/MonolithicFsiSolver.C \ No newline at end of file diff --git a/src/tests/testsuite-spacemapping/MonolithicFsiSolver.H b/src/tests/testsuite-spacemapping/MonolithicFsiSolver.H new file mode 120000 index 00000000..ae7f5455 --- /dev/null +++ b/src/tests/testsuite-spacemapping/MonolithicFsiSolver.H @@ -0,0 +1 @@ +../testsuite-fsi/MonolithicFsiSolver.H \ No newline at end of file diff --git a/src/tests/testsuite-spacemapping/TubeFlowFluidSolver.C b/src/tests/testsuite-spacemapping/TubeFlowFluidSolver.C new file mode 120000 index 00000000..5c5b5911 --- /dev/null +++ b/src/tests/testsuite-spacemapping/TubeFlowFluidSolver.C @@ -0,0 +1 @@ +../testsuite-fsi/TubeFlowFluidSolver.C \ No newline at end of file diff --git a/src/tests/testsuite-spacemapping/TubeFlowFluidSolver.H b/src/tests/testsuite-spacemapping/TubeFlowFluidSolver.H new file mode 120000 index 00000000..58e8c2d2 --- /dev/null +++ b/src/tests/testsuite-spacemapping/TubeFlowFluidSolver.H @@ -0,0 +1 @@ +../testsuite-fsi/TubeFlowFluidSolver.H \ No newline at end of file diff --git a/src/tests/testsuite-spacemapping/TubeFlowLinearSolidSolver.C b/src/tests/testsuite-spacemapping/TubeFlowLinearSolidSolver.C new file mode 120000 index 00000000..cb70555e --- /dev/null +++ b/src/tests/testsuite-spacemapping/TubeFlowLinearSolidSolver.C @@ -0,0 +1 @@ +../testsuite-fsi/TubeFlowLinearSolidSolver.C \ No newline at end of file diff --git a/src/tests/testsuite-spacemapping/TubeFlowLinearSolidSolver.H b/src/tests/testsuite-spacemapping/TubeFlowLinearSolidSolver.H new file mode 120000 index 00000000..3d0987ee --- /dev/null +++ b/src/tests/testsuite-spacemapping/TubeFlowLinearSolidSolver.H @@ -0,0 +1 @@ +../testsuite-fsi/TubeFlowLinearSolidSolver.H \ No newline at end of file diff --git a/src/tests/testsuite-spacemapping/TubeFlowLinearizedFluidSolver.C b/src/tests/testsuite-spacemapping/TubeFlowLinearizedFluidSolver.C new file mode 120000 index 00000000..d48d296e --- /dev/null +++ b/src/tests/testsuite-spacemapping/TubeFlowLinearizedFluidSolver.C @@ -0,0 +1 @@ +../testsuite-fsi/TubeFlowLinearizedFluidSolver.C \ No newline at end of file diff --git a/src/tests/testsuite-spacemapping/TubeFlowLinearizedFluidSolver.H b/src/tests/testsuite-spacemapping/TubeFlowLinearizedFluidSolver.H new file mode 120000 index 00000000..e5c2e857 --- /dev/null +++ b/src/tests/testsuite-spacemapping/TubeFlowLinearizedFluidSolver.H @@ -0,0 +1 @@ +../testsuite-fsi/TubeFlowLinearizedFluidSolver.H \ No newline at end of file diff --git a/src/tests/testsuite-spacemapping/TubeFlowLinearizedSolidSolver.C b/src/tests/testsuite-spacemapping/TubeFlowLinearizedSolidSolver.C new file mode 120000 index 00000000..cd54b95d --- /dev/null +++ b/src/tests/testsuite-spacemapping/TubeFlowLinearizedSolidSolver.C @@ -0,0 +1 @@ +../testsuite-fsi/TubeFlowLinearizedSolidSolver.C \ No newline at end of file diff --git a/src/tests/testsuite-spacemapping/TubeFlowLinearizedSolidSolver.H b/src/tests/testsuite-spacemapping/TubeFlowLinearizedSolidSolver.H new file mode 120000 index 00000000..51b425ac --- /dev/null +++ b/src/tests/testsuite-spacemapping/TubeFlowLinearizedSolidSolver.H @@ -0,0 +1 @@ +../testsuite-fsi/TubeFlowLinearizedSolidSolver.H \ No newline at end of file diff --git a/src/tests/testsuite-spacemapping/TubeFlowSolidSolver.C b/src/tests/testsuite-spacemapping/TubeFlowSolidSolver.C new file mode 120000 index 00000000..1904d9ea --- /dev/null +++ b/src/tests/testsuite-spacemapping/TubeFlowSolidSolver.C @@ -0,0 +1 @@ +../testsuite-fsi/TubeFlowSolidSolver.C \ No newline at end of file diff --git a/src/tests/testsuite-spacemapping/TubeFlowSolidSolver.H b/src/tests/testsuite-spacemapping/TubeFlowSolidSolver.H new file mode 120000 index 00000000..5996c2f3 --- /dev/null +++ b/src/tests/testsuite-spacemapping/TubeFlowSolidSolver.H @@ -0,0 +1 @@ +../testsuite-fsi/TubeFlowSolidSolver.H \ No newline at end of file diff --git a/src/tests/app/test_aggressivespacemapping.C b/src/tests/testsuite-spacemapping/test_aggressivespacemapping.C similarity index 100% rename from src/tests/app/test_aggressivespacemapping.C rename to src/tests/testsuite-spacemapping/test_aggressivespacemapping.C diff --git a/src/tests/app/test_asmils.C b/src/tests/testsuite-spacemapping/test_asmils.C similarity index 100% rename from src/tests/app/test_asmils.C rename to src/tests/testsuite-spacemapping/test_asmils.C diff --git a/src/tests/app/test_manifoldmapping.C b/src/tests/testsuite-spacemapping/test_manifoldmapping.C similarity index 100% rename from src/tests/app/test_manifoldmapping.C rename to src/tests/testsuite-spacemapping/test_manifoldmapping.C diff --git a/src/tests/app/test_manifoldmappinglinearizedfsisolver.C b/src/tests/testsuite-spacemapping/test_manifoldmappinglinearizedfsisolver.C similarity index 100% rename from src/tests/app/test_manifoldmappinglinearizedfsisolver.C rename to src/tests/testsuite-spacemapping/test_manifoldmappinglinearizedfsisolver.C diff --git a/src/tests/app/test_manifoldmappingsolver.C b/src/tests/testsuite-spacemapping/test_manifoldmappingsolver.C similarity index 99% rename from src/tests/app/test_manifoldmappingsolver.C rename to src/tests/testsuite-spacemapping/test_manifoldmappingsolver.C index ac6f2b13..5332b5a6 100644 --- a/src/tests/app/test_manifoldmappingsolver.C +++ b/src/tests/testsuite-spacemapping/test_manifoldmappingsolver.C @@ -218,7 +218,7 @@ protected: SpaceMappingSolver * solver; }; -INSTANTIATE_TEST_CASE_P( testParameters, ManifoldMappingSolverParametrizedTest, ::testing::Combine( Bool(), Values( 0, 1, 4 ), Values( 1, 2 ), Values( 3 ), Values( 10, 20 ), Bool(), Bool(), Bool() ) ); +INSTANTIATE_TEST_CASE_P( testParameters, ManifoldMappingSolverParametrizedTest, ::testing::Combine( Bool(), Values( 0, 1, 4 ), Values( 2 ), Values( 3 ), Values( 10, 20 ), Bool(), Bool(), Bool() ) ); TEST_P( ManifoldMappingSolverParametrizedTest, object ) { diff --git a/src/tests/app/test_mliqnilssolver.C b/src/tests/testsuite-spacemapping/test_mliqnilssolver.C similarity index 100% rename from src/tests/app/test_mliqnilssolver.C rename to src/tests/testsuite-spacemapping/test_mliqnilssolver.C diff --git a/src/tests/app/test_multilevelaggressivespacemappingsolver.C b/src/tests/testsuite-spacemapping/test_multilevelaggressivespacemappingsolver.C similarity index 100% rename from src/tests/app/test_multilevelaggressivespacemappingsolver.C rename to src/tests/testsuite-spacemapping/test_multilevelaggressivespacemappingsolver.C diff --git a/src/tests/app/test_multilevelasmils.C b/src/tests/testsuite-spacemapping/test_multilevelasmils.C similarity index 100% rename from src/tests/app/test_multilevelasmils.C rename to src/tests/testsuite-spacemapping/test_multilevelasmils.C diff --git a/src/tests/app/test_multilevelimplicitfsisolver.C b/src/tests/testsuite-spacemapping/test_multilevelimplicitfsisolver.C similarity index 100% rename from src/tests/app/test_multilevelimplicitfsisolver.C rename to src/tests/testsuite-spacemapping/test_multilevelimplicitfsisolver.C diff --git a/src/tests/app/test_multilevelmanifoldmappingsolver.C b/src/tests/testsuite-spacemapping/test_multilevelmanifoldmappingsolver.C similarity index 100% rename from src/tests/app/test_multilevelmanifoldmappingsolver.C rename to src/tests/testsuite-spacemapping/test_multilevelmanifoldmappingsolver.C diff --git a/src/tests/app/test_multilevelmliqnilssolver.C b/src/tests/testsuite-spacemapping/test_multilevelmliqnilssolver.C similarity index 100% rename from src/tests/app/test_multilevelmliqnilssolver.C rename to src/tests/testsuite-spacemapping/test_multilevelmliqnilssolver.C diff --git a/src/tests/app/test_multileveloutputspacemappingsolver.C b/src/tests/testsuite-spacemapping/test_multileveloutputspacemappingsolver.C similarity index 100% rename from src/tests/app/test_multileveloutputspacemappingsolver.C rename to src/tests/testsuite-spacemapping/test_multileveloutputspacemappingsolver.C diff --git a/src/tests/app/test_multilevelsolver.C b/src/tests/testsuite-spacemapping/test_multilevelsolver.C similarity index 100% rename from src/tests/app/test_multilevelsolver.C rename to src/tests/testsuite-spacemapping/test_multilevelsolver.C diff --git a/src/tests/app/test_multilevelspacemapping.C b/src/tests/testsuite-spacemapping/test_multilevelspacemapping.C similarity index 99% rename from src/tests/app/test_multilevelspacemapping.C rename to src/tests/testsuite-spacemapping/test_multilevelspacemapping.C index dcc8b0f1..1ff9a0bb 100644 --- a/src/tests/app/test_multilevelspacemapping.C +++ b/src/tests/testsuite-spacemapping/test_multilevelspacemapping.C @@ -304,7 +304,7 @@ protected: shared_ptr solver; }; -INSTANTIATE_TEST_CASE_P( testParameters, MultiLevelSpaceMappingSolverParametrizedTest, ::testing::Combine( Values( 0, 2 ), Values( 0, 2 ), Values( 20, 40 ), Values( 0, 1, 2 ), Values( 0, 5 ) ) ); +INSTANTIATE_TEST_CASE_P( testParameters, MultiLevelSpaceMappingSolverParametrizedTest, ::testing::Combine( Values( 0, 2 ), Values( 2 ), Values( 20, 40 ), Values( 0, 1, 2 ), Values( 0, 5 ) ) ); TEST_P( MultiLevelSpaceMappingSolverParametrizedTest, run ) { diff --git a/src/tests/app/test_outputspacemapping.C b/src/tests/testsuite-spacemapping/test_outputspacemapping.C similarity index 100% rename from src/tests/app/test_outputspacemapping.C rename to src/tests/testsuite-spacemapping/test_outputspacemapping.C diff --git a/src/tests/testsuite-spacemapping/tests.C b/src/tests/testsuite-spacemapping/tests.C new file mode 100644 index 00000000..113a1875 --- /dev/null +++ b/src/tests/testsuite-spacemapping/tests.C @@ -0,0 +1,17 @@ + +/* + * Author + * David Blom, TU Delft. All rights reserved. + */ + +#include "gtest/gtest.h" +#include + +int main( + int argc, + char ** argv + ) +{ + ::testing::InitGoogleTest( &argc, argv ); + return RUN_ALL_TESTS(); +} diff --git a/src/tests/tubeflow/TubeFlowFluidSolver.C b/src/tests/tubeflow/TubeFlowFluidSolver.C index 856dda19..5c5b5911 120000 --- a/src/tests/tubeflow/TubeFlowFluidSolver.C +++ b/src/tests/tubeflow/TubeFlowFluidSolver.C @@ -1 +1 @@ -../app/TubeFlowFluidSolver.C \ No newline at end of file +../testsuite-fsi/TubeFlowFluidSolver.C \ No newline at end of file diff --git a/src/tests/tubeflow/TubeFlowFluidSolver.H b/src/tests/tubeflow/TubeFlowFluidSolver.H index 21ee46b4..58e8c2d2 120000 --- a/src/tests/tubeflow/TubeFlowFluidSolver.H +++ b/src/tests/tubeflow/TubeFlowFluidSolver.H @@ -1 +1 @@ -../app/TubeFlowFluidSolver.H \ No newline at end of file +../testsuite-fsi/TubeFlowFluidSolver.H \ No newline at end of file diff --git a/src/tests/tubeflow/TubeFlowLinearSolidSolver.C b/src/tests/tubeflow/TubeFlowLinearSolidSolver.C index 0b920537..cb70555e 120000 --- a/src/tests/tubeflow/TubeFlowLinearSolidSolver.C +++ b/src/tests/tubeflow/TubeFlowLinearSolidSolver.C @@ -1 +1 @@ -../app/TubeFlowLinearSolidSolver.C \ No newline at end of file +../testsuite-fsi/TubeFlowLinearSolidSolver.C \ No newline at end of file diff --git a/src/tests/tubeflow/TubeFlowLinearSolidSolver.H b/src/tests/tubeflow/TubeFlowLinearSolidSolver.H index acb02e6a..3d0987ee 120000 --- a/src/tests/tubeflow/TubeFlowLinearSolidSolver.H +++ b/src/tests/tubeflow/TubeFlowLinearSolidSolver.H @@ -1 +1 @@ -../app/TubeFlowLinearSolidSolver.H \ No newline at end of file +../testsuite-fsi/TubeFlowLinearSolidSolver.H \ No newline at end of file diff --git a/src/tests/tubeflow/TubeFlowLinearizedFluidSolver.C b/src/tests/tubeflow/TubeFlowLinearizedFluidSolver.C index 1f476409..d48d296e 120000 --- a/src/tests/tubeflow/TubeFlowLinearizedFluidSolver.C +++ b/src/tests/tubeflow/TubeFlowLinearizedFluidSolver.C @@ -1 +1 @@ -../app/TubeFlowLinearizedFluidSolver.C \ No newline at end of file +../testsuite-fsi/TubeFlowLinearizedFluidSolver.C \ No newline at end of file diff --git a/src/tests/tubeflow/TubeFlowLinearizedFluidSolver.H b/src/tests/tubeflow/TubeFlowLinearizedFluidSolver.H index b9b27fa0..e5c2e857 120000 --- a/src/tests/tubeflow/TubeFlowLinearizedFluidSolver.H +++ b/src/tests/tubeflow/TubeFlowLinearizedFluidSolver.H @@ -1 +1 @@ -../app/TubeFlowLinearizedFluidSolver.H \ No newline at end of file +../testsuite-fsi/TubeFlowLinearizedFluidSolver.H \ No newline at end of file diff --git a/src/tests/tubeflow/TubeFlowLinearizedSolidSolver.C b/src/tests/tubeflow/TubeFlowLinearizedSolidSolver.C index b134f635..cd54b95d 120000 --- a/src/tests/tubeflow/TubeFlowLinearizedSolidSolver.C +++ b/src/tests/tubeflow/TubeFlowLinearizedSolidSolver.C @@ -1 +1 @@ -../app/TubeFlowLinearizedSolidSolver.C \ No newline at end of file +../testsuite-fsi/TubeFlowLinearizedSolidSolver.C \ No newline at end of file diff --git a/src/tests/tubeflow/TubeFlowLinearizedSolidSolver.H b/src/tests/tubeflow/TubeFlowLinearizedSolidSolver.H index 98bd475b..51b425ac 120000 --- a/src/tests/tubeflow/TubeFlowLinearizedSolidSolver.H +++ b/src/tests/tubeflow/TubeFlowLinearizedSolidSolver.H @@ -1 +1 @@ -../app/TubeFlowLinearizedSolidSolver.H \ No newline at end of file +../testsuite-fsi/TubeFlowLinearizedSolidSolver.H \ No newline at end of file diff --git a/src/tests/tubeflow/TubeFlowSolidSolver.C b/src/tests/tubeflow/TubeFlowSolidSolver.C index 89f77ccf..1904d9ea 120000 --- a/src/tests/tubeflow/TubeFlowSolidSolver.C +++ b/src/tests/tubeflow/TubeFlowSolidSolver.C @@ -1 +1 @@ -../app/TubeFlowSolidSolver.C \ No newline at end of file +../testsuite-fsi/TubeFlowSolidSolver.C \ No newline at end of file diff --git a/src/tests/tubeflow/TubeFlowSolidSolver.H b/src/tests/tubeflow/TubeFlowSolidSolver.H index c8fb8ef3..5996c2f3 120000 --- a/src/tests/tubeflow/TubeFlowSolidSolver.H +++ b/src/tests/tubeflow/TubeFlowSolidSolver.H @@ -1 +1 @@ -../app/TubeFlowSolidSolver.H \ No newline at end of file +../testsuite-fsi/TubeFlowSolidSolver.H \ No newline at end of file diff --git a/src/thirdParty/Allmake b/src/thirdParty/Allmake index c1f96e61..0933b241 100755 --- a/src/thirdParty/Allmake +++ b/src/thirdParty/Allmake @@ -2,6 +2,7 @@ set -e +./compile_petsc ./compile_dealii ./compile_gtest ./compile_precice diff --git a/src/thirdParty/compile_dealii b/src/thirdParty/compile_dealii index bb1ba23a..e34c70f3 100755 --- a/src/thirdParty/compile_dealii +++ b/src/thirdParty/compile_dealii @@ -3,100 +3,23 @@ set -e set -x -METIS_VERSION=5.1.0 -PARMETIS_VERSION=4.0.3 PETSC_VERSION=3.6.3 DEALII_VERSION=8.3.0 BOOST_VERSION=1_55_0 BOOST_VERSION_DOT=1.55.0 export PETSC_ARCH=x86_64 -CORES=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu) - -if [ ! -d "boost" ]; then +if [ ! -d "boost_${BOOST_VERSION}" ]; then rm -rf boost* wget -O boost_${BOOST_VERSION}.tar.bz2 http://downloads.sourceforge.net/project/boost/boost/${BOOST_VERSION_DOT}/boost_${BOOST_VERSION}.tar.bz2 tar jxf boost_${BOOST_VERSION}.tar.bz2 rm -f boost_${BOOST_VERSION}.tar.bz2 - ln -s boost_${BOOST_VERSION} boost fi -if [ ! -d "metis" ]; then - - rm -rf metis* - - wget http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-${METIS_VERSION}.tar.gz - - tar -zxf metis-${METIS_VERSION}.tar.gz - rm metis-${METIS_VERSION}.tar.gz - - ln -s metis-${METIS_VERSION} metis - - cd metis-${METIS_VERSION} - - export CC=mpicc - export CXX=mpicxx - - make config prefix=`pwd`/build - - make install - - cd ../ - -fi - -if [ ! -d "parmetis" ]; then - - rm -rf parmetis* - - wget http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/parmetis-${PARMETIS_VERSION}.tar.gz - - tar -zxf parmetis-${PARMETIS_VERSION}.tar.gz - rm parmetis-${PARMETIS_VERSION}.tar.gz - ln -s parmetis-${PARMETIS_VERSION} parmetis - - cd parmetis-${PARMETIS_VERSION} - - export CC=mpicc - export CXX=mpicxx - - make config prefix=`pwd`/build +rm -f boost +ln -s boost_${BOOST_VERSION} boost - make install - - cd ../ - -fi - -if [ ! -d "petsc" ]; then - - rm -rf petsc* - - wget http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-${PETSC_VERSION}.tar.gz - - tar -zxf petsc-${PETSC_VERSION}.tar.gz - - rm petsc-${PETSC_VERSION}.tar.gz - - ln -s petsc-${PETSC_VERSION} petsc - - cd petsc-${PETSC_VERSION} - - export PETSC_DIR=`pwd` - - ./config/configure.py --with-shared=1 --with-x=0 --with-mpi=1 --download-hypre=1 --download-mumps --download-scalapack --download-ptscotch --download-suitesparse --download-fblaslapack=1 - - make - - make test - - cd ../ - -fi - -cp petsc/${PETSC_ARCH}/lib/lib* ${FOAM_LIBBIN}/ - -if [ ! -d "dealii" ]; then +if [ ! -d "dealii-${DEALII_VERSION}" ]; then rm -rf dealii* @@ -104,8 +27,6 @@ if [ ! -d "dealii" ]; then tar -zxf dealii-${DEALII_VERSION}.tar.gz - ln -s dealii-${DEALII_VERSION} dealii - rm dealii-${DEALII_VERSION}.tar.gz export PETSC_DIR=`pwd`/petsc @@ -115,8 +36,6 @@ if [ ! -d "dealii" ]; then export CXX=mpicxx export F77=mpif77 export F90=mpif90 - export METIS_DIR=`pwd`/metis - export PARMETIS_DIR=`pwd`/parmetis cd dealii-${DEALII_VERSION} @@ -124,16 +43,20 @@ if [ ! -d "dealii" ]; then mkdir bin cd build - cmake -DCMAKE_INSTALL_PREFIX=`pwd`/../bin .. + cmake -DCMAKE_INSTALL_PREFIX=`pwd`/../bin --with-umfpack .. - make -j $CORES install + make -j $WM_NCOMPPROCS install - make -j $CORES test + make -j $WM_NCOMPPROCS test cd ../.. + cp dealii-${DEALII_VERSION}/bin/lib/libdeal* ${FOAM_LIBBIN}/ + fi -cp dealii/bin/lib/libdeal* ${FOAM_LIBBIN}/ + +rm -f dealii +ln -s dealii-${DEALII_VERSION} dealii cd deal-fsi @@ -144,4 +67,4 @@ ln -s ../eigen cmake -DDEAL_II_DIR=../dealii/bin/ . -make +make -j $WM_NCOMPPROCS diff --git a/src/thirdParty/compile_gtest b/src/thirdParty/compile_gtest index 053fe880..bb99e363 100755 --- a/src/thirdParty/compile_gtest +++ b/src/thirdParty/compile_gtest @@ -20,7 +20,7 @@ if [ ! -d "gtest-${VERSION}" ]; then cmake -DCMAKE_CXX_COMPILER=g++ -DCMAKE_CC_COMPILER=gcc - make + make -j $WM_NCOMPPROCS cd ../ @@ -28,6 +28,7 @@ if [ ! -d "gtest-${VERSION}" ]; then rm -rf gtest-${VERSION}.zip - ln -s gtest-${VERSION} gtest - fi + +rm -f gtest +ln -s gtest-${VERSION} gtest diff --git a/src/thirdParty/compile_petsc b/src/thirdParty/compile_petsc new file mode 100755 index 00000000..3a7ce643 --- /dev/null +++ b/src/thirdParty/compile_petsc @@ -0,0 +1,35 @@ +#!/bin/bash + +set -e + +PETSC_VERSION=3.6.3 +export PETSC_ARCH=x86_64 + +if [ ! -d "petsc-${PETSC_VERSION}" ]; then + + rm -rf petsc* + + wget http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-${PETSC_VERSION}.tar.gz + + tar -zxf petsc-lite-${PETSC_VERSION}.tar.gz + + rm petsc-lite-${PETSC_VERSION}.tar.gz + + cd petsc-${PETSC_VERSION} + + export PETSC_DIR=`pwd` + + ./config/configure.py --with-shared=1 --with-x=0 --with-mpi=1 --download-hypre=1 --download-mumps --download-scalapack --download-ptscotch --download-suitesparse --download-fblaslapack=1 + + make + + make test + + cd ../ + + cp petsc-${PETSC_VERSION}/${PETSC_ARCH}/lib/lib* ${FOAM_LIBBIN}/ + +fi + +rm -f petsc +ln -s petsc-${PETSC_VERSION} petsc diff --git a/src/thirdParty/compile_precice b/src/thirdParty/compile_precice index f209c480..bbea8694 100755 --- a/src/thirdParty/compile_precice +++ b/src/thirdParty/compile_precice @@ -3,8 +3,6 @@ set -e set -x -CORES=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu) - # Ensure the script is executed in this directory DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) cd $DIR @@ -33,8 +31,8 @@ export PETSC_ARCH=x86_64 # Build preCICE cd precice -scons -j $CORES build=release python=off petsc=on compiler=mpicxx -scons -j $CORES build=release python=off petsc=on compiler=mpicxx solib +scons -j $WM_NCOMPPROCS build=release python=off petsc=on compiler=mpicxx +scons -j $WM_NCOMPPROCS build=release python=off petsc=on compiler=mpicxx solib mkdir -p ${FOAM_LIBBIN} mkdir -p ${FOAM_APPBIN} diff --git a/src/thirdParty/compile_precice_cluster b/src/thirdParty/compile_precice_cluster index 8241fbd7..49caa23a 100755 --- a/src/thirdParty/compile_precice_cluster +++ b/src/thirdParty/compile_precice_cluster @@ -49,8 +49,8 @@ export CPLUS_INCLUDE_PATH=`pwd`/eigen # Build preCICE cd precice -scons -j 4 build=release python=off petsc=off compiler=mpicxx -scons -j 4 build=release python=off petsc=off compiler=mpicxx solib +scons -j $WM_NCOMPPROCS build=release python=off petsc=off compiler=mpicxx +scons -j $WM_NCOMPPROCS build=release python=off petsc=off compiler=mpicxx solib mkdir -p ${FOAM_USER_LIBBIN} mkdir -p ${FOAM_USER_APPBIN} diff --git a/src/thirdParty/compile_supermuc b/src/thirdParty/compile_supermuc index 9381ace8..67a9129b 100755 --- a/src/thirdParty/compile_supermuc +++ b/src/thirdParty/compile_supermuc @@ -92,9 +92,9 @@ cd build cmake -DCMAKE_INSTALL_PREFIX=`pwd`/../bin .. -make -j 32 install +make -j $WM_NCOMPPROCS install -make -j 32 test +make -j $WM_NCOMPPROCS test cd ../.. @@ -138,8 +138,8 @@ export CPLUS_INCLUDE_PATH=`pwd`/eigen cd precice python tools/python_scripts/insert_mpi_header.py -scons -j 32 build=release python=off petsc=on compiler=mpicxx -scons -j 32 build=release python=off petsc=on compiler=mpicxx solib +scons -j $WM_NCOMPPROCS build=release python=off petsc=on compiler=mpicxx +scons -j $WM_NCOMPPROCS build=release python=off petsc=on compiler=mpicxx solib mkdir -p ${FOAM_USER_LIBBIN} mkdir -p ${FOAM_USER_APPBIN} @@ -172,7 +172,7 @@ cd build CC=gcc CXX=g++ cmake -DBUILD_SHARED_LIBS=ON -DBoost_NO_BOOST_CMAKE=TRUE -DBoost_NO_SYSTEM_PATHS=TRUE -DBOOST_ROOT=${BOOST_ROOT} .. -make -j 32 +make -j $WM_NCOMPPROCS # Copy the shared library to $FOAM_USER_LIBBIN mkdir -p ${FOAM_USER_LIBBIN} diff --git a/src/thirdParty/compile_yaml b/src/thirdParty/compile_yaml index 960c448b..3177a739 100755 --- a/src/thirdParty/compile_yaml +++ b/src/thirdParty/compile_yaml @@ -9,12 +9,20 @@ cd $DIR # Assume that preCICE has been built before, and boost is already downloaded. VERSION=0.5.3 +BOOST_VERSION=1_55_0 +BOOST_VERSION_DOT=1.55.0 + +# Download Boost +if [ ! -d "boost_${BOOST_VERSION}" ]; then + wget -O boost_${BOOST_VERSION}.tar.bz2 http://downloads.sourceforge.net/project/boost/boost/${BOOST_VERSION_DOT}/boost_${BOOST_VERSION}.tar.bz2 + tar jxf boost_${BOOST_VERSION}.tar.bz2 + rm -f boost_${BOOST_VERSION}.tar.bz2 +fi -if [ ! -e "yaml-cpp-release-${VERSION}" ]; then - - # Define which versions of the different packages are used +rm -f boost +ln -s boost_${BOOST_VERSION} boost - export BOOST_VERSION=1_55_0 +if [ ! -e "yaml-cpp-release-${VERSION}" ]; then rm -rf yaml-cpp* @@ -25,15 +33,11 @@ if [ ! -e "yaml-cpp-release-${VERSION}" ]; then tar -zxvf yaml-cpp-${VERSION}.tar.gz rm -f yaml-cpp-${VERSION}.tar.gz - ln -s yaml-cpp-release-${VERSION} yaml-cpp - rm -f boost - ln -s boost_${BOOST_VERSION} boost - export BOOST_ROOT=`pwd`/boost_${BOOST_VERSION} echo $BOOST_ROOT cd $BOOST_ROOT - cd ../yaml-cpp + cd ../yaml-cpp-release-${VERSION} mkdir build @@ -41,11 +45,14 @@ if [ ! -e "yaml-cpp-release-${VERSION}" ]; then CC=gcc CXX=g++ cmake -DBUILD_SHARED_LIBS=ON -DBoost_NO_BOOST_CMAKE=TRUE -DBoost_NO_SYSTEM_PATHS=TRUE -DBOOST_ROOT=${BOOST_ROOT} .. - make -j 4 + make -j $WM_NCOMPPROCS cd ../.. fi +rm -f yaml-cpp +ln -s yaml-cpp-release-${VERSION} yaml-cpp + mkdir -p ${FOAM_LIBBIN} cp yaml-cpp-release-${VERSION}/build/libyaml-cpp* ${FOAM_LIBBIN}/ diff --git a/wercker.yml b/wercker.yml index ef1bb158..d15b22ab 100644 --- a/wercker.yml +++ b/wercker.yml @@ -4,8 +4,11 @@ command-timeout: 60 build: steps: - - install-packages: - packages: git build-essential flex bison zlib1g-dev qt4-dev-tools libqt4-dev gnuplot libreadline-dev libncurses-dev libxt-dev libopenmpi-dev openmpi-bin rpm wget cmake hwloc scotch gfortran python unzip scons libiberty-dev + - script: + name: install packages + code: | + apt-get update + apt-get -y install git build-essential flex bison zlib1g-dev libreadline-dev libncurses-dev libxt-dev libopenmpi-dev openmpi-bin rpm wget cmake hwloc scotch gfortran python unzip scons libiberty-dev libscotch-dev liblapack-dev libblas-dev - script: name: initialize git submodules code: | @@ -47,7 +50,13 @@ build: export PARAVIEW_SYSTEM=1 export CMAKE_SYSTEM=1 export HWLOC_SYSTEM=1 + export SCOTCH_SYSTEM=1 + export SCOTCH_DIR=/usr + export SCOTCH_BIN_DIR=/usr/bin + export SCOTCH_LIB_DIR=/usr/lib + export SCOTCH_INCLUDE_DIR=/usr/include/scotch + export PYFOAM_SYSTEM=1 export CUDA_IGNORE=1 export SWAK4FOAM_SYSTEM=1 @@ -63,7 +72,34 @@ build: unset WM_THIRD_PARTY_USE_SCOTCH_604 unset WM_THIRD_PARTY_USE_PYFOAM_064 - src/Allwmake + . $WM_PROJECT_DIR/etc/settings.sh + cd $WM_PROJECT_DIR/src + wmakePrintBuild -check || /bin/rm -f foam/Make/$WM_OPTIONS/global.? 2>/dev/null + wmakeLnInclude foam + wmakeLnInclude meshTools + wmakeLnInclude OSspecific/$WM_OSTYPE + wmake libo OSspecific/$WM_OSTYPE + wmake libso foam + decompositionMethods/AllwmakeLnInclude + decompositionMethods/Allwmake + wmake libso lagrangian/basic + wmake libso edgeMesh + wmake libso surfMesh + wmake libso meshTools + wmake libso finiteVolume + wmake libso finiteArea + wmake libso lduSolvers + wmake libso tetFiniteElement + dynamicMesh/AllwmakeLnInclude + dynamicMesh/Allwmake + wmake libso coupledMatrix + wmake libso sampling + wmake libso ODE + thermophysicalModels/Allwmake + transportModels/Allwmake + turbulenceModels/Allwmake + lagrangian/Allwmake + wmake libso solidModels - script: name: environment variable $FOAM_USER_SRC code: | @@ -92,6 +128,27 @@ build: fi source $FOAM_SRC/../etc/bashrc + - script: + name: PETSc + code: | + + export PARAVIEW_SYSTEM=1 + export CMAKE_SYSTEM=1 + export HWLOC_SYSTEM=1 + export SCOTCH_SYSTEM=1 + export PYFOAM_SYSTEM=1 + export CUDA_IGNORE=1 + export SWAK4FOAM_SYSTEM=1 + export WM_MPLIB=SYSTEMOPENMPI + export OPENMPI_DIR=/usr + export OPENMPI_BIN_DIR=$OPENMPI_DIR/bin + export FOAM_INST_DIR=`pwd` + + source foam-extend-3.2/etc/bashrc + + cd src/thirdParty + + ./compile_petsc - script: name: deal.II code: | @@ -177,7 +234,212 @@ build: ./compile_yaml - script: - name: build + name: boundary conditions + code: | + + export PARAVIEW_SYSTEM=1 + export CMAKE_SYSTEM=1 + export HWLOC_SYSTEM=1 + export SCOTCH_SYSTEM=1 + export PYFOAM_SYSTEM=1 + export CUDA_IGNORE=1 + export SWAK4FOAM_SYSTEM=1 + export WM_MPLIB=SYSTEMOPENMPI + export OPENMPI_DIR=/usr + export OPENMPI_BIN_DIR=$OPENMPI_DIR/bin + export FOAM_INST_DIR=`pwd` + + source foam-extend-3.2/etc/bashrc + + wmakeLnInclude src/boundaryConditions + wmakeLnInclude src/fvSchemes + wmakeLnInclude src/fsi + wmakeLnInclude src/RBFMeshMotionSolver + wmakeLnInclude src/SRFModelAbs + wmake libso src/boundaryConditions + - script: + name: schemes + code: | + + export PARAVIEW_SYSTEM=1 + export CMAKE_SYSTEM=1 + export HWLOC_SYSTEM=1 + export SCOTCH_SYSTEM=1 + export PYFOAM_SYSTEM=1 + export CUDA_IGNORE=1 + export SWAK4FOAM_SYSTEM=1 + export WM_MPLIB=SYSTEMOPENMPI + export OPENMPI_DIR=/usr + export OPENMPI_BIN_DIR=$OPENMPI_DIR/bin + export FOAM_INST_DIR=`pwd` + + source foam-extend-3.2/etc/bashrc + + wmake libso src/fvSchemes + - script: + name: fsi + code: | + + export PARAVIEW_SYSTEM=1 + export CMAKE_SYSTEM=1 + export HWLOC_SYSTEM=1 + export SCOTCH_SYSTEM=1 + export PYFOAM_SYSTEM=1 + export CUDA_IGNORE=1 + export SWAK4FOAM_SYSTEM=1 + export WM_MPLIB=SYSTEMOPENMPI + export OPENMPI_DIR=/usr + export OPENMPI_BIN_DIR=$OPENMPI_DIR/bin + export FOAM_INST_DIR=`pwd` + + source foam-extend-3.2/etc/bashrc + + wmake libso src/fsi + - script: + name: radial basis function mesh motion solver + code: | + + export PARAVIEW_SYSTEM=1 + export CMAKE_SYSTEM=1 + export HWLOC_SYSTEM=1 + export SCOTCH_SYSTEM=1 + export PYFOAM_SYSTEM=1 + export CUDA_IGNORE=1 + export SWAK4FOAM_SYSTEM=1 + export WM_MPLIB=SYSTEMOPENMPI + export OPENMPI_DIR=/usr + export OPENMPI_BIN_DIR=$OPENMPI_DIR/bin + export FOAM_INST_DIR=`pwd` + + source foam-extend-3.2/etc/bashrc + + wmake libso src/RBFMeshMotionSolver + - script: + name: FSI solvers + code: | + + export PARAVIEW_SYSTEM=1 + export CMAKE_SYSTEM=1 + export HWLOC_SYSTEM=1 + export SCOTCH_SYSTEM=1 + export PYFOAM_SYSTEM=1 + export CUDA_IGNORE=1 + export SWAK4FOAM_SYSTEM=1 + export WM_MPLIB=SYSTEMOPENMPI + export OPENMPI_DIR=/usr + export OPENMPI_BIN_DIR=$OPENMPI_DIR/bin + export FOAM_INST_DIR=`pwd` + + source foam-extend-3.2/etc/bashrc + + wmake applications/solvers/fsi/fsiFoam + wmake applications/solvers/fsi/solidFoam + wmake applications/solvers/fsi/fluidFoam + - script: + name: precice FSI solvers + code: | + + export PARAVIEW_SYSTEM=1 + export CMAKE_SYSTEM=1 + export HWLOC_SYSTEM=1 + export SCOTCH_SYSTEM=1 + export PYFOAM_SYSTEM=1 + export CUDA_IGNORE=1 + export SWAK4FOAM_SYSTEM=1 + export WM_MPLIB=SYSTEMOPENMPI + export OPENMPI_DIR=/usr + export OPENMPI_BIN_DIR=$OPENMPI_DIR/bin + export FOAM_INST_DIR=`pwd` + + source foam-extend-3.2/etc/bashrc + + wmake applications/solvers/fsi/fsiSolidFoam + wmake applications/solvers/fsi/fsiFluidFoam + - script: + name: test app + code: | + + export PARAVIEW_SYSTEM=1 + export CMAKE_SYSTEM=1 + export HWLOC_SYSTEM=1 + export SCOTCH_SYSTEM=1 + export PYFOAM_SYSTEM=1 + export CUDA_IGNORE=1 + export SWAK4FOAM_SYSTEM=1 + export WM_MPLIB=SYSTEMOPENMPI + export OPENMPI_DIR=/usr + export OPENMPI_BIN_DIR=$OPENMPI_DIR/bin + export FOAM_INST_DIR=`pwd` + + source foam-extend-3.2/etc/bashrc + + wmake src/tests/testsuite-dealii + wmake src/tests/testsuite-fsi + wmake src/tests/testsuite-rbf + wmake src/tests/testsuite-sdc + wmake src/tests/testsuite-spacemapping + - script: + name: testsuite-sdc + code: | + + export PARAVIEW_SYSTEM=1 + export CMAKE_SYSTEM=1 + export HWLOC_SYSTEM=1 + export SCOTCH_SYSTEM=1 + export PYFOAM_SYSTEM=1 + export CUDA_IGNORE=1 + export SWAK4FOAM_SYSTEM=1 + export WM_MPLIB=SYSTEMOPENMPI + export OPENMPI_DIR=/usr + export OPENMPI_BIN_DIR=$OPENMPI_DIR/bin + export FOAM_INST_DIR=`pwd` + + source foam-extend-3.2/etc/bashrc + + cd src/tests + python runTests.py testsuite-sdc + - script: + name: testsuite-rbf + code: | + + export PARAVIEW_SYSTEM=1 + export CMAKE_SYSTEM=1 + export HWLOC_SYSTEM=1 + export SCOTCH_SYSTEM=1 + export PYFOAM_SYSTEM=1 + export CUDA_IGNORE=1 + export SWAK4FOAM_SYSTEM=1 + export WM_MPLIB=SYSTEMOPENMPI + export OPENMPI_DIR=/usr + export OPENMPI_BIN_DIR=$OPENMPI_DIR/bin + export FOAM_INST_DIR=`pwd` + + source foam-extend-3.2/etc/bashrc + + cd src/tests + python runTests.py testsuite-rbf + - script: + name: testsuite-spacemapping + code: | + + export PARAVIEW_SYSTEM=1 + export CMAKE_SYSTEM=1 + export HWLOC_SYSTEM=1 + export SCOTCH_SYSTEM=1 + export PYFOAM_SYSTEM=1 + export CUDA_IGNORE=1 + export SWAK4FOAM_SYSTEM=1 + export WM_MPLIB=SYSTEMOPENMPI + export OPENMPI_DIR=/usr + export OPENMPI_BIN_DIR=$OPENMPI_DIR/bin + export FOAM_INST_DIR=`pwd` + + source foam-extend-3.2/etc/bashrc + + cd src/tests + python runTests.py testsuite-spacemapping + - script: + name: testsuite-fsi code: | export PARAVIEW_SYSTEM=1 @@ -194,9 +456,10 @@ build: source foam-extend-3.2/etc/bashrc - ./Allwmake + cd src/tests + python runTests.py testsuite-fsi - script: - name: test suite + name: testsuite-dealii code: | export PARAVIEW_SYSTEM=1 @@ -213,4 +476,5 @@ build: source foam-extend-3.2/etc/bashrc - tests + cd src/tests + python runTests.py testsuite-dealii