<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 10/7/2012 8:48 PM, Randall Mackie
wrote:<br>
</div>
<blockquote
cite="mid:B52422F8-73D3-4538-A734-2504F30C6010@gmail.com"
type="cite"><br>
<div>
<div>On Jul 10, 2012, at 11:29 AM, Jed Brown wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div class="gmail_quote">On Tue, Jul 10, 2012 at 1:22 PM, TAY
wee-beng <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:zonexo@gmail.com" target="_blank">zonexo@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">Do you mean
DMDAVecGetArrayDOFF90 ? I tried to compile but it gives
the error during linking:<br>
<br>
1>dm_test2d.obj : error LNK2019: unresolved external
symbol DMDAVECGETARRAYDOFF90 referenced in function
MAIN__<br>
</div>
</blockquote>
<div><br>
</div>
<div>Matt was suggesting that someone should implement this
function, it doesn't exist currently.</div>
<div><br>
</div>
<div>
Fortran makes this stuff really painful and we don't know
how to make it do something reasonable without depending
on your types. You can write your own
DMDAVecGetArrayF90WithYourType(), but sadly, it requires
some circus tricks to make work. (We can't put this in
PETSc because we don't know what your field type is.)</div>
<div> </div>
<blockquote class="gmail_quote" style="margin-top: 0px;
margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex;
border-left-width: 1px; border-left-color: rgb(204, 204,
204); border-left-style: solid; padding-left: 1ex;
position: static; z-index: auto; ">
<div bgcolor="#FFFFFF" text="#000000"><br>
</div>
</blockquote>
</div>
</blockquote>
</div>
<br>
<div>In my Fortran code, I simply use VecGetArrayF90 on a vector
created with, for example, DMGetGlobalVector, and it</div>
<div>works perfectly fine for DOF>1. You might want to look at
this example:</div>
<div><br>
</div>
<div><a moz-do-not-send="true"
href="http://www.mcs.anl.gov/petsc/petsc-current/src/snes/examples/tutorials/ex5f90.F.html">http://www.mcs.anl.gov/petsc/petsc-current/src/snes/examples/tutorials/ex5f90.F.html</a></div>
<div><br>
</div>
<div>Note that for DOF> 1, the indexing is like
vec(3,xs:xe,ys:ye,zs:ze) for example..</div>
<div><br>
</div>
<div><br>
</div>
<div>Randy</div>
</blockquote>
<br>
Thanks Randy, I did this as well. But now I'm using
DMDAVecGetArrayF90 since it's easier.<br>
</body>
</html>