<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr; font-family: Tahoma; color: rgb(0, 0, 0); font-size: 13px;">
<div style="">&nbsp;Hi, Petsc Team,<br>
<br>
I wonder if we can utilize a global variable when using PETSc, such as a declaration and definition in the main function:<br>
<br>
extern PetscScalar x, y, z;<br>
&nbsp;&nbsp;&nbsp; x = 1.0;<br>
<br>
This should be a regular usage in ANSI C and will help a lot when we have user-defined functions. If it can work, then it will easily replace those functions like DAGetInfo( ) and save running time. But I don't see any examples of using this in PETSc before.
 And I've tried this but it doesn't work or cannot pass the compiling check.<br>
<br>
<br>
Thank you.<br>
<br>
<br>
Zhisong Li<br>
</div>
</div>
</body>
</html>