CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   how to exit begin_c_loop mannually (https://www.cfd-online.com/Forums/main/117955-how-exit-begin_c_loop-mannually.html)

759599290 May 18, 2013 01:27

how to exit begin_c_loop mannually
 
hi everyone, here is my question: I want to assign an udm on some specified cells, so I think I should use begin_c_loop. but the number of the cells in my case is so large ant only one of them should be assigned with udm. I wonde if there are any ways to realize such a function: when i get the udm assigned, the loop ends automatically.

thread_loop_c(t,d)
{
begin_c_loop(c,t)
{
C_CENTROID(x,c,t);
if(x[0]>5.0 && x[0]<5.1)
{
C_UDMI(c,t,0)=5.0;
what code should i write here to end this whole loop?
}
}
end_c_loop(c,t);
}

Thanks a lot for any help.


All times are GMT -4. The time now is 15:06.