UG

Ubiquity Generator framework

paraSolverState.h
Go to the documentation of this file.
1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2/* */
3/* This file is part of the program and software framework */
4/* UG --- Ubquity Generator Framework */
5/* */
6/* Copyright Written by Yuji Shinano <shinano@zib.de>, */
7/* Copyright (C) 2021-2026 by Zuse Institute Berlin, */
8/* licensed under LGPL version 3 or later. */
9/* Commercial licenses are available through <licenses@zib.de> */
10/* */
11/* This code is free software; you can redistribute it and/or */
12/* modify it under the terms of the GNU Lesser General Public License */
13/* as published by the Free Software Foundation; either version 3 */
14/* of the License, or (at your option) any later version. */
15/* */
16/* This program is distributed in the hope that it will be useful, */
17/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
18/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
19/* GNU Lesser General Public License for more details. */
20/* */
21/* You should have received a copy of the GNU Lesser General Public License */
22/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
23/* */
24/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
25
26/**@file paraSolverState.h
27 * @brief This class has solver state to be transferred.
28 * @author Yuji Shinano
29 *
30 *
31 *
32 */
33
34/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
35
36
37#ifndef __PARA_SOLVER_STATE_H__
38#define __PARA_SOLVER_STATE_H__
39
40#include <cfloat>
41#include "paraComm.h"
42
43namespace UG
44{
45
46///
47/// class ParaSolverState
48/// (ParaSolver state object for notification message)
49///
51{
52public:
53
55 )
56 {
57 }
58
60 )
61 {
62 }
63
64 ///
65 /// getter of isRacingStage
66 /// @return true if the Solver notified this message is in racing stage, false otherwise
67 ///
68 virtual bool isRacingStage(
69 ) = 0;
70
71 ///
72 /// getter of notification id
73 /// @return notification id
74 ///
75 virtual unsigned int getNotificaionId(
76 ) = 0;
77
78 ///
79 /// getter of LoadCoordintor id
80 /// @return LoadCoordinator id
81 ///
82 virtual int getLcId(
83 ) = 0;
84
85 ///
86 /// getter of global subtree id
87 /// @return global subtree id
88 ///
89 virtual int getGlobalSubtreeId(
90 ) = 0;
91
92 ///
93 /// getter of deterministic time
94 /// @return deterministic time
95 ///
96 virtual double getDeterministicTime(
97 ) = 0;
98
99 ///
100 /// stringfy ParaSolverState
101 /// @return string to show inside of ParaSolverState
102 ///
103 virtual std::string toString(
104 ) = 0;
105
106 ///
107 /// send this object
108 ///
109 virtual void send(
110 ParaComm *comm, ///< communicator used
111 int destination, ///< destination rank
112 int tag ///< TagSolverState
113 ) = 0;
114
115 ///
116 /// receive this object
117 ///
118 virtual void receive(
119 ParaComm *comm, ///< communicator used
120 int source, ///< source rank
121 int tag ///< TagSolverState
122 ) = 0;
123
124};
125
126}
127
128#endif // __PARA_SOLVER_STATE_H__
Base class of communicator object.
Definition: paraComm.h:102
class ParaSolverState (ParaSolver state object for notification message)
virtual void send(ParaComm *comm, int destination, int tag)=0
send this object
virtual ~ParaSolverState()
virtual double getDeterministicTime()=0
getter of deterministic time
virtual int getLcId()=0
getter of LoadCoordintor id
virtual bool isRacingStage()=0
getter of isRacingStage
virtual unsigned int getNotificaionId()=0
getter of notification id
virtual int getGlobalSubtreeId()=0
getter of global subtree id
virtual std::string toString()=0
stringfy ParaSolverState
virtual void receive(ParaComm *comm, int source, int tag)=0
receive this object
static ScipParaCommTh * comm
Definition: fscip.cpp:73
Base class of communicator for UG Framework.