getfem-users
[Top][All Lists]
Advanced

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

Re: [Getfem-users] parametric source term


From: Sébastien Janas
Subject: Re: [Getfem-users] parametric source term
Date: Mon, 02 May 2011 10:52:48 +0200
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; fr; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10

Hi,

I think the way you define f is not correct.

The mfd.eval function need a string, so you have to do something like that

string f = '[0,1]';
stress=mfd.eval(f);


Le 2/05/11 10:40, Alice Nicolas a écrit :
Dear all,

I am trying to impose a source term to an elliptic problem, which I would like to call in the source term brick as a parameter and not with its numerical value. My problem is 2D, and the constraint is set on a disk.

Using the numerical value of the constraint (f=[0,1]), the program indeed works fine. mfd is the MeshFem associated to the constraint, md is the model, mim is the integration method.
#add source term
stress=mfd.eval('[0,1]')
md.add_initialized_fem_data('SurfaceStress', mfd, stress)
md.add_source_term_brick(mim, 'u', 'SurfaceStress',disk)

My attempt to replace the numerical value by a parameter makes the program fails:
#add source term
f=[0,1]
md.add_fixed_size_data('f',2)
stress=mfd.eval('f')
md.add_initialized_fem_data('SurfaceStress', mfd, stress)
md.add_source_term_brick(mim, 'u', 'SurfaceStress',disk)

Would someone by chance see where I am wrong?

Many thanks in advance,

Alice


_______________________________________________
Getfem-users mailing list
address@hidden
https://mail.gna.org/listinfo/getfem-users





reply via email to

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