eOn 3.2.0
Long-timescale dynamics: aKMC, NEB, parallel replica
☾
Toggle main menu visibility
Loading...
Searching...
No Matches
PotentialParams.cpp
Go to the documentation of this file.
1
/*
2
** This file is part of eOn.
3
**
4
** SPDX-License-Identifier: BSD-3-Clause
5
**
6
** Copyright (c) 2010--present, eOn Development Team
7
** All rights reserved.
8
**
9
** Repo:
10
** https://github.com/TheochemUI/eOn
11
*/
12
#include "
eon/Parameters.h
"
13
#include "
eon/Potential.h
"
14
15
namespace
eonc
{
16
namespace
{
17
thread_local
IPotRegistry
*tls_construction_registry =
nullptr
;
18
}
19
20
PotentialConstructionScope::PotentialConstructionScope
(
IPotRegistry
®istry)
21
:
prev_
(tls_construction_registry) {
22
tls_construction_registry = ®istry;
23
}
24
25
PotentialConstructionScope::~PotentialConstructionScope
() {
26
tls_construction_registry =
prev_
;
27
}
28
29
Potential::Potential
(
PotType
a_ptype)
30
:
Potential
(a_ptype, tls_construction_registry ? *tls_construction_registry
31
:
PotRegistry
::get()) {}
32
33
Potential::Potential
(
PotType
a_ptype,
const
Parameters
&p)
34
:
Potential
(a_ptype) {
35
force_serial_
= !p.
potential_options
().thread_safe;
36
}
37
38
Potential::Potential
(
const
Parameters
&a_params)
39
:
Potential
(a_params.potential_options().potential, a_params) {}
40
41
}
// namespace eonc
Parameters.h
Potential.h
eonc::IPotRegistry
Definition
PotRegistry.h:27
eonc::Parameters
Definition
Parameters.h:35
eonc::Parameters::potential_options
const potential_options_t & potential_options() const
Definition
ParametersAccess.cpp:79
eonc::PotRegistry
Definition
PotRegistry.h:45
eonc::PotentialConstructionScope::~PotentialConstructionScope
~PotentialConstructionScope()
Definition
PotentialParams.cpp:25
eonc::PotentialConstructionScope::PotentialConstructionScope
PotentialConstructionScope(IPotRegistry ®istry)
Definition
PotentialParams.cpp:20
eonc::PotentialConstructionScope::prev_
IPotRegistry * prev_
Definition
Potential.h:39
eonc::Potential::force_serial_
bool force_serial_
Definition
Potential.h:50
eonc::Potential::Potential
Potential(PotType a_ptype)
Production default: construction-scope registry, else PotRegistry::get().
Definition
PotentialParams.cpp:29
eonc
RAII resource manager for the ARTn C library with global synchronization.
Definition
ARTnSaddleSearch.cpp:23
eonc::PotType
PotType
Definition
BaseStructures.h:36
client
PotentialParams.cpp
Generated by
1.17.0
Generated by
Doxygen 1.17.0
Analytics by
Antics
provided by
TurtleTech ehf