PRISMS-PF Manual
Loading...
Searching...
No Matches
miscellaneous_parameters.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2025 PRISMS Center at the University of Michigan
2// SPDX-License-Identifier: GNU Lesser General Public Version 2.1
3
4#pragma once
5
6#include <deal.II/base/mpi.h>
7
10
12
13#include <prismspf/config.h>
14
15#include <mpi.h>
16#include <random>
17
19using RNGEngine = std::mt19937;
20
25{
26public:
30 void
32
36 void
38
42 void
43 set_random_seed(const unsigned int &_random_seed)
44 {
46 rng.seed(random_seed);
47 }
48
49 unsigned int random_seed = 2025;
50 // Use a different seed for each MPI process to avoid correlated events
52};
53
54inline void
57
58inline void
60{
62 << "================================================\n"
63 << " Miscellaneous Parameters\n"
64 << "================================================\n"
65 << "Random seed: " << random_seed << "\n"
66 << std::flush;
67}
68
static dealii::ConditionalOStream & pout_summary()
Log output stream for writing a summary.log file.
Definition conditional_ostreams.cc:34
@ Value
Use value of the variable as a criterion for refinement.
Definition grid_refiner_criterion.h:31
std::mt19937 RNGEngine
Definition miscellaneous_parameters.h:19
Definition conditional_ostreams.cc:20
Struct that holds miscellaneous parameters.
Definition miscellaneous_parameters.h:25
void print_parameter_summary() const
Print parameters to summary.log.
Definition miscellaneous_parameters.h:59
void set_random_seed(const unsigned int &_random_seed)
Set the random seed and initialize the RNG.
Definition miscellaneous_parameters.h:43
void postprocess_and_validate()
Postprocess and validate parameters.
Definition miscellaneous_parameters.h:55
RNGEngine rng
Definition miscellaneous_parameters.h:51
unsigned int random_seed
Definition miscellaneous_parameters.h:49