Commit 27dd2044 authored by jannick.wolters's avatar jannick.wolters
Browse files

updated gitlab ci; removed all compiler warnings


Former-commit-id: 45d5eb25
parent 42cb7fd9
......@@ -8,7 +8,7 @@ unit_tests:
script:
- git submodule update --init --recursive
- cd code/build/release
- cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug ../../
- cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -Dbuild_tests=ON ../../
- ninja
- OMP_NUM_THREADS=1 ./unit_tests -r junit > unit_tests_report.xml
- gcovr -e ../../ext/ -e ../../tests/ -r ../../
......
......@@ -493,6 +493,11 @@ void Config::SetPostprocessing() {
CURRENT_FUNCTION );
}
break;
case CSD_SN_NOTRAFO_SOLVER:
case CSD_SN_FOKKERPLANCK_SOLVER:
case CSD_SN_FOKKERPLANCK_TRAFO_SOLVER:
case CSD_SN_FOKKERPLANCK_TRAFO_SOLVER_2D:
case CSD_SN_FOKKERPLANCK_TRAFO_SH_SOLVER_2D:
case CSD_SN_SOLVER:
supportedGroups = { MINIMAL, DOSE };
if( supportedGroups.end() == std::find( supportedGroups.begin(), supportedGroups.end(), _volumeOutput[idx_volOutput] ) ) {
......
......@@ -27,7 +27,7 @@ VectorVector Checkerboard_SN::GetScatteringXS( const Vector& energies ) { return
VectorVector Checkerboard_SN::GetTotalXS( const Vector& energies ) { return VectorVector( energies.size(), _totalXS ); }
std::vector<VectorVector> Checkerboard_SN::GetExternalSource( const Vector& energies ) {
std::vector<VectorVector> Checkerboard_SN::GetExternalSource( const Vector& /*energies*/ ) {
VectorVector Q( _mesh->GetNumCells(), Vector( 1u, 0.0 ) );
auto cellMids = _mesh->GetCellMidPoints();
for( unsigned j = 0; j < cellMids.size(); ++j ) {
......@@ -91,7 +91,7 @@ VectorVector Checkerboard_PN::GetScatteringXS( const Vector& energies ) { return
VectorVector Checkerboard_PN::GetTotalXS( const Vector& energies ) { return VectorVector( energies.size(), _totalXS ); }
std::vector<VectorVector> Checkerboard_PN::GetExternalSource( const Vector& energies ) {
std::vector<VectorVector> Checkerboard_PN::GetExternalSource( const Vector& /*energies*/ ) {
VectorVector Q( _mesh->GetNumCells(), Vector( 1u, 0.0 ) );
auto cellMids = _mesh->GetCellMidPoints();
for( unsigned j = 0; j < cellMids.size(); ++j ) {
......
......@@ -21,12 +21,12 @@ VectorVector MuscleBoneLung::SetupIC() {
return psi;
}
std::vector<double> MuscleBoneLung::GetDensity( const VectorVector& cellMidPoints ) {
std::vector<double> MuscleBoneLung::GetDensity( const VectorVector& /*cellMidPoints*/ ) {
std::vector<double> densities( 167, 1.04 ); // muscle layer
std::vector<double> bone( 167, 1.85 );
std::vector<double> lung( 665, 0.3 ); // maybe this is just the lung tissue and after that there should be air?
//Concatenate layers
// Concatenate layers
densities.insert( densities.end(), bone.begin(), bone.end() );
densities.insert( densities.end(), lung.begin(), lung.end() );
return densities;
......
......@@ -7,21 +7,21 @@
SlabGeoHG::SlabGeoHG( Config* settings, Mesh* mesh ) : ProblemBase( settings, mesh ) { _physics = nullptr; }
SlabGeoHG::~SlabGeoHG(){};
SlabGeoHG::~SlabGeoHG() {}
VectorVector SlabGeoHG::GetScatteringXS( const Vector& energies ) { return VectorVector( energies.size(), Vector( _mesh->GetNumCells(), 0.0 ) ); }
VectorVector SlabGeoHG::GetTotalXS( const Vector& energies ) { return VectorVector( energies.size(), Vector( _mesh->GetNumCells(), 0.0 ) ); }
std::vector<VectorVector> SlabGeoHG::GetExternalSource( const Vector& energies ) {
std::vector<VectorVector> SlabGeoHG::GetExternalSource( const Vector& /*energies*/ ) {
return std::vector<VectorVector>( 1u, std::vector<Vector>( _mesh->GetNumCells(), Vector( 1u, 0.0 ) ) );
}
VectorVector SlabGeoHG::SetupIC() {
VectorVector psi( _mesh->GetNumCells(), Vector( _settings->GetNQuadPoints(), 0.0 ) );
auto boundaryCells = _mesh->GetBoundaryTypes();
auto cellMids = _mesh->GetCellMidPoints();
double t = 3.2e-4; // pseudo time for gaussian smoothing
// auto boundaryCells = _mesh->GetBoundaryTypes();
// auto cellMids = _mesh->GetCellMidPoints();
// double t = 3.2e-4; // pseudo time for gaussian smoothing
return psi;
}
......@@ -18,7 +18,6 @@ QuadratureBase::QuadratureBase( unsigned order ) : _order( order ) { _settings =
QuadratureBase* QuadratureBase::CreateQuadrature( Config* settings ) {
QUAD_NAME name = settings->GetQuadName();
switch( name ) {
case QUAD_MonteCarlo: return new QMonteCarlo( settings );
case QUAD_GaussLegendreTensorized: return new QGaussLegendreTensorized( settings );
......@@ -29,15 +28,14 @@ QuadratureBase* QuadratureBase::CreateQuadrature( Config* settings ) {
case QUAD_Product: return new QProduct( settings );
default: ErrorMessages::Error( "Creator for the chose quadrature does not yet exist. This is is the fault of the coder!", CURRENT_FUNCTION );
}
return nullptr;
}
QuadratureBase* QuadratureBase::CreateQuadrature( QUAD_NAME name, unsigned quadOrder ) {
switch( name ) {
case QUAD_MonteCarlo: return new QMonteCarlo( quadOrder );
case QUAD_GaussLegendreTensorized:
ErrorMessages::Error( "This quadrature must be initialized with a settings constructor!", CURRENT_FUNCTION );
break;
case QUAD_GaussLegendre1D: return new QGaussLegendre1D( quadOrder );
case QUAD_LevelSymmetric: return new QLevelSymmetric( quadOrder );
case QUAD_LDFESA: return new QLDFESA( quadOrder );
......@@ -45,6 +43,7 @@ QuadratureBase* QuadratureBase::CreateQuadrature( QUAD_NAME name, unsigned quadO
case QUAD_Product: return new QProduct( quadOrder );
default: ErrorMessages::Error( "Creator for the chose quadrature does not yet exist. This is is the fault of the coder!", CURRENT_FUNCTION );
}
return nullptr;
}
double QuadratureBase::Integrate( double( f )( double x0, double x1, double x2 ) ) {
......
......@@ -58,9 +58,6 @@ CSDSNSolverFP::CSDSNSolverFP( Config* settings ) : SNSolver( settings ) {
}
}
// Heney-Greenstein parameter
double g = 0.8;
// determine momente of Heney-Greenstein
_xi = Matrix( 3, _nEnergies );
......
......@@ -13,7 +13,6 @@ CSDSolverTrafoFPSH2D::CSDSolverTrafoFPSH2D( Config* settings ) : SNSolver( setti
// create quadrature
unsigned order = _quadrature->GetOrder();
unsigned nq = _settings->GetNQuadPoints();
_quadPoints = _quadrature->GetPoints();
_weights = _quadrature->GetWeights();
_quadPointsSphere = _quadrature->GetPointsSphere();
......
......@@ -91,19 +91,19 @@ double Interpolation::operator()( double x, double y ) const {
if( _type == cubic ) {
// find closest values to x and y in table (lower bounds)
unsigned xId = IndexOfClosestValue( x, _x );
unsigned yId = IndexOfClosestValue( y, _y );
int xId = IndexOfClosestValue( x, _x );
int yId = IndexOfClosestValue( y, _y );
// store all 16 interpolation points needed
double points[4][4];
for( int i = -1; i < 3; ++i ) {
unsigned idx_y;
idx_y = yId + i < 0 ? 0 : yId + i;
idx_y = yId + i > _data.rows() - 1 ? _data.rows() - 1 : yId + i;
idx_y = yId + i > static_cast<int>( _data.rows() - 1 ) ? _data.rows() - 1 : yId + i;
for( int j = -1; j < 3; ++j ) {
unsigned idx_x;
idx_x = xId + j < 0 ? 0 : xId + j;
idx_x = xId + j > _data.columns() - 1 ? _data.columns() - 1 : xId + j;
idx_x = xId + j > static_cast<int>( _data.columns() - 1 ) ? _data.columns() - 1 : xId + j;
points[i + 1][j + 1] = _data( idx_x, idx_y );
}
......
#include "toolboxes/reconstructor.h"
#include "common/config.h"
Reconstructor::Reconstructor( Config* settings ) {}
Reconstructor::Reconstructor( Config* /*settings*/ ) {}
double FortSign( double a, double b ) {
if( b > 0.0 ) return abs( a );
if( b < 0.0 ) return -abs( a );
if( b > 0.0 ) return std::fabs( a );
if( b < 0.0 ) return -std::fabs( a );
return 0.0;
}
double LMinMod( double sL, double sR ) { return 0.5 * ( FortSign( 1.0, sL ) + FortSign( 1., sR ) ) * fmin( abs( sL ), abs( sR ) ); }
double LMinMod( double sL, double sR ) { return 0.5 * ( FortSign( 1.0, sL ) + FortSign( 1., sR ) ) * fmin( std::fabs( sL ), std::fabs( sR ) ); }
double LVanLeer( double sL, double sR ) {
return ( FortSign( 1.0, sL ) + FortSign( 1.0, sR ) ) * abs( sL ) * abs( sR ) / ( abs( sL ) + abs( sR ) + 0.0000001 );
return ( FortSign( 1.0, sL ) + FortSign( 1.0, sR ) ) * std::fabs( sL ) * std::fabs( sR ) / ( std::fabs( sL ) + std::fabs( sR ) + 0.0000001 );
}
double LSuperBee( double sL, double sR ) {
if( sR >= 0.5 * sL && sR <= 2.0 * sL ) return 0.5 * ( FortSign( 1.0, sL ) + FortSign( 1., sR ) ) * fmax( abs( sL ), abs( sR ) );
if( sR < 0.5 * sL && sR > 2.0 * sL ) return ( FortSign( 1.0, sL ) + FortSign( 1., sR ) ) * fmin( abs( sL ), abs( sR ) );
if( sR >= 0.5 * sL && sR <= 2.0 * sL ) return 0.5 * ( FortSign( 1.0, sL ) + FortSign( 1., sR ) ) * fmax( std::fabs( sL ), std::fabs( sR ) );
if( sR < 0.5 * sL && sR > 2.0 * sL ) return ( FortSign( 1.0, sL ) + FortSign( 1., sR ) ) * fmin( std::fabs( sL ), std::fabs( sR ) );
return 0.0;
}
double LVanAlbaba( double sL, double sR ) { return ( sL * sL * sR + sL * sR * sR ) / ( sL * sL + sR * sR + 0.0000001 ); }
double LWENOJS( double x ) { return 0.0; }
double LWENOJS( double /*x*/ ) { return 0.0; }
double Reconstructor::ReconstructSlopeStruct( double uL, double uC, double uR, double dxL, double dxR, std::string limiter ) const {
double sL = ( uC - uL ) / dxL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment