<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Hi,<BR>
 <BR>
Thank you very much, now I have a better understanding of how works this field.<BR>
 <BR>
Regards,<BR>
 <BR>
<BR><BR> <BR><SPAN style="FONT-FAMILY: Tahoma, Verdana, Arial, sans-serif; COLOR: rgb(68,68,68)" class=ecxecxecxecxecxApple-style-span>
<DIV></SPAN><FONT class=ecxecxecxecxecxApple-style-span color=#444444 face="Tahoma, Verdana, Arial, sans-serif"><BR></FONT> </DIV><BR><BR><BR> 
<BR>
<HR id=stopSpelling>
Date: Mon, 15 Mar 2010 15:44:48 +0100<BR>From: David.Colignon@ulg.ac.be<BR>To: stephane.blanchet@esstin.uhp-nancy.fr<BR>Subject: Fwd: Re: [Gmsh] restrict field<BR><BR><BR><BR>-------- Original Message -------- 
<TABLE class=ecxmoz-email-headers-table border=0 cellSpacing=0 cellPadding=0>
<TBODY>
<TR>
<TH vAlign=baseline align=right>Subject: </TH>
<TD>Re: [Gmsh] restrict field</TD></TR>
<TR>
<TH vAlign=baseline align=right>Date: </TH>
<TD>Mon, 15 Mar 2010 13:53:22 +0100</TD></TR>
<TR>
<TH vAlign=baseline align=right>From: </TH>
<TD>Christophe Geuzaine <A class=ecxmoz-txt-link-rfc2396E href="mailto:cgeuzaine@ulg.ac.be"><cgeuzaine@ulg.ac.be></A></TD></TR>
<TR>
<TH vAlign=baseline align=right>To: </TH>
<TD>David Colignon <A class=ecxmoz-txt-link-rfc2396E href="mailto:David.Colignon@ulg.ac.be"><David.Colignon@ulg.ac.be></A></TD></TR>
<TR>
<TH vAlign=baseline align=right>CC: </TH>
<TD>Stéphane BLANCHET <A class=ecxmoz-txt-link-rfc2396E href="mailto:stephane.blanchet@esstin.uhp-nancy.fr"><stephane.blanchet@esstin.uhp-nancy.fr></A>, <A class=ecxmoz-txt-link-abbreviated href="mailto:gmsh@geuz.org">gmsh@geuz.org</A></TD></TR></TBODY></TABLE><BR><PRE>PS : the Restrict field is used to restrict the application of another 
field to some geometrical entities. In your case the "other field" was 
set to 1 (the default value), which caused an infinite recursion. This 
has now been fixed in the code.

Here's an example of how you can use the Restrict field:

res1  = 1e-1;
x = 1.0;
y = 0.1;

a0 = newp; Point(a0) = {0,0,0,res1};
a1 = newp; Point(a1) = {-x,0,0,res1};
a2 = newp; Point(a2) = {x,0,0,res1};

la1 = newl; Circle(la1) = {a1,a0,a2};
la2 = newl; Circle(la2) = {a2,a0,a1};

loop = newll; Line Loop(loop) = {la1,la2};

sa = news; Plane Surface(sa) = {loop};

Point(4) = {-2, -2, 0};
Point(5) = {2, -2, 0};
Point(6) = {2, 2, 0};
Point(7) = {-2, 2, 0};
Line(5) = {4, 5};
Line(6) = {5, 6};
Line(7) = {6, 7};
Line(8) = {7, 4};
Line Loop(9) = {7, 8, 5, 6};
Plane Surface(10) = {9, 3};

Field[1] = Attractor;
Field[1].EdgesList = {la1,la2,6};
Field[1].NNodesByEdge = 100;

Field[2] = MathEval;
Field[2].F = Sprintf("F1^2 + %g", res1/4);

Field[3] = Restrict;
Field[3].IField = 2;
Field[3].FacesList = {10};
Field[3].EdgesList = {la1,la2, 5:8};

Field[4] = MathEval;
Field[4].F = "0.2";

Field[5] = Restrict;
Field[5].IField = 4;
Field[5].FacesList = {sa};

Field[6] = Min;
Field[6].FieldsList = {3,5};

Background Field = 6;

Mesh.CharacteristicLengthExtendFromBoundary = 0;



</PRE>                                      <br /><hr />Envie de naviguer sur Internet sans laisser de trace? <a href='http://clk.atdmt.com/FRM/go/207186970/direct/01/' target='_new'>La solution avec Internet Explorer 8</a></body>
</html>