Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
KiT-RT
KiT-RT
Commits
45d5eb25
Commit
45d5eb25
authored
Dec 01, 2020
by
jannick.wolters
Browse files
updated gitlab ci; removed all compiler warnings
parent
1291f773
Changes
10
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
45d5eb25
...
...
@@ -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 ../../
...
...
code/src/common/config.cpp
View file @
45d5eb25
...
...
@@ -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
]
)
)
{
...
...
code/src/problems/checkerboard.cpp
View file @
45d5eb25
...
...
@@ -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
)
{
...
...
code/src/problems/musclebonelung.cpp
View file @
45d5eb25
...
...
@@ -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
;
...
...
code/src/problems/slabgeohg.cpp
View file @
45d5eb25
...
...
@@ -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
;
}
code/src/quadratures/quadraturebase.cpp
View file @
45d5eb25
...
...
@@ -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
)
)
{
...
...
code/src/solvers/csdsnsolverfp.cpp
View file @
45d5eb25
...
...
@@ -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
);
...
...
code/src/solvers/csdsolvertrafofpsh2d.cpp
View file @
45d5eb25
...
...
@@ -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
();
...
...
code/src/toolboxes/interpolation.cpp
View file @
45d5eb25
...
...
@@ -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
);
}
...
...
code/src/toolboxes/reconstructor.cpp
View file @
45d5eb25
#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
::
f
abs
(
a
);
if
(
b
<
0.0
)
return
-
std
::
f
abs
(
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
::
f
abs
(
sL
),
std
::
f
abs
(
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
::
f
abs
(
sL
)
*
std
::
f
abs
(
sR
)
/
(
std
::
f
abs
(
sL
)
+
std
::
f
abs
(
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
::
f
abs
(
sL
),
std
::
f
abs
(
sR
)
);
if
(
sR
<
0.5
*
sL
&&
sR
>
2.0
*
sL
)
return
(
FortSign
(
1.0
,
sL
)
+
FortSign
(
1.
,
sR
)
)
*
fmin
(
std
::
f
abs
(
sL
),
std
::
f
abs
(
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
;
...
...
jannick.wolters
@jm2154
mentioned in commit
27dd2044
·
Apr 30, 2021
mentioned in commit
27dd2044
mentioned in commit 27dd2044725c70596934dd25ba0f959f66c2d002
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment