getfem-users
[Top][All Lists]
Advanced

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

Re: [Getfem-users] Re : Generic elliptic Brick


From: jeff witz
Subject: Re: [Getfem-users] Re : Generic elliptic Brick
Date: Thu, 10 Feb 2011 14:16:45 +0100

Hello,

Thanks for your answer,

As you can see in my previous post I use the old Bricks method to get the correct data structure for the tensor in python.

> C=gf.MdBrick.get(b0, 'param','A')
> C[:]=0

C.shape gives
Out[75]: (2, 2, 2, 2)


This tensor can be easily created from scratch using the zeros function :

C=zeros((2,2,2,2))

If I put the important step :

# create a MeshFem of for a field of dimension 2 (i.e. a vector field)
mf = gf.MeshFem(m, 2)
# assign the T3P1 fem elements to all convexes of the MeshFem
mf.set_fem(gf.Fem('FEM_PK(2,1)'))
# assign the numerical integration
mim = gf.MeshIm(m, gf.Integ('IM_TRIANGLE(2)'))
# Create an empty real model
md = gf.Model('real')
# Define u as the primal variable to be solved
md.add_fem_variable('u', mf)

So there is something I surly mess, but if I try  this

md.add_generic_elliptic_brick(mim, 'varname', 'C')
RuntimeError: (Getfem::InterfaceError) -- Error in getfem_models.cc, line 402 :
Undefined model variable varname

if I try :
md.add_generic_ellipticr_brick(mim, 'A','C')
RuntimeError: (Getfem::InterfaceError) -- Error in getfem_models.cc, line 402 :
Undefined model variable A

So it's sure that there is something I misunderstand, but I can't point out what it is ...

Sorry for such trivial question.


Best Regards.





--
Jean-François WITZ

reply via email to

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