Loading...
Searching...
No Matches
MPIPot.h
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#pragma once
13
14#include "eon/Parameters.h"
15#include "eon/Potential.h"
16
17class MPIPot : public eonc::Potential {
18
19public:
20 MPIPot(const eonc::Parameters &p);
21 ~MPIPot();
22 void initialize() {};
23 void cleanMemory();
24 void force(long N, const double *R, const int *atomicNrs, double *F,
25 double *U, double *variance, const double *box) override;
28 [[nodiscard]] bool isThreadSafe() const noexcept override { return false; }
29
30private:
32 double poll_period{0.0};
33};
void cleanMemory()
Definition MPIPot.cpp:41
void force(long N, const double *R, const int *atomicNrs, double *F, double *U, double *variance, const double *box) override
Definition MPIPot.cpp:45
bool isThreadSafe() const noexcept override
MPI_COMM_WORLD sends are not safe from two threads unless the library was initialized with MPI_THREAD...
Definition MPIPot.h:28
MPIPot(const eonc::Parameters &p)
Definition MPIPot.cpp:35
double poll_period
Definition MPIPot.h:32
int potentialRank
Definition MPIPot.h:31
void initialize()
Definition MPIPot.h:22
~MPIPot()
Definition MPIPot.cpp:43