command.py 2.32 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
import os,sys

from pylmgc90.chipy import *
from numpy import *

checkDirectories()

### computation's parameters definition ### 

dt = 0.01
nb_steps = 100
theta = 0.5

freq_display = 1

RBDY3_NewRotationScheme()

PRPRx_UseCpCundallDetection(300)
PRPRx_LowSizeArrayPolyr(70)

#PRPRx_VerboseF2F(1,2)

freq_detect = 1
tol = 0.1666e-3
relax = 1.0
quad = 'Maxm '
gs_it1 = 20
gs_it2 = 10

#nlgs_3D_SetWithQuickScramble()

SetDimension(3,0)

print 'INIT TIME STEPPING'
TimeEvolution_SetTimeStep(dt)
Integrator_InitTheta(theta)

### model reading ###
print 'READ BODIES'
RBDY3_ReadBodies()

print 'READ BEHAVIOURS'
bulk_behav_ReadBehaviours()
tact_behav_ReadBehaviours()

#LOADS
RBDY3_LoadBehaviours()

print 'READ INI DOF'
TimeEvolution_ReadIniDof()
RBDY3_ReadIniDof()

PLANx_LoadTactors()
POLYR_LoadTactors()

print 'READ INI Vloc Rloc'
TimeEvolution_ReadIniVlocRloc()
PRPLx_ReadIniVlocRloc()
PRPRx_ReadIniVlocRloc()

print 'READ DRIVEN DOF'
RBDY3_ReadDrivenDof()

overall_WriteBodies()
RBDY3_WriteBodies()

bulk_behav_WriteBehaviours()
tact_behav_WriteBehaviours()

TimeEvolution_WriteLastDof()
RBDY3_WriteLastDof()

overall_WriteDrivenDof()
RBDY3_WriteDrivenDof()

### post3D ##
OpenDisplayFiles()

### compute masses ###
RBDY3_ComputeMass()

RBDY3_PutBodyVector('Xbeg_', 3, [0., 0., 0.3, 0., 0., 0.])

for k in range(nb_steps):
    #
    print 'INCREMENT STEP'
    TimeEvolution_IncrementStep()
    RBDY3_IncrementStep()
    #
    print 'DISPLAY TIMES'
    TimeEvolution_DisplayStep()
    #
    print 'COMPUTE Fext'
    RBDY3_ComputeFext()
    #
    print 'COMPUTE Fint'
    RBDY3_ComputeBulk()
    # 
    print 'COMPUTE Free Vlocy'
    RBDY3_ComputeFreeVelocity()
    #
    print 'SELECT PROX TACTORS'
    overall_SelectProxTactors(freq_detect)
    PRPLx_SelectProxTactors()
    PRPRx_SelectProxTactors()
    
    PRPLx_RecupRloc()
    PRPRx_RecupRloc()

    nlgs_3D_ExSolver('Exchange_Local_Global         ',quad, tol, relax, gs_it1, gs_it2)

    PRPLx_StockRloc()
    PRPRx_StockRloc()
    #
    print 'COMPUTE DOF'
    RBDY3_ComputeDof()
    #
    print 'UPDATE DOF'
    TimeEvolution_UpdateStep()
    RBDY3_UpdateDof()

    ### post3D ###
    WriteDisplayFiles(freq_display)

    ### writeout handling ###
    overall_CleanWriteOutFlags()

TimeEvolution_WriteLastDof()
RBDY3_WriteLastDof()
#
TimeEvolution_WriteLastVlocRloc()
PRPRx_WriteLastVlocRloc()

CloseDisplayFiles()