Hello

I am thinking of a finite different type application. So I will have loops
like

forall (i,j) in Domain
{
// use all 4 components of solution at (i-3,j), (i-2,j), (i-1,j), (i,j),
(i+1,j)
// and do some computation
}

and similarly a loop where I access solution values along j-axis.

Best
praveen

On Thu, Oct 6, 2016 at 8:41 AM, Praveen C <[email protected]> wrote:

> Dear all
>
> If I have 4 unknowns at each grid point, what is the best way to store
> this data ?
>
> I could do
>
> var u1 : [Domain] real;
> var u2 : [Domain] real;
> var u3 : [Domain] real;
> var u4 : [Domain] real;
>
> But this is not very nice for coding.
>
> I could use a record
>
> record Solution
> {
> var u : [1..4] real;
> }
>
> var sol : [Domain] Solution;
>
> Is there a reason to choose one over the other in terms of performance.
>
> Thanks
> praveen
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users

Reply via email to