ff3d-users
[Top][All Lists]
Advanced

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

[ff3d-users] Problem with For loop and seperate execution


From: Robert Li
Subject: [ff3d-users] Problem with For loop and seperate execution
Date: Sat, 24 Jan 2004 08:03:04 -0800 (PST)

Dear Stephane Del Pino,
  When I tried to use different boundary condition, I
occationally met another problem. when I executed
three models in a for loop in one input file, the
output result of Second and Third loop is different
from that when I run them seperately(one model in one
input file). That is to say only the result of the
first loop is same. The following two results are
different.
  I think we should have same result whether in a loop
form or in seperate input file.

Robert


>>>>>>>>1. for loop format input file 
for(double i=0; i<3; i=i+1)
{
        vertex a1;
        vertex b1;
        vector n1;
        mesh M1;
        double Tzmax;
        double Tzmin;

        if(i==0)//Upper layer
        {
                a1 = (-2, -2, -1);
                b1 = (2, 2, 1);
                n1 = (20, 20, 6);
              M1 = structured(n1,a1,b1);
                Tzmax = -1;
                Tzmin = 0;
        }

        if(i==1)// Middle layer
        {
                a1 = (-2, -2, -3);
                b1 = (2, 2, -1);
                n1 = (20, 20, 6);
                M1 = structured(n1,a1,b1);
                Tzmax = 0;
                Tzmin = 1;
        }

        if(i==2)// Bottom layer
        {
                a1 = (-2, -2, -5);
                b1 = (2, 2, -3);
                n1 = (20, 20, 6);
                M1 = structured(n1,a1,b1);
                Tzmax = 1;
                Tzmin = 2;
        }
        
        scene S = pov(".\\data\void.pov");      // the pov-ray
file for the geometry
        domain O = domain(S);


        solve(u) in M1  //FEM 
        {
           pde(u)
             - div(grad(u)) = 0;
             u = Tzmax  on M1 zmax;
             u = Tzmin  on M1 zmin;
        };
        save(medit,"TT".i,u,M1,dos);
        save(medit,"TT".i,M1,dos);
}



>>>>>>>>1. seperate input file 
vertex a1;
        vertex b1;
        vector n1;
        mesh M1;
        double Tzmax;
        double Tzmin;

//1:
                a1 = (-2, -2, -1);
                b1 = (2, 2, 1);
                n1 = (20, 20, 6);
              M1 = structured(n1,a1,b1);
                Tzmax = -1;
                Tzmin = 0;
/*//2:
                a1 = (-2, -2, -3);
                b1 = (2, 2, -1);
                n1 = (20, 20, 6);
                M1 = structured(n1,a1,b1);
                Tzmax = 0;
                Tzmin = 1;
*/
/*//3:
        a1 = (-2, -2, -5);
                b1 = (2, 2, -3);
                n1 = (20, 20, 6);
                M1 = structured(n1,a1,b1);
                Tzmax = 1;
                Tzmin = 2;*/
        
        
        scene S = pov(".\\data\void.pov");      // the pov-ray
file for the geometry
        domain O = domain(S);


        solve(u) in M1  //FEM 
        {
           pde(u)
             - div(grad(u)) = 0;
             u = Tzmax  on M1 zmax;
             u = Tzmin  on M1 zmin;
        };
        save(medit,"TT",u,M1,dos);
        save(medit,"TT",M1,dos);



__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/




reply via email to

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