kib-lap 0.5__cp313-cp313-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- Examples/Cross_Section_Thin.py +61 -0
- Examples/__init__.py +0 -0
- KIB_LAP/Betonbau/Bemessung_Polygon.py +667 -0
- KIB_LAP/Betonbau/Bemessung_Zust_II.py +648 -0
- KIB_LAP/Betonbau/Cross_Section_Kappa.py +925 -0
- KIB_LAP/Betonbau/Druckglied_KGV.py +179 -0
- KIB_LAP/Betonbau/Iterative_Design.py +723 -0
- KIB_LAP/Betonbau/Materialkennwerte_Beton.py +196 -0
- KIB_LAP/Betonbau/Querschnittsbreite.py +194 -0
- KIB_LAP/Betonbau/Querschnittsbreite_Kreis.py +63 -0
- KIB_LAP/Betonbau/__init__.py +2 -0
- KIB_LAP/Betonbau/beam_plate_T.py +921 -0
- KIB_LAP/Betonbau/beam_plate_T_reverse.py +915 -0
- KIB_LAP/Betonbau/beam_rectangular.py +635 -0
- KIB_LAP/Betonbau/beam_sub_section.py +9 -0
- KIB_LAP/Dynamik/Cross_Section_Properties.py +155 -0
- KIB_LAP/Dynamik/Deformation_Method.py +587 -0
- KIB_LAP/Dynamik/Duhamel_SDOF.py +221 -0
- KIB_LAP/Dynamik/FFT.py +87 -0
- KIB_LAP/Dynamik/Kontinuum_Eigenmodes.py +418 -0
- KIB_LAP/Dynamik/Kontinuum_Schwingung.py +757 -0
- KIB_LAP/Dynamik/Pendulum_Spring_Linearized.py +91 -0
- KIB_LAP/Dynamik/Pendulum_Spring_Problem.py +94 -0
- KIB_LAP/Dynamik/__init__.py +0 -0
- KIB_LAP/Examples/Cross_Section_Thin.py +61 -0
- KIB_LAP/Examples/Cross_Section_Thin_2.py +14 -0
- KIB_LAP/Examples/Plattentragwerke.py +39 -0
- KIB_LAP/Examples/Plattentragwerke_2.py +60 -0
- KIB_LAP/Examples/ShearDesign.py +28 -0
- KIB_LAP/Examples/__init__.py +0 -0
- KIB_LAP/Plattenbeulen/Plate_Design.py +276 -0
- KIB_LAP/Plattenbeulen/Ritz_Optimiert.py +658 -0
- KIB_LAP/Plattenbeulen/__init__.py +2 -0
- KIB_LAP/Plattenbeulen/dist/__init__.py +0 -0
- KIB_LAP/Plattenbeulen/plate_buckling.cpp +561 -0
- KIB_LAP/Plattenbeulen/plate_buckling_cpp.cp313-win_amd64.pyd +0 -0
- KIB_LAP/Plattenbeulen/plate_buckling_cpp.cpp +561 -0
- KIB_LAP/Plattenbeulen/setup.py +35 -0
- KIB_LAP/Plattentragwerke/Functions.cpp +326 -0
- KIB_LAP/Plattentragwerke/Functions.h +41 -0
- KIB_LAP/Plattentragwerke/NumInte.cpp +23 -0
- KIB_LAP/Plattentragwerke/NumericalIntegration.cpp +23 -0
- KIB_LAP/Plattentragwerke/PlateBendingKirchhoff.py +843 -0
- KIB_LAP/Plattentragwerke/__init__.py +1 -0
- KIB_LAP/Plattentragwerke/plate_bending.cpp +341 -0
- KIB_LAP/Plattentragwerke/plate_bending_cpp.cp313-win_amd64.pyd +0 -0
- KIB_LAP/Plattentragwerke/setup.py +39 -0
- KIB_LAP/Querschnittswerte/Querschnitt_Duenn.py +526 -0
- KIB_LAP/Querschnittswerte/__init__.py +1 -0
- KIB_LAP/STABRAUM/InputData.py +92 -0
- KIB_LAP/STABRAUM/Programm.py +1403 -0
- KIB_LAP/STABRAUM/Steifigkeitsmatrix.py +275 -0
- KIB_LAP/STABRAUM/__init__.py +3 -0
- KIB_LAP/Stahlbau/__init__.py +0 -0
- KIB_LAP/Verbundbau/Verbundtraeger_Bemessung.py +766 -0
- KIB_LAP/Verbundbau/__init__.py +0 -0
- KIB_LAP/__init__.py +4 -0
- KIB_LAP/main.py +2 -0
- KIB_LAP/plate_bending_cpp.cp313-win_amd64.pyd +0 -0
- KIB_LAP/plate_buckling_cpp.cp313-win_amd64.pyd +0 -0
- kib_lap-0.5.dist-info/METADATA +25 -0
- kib_lap-0.5.dist-info/RECORD +64 -0
- kib_lap-0.5.dist-info/WHEEL +5 -0
- kib_lap-0.5.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from .PlateBendingKirchhoff import PlateBendingKirchhoffClass
|
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
// plate_bending.cpp
|
|
2
|
+
|
|
3
|
+
#include <pybind11/pybind11.h>
|
|
4
|
+
#include <pybind11/stl.h>
|
|
5
|
+
#include <pybind11/numpy.h>
|
|
6
|
+
|
|
7
|
+
#include <vector>
|
|
8
|
+
#include <cmath> // Für pow und trigonometrische Funktionen
|
|
9
|
+
#include "Functions.h"
|
|
10
|
+
|
|
11
|
+
#ifndef M_PI
|
|
12
|
+
#define M_PI 3.14159265358979323846
|
|
13
|
+
#endif
|
|
14
|
+
|
|
15
|
+
namespace py = pybind11;
|
|
16
|
+
|
|
17
|
+
// Stiffeners
|
|
18
|
+
// The stiffener methods are currently written for navier boundary conditions ONLY!
|
|
19
|
+
|
|
20
|
+
double integrate_longitudinal_stiffener_energy_cpp(int m_i, int n_i, int m_j, int n_j,
|
|
21
|
+
double a, double b,
|
|
22
|
+
double E, double I_S,
|
|
23
|
+
double L_S, double x_stiffener)
|
|
24
|
+
{
|
|
25
|
+
double integral = 0.0;
|
|
26
|
+
|
|
27
|
+
// Anzahl der Unterteilungen entlang der Steife
|
|
28
|
+
const int n_steps = 1000;
|
|
29
|
+
double dy = L_S / n_steps;
|
|
30
|
+
|
|
31
|
+
// Position der Längssteife
|
|
32
|
+
double x_s = x_stiffener; // Kann auch als Parameter übergeben werden
|
|
33
|
+
|
|
34
|
+
// Vorberechnung der konstanten Werte
|
|
35
|
+
double sin_m_i_x = sin(m_i * M_PI * x_s / a);
|
|
36
|
+
double sin_m_j_x = sin(m_j * M_PI * x_s / a);
|
|
37
|
+
double coef_n_i = pow(n_i * M_PI / b, 2);
|
|
38
|
+
double coef_n_j = pow(n_j * M_PI / b, 2);
|
|
39
|
+
|
|
40
|
+
auto nf = NumericFunctions();
|
|
41
|
+
|
|
42
|
+
for (int i = 0; i <= n_steps; ++i)
|
|
43
|
+
{
|
|
44
|
+
double y = i * dy;
|
|
45
|
+
|
|
46
|
+
double d2phi_i_dy2 = nf.function_1(x_s, m_i) * nf.function_2yy(y, n_i);
|
|
47
|
+
double d2phi_j_dy2 = nf.function_1(x_s, m_j) * nf.function_2yy(y, n_j);
|
|
48
|
+
|
|
49
|
+
double integrand = d2phi_i_dy2 * d2phi_j_dy2;
|
|
50
|
+
|
|
51
|
+
// Gewichte für die Trapezregel
|
|
52
|
+
double weight = 1.0;
|
|
53
|
+
if (i == 0 || i == n_steps)
|
|
54
|
+
weight = 0.5;
|
|
55
|
+
|
|
56
|
+
integral += integrand * weight;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
integral *= E * I_S * dy;
|
|
60
|
+
|
|
61
|
+
return integral;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
double integrate_transverse_stiffener_energy_cpp(int m_i, int n_i, int m_j, int n_j,
|
|
65
|
+
double a, double b,
|
|
66
|
+
double E, double I_T,
|
|
67
|
+
double L_T, double y_stiffener)
|
|
68
|
+
{
|
|
69
|
+
const int n_steps = 1000;
|
|
70
|
+
double dx = L_T / n_steps;
|
|
71
|
+
double y_s = y_stiffener; // Position der Quersteife
|
|
72
|
+
|
|
73
|
+
double integral = 0.0;
|
|
74
|
+
auto nf = NumericFunctions();
|
|
75
|
+
|
|
76
|
+
for (int i = 0; i <= n_steps; ++i)
|
|
77
|
+
{
|
|
78
|
+
double x = i * dx;
|
|
79
|
+
|
|
80
|
+
// Zweite Ableitungen der Basisfunktionen
|
|
81
|
+
double d2phi_i_dx2 = nf.function_1xx(x, m_i) * nf.function_2(y_s, n_i);
|
|
82
|
+
double d2phi_j_dx2 = nf.function_1xx(x, m_j) * nf.function_2(y_s, n_j);
|
|
83
|
+
|
|
84
|
+
double integrand = d2phi_i_dx2 * d2phi_j_dx2;
|
|
85
|
+
|
|
86
|
+
// Trapezregel: Gewichte
|
|
87
|
+
double weight = 1.0;
|
|
88
|
+
if (i == 0 || i == n_steps)
|
|
89
|
+
weight = 0.5;
|
|
90
|
+
|
|
91
|
+
integral += integrand * weight;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
integral *= E * I_T * dx;
|
|
95
|
+
|
|
96
|
+
return integral;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
std::vector<double> create_discretized_list(double start, double end, int num_intervals)
|
|
100
|
+
{
|
|
101
|
+
std::vector<double> list;
|
|
102
|
+
double step = (end - start) / num_intervals;
|
|
103
|
+
for (int i = 0; i <= num_intervals; ++i)
|
|
104
|
+
{
|
|
105
|
+
list.push_back(start + i * step);
|
|
106
|
+
}
|
|
107
|
+
return list;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
std::vector<std::vector<double>> assemble_stiffness_matrix(
|
|
111
|
+
double D_11, double D_22, double D_12, double D_66,
|
|
112
|
+
int reihen, int n_inte, double a, double b, const std::string &support,
|
|
113
|
+
double E,
|
|
114
|
+
py::array_t<double> x_s_positions,
|
|
115
|
+
py::array_t<double> I_s_values,
|
|
116
|
+
py::array_t<double> y_s_positions,
|
|
117
|
+
py::array_t<double> I_t_values)
|
|
118
|
+
{
|
|
119
|
+
NumericFunctions nf(a, b, support);
|
|
120
|
+
|
|
121
|
+
std::vector<double> list_a = create_discretized_list(0.0, a, n_inte);
|
|
122
|
+
std::vector<double> list_b = create_discretized_list(0.0, b, n_inte);
|
|
123
|
+
|
|
124
|
+
int matrix_size = reihen * reihen;
|
|
125
|
+
std::vector<std::vector<double>> matrix(matrix_size, std::vector<double>(matrix_size, 0.0));
|
|
126
|
+
|
|
127
|
+
auto x_s_positions_unchecked = x_s_positions.unchecked<1>();
|
|
128
|
+
auto I_s_values_unchecked = I_s_values.unchecked<1>();
|
|
129
|
+
|
|
130
|
+
auto y_s_positions_unchecked = y_s_positions.unchecked<1>();
|
|
131
|
+
auto I_t_values_unchecked = I_t_values.unchecked<1>();
|
|
132
|
+
|
|
133
|
+
// Extrahieren der Unterzugpositionen und -werte in Vektoren
|
|
134
|
+
std::vector<double> x_s_positions_vec(x_s_positions.size());
|
|
135
|
+
std::vector<double> I_s_values_vec(I_s_values.size());
|
|
136
|
+
|
|
137
|
+
for (size_t i = 0; i < x_s_positions.size(); ++i)
|
|
138
|
+
{
|
|
139
|
+
x_s_positions_vec[i] = x_s_positions_unchecked(i);
|
|
140
|
+
I_s_values_vec[i] = I_s_values_unchecked(i);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
std::vector<double> y_s_positions_vec(y_s_positions.size());
|
|
144
|
+
std::vector<double> I_t_values_vec(I_t_values.size());
|
|
145
|
+
|
|
146
|
+
for (size_t i = 0; i < y_s_positions.size(); ++i)
|
|
147
|
+
{
|
|
148
|
+
y_s_positions_vec[i] = y_s_positions_unchecked(i);
|
|
149
|
+
I_t_values_vec[i] = I_t_values_unchecked(i);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// Generierung der Steifigkeitsmatrix
|
|
153
|
+
for (int m = 1; m <= reihen; ++m)
|
|
154
|
+
{
|
|
155
|
+
for (int n = 1; n <= reihen; ++n)
|
|
156
|
+
{
|
|
157
|
+
for (int p = 1; p <= reihen; ++p)
|
|
158
|
+
{
|
|
159
|
+
for (int q = 1; q <= reihen; ++q)
|
|
160
|
+
{
|
|
161
|
+
double lambda_x22_pm = NumericalIntegration::integrate_product(
|
|
162
|
+
[&nf](double x, int p)
|
|
163
|
+
{ return nf.function_1xx(x, p); },
|
|
164
|
+
[&nf](double x, int m)
|
|
165
|
+
{ return nf.function_1xx(x, m); },
|
|
166
|
+
list_a, p, m);
|
|
167
|
+
|
|
168
|
+
double lambda_x22_mp = NumericalIntegration::integrate_product(
|
|
169
|
+
[&nf](double x, int m)
|
|
170
|
+
{ return nf.function_1xx(x, m); },
|
|
171
|
+
[&nf](double x, int p)
|
|
172
|
+
{ return nf.function_1xx(x, p); },
|
|
173
|
+
list_a, m, p);
|
|
174
|
+
|
|
175
|
+
double lambda_y00_nq = NumericalIntegration::integrate_product(
|
|
176
|
+
[&nf](double y, int n)
|
|
177
|
+
{ return nf.function_2(y, n); },
|
|
178
|
+
[&nf](double y, int q)
|
|
179
|
+
{ return nf.function_2(y, q); },
|
|
180
|
+
list_b, n, q);
|
|
181
|
+
|
|
182
|
+
double lambda_y00_qn = NumericalIntegration::integrate_product(
|
|
183
|
+
[&nf](double y, int q)
|
|
184
|
+
{ return nf.function_2(y, q); },
|
|
185
|
+
[&nf](double y, int n)
|
|
186
|
+
{ return nf.function_2(y, n); },
|
|
187
|
+
list_b, q, n);
|
|
188
|
+
|
|
189
|
+
double lambda_x00_mp = NumericalIntegration::integrate_product(
|
|
190
|
+
[&nf](double x, int m)
|
|
191
|
+
{ return nf.function_1(x, m); },
|
|
192
|
+
[&nf](double x, int p)
|
|
193
|
+
{ return nf.function_1(x, p); },
|
|
194
|
+
list_a, m, p);
|
|
195
|
+
|
|
196
|
+
double lambda_x00_pm = NumericalIntegration::integrate_product(
|
|
197
|
+
[&nf](double x, int p)
|
|
198
|
+
{ return nf.function_1(x, p); },
|
|
199
|
+
[&nf](double x, int m)
|
|
200
|
+
{ return nf.function_1(x, m); },
|
|
201
|
+
list_a, p, m);
|
|
202
|
+
|
|
203
|
+
double lambda_y22_nq = NumericalIntegration::integrate_product(
|
|
204
|
+
[&nf](double y, int n)
|
|
205
|
+
{ return nf.function_2yy(y, n); },
|
|
206
|
+
[&nf](double y, int q)
|
|
207
|
+
{ return nf.function_2yy(y, q); },
|
|
208
|
+
list_b, n, q);
|
|
209
|
+
|
|
210
|
+
double lambda_y22_qn = NumericalIntegration::integrate_product(
|
|
211
|
+
[&nf](double y, int q)
|
|
212
|
+
{ return nf.function_2yy(y, q); },
|
|
213
|
+
[&nf](double y, int n)
|
|
214
|
+
{ return nf.function_2yy(y, n); },
|
|
215
|
+
list_b, q, n);
|
|
216
|
+
|
|
217
|
+
double lambda_x20_mp = NumericalIntegration::integrate_product(
|
|
218
|
+
[&nf](double x, int m)
|
|
219
|
+
{ return nf.function_1xx(x, m); },
|
|
220
|
+
[&nf](double x, int p)
|
|
221
|
+
{ return nf.function_1(x, p); },
|
|
222
|
+
list_a, m, p);
|
|
223
|
+
|
|
224
|
+
double lambda_x20_pm = NumericalIntegration::integrate_product(
|
|
225
|
+
[&nf](double x, int p)
|
|
226
|
+
{ return nf.function_1xx(x, p); },
|
|
227
|
+
[&nf](double x, int m)
|
|
228
|
+
{ return nf.function_1(x, m); },
|
|
229
|
+
list_a, p, m);
|
|
230
|
+
|
|
231
|
+
double lambda_y02_nq = NumericalIntegration::integrate_product(
|
|
232
|
+
[&nf](double y, int n)
|
|
233
|
+
{ return nf.function_2(y, n); },
|
|
234
|
+
[&nf](double y, int q)
|
|
235
|
+
{ return nf.function_2yy(y, q); },
|
|
236
|
+
list_b, n, q);
|
|
237
|
+
|
|
238
|
+
double lambda_y02_qn = NumericalIntegration::integrate_product(
|
|
239
|
+
[&nf](double y, int q)
|
|
240
|
+
{ return nf.function_2(y, q); },
|
|
241
|
+
[&nf](double y, int n)
|
|
242
|
+
{ return nf.function_2yy(y, n); },
|
|
243
|
+
list_b, q, n);
|
|
244
|
+
|
|
245
|
+
double lambda_x11_mp = NumericalIntegration::integrate_product(
|
|
246
|
+
[&nf](double x, int m)
|
|
247
|
+
{ return nf.function_1x(x, m); },
|
|
248
|
+
[&nf](double x, int p)
|
|
249
|
+
{ return nf.function_1x(x, p); },
|
|
250
|
+
list_a, m, p);
|
|
251
|
+
|
|
252
|
+
double lambda_x11_pm = NumericalIntegration::integrate_product(
|
|
253
|
+
[&nf](double x, int p)
|
|
254
|
+
{ return nf.function_1x(x, p); },
|
|
255
|
+
[&nf](double x, int m)
|
|
256
|
+
{ return nf.function_1x(x, m); },
|
|
257
|
+
list_a, p, m);
|
|
258
|
+
|
|
259
|
+
double lambda_y11_nq = NumericalIntegration::integrate_product(
|
|
260
|
+
[&nf](double y, int n)
|
|
261
|
+
{ return nf.function_2y(y, n); },
|
|
262
|
+
[&nf](double y, int q)
|
|
263
|
+
{ return nf.function_2y(y, q); },
|
|
264
|
+
list_b, n, q);
|
|
265
|
+
|
|
266
|
+
double lambda_y11_qn = NumericalIntegration::integrate_product(
|
|
267
|
+
[&nf](double y, int q)
|
|
268
|
+
{ return nf.function_2y(y, q); },
|
|
269
|
+
[&nf](double y, int n)
|
|
270
|
+
{ return nf.function_2y(y, n); },
|
|
271
|
+
list_b, q, n);
|
|
272
|
+
|
|
273
|
+
double value = 0.0;
|
|
274
|
+
|
|
275
|
+
if (m == p)
|
|
276
|
+
{
|
|
277
|
+
value =
|
|
278
|
+
0.5 * D_11 * (lambda_x22_mp * lambda_y00_nq + lambda_x22_pm * lambda_y00_qn) +
|
|
279
|
+
0.5 * D_22 * (lambda_x00_mp * lambda_y22_nq + lambda_x00_pm * lambda_y22_qn) +
|
|
280
|
+
D_12 * (lambda_x20_mp * lambda_y02_nq + lambda_x20_pm * lambda_y02_qn) +
|
|
281
|
+
2 * D_66 * (lambda_x11_pm * lambda_y11_nq + lambda_x11_mp * lambda_y11_nq);
|
|
282
|
+
}
|
|
283
|
+
else
|
|
284
|
+
{
|
|
285
|
+
value =
|
|
286
|
+
0.5 * D_11 * (lambda_x22_mp * lambda_y00_nq + lambda_x22_pm * lambda_y00_qn) +
|
|
287
|
+
0.5 * D_22 * (lambda_x00_mp * lambda_y22_nq + lambda_x00_pm * lambda_y22_qn) +
|
|
288
|
+
D_12 * (lambda_x20_mp * lambda_y02_nq + lambda_x20_pm * lambda_y02_qn) +
|
|
289
|
+
2 * D_66 * (lambda_x11_mp * lambda_y11_nq + lambda_x11_pm * lambda_y11_qn);
|
|
290
|
+
}
|
|
291
|
+
for (size_t r = 0; r < x_s_positions_vec.size(); ++r)
|
|
292
|
+
{
|
|
293
|
+
// Angenommen L_S ist immer b oder Sie haben einen festen Wert:
|
|
294
|
+
double L_S = b;
|
|
295
|
+
double stiffener_long = integrate_longitudinal_stiffener_energy_cpp(
|
|
296
|
+
m, n, p, q,
|
|
297
|
+
a, b, E, I_s_values_vec[r],
|
|
298
|
+
L_S, x_s_positions_vec[r]);
|
|
299
|
+
value += stiffener_long;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
for (size_t r = 0; r < y_s_positions_vec.size(); ++r)
|
|
303
|
+
{
|
|
304
|
+
double L_T = a; // oder ein anderer Wert, je nach Definition
|
|
305
|
+
double stiffener_trans = integrate_transverse_stiffener_energy_cpp(
|
|
306
|
+
m, n, p, q,
|
|
307
|
+
a, b, E, I_t_values_vec[r],
|
|
308
|
+
L_T, y_s_positions_vec[r]);
|
|
309
|
+
value += stiffener_trans;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
if (std::abs(value) < 1e-9)
|
|
313
|
+
{
|
|
314
|
+
value = 0.0;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
int row = n - 1 + reihen * (m - 1);
|
|
318
|
+
int col = q - 1 + reihen * (p - 1);
|
|
319
|
+
matrix[row][col] = value;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
return matrix;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
PYBIND11_MODULE(plate_bending_cpp, m)
|
|
329
|
+
{
|
|
330
|
+
m.doc() = "pybind11 Modul zur Assemblierung der Steifigkeitsmatrix für Plattenbiegung";
|
|
331
|
+
|
|
332
|
+
m.def("assemble_stiffness_matrix", &assemble_stiffness_matrix,
|
|
333
|
+
"Assemblierung der Steifigkeitsmatrix inklusive Unterzüge",
|
|
334
|
+
py::arg("D_11"), py::arg("D_22"), py::arg("D_12"), py::arg("D_66"),
|
|
335
|
+
py::arg("reihen"), py::arg("n_inte"), py::arg("a"), py::arg("b"), py::arg("support"),
|
|
336
|
+
py::arg("E"),
|
|
337
|
+
py::arg("x_s_positions"),
|
|
338
|
+
py::arg("I_s_values"),
|
|
339
|
+
py::arg("y_s_positions"),
|
|
340
|
+
py::arg("I_t_values"));
|
|
341
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
from setuptools import setup, Extension
|
|
2
|
+
import pybind11
|
|
3
|
+
from pybind11.setup_helpers import build_ext
|
|
4
|
+
import sys
|
|
5
|
+
|
|
6
|
+
# Überprüfen des Compilers
|
|
7
|
+
if sys.platform == 'win32':
|
|
8
|
+
# Einstellungen für Visual C++ Compiler
|
|
9
|
+
extra_compile_args = ['/O2', '/std:c++17', '/openmp']
|
|
10
|
+
extra_link_args = ['/openmp']
|
|
11
|
+
else:
|
|
12
|
+
# Einstellungen für GCC oder Clang
|
|
13
|
+
extra_compile_args = ['-O3', '-std=c++17', '-fopenmp']
|
|
14
|
+
extra_link_args = ['-fopenmp']
|
|
15
|
+
|
|
16
|
+
ext_modules = [
|
|
17
|
+
Extension(
|
|
18
|
+
'plate_bending_cpp',
|
|
19
|
+
['plate_bending.cpp', 'Functions.cpp'], # Fügen Sie alle Ihre .cpp-Dateien hinzu
|
|
20
|
+
include_dirs=[
|
|
21
|
+
pybind11.get_include(), # Include-Verzeichnis von pybind11
|
|
22
|
+
'.', # Aktuelles Verzeichnis
|
|
23
|
+
'KIB_LAP/Plattentragwerke', # Verzeichnis der Header-Dateien
|
|
24
|
+
],
|
|
25
|
+
language='c++',
|
|
26
|
+
extra_compile_args=extra_compile_args,
|
|
27
|
+
extra_link_args=extra_link_args,
|
|
28
|
+
),
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
setup(
|
|
32
|
+
name='plate_bending_cpp',
|
|
33
|
+
version='0.1',
|
|
34
|
+
author='Ihr Name',
|
|
35
|
+
author_email='ihre.email@example.com',
|
|
36
|
+
description='Platten nach Kirchhoff',
|
|
37
|
+
ext_modules=ext_modules,
|
|
38
|
+
cmdclass={'build_ext': build_ext},
|
|
39
|
+
)
|