Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C Moderated > Representing th...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 1035 of 1099
Post > Topic >>

Representing this grid

by steve <sedelblut@[EMAIL PROTECTED] > Jan 12, 2008 at 07:03 PM

Hi, I am working on a finite-volume numerical method project. I not
very good at programming or numerical methods but know enough to
complete this project. I was wondering if anyone had any ideas how
best to represent this grid in C. It is Xmax long with N points with
deltaX = Xmax/N and each point Xi is located at (i-1/2)*deltaX, i = 1,
2, 3, ... N. It also has cell interfaces located at Xi+1/2 and Xi-1/2.
Furthermore, each interface has a + side and a - side.

Obviously I can represent the grid by Q[N+1] and can call Q[i+1],
Q[i-1], etc. The part I am unsure about is when I need to find Q[i
+1/2]+, Q[i+1/2]- and so on. The only way I could come up with is to
create Q[N+1] and Qhalf[N+1][2] where the second index represents a +
or -. Are there any better ways using C?

Thank You,
Stephen
-- 
comp.lang.c.moderated - moderation address: clcm@[EMAIL PROTECTED]
 -- you must
have an appropriate newsgroups line in your header for your mail to be
seen,
or the newsgroup name in square brackets in the subject line.  Sorry.




 1 Posts in Topic:
Representing this grid
steve <sedelblut@[EMAI  2008-01-12 19:03:00 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed May 14 17:08:03 CDT 2008.