v0.9.1
BCData.cpp
Go to the documentation of this file.
1 /** \file BCData.cpp
2  * \brief Structures for boundary structures
3  *
4  * \note Structures are native for Cubit only
5  */
6 
7 /* MoFEM is free software: you can redistribute it and/or modify it under
8  * the terms of the GNU Lesser General Public License as published by the
9  * Free Software Foundation, either version 3 of the License, or (at your
10  * option) any later version.
11  *
12  * MoFEM is distributed in the hope that it will be useful, but WITHOUT
13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
15  * License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with MoFEM. If not, see <http://www.gnu.org/licenses/>
19  */
20 
21 namespace MoFEM {
22 
23 std::ostream &operator<<(std::ostream &os, const DisplacementCubitBcData &e) {
24  os << "\n";
25  os << "D i s p l a c e m e n t \n \n";
26  os << "Flag for X-Translation (0/1): " << (int)e.data.flag1 << "\n";
27  os << "Flag for Y-Translation (0/1): " << (int)e.data.flag2 << "\n";
28  os << "Flag for Z-Translation (0/1): " << (int)e.data.flag3 << "\n";
29  os << "Flag for X-Rotation (0/1): " << (int)e.data.flag4 << "\n";
30  os << "Flag for Y-Rotation (0/1): " << (int)e.data.flag5 << "\n";
31  os << "Flag for Z-Rotation (0/1): " << (int)e.data.flag6 << "\n \n";
32 
33  if (e.data.flag1 == 1)
34  os << "Displacement magnitude (X-Translation): " << e.data.value1 << "\n";
35  else
36  os << "Displacement magnitude (X-Translation): N/A"
37  << "\n";
38  if (e.data.flag2 == 1)
39  os << "Displacement magnitude (Y-Translation): " << e.data.value2 << "\n";
40  else
41  os << "Displacement magnitude (Y-Translation): N/A"
42  << "\n";
43  if (e.data.flag3 == 1)
44  os << "Displacement magnitude (Z-Translation): " << e.data.value3 << "\n";
45  else
46  os << "Displacement magnitude (Z-Translation): N/A"
47  << "\n";
48  if (e.data.flag4 == 1)
49  os << "Displacement magnitude (X-Rotation): " << e.data.value4 << "\n";
50  else
51  os << "Displacement magnitude (X-Rotation): N/A"
52  << "\n";
53  if (e.data.flag5 == 1)
54  os << "Displacement magnitude (Y-Rotation): " << e.data.value5 << "\n";
55  else
56  os << "Displacement magnitude (Y-Rotation): N/A"
57  << "\n";
58  if (e.data.flag6 == 1)
59  os << "Displacement magnitude (Z-Rotation): " << e.data.value6 << "\n \n";
60  else
61  os << "Displacement magnitude (Z-Rotation): N/A"
62  << "\n \n";
63  return os;
64 }
65 
66 std::ostream &operator<<(std::ostream &os, const ForceCubitBcData &e) {
67  os << "\n";
68  os << "F o r c e \n \n";
69  os << "Force magnitude: " << e.data.value1 << "\n";
70  os << "Moment magnitude: " << e.data.value2 << "\n";
71  os << "Force direction vector (X-component): " << e.data.value3 << "\n";
72  os << "Force direction vector (Y-component): " << e.data.value4 << "\n";
73  os << "Force direction vector (Z-component): " << e.data.value5 << "\n";
74  os << "Moment direction vector (X-component): " << e.data.value6 << "\n";
75  os << "Moment direction vector (Y-component): " << e.data.value7 << "\n";
76  os << "Moment direction vector (Z-component): " << e.data.value8 << "\n \n";
77  return os;
78 }
79 
80 std::ostream &operator<<(std::ostream &os, const VelocityCubitBcData &e) {
81  os << "\n";
82  os << "V e l o c i t y \n \n";
83  if (e.data.flag1 == 1)
84  os << "Velocity magnitude (X-Translation): " << e.data.value1 << "\n";
85  else
86  os << "Velocity magnitude (X-Translation): N/A"
87  << "\n";
88  if (e.data.flag2 == 1)
89  os << "Velocity magnitude (Y-Translation): " << e.data.value2 << "\n";
90  else
91  os << "Velocity magnitude (Y-Translation): N/A"
92  << "\n";
93  if (e.data.flag3 == 1)
94  os << "Velocity magnitude (Z-Translation): " << e.data.value3 << "\n";
95  else
96  os << "Velocity magnitude (Z-Translation): N/A"
97  << "\n";
98  if (e.data.flag4 == 1)
99  os << "Velocity magnitude (X-Rotation): " << e.data.value4 << "\n";
100  else
101  os << "Velocity magnitude (X-Rotation): N/A"
102  << "\n";
103  if (e.data.flag5 == 1)
104  os << "Velocity magnitude (Y-Rotation): " << e.data.value5 << "\n";
105  else
106  os << "Velocity magnitude (Y-Rotation): N/A"
107  << "\n";
108  if (e.data.flag6 == 1)
109  os << "Velocity magnitude (Z-Rotation): " << e.data.value6 << "\n \n";
110  else
111  os << "Velocity magnitude (Z-Rotation): N/A"
112  << "\n \n";
113  return os;
114 }
115 
116 std::ostream &operator<<(std::ostream &os, const AccelerationCubitBcData &e) {
117  os << "\n";
118  os << "A c c e l e r a t i o n \n \n";
119  if (e.data.flag1 == 1)
120  os << "Acceleration magnitude (X-Translation): " << e.data.value1 << "\n";
121  else
122  os << "Acceleration magnitude (X-Translation): N/A"
123  << "\n";
124  if (e.data.flag2 == 1)
125  os << "Acceleration magnitude (Y-Translation): " << e.data.value2 << "\n";
126  else
127  os << "Acceleration magnitude (Y-Translation): N/A"
128  << "\n";
129  if (e.data.flag3 == 1)
130  os << "Acceleration magnitude (Z-Translation): " << e.data.value3 << "\n";
131  else
132  os << "Acceleration magnitude (Z-Translation): N/A"
133  << "\n";
134  if (e.data.flag4 == 1)
135  os << "Acceleration magnitude (X-Rotation): " << e.data.value4 << "\n";
136  else
137  os << "Acceleration magnitude (X-Rotation): N/A"
138  << "\n";
139  if (e.data.flag5 == 1)
140  os << "Acceleration magnitude (Y-Rotation): " << e.data.value5 << "\n";
141  else
142  os << "Acceleration magnitude (Y-Rotation): N/A"
143  << "\n";
144  if (e.data.flag6 == 1)
145  os << "Acceleration magnitude (Z-Rotation): " << e.data.value6 << "\n \n";
146  else
147  os << "Acceleration magnitude (Z-Rotation): N/A"
148  << "\n \n";
149  return os;
150 }
151 
152 std::ostream &operator<<(std::ostream &os, const TemperatureCubitBcData &e) {
153  os << "\n";
154  os << "T e m p e r a t u r e \n \n";
155  if (e.data.flag1 == 1)
156  os << "Temperature: " << e.data.value1 << "\n";
157  else
158  os << "Temperature (default case): N/A"
159  << "\n";
160  if (e.data.flag2 == 1)
161  os << "Temperature (thin shell middle): " << e.data.value2 << "\n";
162  else
163  os << "Temperature (thin shell middle): N/A"
164  << "\n";
165  if (e.data.flag3 == 1)
166  os << "Temperature (thin shell gradient): " << e.data.value3 << "\n";
167  else
168  os << "Temperature (thin shell gradient): N/A"
169  << "\n";
170  if (e.data.flag4 == 1)
171  os << "Temperature (thin shell top): " << e.data.value4 << "\n";
172  else
173  os << "Temperature (thin shell top): N/A"
174  << "\n";
175  if (e.data.flag5 == 1)
176  os << "Temperature (thin shell bottom): " << e.data.value5 << "\n \n";
177  else
178  os << "Temperature (thin shell bottom): N/A"
179  << "\n \n";
180  return os;
181 }
182 
183 std::ostream &operator<<(std::ostream &os, const PressureCubitBcData &e) {
184  os << "\n";
185  os << "P r e s s u r e \n \n";
186  os << "Pressure flag2: " << (int)e.data.flag2 << "\n";
187  os << "Pressure value: " << e.data.value1 << "\n \n";
188  return os;
189 }
190 
191 std::ostream &operator<<(std::ostream &os, const HeatFluxCubitBcData &e) {
192  os << "\n";
193  os << "H e a t F l u x \n \n";
194  if (e.data.flag1 == 1)
195  os << "Heat flux value: " << e.data.value1 << "\n";
196  else
197  os << "Heat flux is applied on thin shells"
198  << "\n";
199  if (e.data.flag2 == 1)
200  os << "Heat flux value (thin shell top): " << e.data.value2 << "\n";
201  else
202  os << "Heat flux value (thin shell top): N/A"
203  << "\n";
204  if (e.data.flag3 == 1)
205  os << "Heat flux value (thin shell bottom): " << e.data.value3 << "\n \n";
206  else
207  os << "Heat flux value (thin shell bottom): N/A"
208  << "\n \n";
209  return os;
210 }
211 
212 std::ostream &operator<<(std::ostream &os, const CfgCubitBcData &e) {
213  os << "\n";
214  os << "CFD BC \n \n";
215  return os;
216 }
217 
218 } // namespace MoFEM
Definition of the temperature bc data structure.
Definition: BCData.hpp:316
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:21
std::ostream & operator<<(std::ostream &os, const DataForcesAndSourcesCore::EntData &e)
Definition of the force bc data structure.
Definition: BCData.hpp:149
Definition of the displacement bc data structure.
Definition: BCData.hpp:87
Definition of the acceleration bc data structure.
Definition: BCData.hpp:257
Definition of the cfd_bc data structure.
Definition: BCData.hpp:490
Definition of the heat flux bc data structure.
Definition: BCData.hpp:437
Definition of the pressure bc data structure.
Definition: BCData.hpp:389
Definition of the velocity bc data structure.
Definition: BCData.hpp:199