Chi-Tech
lbs_01b_print_simheader.cc
Go to the documentation of this file.
1#include "lbs_solver.h"
2
3#include "chi_runtime.h"
4#include "chi_log.h"
5#include "mpi/chi_mpi.h"
6
7//###################################################################
8/**Prints header information of simulation.*/
10{
11 if (Chi::mpi.location_id == 0)
12 {
13 std::stringstream outstr;
14 outstr << "\nInitializing LBS SteadyStateSolver with name: "
15 << TextName() << "\n\n"
16 << "Scattering order : "
17 << options_.scattering_order << "\n"
18 << "Number of Groups : "
19 << groups_.size() << "\n"
20 << "Number of Group sets: "
21 << groupsets_.size() << std::endl;
22
23 //================================================== Output Groupsets
24 for (const auto& groupset : groupsets_)
25 {
26 char buf_pol[20];
27
28 outstr << "\n***** Groupset " << groupset.id_ << " *****\n" << "Groups: ";
29 int counter = 0;
30 for (auto group : groupset.groups_)
31 {
32 snprintf(buf_pol,20,"%5d ",group.id_);
33 outstr << std::string(buf_pol);
34 counter++;
35 if (counter == 12)
36 {
37 counter = 0;
38 outstr << "\n";
39 }
40
41 }//for g
42 Chi::log.Log() << outstr.str() << "\n" << std::endl;
43 }//for gs
44 }
45}
static chi::ChiLog & log
Definition: chi_runtime.h:81
static chi::MPI_Info & mpi
Definition: chi_runtime.h:78
LogStream Log(LOG_LVL level=LOG_0)
Definition: chi_log.cc:35
std::string TextName() const
Definition: chi_solver.cc:116
std::vector< LBSGroup > groups_
Definition: lbs_solver.h:67
lbs::Options options_
Definition: lbs_solver.h:61
std::vector< LBSGroupset > groupsets_
Definition: lbs_solver.h:68
unsigned int scattering_order
Definition: lbs_structs.h:126