Dear Kostas,

Normally, if the matrices have compatible sizes, it should work, at  
least for the assembly.
However, the aim of the reduction and extension matrix of a mesh fem  
is not originally to perform a guyan reduction. The aim is to  
transform a finite element method by adding some linear constraints.
Of course, one problem is that the extension matrix in your case is a  
full matrix, so that this computation has a meaning when the number of  
keptf dof is very small (a few hundred).
Additionaly, I am not sure that the computation is correct. The schur  
complement is the addition of two terms which cannot be obtained in  
such a way, I think.
May be a better way should be to create a special brick for reducted  
models, but still for a strong reduction when the reduced linear  
system is very small.

Yves.



Konstantinos Poulios <[email protected]> a écrit :

> 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
>
> _______________________________________________
> Getfem-users mailing list
> [email protected]
> https://mail.gna.org/listinfo/getfem-users
>




_______________________________________________
Getfem-users mailing list
[email protected]
https://mail.gna.org/listinfo/getfem-users

Reply via email to