[Top][All Lists]

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

Re: [Getfem-users] set_region question

From: James Zhou
Subject: Re: [Getfem-users] set_region question
Date: Wed, 26 Oct 2011 09:52:21 -0400

Thanks Yves for the help.  I have figured it out.  It turns out I did set REGION_ID to a list of convex faces before, and m.set_region() does not overwrite the previous contents of the region.

Also, I have to write m.set_region(REGION_ID, [cvid]) instead of m.set_region(REGION_ID, cvid) to avoid the invalid format error.


On Wed, Oct 26, 2011 at 8:36 AM, James Zhou <address@hidden> wrote:
I have updated to the current version in svn, m.set_region(REGION_ID, cvid); gives the error "Invalid format for the convex or face list".

The type of cvid is numpy.ndarray, and when printing it out, it looks like
[  260,  1272,  1796,...]

Any ideas?  Thanks a lot.

On Wed, Oct 26, 2011 at 3:35 AM, Yves Renard <address@hidden> wrote:
On mercredi 26 octobre 2011, James Zhou wrote:
> Dear all,
> I am trying to set an array of convexes as a region (e.g. using
> set_region() method of Mesh class in python interface).  The code looks
> something like:
> m.set_region(REGION_ID, [cvid, cvid*0-1])
> However, this caused the following error: "Expecting a set of convexes or a
> set of faces, but not a mixed set".  I don't understand why it is a mixed
> set since the second row the input are all -1s (I have double checked by
> printing it out), and it is the first time I assign something to REGION_ID.
> Please let me know where it is going wrong?  Thanks a lot!
> James

I agree that it should work (and I already used this kind of declaration of a
region and it worked). So I presume that it comes from the contaxt of the
region declaration.

Note also that it the current svn version of Getfem, the syntax
m.set_region(REGION_ID, cvid)
is allowed for regions contiaining only elements.



 Yves Renard (address@hidden)       tel : (33)
 Pole de Mathematiques, INSA-Lyon             fax : (33)
 20, rue Albert Einstein
 69621 Villeurbanne Cedex, FRANCE


Qingnan (James) Zhou

Qingnan (James) Zhou

reply via email to

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