getfem-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Getfem-users] System static reduction


From: Konstantinos Poulios
Subject: [Getfem-users] System static reduction
Date: Fri, 8 Jan 2010 12:35:51 +0100

Hi, I am trying to implement a guyan (static) reduction of a linear
elasticity problem in getfem, exploiting the reduction and extension
matrices of the mesh_fem object. What I have tried is the following:

..............................
..............................
model_tmp=Model('real')
model_tmp.add_fem_variable('u',mf3)
model_tmp.add_initialized_data('lambda', Lambda)
model_tmp.add_initialized_data('mu', Mu)
model_tmp.add_isotropic_linearized_elasticity_brick(mim, 'u', 'lambda', 'mu')

dofs_kept = 
numpy.append(mf3.basic_dof_on_region(LATERAL1),mf3.basic_dof_on_region(LATERAL3))
dofs_rest = numpy.ndarray(0)
for i in mf3.basic_dof_on_region(-1):
  if i not in dofs_kept:
    dofs_rest = numpy.append(dofs_rest,i)

model_tmp.assembly('build_matrix')

K = model_tmp.tangent_matrix()

BA = K.full(dofs_rest, dofs_kept)
BB = K.full(dofs_rest, dofs_rest)
BB_inv = numpy.linalg.inv(BB)

nA=BA.shape[1]
nB=BA.shape[0]

R = numpy.eye(nA)
R.resize((nA,nA+nB))

E1 = numpy.eye(nA)
E2 = numpy.dot(-BB_inv,BA)
E = numpy.append(E1,E2,0)

RR=Spmat('empty',nA,nA+nB)
EE=Spmat('empty',nA+nB,nA)

RR.assign(range(nA),range(nA+nB),R)
EE.assign(range(nA+nB),range(nA),E)

mf3.reduction_matrices(RR,EE)

model=Model('real')
model.add_fem_variable('u',mf3)
.............................
.............................


Unfortunately it doesn't work (it segfaults) and I am wondering if
what I am trying is to do is basically wrong and if there is a simpler
method for this. I would also like to ask if there are experiences and
examples of static and/or dynamic reduction of linearized elasticity
systems in getfem.

Best Regards

Kostas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]