Yes, Vec is just a regular type.<br><br> Matt<br><br><div class="gmail_quote">On Mon, Nov 9, 2009 at 7:29 AM, <span dir="ltr"><<a href="mailto:jarunan@ascomp.ch">jarunan@ascomp.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
I am solving multi-level grid (similar to multi grid but not the same). In each iteration, each level is solved separately but solutions are mapped to eachother. Each level has different size of matrix and vector. And each test case has different numbers of grid level.<br>
<br>
I have a difficulty to create vectors and matrices for each level, preparing for the computation, as I do not want to create and destroy them in every iteration. I am thinking of something similar to array pointer (the code is in fortran) e.g.,<br>
<br>
Type(real_array), Dimension(:), allocatable:: pointername<br>
Allocate(pointername(level_numbers))<br>
<br>
do i = 1, level_numbers<br>
allocate(pointername(i)%p(size))<br>
enddo<br>
<br>
<br>
Is it possible to create pointer to vectors?<br>
<br>
<br>
Thank you<br>
Jarunan<br>
<br>
<br>
Quoting <a href="mailto:jarunan@ascomp.ch" target="_blank">jarunan@ascomp.ch</a>:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Hello,<br>
<br>
Is there an equivalent way to allocating array pointer for creating<br>
vectors (or vector pointers)?<br>
<br>
<br>
Jarunan<br>
</blockquote>
<br>
<br>
<br>
-- <br>
Jarunan Panyasantisuk<br>
Development Engineer<br>
ASCOMP GmbH, Technoparkstr. 1<br>
CH-8005 Zurich, Switzerland<br>
Phone : +41 44 445 4072<br>
Fax : +41 44 445 4075<br>
E-mail: <a href="mailto:jarunan@ascomp.ch" target="_blank">jarunan@ascomp.ch</a><br>
<a href="http://www.ascomp.ch" target="_blank">www.ascomp.ch</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener<br>