svFSIplus
svFSI
ChnlMod.h
1
/* Copyright (c) Stanford University, The Regents of the University of California, and others.
2
*
3
* All Rights Reserved.
4
*
5
* See Copyright-SimVascular.txt for additional details.
6
*
7
* Permission is hereby granted, free of charge, to any person obtaining
8
* a copy of this software and associated documentation files (the
9
* "Software"), to deal in the Software without restriction, including
10
* without limitation the rights to use, copy, modify, merge, publish,
11
* distribute, sublicense, and/or sell copies of the Software, and to
12
* permit persons to whom the Software is furnished to do so, subject
13
* to the following conditions:
14
*
15
* The above copyright notice and this permission notice shall be included
16
* in all copies or substantial portions of the Software.
17
*
18
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
19
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
21
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
22
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
*/
30
31
// The classes defined here duplicate the data structures in the Fortran CHNLMOD module
32
// defined in CHNL.f.
33
34
// This module defines data structures for
35
36
#include "Array.h"
37
#include "Vector.h"
38
39
#include <string>
40
41
#ifndef CHNL_MOD_H
42
#define CHNL_MOD_H
43
44
/// @brief Channel type, used in I/O
45
class
chnlType
46
{
47
// Whether it is open to the screen
48
bool
oTS =
false
;
49
50
// Whether it is open to the file
51
bool
oTF =
false
;
52
53
// Channel identifier
54
int
id;
55
56
// File ID
57
int
fId;
58
59
// File address
60
std::string fName =
"histor"
;
61
62
// Channel tag
63
std::string tag =
""
;
64
65
// Creates a new channel
66
// PROCEDURE :: new => newChnl
67
// Closes the channel
68
// PROCEDURE :: close => closeChnl
69
// To send a string to channel
70
// PROCEDURE chnlAssign
71
// GENERIC :: ASSIGNMENT(=) => chnlAssign
72
};
73
74
/// @brief Only to group four channels, in case I rather have them as one
75
/// variable
76
class
ioType
77
{
78
// Standard output
79
chnlType
o;
80
81
// Error
82
chnlType
e;
83
84
// Warning
85
chnlType
w;
86
87
// Debugging
88
chnlType
d;
89
90
// Status file
91
chnlType
s;
92
93
// CONTAINS
94
//! Opens all as standard channels
95
//PROCEDURE :: new => newIO
96
//! Closes the channel
97
//PROCEDURE :: close => closeIO
98
};
99
100
class
ChnlMod
101
{
102
public
:
103
ChnlMod
();
104
105
// Channels cases: standard output, error output, warning output,
106
// debugging output
107
int
CHNL_O = 601;
108
int
CHNL_E = 602;
109
int
CHNL_W = 603;
110
int
CHNL_D = 604;
111
112
// Whether to use color in printing outputs
113
bool
pClr =
true
;
114
115
// A general counter for file ID
116
int
gFID = 314;
117
118
// Appended path to all files that are going to be saved
119
std::string appPath =
""
;
120
121
};
122
123
#endif
124
ChnlMod
Definition:
ChnlMod.h:101
chnlType
Channel type, used in I/O.
Definition:
ChnlMod.h:46
ioType
Only to group four channels, in case I rather have them as one variable.
Definition:
ChnlMod.h:77
Generated by
1.9.1