CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums

Search Results

Register Blogs Community New Posts Updated Threads Search

Showing results 1 to 2 of 2
Search took 0.00 seconds.
Search: Posts Made By: adhiraj
Forum: OpenFOAM October 31, 2012, 05:54
Replies: 4
Views: 1,552
Posted By adhiraj
Good that it worked. :) The issue is not...

Good that it worked. :)

The issue is not with zero in particular; two doubles should not be compared directly like this

x==y
Rather you want to check if

abs(x-y)<=epsilon
where epsilon is...
Forum: OpenFOAM October 28, 2012, 23:30
Replies: 4
Views: 1,552
Posted By adhiraj
I would do this:- forAll(X.boundaryField(),...

I would do this:-

forAll(X.boundaryField(), patchi)
{
forAll(X.boundaryField()[patchi],celli)
{
if(Y.boundaryField()[patchi][celli]==0)
X.boundaryField()[patchi][celli]=a;
else
...
Showing results 1 to 2 of 2

 
Forum Jump

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