getfem-users
[Top][All Lists]
Advanced

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

Re: [Getfem-users] matrix field in "generic elliptic" brick


From: Yves RENARD
Subject: Re: [Getfem-users] matrix field in "generic elliptic" brick
Date: Sun, 05 Oct 2008 17:02:23 +0200
User-agent: Internet Messaging Program (IMP) H3 (4.1.3)


I tried

b0=gf_mdbrick('generic elliptic',mim,mf, 'matrix');
gf_mesh_fem_set(mf, 'qdim', 4);
A1 = gf_mesh_fem_get(mf, 'eval', {3, 4, 5, 6});
gf_mesh_fem_set(mf, 'qdim', 1);
A1=reshape(A1, 2, 2, 441);

and it seems to work well.

Yves.


Quoting Julien Pommier <address@hidden>:

Hi Marco,

I have just committed a patch (
http://svn.gna.org/viewcvs/getfem?rev=2828&view=rev ) that should fix your
problem.

Julien


Quoting marco trevisan <address@hidden>:

Hello!
I still cannot find my way through this (presumably easy) problem of
coefficient definition, so I guess the best thing to do is post a tiny
snippet of the code:

base = gf_mdbrick('generic elliptic',mim,mf,'matrix');
gf_mdbrick_set(base,'param','A',mf, A1);

now, which size should the matrix field A1 be?
The mesh has 121 nodes (same as the dofs), the problem is scalar on a
2D domain, and I have tried almost every possible reshaping of these
4x121=484 numbers with no effect.

example of error outputs:

"??? wrong size for the parameter A, expected an array of size 0x0x121
( or 0x0 for a constant field), got an array of size 1x484"
"??? wrong size for the parameter A, expected an array of size 0x0x121
( or 0x0 for a constant field), got an array of size 4x121"

finally I entered a 0x0x121 matrix just to see the output:

"??? Error in ../../src/getfem/getfem_modeling.h, line 696 void
getfem::mdbrick_parameter<VEC>::check() const [with VEC =
getfem::modeling_standard_plain_vector]:
invalid dimension for brick parameter 'A', expected an array of size
484=4x121, got an array of size 0"

Any tips?
Thank you in advance

marco trevisan

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





_______________________________________________
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]