<div dir="ltr">Hi,<div><br></div><div>I am wondering if it is necessary to call </div><div>MatAssemblyBegin() and MatAssemblyEnd() after MatDuplicate() with the option of MAT_DO_NOT_COPY_VALUES.</div><div>For example, if I have an assembled matrix A, and I call MatDuplicate() to create B, which is a duplication of A. </div><div>Do I need to call MatAssemblyBegin() and MatAssemblyEnd() for B.</div><div><br></div><div>And 2nd question is : </div><div>just after the MatCreateDense() call and before MatAssemblyBegin() and MatAssemblyEnd() calls, can I use MatGetArray() ?</div><div><br></div><div>The 3rd question is: </div><div>before the MatAssemblyBegin() and MatAssemblyEnd() calls, should I use INSERT_VALUES or <span style="font-family:Menlo;font-size:13px">ADD_VALUES for </span>MatSetValues call? And why ?</div><div>Actually I have read the manual, but I still feel confused about the means of INSERT_VALUES and <span style="font-size:13px;font-family:Menlo">ADD_VALUES.</span></div><div><span style="font-size:13px;font-family:Menlo"><br></span></div><div><font face="Menlo">Thanks </font></div><div><font face="Menlo"><br></font></div><div><font face="Menlo">Cong Li</font></div></div>