Commit a2c975cd authored by François Trigaux's avatar François Trigaux 🤠
Browse files

🍺 Added function for distributed loads

parent 07be8abd
obj/*
bin/*
run/gebt*
run/output*
[Beam]
analysis_flag = 0
nkp = 2
nkp = 400
niter = 1000
nstep = 1
nmemb = 1
ncond_pt = 2
nmate = 1
nframe = 0
ndistrfun = 1
ncurv = 0
ncond_mb = 1
\ No newline at end of file
initFromFile = 0
L=1.0
\ No newline at end of file
0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00
0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00
0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00
0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00
0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 1.33333333333333E-02 0.00000000000000E+00
0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 0.00000000000000E+00 1.33333333333333E-02
\ No newline at end of file
File deleted
0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 -6.95336409e+05 0.00000000e+00 6.50230105e+05 0.00000000e+00 -4.50054452e+05 0.00000000e+00
1.00000000e+00 0.00000000e+00 0.00000000e+00 -3.53786124e-01 0.00000000e+00 6.93571990e-01 0.00000000e+00 -1.12051170e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00
5.00000000e-03 0.00000000e+00 0.00000000e+00 -1.01297216e-04 0.00000000e+00 7.43850710e-05 0.00000000e+00 -1.51835527e-02 0.00000000e+00 -6.85383883e+05 0.00000000e+00 6.55712376e+05 0.00000000e+00 -4.46841942e+05 0.00000000e+00
1.50000000e-02 0.00000000e+00 0.00000000e+00 -3.05434191e-04 0.00000000e+00 3.70912120e-04 0.00000000e+00 -4.53322527e-02 0.00000000e+00 -6.65458512e+05 0.00000000e+00 6.66075727e+05 0.00000000e+00 -4.40364198e+05 0.00000000e+00
2.50000000e-02 0.00000000e+00 0.00000000e+00 -5.16950793e-04 0.00000000e+00 9.60757345e-04 0.00000000e+00 -7.50422679e-02 0.00000000e+00 -6.45531827e+05 0.00000000e+00 6.75547433e+05 0.00000000e+00 -4.33785319e+05 0.00000000e+00
3.50000000e-02 0.00000000e+00 0.00000000e+00 -7.44244780e-04 0.00000000e+00 1.83937576e-03 0.00000000e+00 -1.04309995e-01 0.00000000e+00 -6.25642990e+05 0.00000000e+00 6.84141530e+05 0.00000000e+00 -4.27113876e+05 0.00000000e+00
4.50000000e-02 0.00000000e+00 0.00000000e+00 -9.95327154e-04 0.00000000e+00 3.00192864e-03 0.00000000e+00 -1.33132118e-01 0.00000000e+00 -6.05829317e+05 0.00000000e+00 6.91873883e+05 0.00000000e+00 -4.20358312e+05 0.00000000e+00
5.50000000e-02 0.00000000e+00 0.00000000e+00 -1.27781495e-03 0.00000000e+00 4.44331073e-03 0.00000000e+00 -1.61505606e-01 0.00000000e+00 -5.86126210e+05 0.00000000e+00 6.98762004e+05 0.00000000e+00 -4.13526931e+05 0.00000000e+00
6.50000000e-02 0.00000000e+00 0.00000000e+00 -1.59892605e-03 0.00000000e+00 6.15817714e-03 0.00000000e+00 -1.89427709e-01 0.00000000e+00 -5.66567109e+05 0.00000000e+00 7.04824882e+05 0.00000000e+00 -4.06627882e+05 0.00000000e+00
7.50000000e-02 0.00000000e+00 0.00000000e+00 -1.96547593e-03 0.00000000e+00 8.14096991e-03 0.00000000e+00 -2.16895957e-01 0.00000000e+00 -5.47183454e+05 0.00000000e+00 7.10082807e+05 0.00000000e+00 -3.99669139e+05 0.00000000e+00
8.50000000e-02 0.00000000e+00 0.00000000e+00 -2.38387624e-03 0.00000000e+00 1.03859439e-02 0.00000000e+00 -2.43908159e-01 0.00000000e+00 -5.28004664e+05 0.00000000e+00 7.14557206e+05 0.00000000e+00 -3.92658496e+05 0.00000000e+00
9.50000000e-02 0.00000000e+00 0.00000000e+00 -2.86013509e-03 0.00000000e+00 1.28871918e-02 0.00000000e+00 -2.70462396e-01 0.00000000e+00 -5.09058125e+05 0.00000000e+00 7.18270474e+05 0.00000000e+00 -3.85603548e+05 0.00000000e+00
1.05000000e-01 0.00000000e+00 0.00000000e+00 -3.39985901e-03 0.00000000e+00 1.56386692e-02 0.00000000e+00 -2.96557023e-01 0.00000000e+00 -4.90369201e+05 0.00000000e+00 7.21245820e+05 0.00000000e+00 -3.78511686e+05 0.00000000e+00
1.15000000e-01 0.00000000e+00 0.00000000e+00 -4.00825636e-03 0.00000000e+00 1.86342173e-02 0.00000000e+00 -3.22190658e-01 0.00000000e+00 -4.71961242e+05 0.00000000e+00 7.23507113e+05 0.00000000e+00 -3.71390088e+05 0.00000000e+00
1.25000000e-01 0.00000000e+00 0.00000000e+00 -4.69014215e-03 0.00000000e+00 2.18675863e-02 0.00000000e+00 -3.47362190e-01 0.00000000e+00 -4.53855613e+05 0.00000000e+00 7.25078741e+05 0.00000000e+00 -3.64245711e+05 0.00000000e+00
1.35000000e-01 0.00000000e+00 0.00000000e+00 -5.44994417e-03 0.00000000e+00 2.53324566e-02 0.00000000e+00 -3.72070762e-01 0.00000000e+00 -4.36071730e+05 0.00000000e+00 7.25985469e+05 0.00000000e+00 -3.57085285e+05 0.00000000e+00
1.45000000e-01 0.00000000e+00 0.00000000e+00 -6.29171018e-03 0.00000000e+00 2.90224594e-02 0.00000000e+00 -3.96315781e-01 0.00000000e+00 -4.18627100e+05 0.00000000e+00 7.26252317e+05 0.00000000e+00 -3.49915308e+05 0.00000000e+00
1.55000000e-01 0.00000000e+00 0.00000000e+00 -7.21911622e-03 0.00000000e+00 3.29311961e-02 0.00000000e+00 -4.20096903e-01 0.00000000e+00 -4.01537374e+05 0.00000000e+00 7.25904434e+05 0.00000000e+00 -3.42742048e+05 0.00000000e+00
1.65000000e-01 0.00000000e+00 0.00000000e+00 -8.23547583e-03 0.00000000e+00 3.70522569e-02 0.00000000e+00 -4.43414036e-01 0.00000000e+00 -3.84816403e+05 0.00000000e+00 7.24966987e+05 0.00000000e+00 -3.35571532e+05 0.00000000e+00
1.75000000e-01 0.00000000e+00 0.00000000e+00 -9.34375002e-03 0.00000000e+00 4.13792374e-02 0.00000000e+00 -4.66267333e-01 0.00000000e+00 -3.68476297e+05 0.00000000e+00 7.23465061e+05 0.00000000e+00 -3.28409554e+05 0.00000000e+00
1.85000000e-01 0.00000000e+00 0.00000000e+00 -1.05465580e-02 0.00000000e+00 4.59057551e-02 0.00000000e+00 -4.88657187e-01 0.00000000e+00 -3.52527497e+05 0.00000000e+00 7.21423560e+05 0.00000000e+00 -3.21261669e+05 0.00000000e+00
1.95000000e-01 0.00000000e+00 0.00000000e+00 -1.18461884e-02 0.00000000e+00 5.06254641e-02 0.00000000e+00 -5.10584231e-01 0.00000000e+00 -3.36978841e+05 0.00000000e+00 7.18867125e+05 0.00000000e+00 -3.14133197e+05 0.00000000e+00
2.05000000e-01 0.00000000e+00 0.00000000e+00 -1.32446111e-02 0.00000000e+00 5.55320684e-02 0.00000000e+00 -5.32049330e-01 0.00000000e+00 -3.21837636e+05 0.00000000e+00 7.15820052e+05 0.00000000e+00 -3.07029223e+05 0.00000000e+00
2.15000000e-01 0.00000000e+00 0.00000000e+00 -1.47434896e-02 0.00000000e+00 6.06193350e-02 0.00000000e+00 -5.53053577e-01 0.00000000e+00 -3.07109736e+05 0.00000000e+00 7.12306225e+05 0.00000000e+00 -2.99954602e+05 0.00000000e+00
2.25000000e-01 0.00000000e+00 0.00000000e+00 -1.63441931e-02 0.00000000e+00 6.58811050e-02 0.00000000e+00 -5.73598289e-01 0.00000000e+00 -2.92799614e+05 0.00000000e+00 7.08349053e+05 0.00000000e+00 -2.92913959e+05 0.00000000e+00
2.35000000e-01 0.00000000e+00 0.00000000e+00 -1.80478095e-02 0.00000000e+00 7.13113039e-02 0.00000000e+00 -5.93685004e-01 0.00000000e+00 -2.78910443e+05 0.00000000e+00 7.03971417e+05 0.00000000e+00 -2.85911697e+05 0.00000000e+00
2.45000000e-01 0.00000000e+00 0.00000000e+00 -1.98551583e-02 0.00000000e+00 7.69039510e-02 0.00000000e+00 -6.13315473e-01 0.00000000e+00 -2.65444167e+05 0.00000000e+00 6.99195619e+05 0.00000000e+00 -2.78951997e+05 0.00000000e+00
2.55000000e-01 0.00000000e+00 0.00000000e+00 -2.17668033e-02 0.00000000e+00 8.26531679e-02 0.00000000e+00 -6.32491660e-01 0.00000000e+00 -2.52401584e+05 0.00000000e+00 6.94043349e+05 0.00000000e+00 -2.72038826e+05 0.00000000e+00
2.65000000e-01 0.00000000e+00 0.00000000e+00 -2.37830655e-02 0.00000000e+00 8.85531853e-02 0.00000000e+00 -6.51215732e-01 0.00000000e+00 -2.39782416e+05 0.00000000e+00 6.88535644e+05 0.00000000e+00 -2.65175942e+05 0.00000000e+00
2.75000000e-01 0.00000000e+00 0.00000000e+00 -2.59040364e-02 0.00000000e+00 9.45983497e-02 0.00000000e+00 -6.69490059e-01 0.00000000e+00 -2.27585385e+05 0.00000000e+00 6.82692865e+05 0.00000000e+00 -2.58366900e+05 0.00000000e+00
2.85000000e-01 0.00000000e+00 0.00000000e+00 -2.81295902e-02 0.00000000e+00 1.00783129e-01 0.00000000e+00 -6.87317207e-01 0.00000000e+00 -2.15808286e+05 0.00000000e+00 6.76534673e+05 0.00000000e+00 -2.51615056e+05 0.00000000e+00
2.95000000e-01 0.00000000e+00 0.00000000e+00 -3.04593969e-02 0.00000000e+00 1.07102116e-01 0.00000000e+00 -7.04699931e-01 0.00000000e+00 -2.04448059e+05 0.00000000e+00 6.70080014e+05 0.00000000e+00 -2.44923575e+05 0.00000000e+00
3.05000000e-01 0.00000000e+00 0.00000000e+00 -3.28929344e-02 0.00000000e+00 1.13550035e-01 0.00000000e+00 -7.21641177e-01 0.00000000e+00 -1.93500854e+05 0.00000000e+00 6.63347105e+05 0.00000000e+00 -2.38295439e+05 0.00000000e+00
3.15000000e-01 0.00000000e+00 0.00000000e+00 -3.54295008e-02 0.00000000e+00 1.20121741e-01 0.00000000e+00 -7.38144070e-01 0.00000000e+00 -1.82962100e+05 0.00000000e+00 6.56353431e+05 0.00000000e+00 -2.31733451e+05 0.00000000e+00
3.25000000e-01 0.00000000e+00 0.00000000e+00 -3.80682264e-02 0.00000000e+00 1.26812225e-01 0.00000000e+00 -7.54211912e-01 0.00000000e+00 -1.72826569e+05 0.00000000e+00 6.49115738e+05 0.00000000e+00 -2.25240243e+05 0.00000000e+00
3.35000000e-01 0.00000000e+00 0.00000000e+00 -4.08080849e-02 0.00000000e+00 1.33616617e-01 0.00000000e+00 -7.69848181e-01 0.00000000e+00 -1.63088436e+05 0.00000000e+00 6.41650037e+05 0.00000000e+00 -2.18818282e+05 0.00000000e+00
3.45000000e-01 0.00000000e+00 0.00000000e+00 -4.36479053e-02 0.00000000e+00 1.40530181e-01 0.00000000e+00 -7.85056519e-01 0.00000000e+00 -1.53741335e+05 0.00000000e+00 6.33971603e+05 0.00000000e+00 -2.12469879e+05 0.00000000e+00
3.55000000e-01 0.00000000e+00 0.00000000e+00 -4.65863826e-02 0.00000000e+00 1.47548324e-01 0.00000000e+00 -7.99840733e-01 0.00000000e+00 -1.44778419e+05 0.00000000e+00 6.26094988e+05 0.00000000e+00 -2.06197194e+05 0.00000000e+00
3.65000000e-01 0.00000000e+00 0.00000000e+00 -4.96220880e-02 0.00000000e+00 1.54666588e-01 0.00000000e+00 -8.14204788e-01 0.00000000e+00 -1.36192413e+05 0.00000000e+00 6.18034029e+05 0.00000000e+00 -2.00002242e+05 0.00000000e+00
3.75000000e-01 0.00000000e+00 0.00000000e+00 -5.27534799e-02 0.00000000e+00 1.61880656e-01 0.00000000e+00 -8.28152802e-01 0.00000000e+00 -1.27975658e+05 0.00000000e+00 6.09801859e+05 0.00000000e+00 -1.93886903e+05 0.00000000e+00
3.85000000e-01 0.00000000e+00 0.00000000e+00 -5.59789130e-02 0.00000000e+00 1.69186348e-01 0.00000000e+00 -8.41689045e-01 0.00000000e+00 -1.20120166e+05 0.00000000e+00 6.01410919e+05 0.00000000e+00 -1.87852926e+05 0.00000000e+00
3.95000000e-01 0.00000000e+00 0.00000000e+00 -5.92966485e-02 0.00000000e+00 1.76579620e-01 0.00000000e+00 -8.54817927e-01 0.00000000e+00 -1.12617656e+05 0.00000000e+00 5.92872982e+05 0.00000000e+00 -1.81901937e+05 0.00000000e+00
4.05000000e-01 0.00000000e+00 0.00000000e+00 -6.27048626e-02 0.00000000e+00 1.84056563e-01 0.00000000e+00 -8.67544002e-01 0.00000000e+00 -1.05459605e+05 0.00000000e+00 5.84199161e+05 0.00000000e+00 -1.76035444e+05 0.00000000e+00
4.15000000e-01 0.00000000e+00 0.00000000e+00 -6.62016554e-02 0.00000000e+00 1.91613403e-01 0.00000000e+00 -8.79871959e-01 0.00000000e+00 -9.86372786e+04 0.00000000e+00 5.75399934e+05 0.00000000e+00 -1.70254845e+05 0.00000000e+00
4.25000000e-01 0.00000000e+00 0.00000000e+00 -6.97850595e-02 0.00000000e+00 1.99246494e-01 0.00000000e+00 -8.91806616e-01 0.00000000e+00 -9.21417740e+04 0.00000000e+00 5.66485162e+05 0.00000000e+00 -1.64561433e+05 0.00000000e+00
4.35000000e-01 0.00000000e+00 0.00000000e+00 -7.34530476e-02 0.00000000e+00 2.06952321e-01 0.00000000e+00 -9.03352919e-01 0.00000000e+00 -8.59640498e+04 0.00000000e+00 5.57464111e+05 0.00000000e+00 -1.58956401e+05 0.00000000e+00
4.45000000e-01 0.00000000e+00 0.00000000e+00 -7.72035403e-02 0.00000000e+00 2.14727495e-01 0.00000000e+00 -9.14515939e-01 0.00000000e+00 -8.00949591e+04 0.00000000e+00 5.48345470e+05 0.00000000e+00 -1.53440852e+05 0.00000000e+00
4.55000000e-01 0.00000000e+00 0.00000000e+00 -8.10344132e-02 0.00000000e+00 2.22568750e-01 0.00000000e+00 -9.25300861e-01 0.00000000e+00 -7.45252791e+04 0.00000000e+00 5.39137377e+05 0.00000000e+00 -1.48015798e+05 0.00000000e+00
4.65000000e-01 0.00000000e+00 0.00000000e+00 -8.49435037e-02 0.00000000e+00 2.30472941e-01 0.00000000e+00 -9.35712987e-01 0.00000000e+00 -6.92457375e+04 0.00000000e+00 5.29847439e+05 0.00000000e+00 -1.42682171e+05 0.00000000e+00
4.75000000e-01 0.00000000e+00 0.00000000e+00 -8.89286179e-02 0.00000000e+00 2.38437040e-01 0.00000000e+00 -9.45757727e-01 0.00000000e+00 -6.42470378e+04 0.00000000e+00 5.20482754e+05 0.00000000e+00 -1.37440827e+05 0.00000000e+00
4.85000000e-01 0.00000000e+00 0.00000000e+00 -9.29875361e-02 0.00000000e+00 2.46458136e-01 0.00000000e+00 -9.55440600e-01 0.00000000e+00 -5.95198825e+04 0.00000000e+00 5.11049934e+05 0.00000000e+00 -1.32292549e+05 0.00000000e+00
4.95000000e-01 0.00000000e+00 0.00000000e+00 -9.71180193e-02 0.00000000e+00 2.54533428e-01 0.00000000e+00 -9.64767223e-01 0.00000000e+00 -5.50549938e+04 0.00000000e+00 5.01555130e+05 0.00000000e+00 -1.27238053e+05 0.00000000e+00
5.05000000e-01 0.00000000e+00 0.00000000e+00 -1.01317814e-01 0.00000000e+00 2.62660222e-01 0.00000000e+00 -9.73743314e-01 0.00000000e+00 -5.08431332e+04 0.00000000e+00 4.92004050e+05 0.00000000e+00 -1.22277992e+05 0.00000000e+00
5.15000000e-01 0.00000000e+00 0.00000000e+00 -1.05584659e-01 0.00000000e+00 2.70835933e-01 0.00000000e+00 -9.82374684e-01 0.00000000e+00 -4.68751193e+04 0.00000000e+00 4.82401982e+05 0.00000000e+00 -1.17412961e+05 0.00000000e+00
5.25000000e-01 0.00000000e+00 0.00000000e+00 -1.09916288e-01 0.00000000e+00 2.79058075e-01 0.00000000e+00 -9.90667234e-01 0.00000000e+00 -4.31418435e+04 0.00000000e+00 4.72753818e+05 0.00000000e+00 -1.12643503e+05 0.00000000e+00
5.35000000e-01 0.00000000e+00 0.00000000e+00 -1.14310435e-01 0.00000000e+00 2.87324262e-01 0.00000000e+00 -9.98626952e-01 0.00000000e+00 -3.96342850e+04 0.00000000e+00 4.63064073e+05 0.00000000e+00 -1.07970109e+05 0.00000000e+00
5.45000000e-01 0.00000000e+00 0.00000000e+00 -1.18764841e-01 0.00000000e+00 2.95632203e-01 0.00000000e+00 -1.00625991e+00 0.00000000e+00 -3.63435242e+04 0.00000000e+00 4.53336906e+05 0.00000000e+00 -1.03393223e+05 0.00000000e+00
5.55000000e-01 0.00000000e+00 0.00000000e+00 -1.23277254e-01 0.00000000e+00 3.03979701e-01 0.00000000e+00 -1.01357226e+00 0.00000000e+00 -3.32607542e+04 0.00000000e+00 4.43576142e+05 0.00000000e+00 -9.89132476e+04 0.00000000e+00
5.65000000e-01 0.00000000e+00 0.00000000e+00 -1.27845435e-01 0.00000000e+00 3.12364646e-01 0.00000000e+00 -1.02057023e+00 0.00000000e+00 -3.03772921e+04 0.00000000e+00 4.33785290e+05 0.00000000e+00 -9.45305455e+04 0.00000000e+00
5.75000000e-01 0.00000000e+00 0.00000000e+00 -1.32467165e-01 0.00000000e+00 3.20785015e-01 0.00000000e+00 -1.02726011e+00 0.00000000e+00 -2.76845887e+04 0.00000000e+00 4.23967561e+05 0.00000000e+00 -9.02454430e+04 0.00000000e+00
5.85000000e-01 0.00000000e+00 0.00000000e+00 -1.37140240e-01 0.00000000e+00 3.29238870e-01 0.00000000e+00 -1.03364829e+00 0.00000000e+00 -2.51742371e+04 0.00000000e+00 4.14125889e+05 0.00000000e+00 -8.60582330e+04 0.00000000e+00
5.95000000e-01 0.00000000e+00 0.00000000e+00 -1.41862482e-01 0.00000000e+00 3.37724351e-01 0.00000000e+00 -1.03974118e+00 0.00000000e+00 -2.28379808e+04 0.00000000e+00 4.04262950e+05 0.00000000e+00 -8.19691780e+04 0.00000000e+00
6.05000000e-01 0.00000000e+00 0.00000000e+00 -1.46631740e-01 0.00000000e+00 3.46239675e-01 0.00000000e+00 -1.04554530e+00 0.00000000e+00 -2.06677202e+04 0.00000000e+00 3.94381174e+05 0.00000000e+00 -7.79785123e+04 0.00000000e+00
6.15000000e-01 0.00000000e+00 0.00000000e+00 -1.51445889e-01 0.00000000e+00 3.54783137e-01 0.00000000e+00 -1.05106719e+00 0.00000000e+00 -1.86555194e+04 0.00000000e+00 3.84482766e+05 0.00000000e+00 -7.40864447e+04 0.00000000e+00
6.25000000e-01 0.00000000e+00 0.00000000e+00 -1.56302838e-01 0.00000000e+00 3.63353098e-01 0.00000000e+00 -1.05631348e+00 0.00000000e+00 -1.67936115e+04 0.00000000e+00 3.74569720e+05 0.00000000e+00 -7.02931610e+04 0.00000000e+00
6.35000000e-01 0.00000000e+00 0.00000000e+00 -1.61200527e-01 0.00000000e+00 3.71947994e-01 0.00000000e+00 -1.06129084e+00 0.00000000e+00 -1.50744034e+04 0.00000000e+00 3.64643836e+05 0.00000000e+00 -6.65988256e+04 0.00000000e+00
6.45000000e-01 0.00000000e+00 0.00000000e+00 -1.66136936e-01 0.00000000e+00 3.80566324e-01 0.00000000e+00 -1.06600597e+00 0.00000000e+00 -1.34904800e+04 0.00000000e+00 3.54706733e+05 0.00000000e+00 -6.30035839e+04 0.00000000e+00
6.55000000e-01 0.00000000e+00 0.00000000e+00 -1.71110080e-01 0.00000000e+00 3.89206652e-01 0.00000000e+00 -1.07046567e+00 0.00000000e+00 -1.20346084e+04 0.00000000e+00 3.44759861e+05 0.00000000e+00 -5.95075640e+04 0.00000000e+00
6.65000000e-01 0.00000000e+00 0.00000000e+00 -1.76118014e-01 0.00000000e+00 3.97867604e-01 0.00000000e+00 -1.07467673e+00 0.00000000e+00 -1.06997407e+04 0.00000000e+00 3.34804518e+05 0.00000000e+00 -5.61108785e+04 0.00000000e+00
6.75000000e-01 0.00000000e+00 0.00000000e+00 -1.81158838e-01 0.00000000e+00 4.06547865e-01 0.00000000e+00 -1.07864602e+00 0.00000000e+00 -9.47901723e+03 0.00000000e+00 3.24841860e+05 0.00000000e+00 -5.28136256e+04 0.00000000e+00
6.85000000e-01 0.00000000e+00 0.00000000e+00 -1.86230693e-01 0.00000000e+00 4.15246177e-01 0.00000000e+00 -1.08238043e+00 0.00000000e+00 -8.36576892e+03 0.00000000e+00 3.14872914e+05 0.00000000e+00 -4.96158915e+04 0.00000000e+00
6.95000000e-01 0.00000000e+00 0.00000000e+00 -1.91331766e-01 0.00000000e+00 4.23961338e-01 0.00000000e+00 -1.08588691e+00 0.00000000e+00 -7.35351944e+03 0.00000000e+00 3.04898588e+05 0.00000000e+00 -4.65177506e+04 0.00000000e+00
7.05000000e-01 0.00000000e+00 0.00000000e+00 -1.96460289e-01 0.00000000e+00 4.32692200e-01 0.00000000e+00 -1.08917242e+00 0.00000000e+00 -6.43598707e+03 0.00000000e+00 2.94919681e+05 0.00000000e+00 -4.35192678e+04 0.00000000e+00
7.15000000e-01 0.00000000e+00 0.00000000e+00 -2.01614545e-01 0.00000000e+00 4.41437666e-01 0.00000000e+00 -1.09224398e+00 0.00000000e+00 -5.60708632e+03 0.00000000e+00 2.84936897e+05 0.00000000e+00 -4.06204986e+04 0.00000000e+00
7.25000000e-01 0.00000000e+00 0.00000000e+00 -2.06792863e-01 0.00000000e+00 4.50196686e-01 0.00000000e+00 -1.09510862e+00 0.00000000e+00 -4.86092925e+03 0.00000000e+00 2.74950848e+05 0.00000000e+00 -3.78214912e+04 0.00000000e+00
7.35000000e-01 0.00000000e+00 0.00000000e+00 -2.11993625e-01 0.00000000e+00 4.58968262e-01 0.00000000e+00 -1.09777340e+00 0.00000000e+00 -4.19182666e+03 0.00000000e+00 2.64962066e+05 0.00000000e+00 -3.51222863e+04 0.00000000e+00
7.45000000e-01 0.00000000e+00 0.00000000e+00 -2.17215262e-01 0.00000000e+00 4.67751441e-01 0.00000000e+00 -1.10024543e+00 0.00000000e+00 -3.59428902e+03 0.00000000e+00 2.54971015e+05 0.00000000e+00 -3.25229188e+04 0.00000000e+00
7.55000000e-01 0.00000000e+00 0.00000000e+00 -2.22456259e-01 0.00000000e+00 4.76545315e-01 0.00000000e+00 -1.10253183e+00 0.00000000e+00 -3.06302727e+03 0.00000000e+00 2.44978089e+05 0.00000000e+00 -3.00234183e+04 0.00000000e+00
7.65000000e-01 0.00000000e+00 0.00000000e+00 -2.27715153e-01 0.00000000e+00 4.85349018e-01 0.00000000e+00 -1.10463972e+00 0.00000000e+00 -2.59295357e+03 0.00000000e+00 2.34983628e+05 0.00000000e+00 -2.76238095e+04 0.00000000e+00
7.75000000e-01 0.00000000e+00 0.00000000e+00 -2.32990535e-01 0.00000000e+00 4.94161729e-01 0.00000000e+00 -1.10657629e+00 0.00000000e+00 -2.17918175e+03 0.00000000e+00 2.24987921e+05 0.00000000e+00 -2.53241134e+04 0.00000000e+00
7.85000000e-01 0.00000000e+00 0.00000000e+00 -2.38281052e-01 0.00000000e+00 5.02982668e-01 0.00000000e+00 -1.10834871e+00 0.00000000e+00 -1.81702787e+03 0.00000000e+00 2.14991211e+05 0.00000000e+00 -2.31243472e+04 0.00000000e+00
7.95000000e-01 0.00000000e+00 0.00000000e+00 -2.43585404e-01 0.00000000e+00 5.11811092e-01 0.00000000e+00 -1.10996419e+00 0.00000000e+00 -1.50201052e+03 0.00000000e+00 2.04993700e+05 0.00000000e+00 -2.10245253e+04 0.00000000e+00
8.05000000e-01 0.00000000e+00 0.00000000e+00 -2.48902350e-01 0.00000000e+00 5.20646302e-01 0.00000000e+00 -1.11142995e+00 0.00000000e+00 -1.22985117e+03 0.00000000e+00 1.94995559e+05 0.00000000e+00 -1.90246595e+04 0.00000000e+00
8.15000000e-01 0.00000000e+00 0.00000000e+00 -2.54230702e-01 0.00000000e+00 5.29487632e-01 0.00000000e+00 -1.11275322e+00 0.00000000e+00 -9.96474383e+02 0.00000000e+00 1.84996926e+05 0.00000000e+00 -1.71247594e+04 0.00000000e+00
8.25000000e-01 0.00000000e+00 0.00000000e+00 -2.59569333e-01 0.00000000e+00 5.38334458e-01 0.00000000e+00 -1.11394125e+00 0.00000000e+00 -7.98008006e+02 0.00000000e+00 1.74997915e+05 0.00000000e+00 -1.53248328e+04 0.00000000e+00
8.35000000e-01 0.00000000e+00 0.00000000e+00 -2.64917169e-01 0.00000000e+00 5.47186189e-01 0.00000000e+00 -1.11500129e+00 0.00000000e+00 -6.30783335e+02 0.00000000e+00 1.64998618e+05 0.00000000e+00 -1.36248860e+04 0.00000000e+00
8.45000000e-01 0.00000000e+00 0.00000000e+00 -2.70273197e-01 0.00000000e+00 5.56042272e-01 0.00000000e+00 -1.11594063e+00 0.00000000e+00 -4.91335221e+02 0.00000000e+00 1.54999107e+05 0.00000000e+00 -1.20249238e+04 0.00000000e+00
8.55000000e-01 0.00000000e+00 0.00000000e+00 -2.75636461e-01 0.00000000e+00 5.64902189e-01 0.00000000e+00 -1.11676653e+00 0.00000000e+00 -3.76402160e+02 0.00000000e+00 1.44999440e+05 0.00000000e+00 -1.05249503e+04 0.00000000e+00
8.65000000e-01 0.00000000e+00 0.00000000e+00 -2.81006064e-01 0.00000000e+00 5.73765454e-01 0.00000000e+00 -1.11748630e+00 0.00000000e+00 -2.82926361e+02 0.00000000e+00 1.34999660e+05 0.00000000e+00 -9.12496845e+03 0.00000000e+00
8.75000000e-01 0.00000000e+00 0.00000000e+00 -2.86381168e-01 0.00000000e+00 5.82631620e-01 0.00000000e+00 -1.11810722e+00 0.00000000e+00 -2.08053791e+02 0.00000000e+00 1.24999801e+05 0.00000000e+00 -7.82498058e+03 0.00000000e+00
8.85000000e-01 0.00000000e+00 0.00000000e+00 -2.91760994e-01 0.00000000e+00 5.91500268e-01 0.00000000e+00 -1.11863660e+00 0.00000000e+00 -1.49134219e+02 0.00000000e+00 1.14999889e+05 0.00000000e+00 -6.62498848e+03 0.00000000e+00
8.95000000e-01 0.00000000e+00 0.00000000e+00 -2.97144821e-01 0.00000000e+00 6.00371018e-01 0.00000000e+00 -1.11908175e+00 0.00000000e+00 -1.03721232e+02 0.00000000e+00 1.04999941e+05 0.00000000e+00 -5.52499345e+03 0.00000000e+00
9.05000000e-01 0.00000000e+00 0.00000000e+00 -3.02531988e-01 0.00000000e+00 6.09243518e-01 0.00000000e+00 -1.11944997e+00 0.00000000e+00 -6.95722609e+01 0.00000000e+00 9.49999706e+04 0.00000000e+00 -4.52499646e+03 0.00000000e+00
9.15000000e-01 0.00000000e+00 0.00000000e+00 -3.07921895e-01 0.00000000e+00 6.18117452e-01 0.00000000e+00 -1.11974860e+00 0.00000000e+00 -4.46485894e+01 0.00000000e+00 8.49999865e+04 0.00000000e+00 -3.62499821e+03 0.00000000e+00
9.25000000e-01 0.00000000e+00 0.00000000e+00 -3.13314000e-01 0.00000000e+00 6.26992535e-01 0.00000000e+00 -1.11998494e+00 0.00000000e+00 -2.71153622e+01 0.00000000e+00 7.49999943e+04 0.00000000e+00 -2.82499916e+03 0.00000000e+00
9.35000000e-01 0.00000000e+00 0.00000000e+00 -3.18707823e-01 0.00000000e+00 6.35868514e-01 0.00000000e+00 -1.12016633e+00 0.00000000e+00 -1.53415907e+01 0.00000000e+00 6.49999979e+04 0.00000000e+00 -2.12499964e+03 0.00000000e+00
9.45000000e-01 0.00000000e+00 0.00000000e+00 -3.24102941e-01 0.00000000e+00 6.44745169e-01 0.00000000e+00 -1.12030008e+00 0.00000000e+00 -7.90015662e+00 0.00000000e+00 5.49999993e+04 0.00000000e+00 -1.52499987e+03 0.00000000e+00
9.55000000e-01 0.00000000e+00 0.00000000e+00 -3.29498993e-01 0.00000000e+00 6.53622310e-01 0.00000000e+00 -1.12039352e+00 0.00000000e+00 -3.56781346e+00 0.00000000e+00 4.49999998e+04 0.00000000e+00 -1.02499996e+03 0.00000000e+00
9.65000000e-01 0.00000000e+00 0.00000000e+00 -3.34895679e-01 0.00000000e+00 6.62499780e-01 0.00000000e+00 -1.12045399e+00 0.00000000e+00 -1.32518813e+00 0.00000000e+00 3.50000000e+04 0.00000000e+00 -6.24999990e+02 0.00000000e+00
9.75000000e-01 0.00000000e+00 0.00000000e+00 -3.40292756e-01 0.00000000e+00 6.71377454e-01 0.00000000e+00 -1.12048880e+00 0.00000000e+00 -3.56781494e-01 0.00000000e+00 2.50000000e+04 0.00000000e+00 -3.24999998e+02 0.00000000e+00
9.85000000e-01 0.00000000e+00 0.00000000e+00 -3.45690044e-01 0.00000000e+00 6.80255238e-01 0.00000000e+00 -1.12050529e+00 0.00000000e+00 -5.09687954e-02 0.00000000e+00 1.50000000e+04 0.00000000e+00 -1.25000000e+02 0.00000000e+00
9.95000000e-01 0.00000000e+00 0.00000000e+00 -3.51087423e-01 0.00000000e+00 6.89133069e-01 0.00000000e+00 -1.12051079e+00 0.00000000e+00 -2.57347088e-12 0.00000000e+00 5.00000000e+03 0.00000000e+00 -2.50000000e+01 0.00000000e+00
import numpy as np
import matplotlib.pyplot as plt
npts = 3
nmemb = 10
from readIni import IniReader
ini = IniReader("Beam.ini");
nkp = ini.getValue("Beam","nkp",typeCast=int);
nmemb = nkp-1
x = np.linspace(0,1);
q = 1;
w_obj = 0.01;
EI = 6 * q * 1 *(6-4+1)/24 / w_obj;
print(EI);
print(1/EI)
w = 6 * q * x*x *(6-4*x+x*x)/24/EI;
for k in range(1):
data = np.loadtxt("output%03d.dat"%(k));
pts = data[0:npts,:];
mem = data[npts:,:];
pts = data[0:nkp,:];
mem = data[nkp:,:];
#plt.plot(mem[:,0]+mem[:,3],mem[:,4]+mem[:,1]);
plt.plot(mem[:,0]+mem[:,3],mem[:,5]+mem[:,2]);
plt.plot(pts[:,0]+pts[:,3],pts[:,5]+pts[:,2],'.-b');
plt.plot(mem[:,0]+mem[:,3],mem[:,5]+mem[:,2],'.r');
plt.plot(x,w,'k');
#plt.axis('scaled');
#plt.xlim([-1,1]);
#plt.ylim([-1,1]);
......
......@@ -94,6 +94,7 @@ IF(DEBUG) THEN
IF(FileOpen(IOUT, deb_name, 'UNKNOWN', 'WRITE',error)) RETURN
ENDIF
WRITE(*,*) error
CALL Preprocess(nkp,nelem,ndof_el,member,material,frame,coord,curvature,&
& dof_con,memb_info,error)
IF(error/='') RETURN
......@@ -182,7 +183,6 @@ IF(analysis_flag==2) THEN
ENDIF
DO i=1,nstep
! evaluate the prescribed information for this step
!---------------------------------------------------
......@@ -210,7 +210,6 @@ DO i=1,nstep
IF(DEBUG) WRITE(IOUT,*) "STEP=",i
ENDIF
IF(niter==1) THEN ! solve the linear system for ith step
CALL LinearSolution(ndof_el,memb_info,v_root_a,omega_a,member,error,&
& ncond_mb,mb_condition,distr_fun,(dof_con),x,init_cond)
......
......@@ -83,8 +83,6 @@ SUBROUTINE c_Analysis(nkp,nelem,ndof_el,nmemb,ncond_pt,nmate, nframe,ndistrfun,
TYPE(PrescriInf),POINTER :: f_pt_condition(:)
TYPE(PrescriInf),POINTER :: f_mb_condition(:)
WRITE(*,*) simu_time
WRITE(*,*) "Converting all pointers..."
CALL c_f_pointer(coord,f_coord, [nkp,NDIM]);
......@@ -102,7 +100,6 @@ SUBROUTINE c_Analysis(nkp,nelem,ndof_el,nmemb,ncond_pt,nmate, nframe,ndistrfun,
!CALL c_f_pointer(omega_a_tf, f_omega_a_tf, [NDIM]);
!CALL c_f_pointer(v_root_a_tf, f_v_root_a_tf, [NDIM]);
!CALL c_f_pointer(simu_time, f_simu_time, [2])
WRITE(*,*) ntimefun
CALL c_f_pointer(time_function, f_time_function, [ntimefun]);
CALL c_f_pointer(init_cond, f_init_cond, [nelem,12]);
CALL c_f_pointer(eigen_val, f_eigen_val, [2,nev+1]);
......@@ -112,6 +109,7 @@ SUBROUTINE c_Analysis(nkp,nelem,ndof_el,nmemb,ncond_pt,nmate, nframe,ndistrfun,
! --------------------------------------------------
! Call the original fortran function
! --------------------------------------------------
WRITE(*,*) '--- Calling GEBT ---'
CALL Analysis(nkp,nelem,ndof_el,nmemb,ncond_pt,nmate, nframe,ndistrfun,ncurv,f_coord, &
& f_member,f_pt_condition,f_material,niter,nstep,f_sol_pt,f_sol_mb,f_error,ncond_mb, &
& ntimefun,f_frame,f_mb_condition,f_distr_fun,f_curvature,omega_a0,omega_a_tf, &
......
#include <stdlib.h>
#include <stdio.h>
#include "beam.h"
#include "readINIFile.h"
#include "beam.h"
int check;
int i_,j_,k_; // macro iterators
void initBeam(Beam *bm)
{
int i,j,k;
char *section;
dataINI fileBeam = readINIFile("Beam.ini");
char* line = NULL;
ssize_t read;
int frmt;
size_t len = 0;
/* Set the mesh parameters */
/*section = "Beam";
SET_OR_DEFAULT(&(bm->analysis_flag),%d,fileBeam,section,"analysis_flag",2);
SET_OR_DEFAULT(&(bm->nkp),%d,fileBeam,section,"nkp",2);
SET_OR_DEFAULT(&(bm->nframe),%d,fileBeam,section,"nframe",0);// number of different cross-sectional frames
SET_OR_DEFAULT(&(bm->ncurv),%d,fileBeam,section,"ncurv",0);// number of sets of initial curvature/twists
SET_OR_DEFAULT(&(bm->L),%lf,fileBeam,section,"L",1.0);// number of sets of initial curvature/twists
SET_OR_DEFAULT(&(bm->initFromFile),%d,fileBeam,section,"initFromFile",0);// number of sets of initial curvature/twists
*/
section = "Beam";
SET_OR_DEFAULT(&(bm->analysis_flag),%d,fileBeam,section,"analysis_flag",2);
SET_OR_DEFAULT(&(bm->nkp),%d,fileBeam,section,"nkp",2);
SET_OR_DEFAULT(&(bm->nframe),%d,fileBeam,section,"nframe",0);// number of different cross-sectional frames
SET_OR_DEFAULT(&(bm->ncurv),%d,fileBeam,section,"ncurv",0);// number of sets of initial curvature/twists
SET_OR_DEFAULT(&(bm->L),%lf,fileBeam,section,"L",1.0);// number of sets of initial curvature/twists
SET_OR_DEFAULT(&(bm->initFromFile),%d,fileBeam,section,"initFromFile",0);// number of sets of initial curvature/twists
SET_OR_DEFAULT(&(bm->niter),%d,fileBeam,section,"niter",100);
SET_OR_DEFAULT(&(bm->nstep),%d,fileBeam,section,"nstep",1);
bm->nmemb = bm->nkp-1; // specific for beams.
bm->nmate = bm->nkp; // 1 material per point
bm->ncond_mb = bm->nmemb; // each member has one condition
bm->ndistrfun = bm->nmemb; // each member will have its own distributed load.
bm->ncond_pt = 2; // condition for clamped-free beam
bm->ntimefun = 0;
if(bm->analysis_flag==0){
bm->ndof_el=NDOF_ND;
for (i = 0; i < NDIM; i++)
{
bm->omega_a0[i] = 0.0;
bm->omega_a_tf[i] = 0;
bm->v_root_a0[i] = 0.0;
bm->v_root_a_tf[i] = 0;
}
}
else{
bm->ndof_el=18;
for (i = 0; i < NDIM; i++)
{
bm->omega_a_tf[i] = 0;
bm->v_root_a_tf[i] = 0;
}
SET_OR_DEFAULT(&bm->omega_a0[0],%lf,fileBeam,section,"omegaX",0.0);
SET_OR_DEFAULT(&bm->omega_a0[1],%lf,fileBeam,section,"omegaY",0.0);
SET_OR_DEFAULT(&bm->omega_a0[2],%lf,fileBeam,section,"omegaZ",0.0);
SET_OR_DEFAULT(&bm->v_root_a0[0],%lf,fileBeam,section,"vrootX",0.0);
SET_OR_DEFAULT(&bm->v_root_a0[1],%lf,fileBeam,section,"vrootY",0.0);
SET_OR_DEFAULT(&bm->v_root_a0[2],%lf,fileBeam,section,"vrootZ",0.0);
}
bm->nev = 0;
ALLOCATE2(bm->coord, double, bm->nkp, NDIM);
ALLOCATE2(bm->member, int, bm->nmemb, MEMB_CONST);
ALLOCATE1(bm->pt_condition, struct PrescriInf, bm->ncond_pt);
ALLOCATE3(bm->material, double, bm->nmate, bm->ndof_el - NSTRN, NSTRN);
ALLOCATE3(bm->frame, double, bm->nframe, NDIM, NDIM);
ALLOCATE1(bm->mb_condition, struct PrescriInf, bm->ncond_mb);
ALLOCATE2(bm->distr_fun, double, bm->ndistrfun, NSTRN);
ALLOCATE2(bm->curvature, double, bm->ncurv, NDIM);
//ALLOCATE1(bm->time_function, struct TimeFunction, bm-> ntimefun);
for (i = 0; i < bm->nkp; i++) {
bm->coord[i][0] = i * bm->L/((double)bm->nkp);
bm->coord[i][1] = 0.0;
bm->coord[i][2] = 0.0;
}
for (i=0;i<bm->nmemb;i++){
bm->member[i][0] = i+1; // number of point 1
bm->member[i][1] = i+2; // number of point 2
bm->member[i][2] = i+1; // number of material 1
bm->member[i][3] = i+2; // number of material 2
bm->member[i][4] = 0; // frame number
bm->member[i][5] = 1; // number of division
bm->member[i][6] = 0; // initial curvature number
}
// Set the clamped-free conditions
bm->pt_condition[0].id = 1; // first point
bm->pt_condition[1].id = bm->nkp; // last point
for (i=0;i<6;i++){
bm->pt_condition[0].dof[i] = i+1;
bm->pt_condition[0].value[i] = 0.0;
bm->pt_condition[0].time_fun_no[i] = 0;
bm->pt_condition[0].follower[i] = 0;
bm->pt_condition[0].value_current[i] = bm->pt_condition[0].value[i];
bm->pt_condition[1].dof[i] = i+1+6;
bm->pt_condition[1].value[i] = 0.0;
bm->pt_condition[1].time_fun_no[i] = 0;
bm->pt_condition[1].follower[i] = 0;
bm->pt_condition[1].value_current[i] = bm->pt_condition[0].value[i];
}
// Initialize the materials
// TODO - This need to be reworked to interpolate the mass matrices at the nkp positions
FILE *COMP = fopen("Compliance.dat","r");
if (COMP==NULL)
{printf("Unable to read compliance matrix file\n"); exit(EXIT_FAILURE);}
FILE *MASS = fopen("Mass.dat","r");
if ((MASS==NULL) && (bm->analysis_flag==2))
{printf("Unable to read mass matrix file for dynamic analysis\n"); exit(EXIT_FAILURE);}
for (i=0;i<bm->nmate;i++)
{
if (i==0)
{
for (j=0; j<NSTRN; j++)
{
READL(line,len,COMP);
frmt = sscanf(line,"%lf %lf %lf %lf %lf %lf",&bm->material[i][j][0],&bm->material[i][j][1],&bm->material[i][j][2],&bm->material[i][j][3],&bm->material[i][j][4],&bm->material[i][j][5]); CHKFRMT(frmt,6);
}
if(bm->analysis_flag!=0){
for (j=NSTRN;j<NSTRN+NSTRN;j++){
READL(line,len,MASS);
frmt = sscanf(line,"%lf %lf %lf %lf %lf %lf",&bm->material[i][j][0],&bm->material[i][j][1],&bm->material[i][j][2],&bm->material[i][j][3],&bm->material[i][j][4],&bm->material[i][j][5]); CHKFRMT(frmt,6);
}
}
}
else
{
// COPY compliance matrix
for (j=0;j<NSTRN;j++)
{
for(k=0;k<NSTRN;k++)
{
bm->material[i][j][k] = bm->material[0][j][k];
}
}
// Copy mass matrix
if(bm->analysis_flag!=0){
for (j=NSTRN;j<NSTRN+NSTRN;j++){
for(k=0;k<NSTRN;k++)
{
bm->material[i][j][k] = bm->material[0][j][k];
}
}
}
}
}
fclose(COMP);
fclose(MASS);
for(i=0;i<bm->nframe;i++){
for(j=0;j<NDIM;j++){
for(k=0;k<NDIM;k++){
bm->frame[i][j][k]= (i==k) ? 1.0 : 0.0;
}
}
}
// Initialize the loads to zero. Use proper function later to set the distributed loads
if(bm->ncond_mb>0){
struct PrescriInf *tmp;
for (i=0;i<bm->ncond_mb;i++)
{
tmp = &(bm->mb_condition[i]);
tmp->id = i+1;
for (j=0;j<NSTRN;j++)
{
tmp->dof[j] = i+1; // Set the number of the distributed function
tmp->value[j] = 0.0; // Set the value to multiply the distributed function with
tmp->time_fun_no[j] = 0;
tmp->follower[j] = 0;
tmp->value_current[j] = tmp->value[j];
}
}
}
// Use the proper function later to set the distributed load functions
if(bm->ndistrfun>0){
for(i=0;i<bm->ndistrfun;i++)
{
for (j=0;j<NSTRN;j++)
{
bm->distr_fun[i][j] = 0.0;
}
}
}
if(bm->ncurv>0)
{
for(i=0;i<bm->ncurv;i++)
{
// TODO - Allow for curvature
printf("Cannot set curvature\n");
exit(EXIT_FAILURE);
}
}
// This must be initialize but has no consequence as no time-functions are used
bm->simu_time[0] = 0.0;
bm->simu_time[1] = 1.0;
ALLOCATE1(bm->time_function,struct TimeFunction,bm->ntimefun);
if (bm->ntimefun>0)
{
printf("Unable to read timefunctions from C\n");
exit(EXIT_FAILURE);
}
bm->nelem=0;
for (i=0;i<bm->nmemb;i++)
{
bm->nelem += bm->member[i][5]; // total number of elements for the structure
}
// Initialize conditions from file
ALLOCATE2(bm->init_cond , double , bm->nelem , 12);
if(bm->analysis_flag==2){
if (bm->initFromFile==1)
{
// READ INITIAL CONIDITIONS FROM THE FILE
FILE *INIT = fopen("Beam_initCond.ini","r");
if (INIT==NULL)
{
printf("Cannot read %s\n","Beam_init.dat");
exit(EXIT_FAILURE);
}
for (i=0;i<bm->nelem;i++)
{
READL(line,len,INIT);
frmt = sscanf(line,"%lf %lf %lf %lf %lf %lf",&bm->init_cond[i][0],&bm->init_cond[i][1],&bm->init_cond[i][2],&bm->init_cond[i][3],&bm->init_cond[i][4],&bm->init_cond[i][5]); CHKFRMT(frmt,6);
}
for (i=0;i<bm->nelem;i++)
{
READL(line,len,INIT);
frmt = sscanf(line,"%lf %lf %lf %lf %lf %lf",&bm->init_cond[i][6],&bm->init_cond[i][7],&bm->init_cond[i][8],&bm->init_cond[i][9],&bm->init_cond[i][10],&bm->init_cond[i][11]); CHKFRMT(frmt,6);
}
fclose(INIT);
}
else
{
for (i=0;i<bm->nelem;i++)
{
for (j=0;j<2*NSTRN;j++)
{
bm->init_cond[i][6] = 0.0;
}
}
}
}
ALLOCATE3(bm->sol_pt , double , bm->nstep , bm->nkp , NDIM + NDOF_ND); //for each point there are 12 variables
ALLOCATE3(bm->sol_mb , double , bm->nstep , bm->nelem, NDIM + bm->ndof_el); // for each element, there are 18 variables
}
void initBeamFromGebtFile(Beam *bm)
{
int i,j;
char *section, dataFileName[32];
......@@ -279,7 +562,7 @@ void beam_writeSolToFile(Beam *bm)
for (i=0;i<bm->nkp;i++)
{
for(j=0;j<15;j++)
for(j=0;j<NDIM + NDOF_ND;j++)
{
fprintf(fid,"%1.8e ",bm->sol_pt[k][i][j]);
}
......@@ -288,7 +571,7 @@ void beam_writeSolToFile(Beam *bm)
for (i=0;i<bm->nelem;i++)
{
for(j=0;j<15;j++)
for(j=0;j<NDIM + bm->ndof_el;j++)
{
fprintf(fid,"%1.8e ",bm->sol_mb[k][i][j]);
}
......@@ -299,6 +582,23 @@ void beam_writeSolToFile(Beam *bm)
}
void beam_setLoads(Beam *bm, double *loads, int load_no)
{
int i;
for(i=0;i<bm->ncond_mb;i++)
{
bm->mb_condition[i].dof[load_no] = i+1;
bm->mb_condition[i].value[load_no] = loads[i];
bm->mb_condition[i].value_current[load_no] = loads[i];
}
for(i=0;i<bm->ndistrfun;i++)
{
bm->distr_fun[i][0] = 1.0; //Constant chebyshev polynomial
}
}
void freeBeam(Beam *bm)
{
......
......@@ -108,10 +108,15 @@ typedef struct
double **init_cond;
int analysis_flag;
int nev; // upon return, nev is the number of converged eigen values might be the original nev given by the user in the inputs or nev+1 due to complex conjugate pair
// Personal add
double L; // Beam Length
int initFromFile;
} Beam;
void initBeam(Beam *bm);
void beam_setLoads(Beam *bm, double *loads, int load_no);
void beam_writeSolToFile(Beam *bm);
void freeBeam(Beam *bm);
\ No newline at end of file
......@@ -7,10 +7,20 @@
int main(int argc, char* argv[])
{
int i;
printf("Reading...\n");
Beam *bm = malloc(sizeof(Beam));
initBeam(bm);
int i,j,k;
printf("...Done!\n");
printf("Creating the loads...\n");
double *loads = malloc(sizeof(double)*bm->nmemb);
for(i=0;i<bm->nmemb;i++)
{