helics 3.7.0
Loading...
Searching...
No Matches
MpiCore.h
1/*
2Copyright (c) 2017-2026,
3Battelle Memorial Institute; Lawrence Livermore National Security, LLC; Alliance for Energy
4Innovation LLC. See the top-level NOTICE for additional details. All rights reserved.
5SPDX-License-Identifier: BSD-3-Clause
6*/
7
8#pragma once
9
10#include "../../core/CommonCore.hpp"
11#include "../CommsBroker.hpp"
12
13#include <memory>
14#include <string>
15
16namespace helics {
17namespace mpi {
18 class MpiComms;
20 class MpiCore final: public CommsBroker<MpiComms, CommonCore> {
21 public:
23 MpiCore() noexcept;
24 explicit MpiCore(std::string_view core_name);
25 ~MpiCore();
26
27 protected:
28 virtual std::shared_ptr<helicsCLI11App> generateCLI() override;
29
30 public:
31 virtual std::string generateLocalAddressString() const override;
32
33 private:
34 mutable std::mutex dataMutex;
35 std::string brokerAddress;
36 int brokerRank{0};
37 int brokerTag{0};
38 virtual bool brokerConnect() override;
39 };
40
41} // namespace mpi
42} // namespace helics
Definition CommsBroker.hpp:21
Definition MpiCore.h:20
virtual std::string generateLocalAddressString() const override
Definition MpiCore.cpp:69
MpiCore() noexcept
Definition MpiCore.cpp:18
virtual std::shared_ptr< helicsCLI11App > generateCLI() override
Definition MpiCore.cpp:26
the main namespace for the helics co-simulation library User functions will be in the helics namespac...
Definition AsyncFedCallInfo.hpp:14