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
15namespace eonc {
16namespace {
17thread_local IPotRegistry *tls_construction_registry = nullptr;
18}
19
21 : prev_(tls_construction_registry) {
22 tls_construction_registry = &registry;
23}
24
26 tls_construction_registry = prev_;
27}
28
30 : Potential(a_ptype, tls_construction_registry ? *tls_construction_registry
31 : PotRegistry::get()) {}
32
34 : Potential(a_ptype) {
35 force_serial_ = !p.potential_options().thread_safe;
36}
37
39 : Potential(a_params.potential_options().potential, a_params) {}
40
41} // namespace eonc
const potential_options_t & potential_options() const
PotentialConstructionScope(IPotRegistry &registry)
Potential(PotType a_ptype)
Production default: construction-scope registry, else PotRegistry::get().
RAII resource manager for the ARTn C library with global synchronization.