• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

CSMMLab / KiT-RT / #95

28 May 2025 02:06AM UTC coverage: 46.655% (-11.1%) from 57.728%
#95

push

travis-ci

web-flow
Release 2025 (#44)

* New neural models (#30)

* extend kitrt script

* added new neural models

* extend to m3 models

* added M3_2D models

* added M2 and M4 models

* configure ml optimizer for high order models

* added configuration for high order models

* add option for rotation postprcessing in neural networks. remove unneccessary python scripts

* started rotational symmetric postprocessing

* added rotational invariance postprocessing for m2 and m1 models

* fix post merge bugs

* created hohlraum mesh

* add hohlraum tes case

* add hohlraum test case

* add hohlraum cfg filees

* fixed hohlraum testcase

* add hohlraum cfg files

* changed hohlraum cfg

* changed hohlraum testcase to isotropic inflow source boundary condition

* added ghost cell bonudary for hohlraum testcase

* update readme and linesource mesh creator

* added proper scaling for linesource reference solution

* regularized newton debugging

* Data generator with reduced objective functional (#33)

* added reduced optimizer for sampling

* remove old debugging comments

* mesh acceleration (#38)

* added new ansatz (#36)

* added new ansatz

* debug new ansatz

* branch should be abandoned here

* debug new ansatz

* fix scaling error new ansatz

* fix config errors

* temporarily fixed dynamic ansatz rotation bug

* fix inheritance error for new ansatz

* mesh acceleration

* add structured hohlraum

* Mesh acc (#41)

* mesh acceleration

* added floor value for starmap moment methods

* enable accelleration

* delete minimum value starmap

* Update README.md

* Spherical harmonics nn (#40)

* added new ansatz

* debug new ansatz

* branch should be abandoned here

* debug new ansatz

* fix scaling error new ansatz

* fix config errors

* temporarily fixed dynamic ansatz rotation bug

* fix inheritance error for new ansatz

* mesh acceleration

* add structured hohlraum

* added sph... (continued)

767 of 3019 new or added lines in 51 files covered. (25.41%)

131 existing lines in 8 files now uncovered.

4422 of 9478 relevant lines covered (46.66%)

57163.05 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/solvers/mnsolver_normalized.cpp
1
#include "solvers/mnsolver_normalized.hpp"
2
#include "common/config.hpp"
3
#include "common/io.hpp"
4
#include "common/mesh.hpp"
5
#include "entropies/entropybase.hpp"
6
#include "fluxes/numericalflux.hpp"
7
#include "optimizers/newtonoptimizer.hpp"
8
#include "optimizers/optimizerbase.hpp"
9
#include "optimizers/partregularizednewtonoptimizer.hpp"
10
#include "problems/problembase.hpp"
11
#include "quadratures/quadraturebase.hpp"
12
#include "solvers/mnsolver.hpp"
13
#include "toolboxes/errormessages.hpp"
14
#include "toolboxes/textprocessingtoolbox.hpp"
15
#include "velocitybasis/sphericalbase.hpp"
16

17
// externals
18
#include "spdlog/spdlog.h"
19
#include <iostream>
20

NEW
21
MNSolverNormalized::MNSolverNormalized( Config* settings ) : MNSolver( settings ) {
×
NEW
22
    _u0 = Vector( _nCells, 0.0 );
×
NEW
23
    if( _settings->GetRegularizerGamma() > 0 ) {
×
NEW
24
        _optimizer2 = new PartRegularizedNewtonOptimizer( settings );
×
25
    }
26
    else {
NEW
27
        _optimizer2 = new NewtonOptimizer( settings );
×
28
    }
NEW
29
    _sol2 = VectorVector( _nCells, Vector( _nSystem, 0.0 ) );
×
30
}
31

32
MNSolverNormalized::~MNSolverNormalized() {}
×
33

×
34
void MNSolverNormalized::IterPreprocessing( unsigned /*idx_pseudotime*/ ) {
×
35
    Vector alpha_norm_per_cell( _nCells, 0 );    // ONLY FOR DEBUGGING! THIS SLOWS DOWN THE CODE
36

×
37
    // ------- Entropy closure Step ----------------
×
38
    for( unsigned idx_cell = 0; idx_cell < _nCells; idx_cell++ ) {
39
        _u0[idx_cell] = _sol[idx_cell][0];
40
        _sol[idx_cell] /= _u0[idx_cell];    // assume _u0 > 0 always!!
×
41
    }
×
42

×
43

44
    _optimizer->SolveMultiCell( _alpha, _sol, _momentBasis, alpha_norm_per_cell );
45

46
    // ------- Solution reconstruction step ----
×
47
#pragma omp parallel for
48
    for( unsigned idx_cell = 0; idx_cell < _nCells; idx_cell++ ) {
49

×
50
        alpha_norm_per_cell[idx_cell] *= _momentBasis[0][0] * 0.5 * _settings->GetRegularizerGamma();    // is constant
51
        // std::cout << alpha_norm << "|" << _momentBasis[0][0] << "\n";
52
        for( unsigned idx_quad = 0; idx_quad < _nq; idx_quad++ ) {
53
            // compute the kinetic density at all grid cells
54
            _kineticDensity[idx_cell][idx_quad] =
55
                _u0[idx_cell] * _entropy->EntropyPrimeDual( blaze::dot( _alpha[idx_cell], _momentBasis[idx_quad] ) - alpha_norm_per_cell[idx_cell] );
56
        }
57
    }
58

59
    // ------ Compute slope limiters and cell gradients ---
60
    if( _reconsOrder > 1 ) {
61
        _mesh->ComputeSlopes( _nq, _solDx, _solDy, _kineticDensity );               // parallel
62
        _mesh->ComputeLimiter( _nq, _solDx, _solDy, _kineticDensity, _limiter );    // parallel
×
63
    }
×
64
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc