svMultiPhysics
Loading...
Searching...
No Matches
ChnlMod.h
1// SPDX-FileCopyrightText: Copyright (c) Stanford University, The Regents of the University of California, and others.
2// SPDX-License-Identifier: BSD-3-Clause
3
4// The classes defined here duplicate the data structures in the Fortran CHNLMOD module
5// defined in CHNL.f.
6
7// This module defines data structures for
8
9#include "Array.h"
10#include "Vector.h"
11
12#include <string>
13
14#ifndef CHNL_MOD_H
15#define CHNL_MOD_H
16
17/// @brief Channel type, used in I/O
19{
20 // Whether it is open to the screen
21 bool oTS = false;
22
23 // Whether it is open to the file
24 bool oTF = false;
25
26 // Channel identifier
27 int id;
28
29 // File ID
30 int fId;
31
32 // File address
33 std::string fName = "histor";
34
35 // Channel tag
36 std::string tag = "";
37
38 // Creates a new channel
39 // PROCEDURE :: new => newChnl
40 // Closes the channel
41 // PROCEDURE :: close => closeChnl
42 // To send a string to channel
43 // PROCEDURE chnlAssign
44 // GENERIC :: ASSIGNMENT(=) => chnlAssign
45};
46
47/// @brief Only to group four channels, in case I rather have them as one
48/// variable
49class ioType
50{
51 // Standard output
52 chnlType o;
53
54 // Error
55 chnlType e;
56
57 // Warning
58 chnlType w;
59
60 // Debugging
61 chnlType d;
62
63 // Status file
64 chnlType s;
65
66 // CONTAINS
67 //! Opens all as standard channels
68 //PROCEDURE :: new => newIO
69 //! Closes the channel
70 //PROCEDURE :: close => closeIO
71};
72
74{
75 public:
76 ChnlMod();
77
78 // Channels cases: standard output, error output, warning output,
79 // debugging output
80 int CHNL_O = 601;
81 int CHNL_E = 602;
82 int CHNL_W = 603;
83 int CHNL_D = 604;
84
85 // Whether to use color in printing outputs
86 bool pClr = true;
87
88 // A general counter for file ID
89 int gFID = 314;
90
91 // Appended path to all files that are going to be saved
92 std::string appPath = "";
93
94};
95
96#endif
97
Definition ChnlMod.h:74
Channel type, used in I/O.
Definition ChnlMod.h:19
Only to group four channels, in case I rather have them as one variable.
Definition ChnlMod.h:50