<div class="gmail_quote">On Thu, Oct 13, 2011 at 00:55, Vijay S. Mahadevan <span dir="ltr"><<a href="mailto:vijay.m@gmail.com">vijay.m@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Attached is a test file with a routine VecNestSetSubVec to modify a<br>
block of a Nest vector after initial creation. This functionality does<br>
not exist as of now and this is my first crack at it. The test_vec_ops<br>
also has several variations of tests and all of them pass currently.<br>
The function VecSize_Nest_Recursive_duplicate, as the name suggests is<br>
a duplicate of "VecSize_Nest_Recursive" private routine in vecnest.c<br>
<br>
If you find something wrong, do let me know. Feel free to<br>
modify/optimize the routine as necessary as I feel it could use some<br>
level of recursion but I can't see it as of now. If the functionality<br>
is acceptable, perhaps the routine could be added to VecNest<br>
implementation.<br></blockquote><div><br></div><div>Thanks. Would you be willing to put this routine into vecnest.c with dynamic dispatch and a manual page (search for VecNestSetSubVec() and follow the pattern)? You can put your test code in src/vec/vec/examples/tests/ with output so that it gets run in the nightlies. Please follow the indenting and code formatting guidelines, commit the patch, and send with hg bundle or hg export.</div>
<div><br></div><div>Let me know if you don't have time or don't think you will ever contribute to PETSc. But if you think you'll have other patches (ISNest ;-)), this would be a good one to familiarize yourself with the process.</div>
<div><br></div><div><br></div><div>Barry, note that this implementation allows resizing by setting nested blocks of a different size.</div></div>