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

any sugestion

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 16, 2010, 14:17
Question any sugestion
  #1
New Member
 
Join Date: Mar 2010
Posts: 1
Rep Power: 0
bird10 is on a distinguished road
Dear all
I have matrix "A" defined in (0,m)(0,m), I want to create another matrix "B" with same data as A but in different range ,i.e., (-1,m+1)(-1,m+1). For this I wrote the following:
do j=0,m
do i=0,m
B(I,J)=A(I,J)
end do
enddo

do j=0,m
B(-1,J)=A(m,J)
B(-1,m+1)=A(m,0)
enddo
do i=0,m
B(i,-1)=A(i,m)
B(m+1,-1)=A(0,m)
enddo
B(-1,-1)=A(m,m)
B(m+1,-1)=A(0,m)
B(-1,m+1)=A(m,0)
B(m+1,m+1)=A(0,0)
Are these new coordinates are right or not?

Thank you a lot.
Bird
bird10 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Parabolic inlet velocity profile msrinath80 OpenFOAM Running, Solving & CFD 157 February 6, 2020 05:13


All times are GMT -4. The time now is 12:25.