Skip to content
This repository has been archived by the owner on May 9, 2022. It is now read-only.

Commit

Permalink
Merge pull request #165 from davidsblom/travis
Browse files Browse the repository at this point in the history
Use wercker for continuous integration
  • Loading branch information
David Blom committed Feb 13, 2016
2 parents 8e3daba + b51480f commit 0c8d0da
Show file tree
Hide file tree
Showing 207 changed files with 1,671 additions and 712 deletions.
6 changes: 5 additions & 1 deletion Allclean
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion Allwmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
-----------

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion applications/solvers/fsi/fluidFoam/fluidFoam.C
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ int main(
int minSweeps = piesConfig["min-sweeps"].as<int>();
int maxSweeps = piesConfig["max-sweeps"].as<int>();

timeSolver = std::shared_ptr<sdc::TimeIntegrationScheme> ( new sdc::PIES( solver, rho, delta, tol, minSweeps, maxSweeps ) );
timeSolver = std::shared_ptr<sdc::TimeIntegrationScheme> ( new sdc::PIES<boost::multiprecision::cpp_dec_float_50>( solver, rho, delta, tol, minSweeps, maxSweeps ) );
}
}

Expand Down
6 changes: 0 additions & 6 deletions applications/solvers/fsi/fsiFoam/Make/options
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion applications/solvers/fsi/fsiFoam/fsiFoam.C
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ int main(
int minSweeps = piesConfig["min-sweeps"].as<int>();
int maxSweeps = piesConfig["max-sweeps"].as<int>();

timeSolver = std::shared_ptr<sdc::TimeIntegrationScheme> ( new sdc::PIES( sdcFsiSolver, rho, delta, tol, minSweeps, maxSweeps ) );
timeSolver = std::shared_ptr<sdc::TimeIntegrationScheme> ( new sdc::PIES<boost::multiprecision::cpp_dec_float_50>( sdcFsiSolver, rho, delta, tol, minSweeps, maxSweeps ) );
}

assert( timeSolver );
Expand Down
2 changes: 1 addition & 1 deletion applications/solvers/fsi/solidFoam/solidFoam.C
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ int main(
int minSweeps = piesConfig["min-sweeps"].as<int>();
int maxSweeps = piesConfig["max-sweeps"].as<int>();

timeSolver = std::shared_ptr<sdc::TimeIntegrationScheme> ( new sdc::PIES( solver, rho, delta, tol, minSweeps, maxSweeps ) );
timeSolver = std::shared_ptr<sdc::TimeIntegrationScheme> ( new sdc::PIES<boost::multiprecision::cpp_dec_float_50>( solver, rho, delta, tol, minSweeps, maxSweeps ) );
}

assert( solid || timeSolver );
Expand Down
11 changes: 11 additions & 0 deletions src/fsi/ClenshawCurtis.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

#include "ClenshawCurtis.H"
#include "fvCFD.H"

namespace fsi
{
namespace quadrature
{
template class ClenshawCurtis<scalar>;
}
}
150 changes: 150 additions & 0 deletions src/fsi/DataStorage.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@

/*
* Author
* David Blom, TU Delft. All rights reserved.
*/

#include "DataStorage.H"

namespace sdc
{
DataStorage::DataStorage(
std::shared_ptr<fsi::quadrature::IQuadrature<scalar> > 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<scalar> & nodes, scalar dt ) const
{
std::vector<scalar> quadratureNodes = quadrature->get_nodes();

if ( not quadrature->left_is_node() )
quadratureNodes.erase( quadratureNodes.begin() );

fsi::quadrature::Matrix<scalar> q_matrix = fsi::quadrature::compute_q_matrix( quadratureNodes, nodes );

if ( not quadrature->left_is_node() )
{
fsi::quadrature::Matrix<scalar> 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<scalar> data = dt * q_matrix * getFunctions();

for ( int i = 0; i < data.rows(); i++ )
data.row( i ) += getSolutions().row( 0 );

return data;
}

template<typename scalar>
static fsi::quadrature::Matrix<scalar> compute_interpolation_matrix(
const std::vector<scalar> & from,
const std::vector<scalar> & 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<scalar> q_mat = fsi::quadrature::Matrix<scalar>::Zero( to_size, from_size );

for ( size_t m = 0; m < from_size; ++m )
{
fsi::quadrature::Polynomial<scalar> 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<scalar> & nodes ) const
{
std::vector<scalar> quadratureNodes = quadrature->get_nodes();
fsi::quadrature::Matrix<scalar> 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;
}
}
52 changes: 52 additions & 0 deletions src/fsi/DataStorage.H
Original file line number Diff line number Diff line change
@@ -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<fsi::quadrature::IQuadrature<scalar> >,
int N );

~DataStorage();

const fsi::matrix & getFunctions() const;

const fsi::matrix & getSolutions() const;

const fsi::matrix integrate( const std::vector<scalar> & nodes, scalar dt ) const;

const fsi::matrix interpolate(
const fsi::matrix functions,
const std::vector<scalar> & 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<fsi::quadrature::IQuadrature<scalar> > quadrature;
fsi::matrix F, solStages;
};
}
11 changes: 11 additions & 0 deletions src/fsi/GaussLobatto.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

#include "GaussLobatto.H"
#include "fvCFD.H"

namespace fsi
{
namespace quadrature
{
template class GaussLobatto<scalar>;
}
}
11 changes: 11 additions & 0 deletions src/fsi/GaussRadau.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

#include "GaussRadau.H"
#include "fvCFD.H"

namespace fsi
{
namespace quadrature
{
template class GaussRadau<scalar>;
}
}
8 changes: 8 additions & 0 deletions src/fsi/Make/files
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit 0c8d0da

Please sign in to comment.