Skip to content
Snippets Groups Projects
Commit 363ffc70 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

removed extra white space and node coord format in UNV export
parent bfeec0f9
No related branches found
No related tags found
No related merge requests found
// $Id: Print_Mesh.cpp,v 1.58 2005-01-08 20:15:12 geuzaine Exp $
// $Id: Print_Mesh.cpp,v 1.59 2005-02-04 16:06:10 geuzaine Exp $
//
// Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
//
......@@ -628,25 +628,27 @@ static FILE *UNVFILE;
static void _unv_process_nodes(Mesh *M)
{
int nbnod;
double x, y, z;
int i, idnod;
Vertex *v;
List_T *Nodes = Tree2List(M->Vertices);
fprintf(UNVFILE, "%6d\n", -1);
fprintf(UNVFILE, "%6d\n", NODES);
nbnod = List_Nbr(Nodes);
int nbnod = List_Nbr(Nodes);
for(i = 0; i < nbnod; i++) {
for(int i = 0; i < nbnod; i++) {
List_Read(Nodes, i, &v);
idnod = v->Num;
x = v->Pos.X * CTX.mesh.scaling_factor;
y = v->Pos.Y * CTX.mesh.scaling_factor;
z = v->Pos.Z * CTX.mesh.scaling_factor;
int idnod = v->Num;
double x = v->Pos.X * CTX.mesh.scaling_factor;
double y = v->Pos.Y * CTX.mesh.scaling_factor;
double z = v->Pos.Z * CTX.mesh.scaling_factor;
fprintf(UNVFILE, "%10d%10d%10d%10d\n", idnod, 1, 1, 11);
fprintf(UNVFILE, "%21.16fD+00 %21.16fD+00 %21.16fD+00\n", x, y, z);
char tmp[128];
// ugly hack to print number with 'D+XX' exponents
sprintf(tmp, "%25.16E%25.16E%25.16E\n", x, y, z);
tmp[21] = 'D';
tmp[46] = 'D';
tmp[71] = 'D';
fprintf(UNVFILE, tmp);
}
List_Delete(Nodes);
......@@ -847,8 +849,8 @@ static void _unv_add_vertex(void *a, void *b)
return;
Tree_Add(tree, &v->Num);
fprintf(UNVFILE, "%10d%10d%2d%2d%2d%2d%2d%2d\n", v->Num, 1, 0, 1, 0, 0, 0, 0);
fprintf(UNVFILE, "%21.16fD+00 %21.16fD+00 %21.16fD+00\n", 0., 1., 0.);
fprintf(UNVFILE, "%21.16fD+00 %21.16fD+00 %21.16fD+00\n", 0., 0., 0.);
fprintf(UNVFILE, " 0.0000000000000000D+00 1.0000000000000000D+00 0.0000000000000000D+00\n");
fprintf(UNVFILE, " 0.0000000000000000D+00 0.0000000000000000D+00 0.0000000000000000D+00\n");
fprintf(UNVFILE, "%10d%10d%10d%10d%10d%10d\n", 0, 0, 0, 0, 0, 0);
}
......
$Id: TODO,v 1.83 2005-02-02 18:56:49 geuzaine Exp $
$Id: TODO,v 1.84 2005-02-04 16:06:10 geuzaine Exp $
********************************************************************
......@@ -45,6 +45,11 @@ Add a "bitmap" object in the views, e.g. to add a logo
********************************************************************
reduce cpu during 'sleep' by using small 'usleep' calls instead of a
simple while(1) loop
********************************************************************
add the ability to create tensors with Plugin(Extract)?
********************************************************************
......
$Id: CREDITS,v 1.25 2005-01-20 01:25:49 geuzaine Exp $
$Id: CREDITS,v 1.26 2005-02-04 16:06:10 geuzaine Exp $
Gmsh is copyright (C) 1997-2005
......@@ -95,5 +95,6 @@ Jose Miguel Pasini <jmp84 at cornell.edu>, Philippe Lussou <plussou at
necs.fr>, Jacques Kools <JKools at veeco.com>, Bayram Yenikaya
<yenikaya at math.umn.edu>, Peter Hornby <p.hornby at arrc.csiro.au>,
Krishna Mohan Gundu <gkmohan at gmail.com>, Christopher Stott
<C.Stott@surrey.ac.uk>, Timmy Schumacher <Tim.Schumacher@colorado.edu>,
Carl Osterwisch <osterwischc@asme.org>.
<C.Stott@surrey.ac.uk>, Timmy Schumacher
<Tim.Schumacher@colorado.edu>, Carl Osterwisch <osterwischc@asme.org>,
Bruno Frackowiak <bruno.frackowiak@onecert.fr>.
$Id: VERSIONS,v 1.307 2005-02-02 18:48:00 geuzaine Exp $
$Id: VERSIONS,v 1.308 2005-02-04 16:06:10 geuzaine Exp $
New in 1.59: added support for discrete (triangulated) surfaces,
either in STL format or with the new "Discrete Surface" command; added
......@@ -11,10 +11,11 @@ Divergence); changed default colormap to match Matlab's "Jet"
colormap; new transformation matrix option for views (for
non-destructive rotations, symmetries, etc.); improved solver
interface to keep the GUI responsive during solver calls; new C++ and
Python solver examples; simplified Tools->Visibility GUI; handle
negative numbers in transfinite lines with "Progression" gracefully;
added ability to retrive Gmsh's version number in the parser (to help
write backward compatible scripts); fixed various small bugs.
Python solver examples; simplified Tools->Visibility GUI; transfinite
lines with "Progression" now allow negative line numbers to reverse
the progression; added ability to retrieve Gmsh's version number in
the parser (to help write backward compatible scripts); fixed white
space in unv mesh output; fixed various small bugs.
New in 1.58: fixed UNIX socket interface on Windows (broken by the TCP
solver patch in 1.57); bumped version number of default
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment