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
141448bf
Commit
141448bf
authored
Mar 23, 2021
by
Steffen Schotthöfer
Browse files
update
Former-commit-id:
38ceba85
parent
e25bf4cc
Changes
3
Hide whitespace changes
Inline
Side-by-side
code/include/toolboxes/textprocessingtoolbox.h
View file @
141448bf
...
...
@@ -53,6 +53,8 @@ inline void PrintVectorVector( const VectorVector vectorIn ) {
}
}
inline
void
PrintMatrix
(
const
Matrix
mat
)
{
std
::
cout
<<
mat
<<
std
::
endl
;
}
/*!
* @brief utility function for returning the last number in a string
* @param str string to be checked
...
...
code/src/solvers/csdpnsolver.cpp
View file @
141448bf
...
...
@@ -8,7 +8,7 @@
#include "problems/icru.h"
#include "problems/problembase.h"
#include "solvers/csdpn_starmap_constants.h"
#include "toolboxes/textprocessingtoolbox.h"
// externals
#include "spdlog/spdlog.h"
#include <mpi.h>
...
...
@@ -52,7 +52,11 @@ CSDPNSolver::CSDPNSolver( Config* settings ) : PNSolver( settings ) {
}
}
printf
(
"%d"
,
sigma_ref
.
rows
()
);
// printf( "%d", sigma_ref.rows() );
// std::cout << size( sigma_ref ) << std::endl;
// std::cout << sigma_ref.rows() << std::endl;
// std::cout << _energies.size() << std::endl;
Matrix
sigma_t
(
_energies
.
size
(),
sigma_ref
.
rows
()
);
for
(
unsigned
idx_degree
=
0
;
idx_degree
<
_polyDegreeBasis
;
++
idx_degree
)
{
...
...
@@ -61,6 +65,12 @@ CSDPNSolver::CSDPNSolver( Config* settings ) : PNSolver( settings ) {
blaze
::
column
(
sigma_t
,
idx_degree
)
=
interp
(
_energies
);
}
// std::cout << "here\n";
// std::cout << size( sigma_t ) << std::endl;
_sigmaT
=
sigma_t
;
TextProcessingToolbox
::
PrintMatrix
(
sigma_t
);
Interpolation
interpS
(
E_tab
,
S_tab
);
_s
=
interpS
(
_energies
);
}
...
...
@@ -145,7 +155,7 @@ void CSDPNSolver::FVMUpdate( unsigned idx_energy ) {
_solNew
[
idx_cell
][
idx_sys
]
=
_sol
[
idx_cell
][
idx_sys
]
-
(
_dE
/
_areas
[
idx_cell
]
)
*
_solNew
[
idx_cell
][
idx_sys
]
/* cell averaged flux */
-
_dE
*
_sol
[
idx_cell
][
idx_sys
]
*
(
_sigmaT
[
idx_energy
][
idx_cell
]
/* absorbtion influence */
+
_sigmaS
[
idx_energy
][
idx_cell
]
*
_scatterMatDiag
[
idx_sys
]
);
/* scattering influence */
-
_sigmaS
[
idx_energy
][
idx_cell
]
*
_scatterMatDiag
[
idx_sys
]
);
/* scattering influence */
}
// Source Term
_solNew
[
idx_cell
][
0
]
+=
_dE
*
_Q
[
0
][
idx_cell
][
0
];
...
...
code/src/solvers/pnsolver.cpp
View file @
141448bf
...
...
@@ -162,8 +162,9 @@ void PNSolver::FVMUpdate( unsigned idx_energy ) {
for
(
unsigned
idx_sys
=
0
;
idx_sys
<
_nSystem
;
idx_sys
++
)
{
_solNew
[
idx_cell
][
idx_sys
]
=
_sol
[
idx_cell
][
idx_sys
]
-
(
_dE
/
_areas
[
idx_cell
]
)
*
_solNew
[
idx_cell
][
idx_sys
]
/* cell averaged flux */
-
_dE
*
_sol
[
idx_cell
][
idx_sys
]
*
(
_sigmaT
[
idx_energy
][
idx_cell
]
/* absorbtion influence */
+
_sigmaS
[
idx_energy
][
idx_cell
]
*
_scatterMatDiag
[
idx_sys
]
);
/* scattering influence */
(
_sigmaS
[
idx_energy
][
idx_cell
]
*
_scatterMatDiag
[
idx_sys
]
/* scattering influence */
+
_sigmaT
[
idx_energy
][
idx_cell
]
);
/* total xs influence */
// Vorzeichenfehler!
}
// Source Term
_solNew
[
idx_cell
][
0
]
+=
_dE
*
_Q
[
0
][
idx_cell
][
0
];
...
...
@@ -345,7 +346,7 @@ void PNSolver::ComputeFluxComponents() {
void
PNSolver
::
ComputeScatterMatrix
()
{
// --- Isotropic ---
_scatterMatDiag
[
0
]
=
-
1
.0
;
_scatterMatDiag
[
0
]
=
-
1
;
for
(
unsigned
idx_diag
=
1
;
idx_diag
<
_nSystem
;
idx_diag
++
)
{
_scatterMatDiag
[
idx_diag
]
=
0.0
;
}
...
...
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