www.mooseframework.org
Public Member Functions | List of all members
MooseInit Class Reference

Initialization object for any MOOSE-based application. More...

#include <MooseInit.h>

Inheritance diagram for MooseInit:
[legend]

Public Member Functions

 MooseInit (int argc, char *argv[], MPI_Comm COMM_WORLD_IN=MPI_COMM_WORLD)
 
virtual ~MooseInit ()=default
 

Detailed Description

Initialization object for any MOOSE-based application.

This object must be created in the main() of any MOOSE-based application so everything is properly initialized and finalized.

Definition at line 29 of file MooseInit.h.

Constructor & Destructor Documentation

MooseInit::MooseInit ( int  argc,
char *  argv[],
MPI_Comm  COMM_WORLD_IN = MPI_COMM_WORLD 
)

Definition at line 31 of file MooseInit.C.

32  : LibMeshInit(argc, argv, COMM_WORLD_IN)
33 {
34 #ifdef LIBMESH_HAVE_PETSC
35  PetscPopSignalHandler(); // get rid of Petsc error handler
36 #endif
37 
38 // Set the number of OpenMP threads to the same as the number of threads libMesh is going to use
39 #ifdef LIBMESH_HAVE_OPENMP
40  omp_set_num_threads(libMesh::n_threads());
41 #endif
42 
44 
45  // Make sure that any calls to the global random number generator are consistent among processes
47 }
static void initialize()
Must be called by main thread before any threaded computation! Do NOT call in a worker thread! ...
static void seed(unsigned int seed)
The method seeds the random number generator.
Definition: MooseRandom.h:49
virtual MooseInit::~MooseInit ( )
virtualdefault

The documentation for this class was generated from the following files: