<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi there, just a quick question:</p>
<p>It seems MAT_NEW_NONZERO_LOCATION_ERR set to PETSC_TRUE has kind
of the same purpose as MAT_NEW_NONZERO_LOCATIONS set to
PETSC_FALSE, the difference being if an additional entry is there,
the former produces an error whereas in the latter it is simply
ignored.</p>
<p>However the manual states:</p>
<p>'If one wishes to repeatedly assemble matrices that retain the
same nonzero pattern (such as within a nonlinear
or time-dependent problem), the option
MatSetOption(MatA,<b>MAT_NEW_NONZERO_LOCATIONS,PETSC_FALSE</b>);
should be specified after the first matrix has been fully
assembled. This option ensures that certain data
structures and communication information will be reused (instead
of regenerated) during successive steps,
thereby increasing efficiency'</p>
<p>If I only declare:</p>
<p> CALL
MatSetOption(MatA,MAT_NEW_NONZERO_LOCATION_ERR,PETSC_TRUE,ierr)</p>
<p>Would the data structures still be reused in later matrix
assemblies?<br>
</p>
<p>Or does it rather make sense to use conjointly:</p>
<p> CALL
MatSetOption(MatA,MAT_NEW_NONZERO_LOCATION_ERR,PETSC_TRUE,ierr)<br>
CALL
MatSetOption(MatA,MAT_NEW_NONZERO_LOCATIONS,PETSC_FALSE,ierr)<br>
</p>
<p>Thank you,<br>
</p>
<p><br>
</p>
<p>Thibaut<br>
</p>
</body>
</html>