<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I would like to output the contents of a Vec to an ASCII file in which the entries are all on one line, as "x[0] x[1] x[2] ... x[N-1]". This can be done in a slightly roundabout way by putting the values in a 1xN dense Mat, assembling the matrix, and then
use MatView with a suitable format, but one would think that skipping the matrix step and use a VecView directly would be more efficient (the procedure is to be repeated many times). However, none of the viewer formats seems to support the desired output formatting
for Vec.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Is there any way to customize viewer formats for a specific layout - or is there perhaps a more clever way to do the thing I want?</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Also, somewhat relatedly, is there a more detailed specification of available viewer formats? The documentation for PetscViewerFormat (<a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Viewer/PetscViewerFormat/*petscviewerformat__;Iw!!G_uCfscf7eWS!fmgo_gSUThwXeUVpPBhwFVgTXRhk3tS8gDcRbkXu6TQu9lj3Emm5wwGKPUktzKcWMN-isoQKklivtNv-eU4$" id="LPlnk575241">https://petsc.org/release/manualpages/Viewer/PetscViewerFormat/#petscviewerformat</a>)
briefly describes a number of them, and notes that "A variety of specialized formats also exist", although this isn't elaborated.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks!</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Best,</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Peder</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature" class="elementToProof" style="color: inherit;">
<table style="width: 400px; box-sizing: border-box; border-collapse: collapse; border-spacing: 0px;">
<tbody>
<tr>
<td style="width: 400px; height: 207.997px;">
<table style="width: 400px; color: black; box-sizing: border-box; border-collapse: collapse; border-spacing: 0px;">
<tbody>
<tr>
<td style="width: 50px; height: 206.009px; vertical-align: top;">
<table style="width: 50px; box-sizing: border-box; border-collapse: collapse; border-spacing: 0px;">
<tbody>
<tr>
<td align="left" style="width: 50px; height: 58.6222px; vertical-align: top;"><span style="font-family: Arial; font-size: 11.5px; color: black;"><img width="36" height="53" style="width: 36px; height: 53px;" src="http://www.dtu.dk/-/media/DTU_Generelt/Andet/mail-signature-logo.png"></span></td>
</tr>
</tbody>
</table>
</td>
<td style="width: 350px; height: 206.009px; vertical-align: top;">
<table style="width: 350px; color: black; box-sizing: border-box; border-collapse: collapse; border-spacing: 0px;">
<tbody>
<tr>
<td style="width: 350px; height: 21.1932px; line-height: 19.2px;">
<div style="line-height: 19.2px; font-family: Arial; font-size: 16px; color: black;">
<b>Peder Jørgensgaard Olesen</b></div>
</td>
</tr>
<tr>
<td style="width: 350px; height: 52.9971px; line-height: 17px;">
<div style="line-height: 17px; font-family: Arial; font-size: 11.5px; color: black;">
Postdoc</div>
<div style="line-height: 17px; font-family: Arial; font-size: 11.5px; color: black;">
DTU Construct</div>
<div style="line-height: 17px; font-family: Arial; font-size: 11.5px; color: black;">
Institut for Byggeri og Mekanisk Teknologi</div>
</td>
</tr>
<tr>
<td style="width: 350px; height: 18.9915px; line-height: 17px;">
<div style="line-height: 17px; font-family: Arial; font-size: 11.5px; color: black;">
</div>
</td>
</tr>
<tr>
<td style="width: 350px; height: 18.9915px; line-height: 17px;">
<div style="line-height: 17px; font-family: Arial; font-size: 11.5px; color: black;">
<span style="line-height: 17px;"><a href="mailto:pjool@dtu.dk" style="color: black; text-decoration: none; margin: 0px;">pjool@dtu.dk</a></span></div>
</td>
</tr>
<tr>
<td style="width: 350px; height: 18.9915px; line-height: 17px;">
<div style="line-height: 17px; font-family: Arial; font-size: 11.5px; color: black;">
Koppels Allé</div>
</td>
</tr>
<tr>
<td style="width: 350px; height: 18.9915px; line-height: 17px;">
<div style="line-height: 17px; font-family: Arial; font-size: 11.5px; color: black;">
Building 403</div>
</td>
</tr>
<tr>
<td style="width: 350px; height: 18.9914px; line-height: 17px;">
<div style="line-height: 17px; font-family: Arial; font-size: 11.5px; color: black;">
2800 Kgs. Lyngby</div>
</td>
</tr>
<tr>
<td style="width: 350px; height: 18.9916px; line-height: 17px;">
<div style="line-height: 17px; font-family: Arial; font-size: 11.5px; color: black;">
<span style="line-height: 17px;"><a href="https://urldefense.us/v3/__https://www.dtu.dk/english__;!!G_uCfscf7eWS!fmgo_gSUThwXeUVpPBhwFVgTXRhk3tS8gDcRbkXu6TQu9lj3Emm5wwGKPUktzKcWMN-isoQKklivEFUBK2I$" style="color: black; text-decoration: none; margin: 0px;">www.dtu.dk/english</a></span></div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
</div>
</body>
</html>