|
Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
|
G4GeometryManager is a singleton class responsible for high level geometrical functions, and for high level objects in the geometry subdomain. More...
#include <G4GeometryManager.hh>
Public Member Functions | |
| ~G4GeometryManager () | |
| G4bool | CloseGeometry (G4bool pOptimise=true, G4bool verbose=false, G4VPhysicalVolume *vol=nullptr) |
| void | OpenGeometry (G4VPhysicalVolume *vol=nullptr) |
| G4bool | IsGeometryClosed () |
| void | SetWorldMaximumExtent (G4double worldExtent) |
| void | OptimiseInParallel (G4bool val=true) |
| void | UndertakeOptimisation () |
| void | RequestParallelOptimisation (G4bool val=true, G4bool verbose=true) |
| G4bool | IsParallelOptimisationConfigured () |
| G4bool | IsParallelOptimisationFinished () |
Static Public Member Functions | |
| static G4GeometryManager * | GetInstance () |
| static G4GeometryManager * | GetInstanceIfExist () |
G4GeometryManager is a singleton class responsible for high level geometrical functions, and for high level objects in the geometry subdomain.
Definition at line 56 of file G4GeometryManager.hh.
| G4GeometryManager::~G4GeometryManager | ( | ) |
Destructor; called by G4RunManagerKernel.
Definition at line 103 of file G4GeometryManager.cc.
| G4bool G4GeometryManager::CloseGeometry | ( | G4bool | pOptimise = true, |
| G4bool | verbose = false, | ||
| G4VPhysicalVolume * | vol = nullptr ) |
Closes ('locks') the geometry: performs sanity and 'completion' checks and optionally [default=yes] builds the optimisation structure. Applies to just a specific subtree if a physical volume is specified.
| [in] | pOptimise | Flag to enabling/disabling optimisation structure. |
| [in] | verbose | Flag for verbosity. |
| [in] | vol | Optional pointer to a physical volume (subtree) for optimisation. |
Definition at line 128 of file G4GeometryManager.cc.
Referenced by G4TheRayTracer::CreateBitMap(), G4DNAChemistryManager::HandleStandaloneInitialization(), G4RunManagerKernel::ResetNavigator(), and G4TheRayTracer::StoreUserActions().
|
static |
Returns a pointer to the singleton instance of the class, creating it if not existing.
Definition at line 188 of file G4GeometryManager.cc.
Referenced by G4AssemblyStore::Clean(), G4LogicalVolumeStore::Clean(), G4PhysicalVolumeStore::Clean(), G4RegionStore::Clean(), G4SolidStore::Clean(), G4LogicalBorderSurface::CleanSurfaceTable(), G4LogicalSkinSurface::CleanSurfaceTable(), G4ErrorPropagatorManager::CloseGeometry(), G4TheRayTracer::CreateBitMap(), G4DNAChemistryManager::HandleStandaloneInitialization(), G4WorkerRunManager::InitializeGeometry(), G4RunManager::ReinitializeGeometry(), G4RunManagerKernel::ResetNavigator(), G4GDMLMessenger::SetNewValue(), G4TheRayTracer::StoreUserActions(), and G4RunManagerKernel::~G4RunManagerKernel().
|
static |
Simply returns a pointer to the singleton instance.
Definition at line 201 of file G4GeometryManager.cc.
Referenced by G4RunManagerKernel::~G4RunManagerKernel().
| G4bool G4GeometryManager::IsGeometryClosed | ( | ) |
Returns true/false according to the state of the optimised geometry.
Definition at line 151 of file G4GeometryManager.cc.
| G4bool G4GeometryManager::IsParallelOptimisationConfigured | ( | ) |
Checks whether parallel optimisation was requested and configured.
Definition at line 229 of file G4GeometryManager.cc.
Referenced by G4WorkerRunManager::InitializeGeometry(), and G4RunManagerKernel::ResetNavigator().
| G4bool G4GeometryManager::IsParallelOptimisationFinished | ( | ) |
Reports whether parallel optimisation was completed.
Definition at line 219 of file G4GeometryManager.cc.
Referenced by G4WorkerRunManager::InitializeGeometry(), and G4RunManagerKernel::ResetNavigator().
| void G4GeometryManager::OpenGeometry | ( | G4VPhysicalVolume * | vol = nullptr | ) |
Opens ('unlocks') the geometry and removes the optimisation structure if present. Applies to just a specific subtree if a physical volume is specified.
| [in] | vol | Optional pointer to a physical volume (subtree) for optimisation. |
Definition at line 166 of file G4GeometryManager.cc.
Referenced by G4ErrorPropagatorManager::CloseGeometry(), G4TheRayTracer::CreateBitMap(), G4DNAChemistryManager::HandleStandaloneInitialization(), G4RunManager::ReinitializeGeometry(), G4RunManagerKernel::ResetNavigator(), G4GDMLMessenger::SetNewValue(), G4TheRayTracer::StoreUserActions(), and G4RunManagerKernel::~G4RunManagerKernel().
| void G4GeometryManager::OptimiseInParallel | ( | G4bool | val = true | ) |
Requests optimisation using threads (if MT is enabled & used ).
Definition at line 210 of file G4GeometryManager.cc.
Detailed method for user to request parallel optimisation (if verbosity is required). Calling this method is enough to ask for it. It will be used if Geant4 is built with MT/tasks. Parallelism will be used if Geant4 is built with MT/tasks.
Definition at line 369 of file G4GeometryManager.cc.
Referenced by OptimiseInParallel().
| void G4GeometryManager::SetWorldMaximumExtent | ( | G4double | worldExtent | ) |
Sets the maximum extent of the world volume. The operation is allowed only if NO solids have been created already.
Definition at line 500 of file G4GeometryManager.cc.
| void G4GeometryManager::UndertakeOptimisation | ( | ) |
Method that contributes to (voxel) optimisation until all work is done. To be called by a worker thread initialisation - not by the user.
Definition at line 382 of file G4GeometryManager.cc.
Referenced by G4WorkerRunManager::InitializeGeometry(), and G4RunManagerKernel::ResetNavigator().