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

small cleanup (+ remove solver link on webpage)
parent bacfabee
No related branches found
No related tags found
No related merge requests found
// $Id: Post.cpp,v 1.93 2005-01-13 05:45:41 geuzaine Exp $ // $Id: Post.cpp,v 1.94 2005-01-14 22:53:20 geuzaine Exp $
// //
// Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
// //
...@@ -225,18 +225,16 @@ void Get_Coords(Post_View *v, int type, int nbnod, int nbcomp, ...@@ -225,18 +225,16 @@ void Get_Coords(Post_View *v, int type, int nbnod, int nbcomp,
double *x2, double *y2, double *z2, double *x2, double *y2, double *z2,
int offset, int raise, int transform) int offset, int raise, int transform)
{ {
int i;
double xc = 0., yc = 0., zc = 0.;
if(v->Explode == 1.) { if(v->Explode == 1.) {
for(i = 0; i < nbnod; i++) { for(int i = 0; i < nbnod; i++) {
x2[i] = x1[i]; x2[i] = x1[i];
y2[i] = y1[i]; y2[i] = y1[i];
z2[i] = z1[i]; z2[i] = z1[i];
} }
} }
else { else {
for(i = 0; i < nbnod; i++) { double xc = 0., yc = 0., zc = 0.;
for(int i = 0; i < nbnod; i++) {
xc += x1[i]; xc += x1[i];
yc += y1[i]; yc += y1[i];
zc += z1[i]; zc += z1[i];
...@@ -244,7 +242,7 @@ void Get_Coords(Post_View *v, int type, int nbnod, int nbcomp, ...@@ -244,7 +242,7 @@ void Get_Coords(Post_View *v, int type, int nbnod, int nbcomp,
xc /= (double)nbnod; xc /= (double)nbnod;
yc /= (double)nbnod; yc /= (double)nbnod;
zc /= (double)nbnod; zc /= (double)nbnod;
for(i = 0; i < nbnod; i++) { for(int i = 0; i < nbnod; i++) {
x2[i] = xc + v->Explode * (x1[i] - xc); x2[i] = xc + v->Explode * (x1[i] - xc);
y2[i] = yc + v->Explode * (y1[i] - yc); y2[i] = yc + v->Explode * (y1[i] - yc);
z2[i] = zc + v->Explode * (z1[i] - zc); z2[i] = zc + v->Explode * (z1[i] - zc);
...@@ -252,7 +250,7 @@ void Get_Coords(Post_View *v, int type, int nbnod, int nbcomp, ...@@ -252,7 +250,7 @@ void Get_Coords(Post_View *v, int type, int nbnod, int nbcomp,
} }
if(transform){ if(transform){
for(i = 0; i < nbnod; i++) { for(int i = 0; i < nbnod; i++) {
double x = x2[i], y = y2[i], z = z2[i]; double x = x2[i], y = y2[i], z = z2[i];
x2[i] = v->Transform[0][0] * x + v->Transform[0][1] * y + v->Transform[0][2] * z; x2[i] = v->Transform[0][0] * x + v->Transform[0][1] * y + v->Transform[0][2] * z;
y2[i] = v->Transform[1][0] * x + v->Transform[1][1] * y + v->Transform[1][2] * z; y2[i] = v->Transform[1][0] * x + v->Transform[1][1] * y + v->Transform[1][2] * z;
...@@ -261,7 +259,7 @@ void Get_Coords(Post_View *v, int type, int nbnod, int nbcomp, ...@@ -261,7 +259,7 @@ void Get_Coords(Post_View *v, int type, int nbnod, int nbcomp,
} }
if(offset){ if(offset){
for(i = 0; i < nbnod; i++) { for(int i = 0; i < nbnod; i++) {
x2[i] += v->Offset[0]; x2[i] += v->Offset[0];
y2[i] += v->Offset[1]; y2[i] += v->Offset[1];
z2[i] += v->Offset[2]; z2[i] += v->Offset[2];
...@@ -269,19 +267,19 @@ void Get_Coords(Post_View *v, int type, int nbnod, int nbcomp, ...@@ -269,19 +267,19 @@ void Get_Coords(Post_View *v, int type, int nbnod, int nbcomp,
} }
if(raise){ if(raise){
for(int k = 0; k < nbnod; k++){ for(int i = 0; i < nbnod; i++){
double norm = 0.; double norm = 0.;
if(nbcomp == 1) if(nbcomp == 1)
norm = vals[k]; norm = vals[i];
else if(nbcomp == 3) else if(nbcomp == 3)
norm = sqrt(vals[3*k] * vals[3*k] + norm = sqrt(vals[3*i] * vals[3*i] +
vals[3*k+1] * vals[3*k+1] + vals[3*i+1] * vals[3*i+1] +
vals[3*k+2] * vals[3*k+2]); vals[3*i+2] * vals[3*i+2]);
else if(nbcomp == 9) else if(nbcomp == 9)
norm = ComputeVonMises(vals + 9*k); norm = ComputeVonMises(vals + 9*i);
x2[k] += v->Raise[0] * norm; x2[i] += v->Raise[0] * norm;
y2[k] += v->Raise[1] * norm; y2[i] += v->Raise[1] * norm;
z2[k] += v->Raise[2] * norm; z2[i] += v->Raise[2] * norm;
} }
} }
......
$Id: TODO,v 1.77 2005-01-13 20:36:27 geuzaine Exp $ $Id: TODO,v 1.78 2005-01-14 22:53:20 geuzaine Exp $
********************************************************************
add GUI for the Layer stuff in Extrude commands
******************************************************************** ********************************************************************
......
$Id: VERSIONS,v 1.302 2005-01-14 01:40:49 geuzaine Exp $ $Id: VERSIONS,v 1.303 2005-01-14 22:53:21 geuzaine Exp $
New since 1.58: added support for discrete (triangulated) surfaces, New since 1.58: better support for discrete (triangulated) surfaces,
either in STL format or with the new "Discrete Surface" command; added either in STL format or with the new "Discrete Surface" command; added
STL and Text output format for post-processing views and STL output STL and Text output format for post-processing views and STL output
format for surface meshes; all levelset-based plugins can now also format for surface meshes; all levelset-based plugins can now also
...@@ -10,8 +10,8 @@ Plugin(CutGrid); new plugins (Eigenvalues, Gradient, Curl, ...@@ -10,8 +10,8 @@ Plugin(CutGrid); new plugins (Eigenvalues, Gradient, Curl,
Divergence); changed default colormap to match Matlab's "Jet" Divergence); changed default colormap to match Matlab's "Jet"
colormap; new transformation matrix option for views (for colormap; new transformation matrix option for views (for
non-destructive rotations, symmetries, etc.); improved solver non-destructive rotations, symmetries, etc.); improved solver
interface to keep the GUI responsive during solver calls; the fixed interface to keep the GUI responsive during solver calls; fixed small
small bugs. bugs.
New in 1.58: fixed UNIX socket interface on Windows (broken by the TCP New in 1.58: fixed UNIX socket interface on Windows (broken by the TCP
solver patch in 1.57); bumped version number of default solver patch in 1.57); bumped version number of default
......
...@@ -67,9 +67,6 @@ capabilities</a>. ...@@ -67,9 +67,6 @@ capabilities</a>.
<li><a href="/gmsh/doc/FAQ">Frequently asked questions (FAQ)</a> <li><a href="/gmsh/doc/FAQ">Frequently asked questions (FAQ)</a>
<li><a href="/gmsh/doc/VERSIONS">Version history</a> <li><a href="/gmsh/doc/VERSIONS">Version history</a>
<li><a href="/gmsh/doc/CREDITS">Credits</a> <li><a href="/gmsh/doc/CREDITS">Credits</a>
<li><a name="mysolver"></a>Interactive solver examples:
<a href="/gmsh/doc/mysolver.tgz">C solver</a>,
<a href="/gmsh/doc/myperlsolver.tgz">Perl solver</a>
</ul> </ul>
<form method=GET action="http://www.geuz.org/search/search-geuz.cgi"> <form method=GET action="http://www.geuz.org/search/search-geuz.cgi">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment