v0.14.0
Searching...
No Matches
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
8namespace MoFEM {
9
10std::ostream &operator<<(std::ostream &os, const DisplacementCubitBcData &e) {
11 os << "\n";
12 os << "D i s p l a c e m e n t \n \n";
13 os << "Flag for X-Translation (0/1): " << (int)e.data.flag1 << "\n";
14 os << "Flag for Y-Translation (0/1): " << (int)e.data.flag2 << "\n";
15 os << "Flag for Z-Translation (0/1): " << (int)e.data.flag3 << "\n";
16 os << "Flag for X-Rotation (0/1): " << (int)e.data.flag4 << "\n";
17 os << "Flag for Y-Rotation (0/1): " << (int)e.data.flag5 << "\n";
18 os << "Flag for Z-Rotation (0/1): " << (int)e.data.flag6 << "\n \n";
19
20 if (e.data.flag1 == 1)
21 os << "Displacement magnitude (X-Translation): " << e.data.value1 << "\n";
22 else
23 os << "Displacement magnitude (X-Translation): N/A"
24 << "\n";
25 if (e.data.flag2 == 1)
26 os << "Displacement magnitude (Y-Translation): " << e.data.value2 << "\n";
27 else
28 os << "Displacement magnitude (Y-Translation): N/A"
29 << "\n";
30 if (e.data.flag3 == 1)
31 os << "Displacement magnitude (Z-Translation): " << e.data.value3 << "\n";
32 else
33 os << "Displacement magnitude (Z-Translation): N/A"
34 << "\n";
35 if (e.data.flag4 == 1)
36 os << "Displacement magnitude (X-Rotation): " << e.data.value4 << "\n";
37 else
38 os << "Displacement magnitude (X-Rotation): N/A"
39 << "\n";
40 if (e.data.flag5 == 1)
41 os << "Displacement magnitude (Y-Rotation): " << e.data.value5 << "\n";
42 else
43 os << "Displacement magnitude (Y-Rotation): N/A"
44 << "\n";
45 if (e.data.flag6 == 1)
46 os << "Displacement magnitude (Z-Rotation): " << e.data.value6 << "\n \n";
47 else
48 os << "Displacement magnitude (Z-Rotation): N/A"
49 << "\n \n";
50 return os;
51}
52
53std::ostream &operator<<(std::ostream &os, const ForceCubitBcData &e) {
54 os << "\n";
55 os << "F o r c e \n \n";
56 os << "Force magnitude: " << e.data.value1 << "\n";
57 os << "Moment magnitude: " << e.data.value2 << "\n";
58 os << "Force direction vector (X-component): " << e.data.value3 << "\n";
59 os << "Force direction vector (Y-component): " << e.data.value4 << "\n";
60 os << "Force direction vector (Z-component): " << e.data.value5 << "\n";
61 os << "Moment direction vector (X-component): " << e.data.value6 << "\n";
62 os << "Moment direction vector (Y-component): " << e.data.value7 << "\n";
63 os << "Moment direction vector (Z-component): " << e.data.value8 << "\n \n";
64 return os;
65}
66
67std::ostream &operator<<(std::ostream &os, const VelocityCubitBcData &e) {
68 os << "\n";
69 os << "V e l o c i t y \n \n";
70 if (e.data.flag1 == 1)
71 os << "Velocity magnitude (X-Translation): " << e.data.value1 << "\n";
72 else
73 os << "Velocity magnitude (X-Translation): N/A"
74 << "\n";
75 if (e.data.flag2 == 1)
76 os << "Velocity magnitude (Y-Translation): " << e.data.value2 << "\n";
77 else
78 os << "Velocity magnitude (Y-Translation): N/A"
79 << "\n";
80 if (e.data.flag3 == 1)
81 os << "Velocity magnitude (Z-Translation): " << e.data.value3 << "\n";
82 else
83 os << "Velocity magnitude (Z-Translation): N/A"
84 << "\n";
85 if (e.data.flag4 == 1)
86 os << "Velocity magnitude (X-Rotation): " << e.data.value4 << "\n";
87 else
88 os << "Velocity magnitude (X-Rotation): N/A"
89 << "\n";
90 if (e.data.flag5 == 1)
91 os << "Velocity magnitude (Y-Rotation): " << e.data.value5 << "\n";
92 else
93 os << "Velocity magnitude (Y-Rotation): N/A"
94 << "\n";
95 if (e.data.flag6 == 1)
96 os << "Velocity magnitude (Z-Rotation): " << e.data.value6 << "\n \n";
97 else
98 os << "Velocity magnitude (Z-Rotation): N/A"
99 << "\n \n";
100 return os;
101}
102
103std::ostream &operator<<(std::ostream &os, const AccelerationCubitBcData &e) {
104 os << "\n";
105 os << "A c c e l e r a t i o n \n \n";
106 if (e.data.flag1 == 1)
107 os << "Acceleration magnitude (X-Translation): " << e.data.value1 << "\n";
108 else
109 os << "Acceleration magnitude (X-Translation): N/A"
110 << "\n";
111 if (e.data.flag2 == 1)
112 os << "Acceleration magnitude (Y-Translation): " << e.data.value2 << "\n";
113 else
114 os << "Acceleration magnitude (Y-Translation): N/A"
115 << "\n";
116 if (e.data.flag3 == 1)
117 os << "Acceleration magnitude (Z-Translation): " << e.data.value3 << "\n";
118 else
119 os << "Acceleration magnitude (Z-Translation): N/A"
120 << "\n";
121 if (e.data.flag4 == 1)
122 os << "Acceleration magnitude (X-Rotation): " << e.data.value4 << "\n";
123 else
124 os << "Acceleration magnitude (X-Rotation): N/A"
125 << "\n";
126 if (e.data.flag5 == 1)
127 os << "Acceleration magnitude (Y-Rotation): " << e.data.value5 << "\n";
128 else
129 os << "Acceleration magnitude (Y-Rotation): N/A"
130 << "\n";
131 if (e.data.flag6 == 1)
132 os << "Acceleration magnitude (Z-Rotation): " << e.data.value6 << "\n \n";
133 else
134 os << "Acceleration magnitude (Z-Rotation): N/A"
135 << "\n \n";
136 return os;
137}
138
139std::ostream &operator<<(std::ostream &os, const TemperatureCubitBcData &e) {
140 os << "\n";
141 os << "T e m p e r a t u r e \n \n";
142 if (e.data.flag1 == 1)
143 os << "Temperature: " << e.data.value1 << "\n";
144 else
145 os << "Temperature (default case): N/A"
146 << "\n";
147 if (e.data.flag2 == 1)
148 os << "Temperature (thin shell middle): " << e.data.value2 << "\n";
149 else
150 os << "Temperature (thin shell middle): N/A"
151 << "\n";
152 if (e.data.flag3 == 1)
153 os << "Temperature (thin shell gradient): " << e.data.value3 << "\n";
154 else
155 os << "Temperature (thin shell gradient): N/A"
156 << "\n";
157 if (e.data.flag4 == 1)
158 os << "Temperature (thin shell top): " << e.data.value4 << "\n";
159 else
160 os << "Temperature (thin shell top): N/A"
161 << "\n";
162 if (e.data.flag5 == 1)
163 os << "Temperature (thin shell bottom): " << e.data.value5 << "\n \n";
164 else
165 os << "Temperature (thin shell bottom): N/A"
166 << "\n \n";
167 return os;
168}
169
170std::ostream &operator<<(std::ostream &os, const PressureCubitBcData &e) {
171 os << "\n";
172 os << "P r e s s u r e \n \n";
173 os << "Pressure flag2: " << (int)e.data.flag2 << "\n";
174 os << "Pressure value: " << e.data.value1 << "\n \n";
175 return os;
176}
177
178std::ostream &operator<<(std::ostream &os, const HeatFluxCubitBcData &e) {
179 os << "\n";
180 os << "H e a t F l u x \n \n";
181 if (e.data.flag1 == 1)
182 os << "Heat flux value: " << e.data.value1 << "\n";
183 else
184 os << "Heat flux is applied on thin shells"
185 << "\n";
186 if (e.data.flag2 == 1)
187 os << "Heat flux value (thin shell top): " << e.data.value2 << "\n";
188 else
189 os << "Heat flux value (thin shell top): N/A"
190 << "\n";
191 if (e.data.flag3 == 1)
192 os << "Heat flux value (thin shell bottom): " << e.data.value3 << "\n \n";
193 else
194 os << "Heat flux value (thin shell bottom): N/A"
195 << "\n \n";
196 return os;
197}
198
199std::ostream &operator<<(std::ostream &os, const CfgCubitBcData &e) {
200 os << "\n";
201 os << "CFD BC \n \n";
202 return os;
203}
204
205} // namespace MoFEM
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:10
std::ostream & operator<<(std::ostream &os, const EntitiesFieldData::EntData &e)
Definition of the acceleration bc data structure.
Definition: BCData.hpp:247
Definition of the cfd_bc data structure.
Definition: BCData.hpp:480
Definition of the displacement bc data structure.
Definition: BCData.hpp:76
Definition of the force bc data structure.
Definition: BCData.hpp:139
Definition of the heat flux bc data structure.
Definition: BCData.hpp:427
Definition of the pressure bc data structure.
Definition: BCData.hpp:379
Definition of the temperature bc data structure.
Definition: BCData.hpp:306
Definition of the velocity bc data structure.
Definition: BCData.hpp:189