UG

Ubiquity Generator framework

paraLoadCoordinatorTerminationState.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 paraLoadCoordinatorTerminationState.h
27 * @brief Load coordinator termination state.
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_LOADCOORDINATOR_TERMINATION_STATE_H__
38#define __PARA_LOADCOORDINATOR_TERMINATION_STATE_H__
39
40#include <string>
41#include <cfloat>
42#include "paraComm.h"
43
44#ifdef UG_WITH_ZLIB
45#include "gzstream.h"
46#endif
47
48namespace UG
49{
50
51///
52/// Abstract interface for LoadCoordinator termination state.
53/// Holds no data; derived classes own the fields.
54///
56{
57public:
58
60 )
61 {
62 }
63
65 )
66 {
67 }
68
69 ///
70 /// stringfy ParaCalculationState
71 /// @return string to show inside of this object
72 ///
73 virtual std::string toString(
74 ) = 0;
75
76#ifdef UG_WITH_ZLIB
77
78 ///
79 /// write to checkpoint file
80 ///
81 virtual void write(
82 gzstream::ogzstream &out ///< gzstream for output
83 ) = 0;
84
85 ///
86 /// read from checkpoint file
87 ///
88 virtual bool read(
89 ParaComm *comm, ///< communicator used
90 gzstream::igzstream &in ///< gzstream for input
91 ) = 0;
92
93#endif
94
95};
96
97}
98
99#endif // __PARA_LOADCOORDINATOR_TERMINATION_STATE_H__
100
Base class of communicator object.
Definition: paraComm.h:102
Abstract interface for LoadCoordinator termination state. Holds no data; derived classes own the fiel...
virtual bool read(ParaComm *comm, gzstream::igzstream &in)=0
read from checkpoint file
virtual void write(gzstream::ogzstream &out)=0
write to checkpoint file
virtual std::string toString()=0
stringfy ParaCalculationState
static ScipParaCommTh * comm
Definition: fscip.cpp:73
Utilities for handling gzipped input and output streams.
Base class of communicator for UG Framework.