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

Single MeanPlane

Better tolerance in sys3x3_with_tol
1.22
parent f2619835
Branches
Tags
No related merge requests found
// $Id: Geom.cpp,v 1.23 2001-07-18 07:36:36 geuzaine Exp $ // $Id: Geom.cpp,v 1.24 2001-07-26 21:26:34 geuzaine Exp $
#include "Gmsh.h" #include "Gmsh.h"
#include "GmshUI.h" #include "GmshUI.h"
...@@ -216,20 +216,19 @@ int isPointOnPlanarSurface (Surface *S, double X, double Y, double Z, double n[3 ...@@ -216,20 +216,19 @@ int isPointOnPlanarSurface (Surface *S, double X, double Y, double Z, double n[3
} }
void Plan_SurfPlane (void *data,void *dum){ void Draw_Plane_Surface (Surface *s){
Surface **pS , *s; int i, j, k;
Curve *pC; Curve *c;
Vertex *v; double minx, miny, maxx, maxy, t, n[3], nn;
int ix,iy,iz,i,j,N; Vertex P1, P2, P3, V[4], vv, vv1, vv2;
double det,sys[3][3],b[3],res[3],mod,t1[3],t2[3],ex[3],s2s[2][2],r2[2],X,Y,Z; char Num[100];
static List_T *points; static List_T *points;
static int deb=1; static int deb=1;
pS = (Surface**)data; if(!s->Orientations){
s = *pS;
if(s->Typ != MSH_SURF_PLAN) return ; s->Orientations = List_Create(20,2,sizeof(Vertex));
if(deb){ if(deb){
points = List_Create(10,10,sizeof(Vertex*)); points = List_Create(10,10,sizeof(Vertex*));
...@@ -239,186 +238,14 @@ void Plan_SurfPlane (void *data,void *dum){ ...@@ -239,186 +238,14 @@ void Plan_SurfPlane (void *data,void *dum){
List_Reset(points); List_Reset(points);
for(i=0;i<List_Nbr(s->Generatrices);i++){ for(i=0;i<List_Nbr(s->Generatrices);i++){
List_Read(s->Generatrices,i,&pC); List_Read(s->Generatrices,i,&c);
for(j=0;j<List_Nbr(pC->Control_Points);j++){ for(j=0;j<List_Nbr(c->Control_Points);j++){
List_Add(points,List_Pointer(pC->Control_Points,j)); List_Add(points,List_Pointer(c->Control_Points,j));
}
}
N = List_Nbr(points);
for(i=0;i<3;i++){
b[i] = 0.0;
for(j=0;j<3;j++){
sys[i][j] = 0.0;
}
}
/* ax + by + cz = 1 */
ix=iy=iz=0;
// TOLERANCE ! WARNING WARNING
double eps = 1.e-6 * CTX.lc;
for(i=0;i<N;i++){
List_Read(points,i,&v);
if(!i){
X = v->Pos.X;
Y = v->Pos.Y;
Z = v->Pos.Z;
}
else{
if(fabs(X-v->Pos.X) > eps) ix = 1;
if(fabs(Y-v->Pos.Y) > eps) iy = 1;
if(fabs(Z-v->Pos.Z) > eps) iz = 1;
}
sys[0][0] += v->Pos.X * v->Pos.X;
sys[1][1] += v->Pos.Y * v->Pos.Y;
sys[2][2] += v->Pos.Z * v->Pos.Z;
sys[0][1] += v->Pos.X * v->Pos.Y;
sys[0][2] += v->Pos.X * v->Pos.Z;
sys[1][2] += v->Pos.Y * v->Pos.Z;
sys[2][1] = sys[1][2];
sys[1][0] = sys[0][1];
sys[2][0] = sys[0][2];
b[0] += v->Pos.X;
b[1] += v->Pos.Y;
b[2] += v->Pos.Z;
}
s->d = 1.0;
/* x = X */
if(!ix){
s->d = X;
res[0] = 1.;
res[1] = res[2] = 0.0;
}
/* y = Y */
else if(!iy){
s->d = Y;
res[1] = 1.;
res[0] = res[2] = 0.0;
}
/* z = Z */
else if(!iz){
s->d = Z;
res[2] = 1.;
res[1] = res[0] = 0.0;
}
/* by + cz = -x */
else if (!sys3x3_with_tol(sys,b,res,&det) ){
s->d = 0.0;
s2s[0][0] = sys[1][1];
s2s[0][1] = sys[1][2];
s2s[1][0] = sys[1][2];
s2s[1][1] = sys[2][2];
b[0] = -sys[0][1];
b[1] = -sys[0][2];
if(sys2x2(s2s,b,r2)){
res[0] = 1.;
res[1] = r2[0];
res[2] = r2[1];
}
/* ax + cz = -y */
else {
s->d = 0.0;
s2s[0][0] = sys[0][0];
s2s[0][1] = sys[0][2];
s2s[1][0] = sys[0][2];
s2s[1][1] = sys[2][2];
b[0] = -sys[0][1];
b[1] = -sys[1][2];
if(sys2x2(s2s,b,r2)){
res[0] = r2[0];
res[1] = 1.;
res[2] = r2[1];
}
/* ax + by = -z */
else {
s->d = 1.0;
s2s[0][0] = sys[0][0];
s2s[0][1] = sys[0][1];
s2s[1][0] = sys[0][1];
s2s[1][1] = sys[1][1];
b[0] = -sys[0][2];
b[1] = -sys[1][2];
if(sys2x2(s2s,b,r2)){
res[0] = r2[0];
res[1] = r2[1];
res[2] = 1.;
}
else {
Msg(GERROR, "Draw Geometry (Plan_SurfPlane)");
}
}
}
}
s->a = res[0];
s->b = res[1];
s->c = res[2];
mod = sqrt (res[0] * res[0] + res[1] * res[1] + res[2] * res[2]);
for(i=0;i<3;i++) res[i]/=mod;
/* L'axe n'est pas l'axe des x */
if(res[0] > res[1]){
ex[0] = 0.;
ex[1] = 1.;
ex[2] = 0.;
}
else{
ex[0] = 1.;
ex[1] = 0.;
ex[2] = 0.;
}
prodve(res,ex,t1);
mod = sqrt (t1[0] * t1[0] + t1[1] * t1[1] + t1[2] * t1[2] ) ;
for(i=0;i<3;i++) t1[i]/=mod;
prodve(t1,res,t2);
mod = sqrt (t2[0] * t2[0] + t2[1] * t2[1] + t2[2] * t2[2] ) ;
for(i=0;i<3;i++) t2[i]/=mod;
for(i=0;i<3;i++)s->plan[0][i] = t1[i];
for(i=0;i<3;i++)s->plan[1][i] = t2[i];
for(i=0;i<3;i++)s->plan[2][i] = res[i];
/* Matrice orthogonale */
for(i=0;i<3;i++){
for(j=0;j<3;j++){
s->invplan[i][j] = s->plan[j][i];
}
} }
} }
MeanPlane(points, s);
void Draw_Plane_Surface (Surface *s){
int i,k;
Curve *c;
double minx,miny,maxx,maxy,t,n[3],nn;
Vertex P1,P2,P3,V[4],vv,vv1,vv2;
char Num[100];
if(!s->Orientations){
s->Orientations = List_Create(20,2,sizeof(Vertex));
Plan_SurfPlane(&s,NULL);
k = 0; k = 0;
for(i=0;i<List_Nbr(s->Generatrices);i++){ for(i=0;i<List_Nbr(s->Generatrices);i++){
...@@ -682,8 +509,7 @@ void Draw_Surface (void *a, void *b){ ...@@ -682,8 +509,7 @@ void Draw_Surface (void *a, void *b){
glDisable(GL_LINE_STIPPLE); glDisable(GL_LINE_STIPPLE);
Tree_Action(s->STL->Simplexes,Draw_Simplex_Surfaces); Tree_Action(s->STL->Simplexes,Draw_Simplex_Surfaces);
} }
else if(s->Typ == MSH_SURF_DISCRETE) else if(s->Typ == MSH_SURF_DISCRETE){
{
glDisable(GL_LINE_STIPPLE); glDisable(GL_LINE_STIPPLE);
Tree_Action(s->Simplexes,Draw_Simplex_Surfaces); Tree_Action(s->Simplexes,Draw_Simplex_Surfaces);
} }
......
# $Id: Makefile,v 1.106 2001-07-26 18:47:59 remacle Exp $ # $Id: Makefile,v 1.107 2001-07-26 21:26:34 geuzaine Exp $
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# Makefile for Gmsh # Makefile for Gmsh
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
GMSH_RELEASE = 1.21 GMSH_RELEASE = 1.22
MAKE = make MAKE = make
CC = c++ CC = c++
......
// $Id: 2D_Mesh.cpp,v 1.29 2001-06-25 18:34:59 remacle Exp $ // $Id: 2D_Mesh.cpp,v 1.30 2001-07-26 21:26:34 geuzaine Exp $
/* /*
Maillage Delaunay d'une surface (Point insertion Technique) Maillage Delaunay d'une surface (Point insertion Technique)
...@@ -55,14 +55,12 @@ void Projette_Inverse (void *a, void *b){ ...@@ -55,14 +55,12 @@ void Projette_Inverse (void *a, void *b){
} }
void Plan_Moyen (void *data, void *dum){ void Plan_Moyen (void *data, void *dum){
int ix, iy, iz, i, j, N; int i, j;
static List_T *points;
Curve *pC;
static int deb = 1;
double det, sys[3][3], b[3], res[3], mod, t1[3], t2[3], ex[3];
double s2s[2][2], r2[2], X, Y, Z;
Vertex *v; Vertex *v;
Curve *pC;
Surface **pS, *s; Surface **pS, *s;
static List_T *points;
static int deb = 1;
pS = (Surface **) data; pS = (Surface **) data;
s = *pS; s = *pS;
...@@ -91,195 +89,7 @@ void Plan_Moyen (void *data, void *dum){ ...@@ -91,195 +89,7 @@ void Plan_Moyen (void *data, void *dum){
break; break;
} }
N = List_Nbr (points); MeanPlane(points, s);
for (i = 0; i < 3; i++){
b[i] = 0.0;
for (j = 0; j < 3; j++){
sys[i][j] = 0.0;
}
}
/* ax + by + cz = 1 */
ix = iy = iz = 0;
// TOLERANCE ! WARNING WARNING
double eps = 1.e-6 * CTX.lc;
for (i = 0; i < N; i++){
List_Read (points, i, &v);
if (!i){
X = v->Pos.X;
Y = v->Pos.Y;
Z = v->Pos.Z;
}
else{
if(fabs(X-v->Pos.X) > eps) ix = 1;
if(fabs(Y-v->Pos.Y) > eps) iy = 1;
if(fabs(Z-v->Pos.Z) > eps) iz = 1;
}
sys[0][0] += v->Pos.X * v->Pos.X;
sys[1][1] += v->Pos.Y * v->Pos.Y;
sys[2][2] += v->Pos.Z * v->Pos.Z;
sys[0][1] += v->Pos.X * v->Pos.Y;
sys[0][2] += v->Pos.X * v->Pos.Z;
sys[1][2] += v->Pos.Y * v->Pos.Z;
sys[2][1] = sys[1][2];
sys[1][0] = sys[0][1];
sys[2][0] = sys[0][2];
b[0] += v->Pos.X;
b[1] += v->Pos.Y;
b[2] += v->Pos.Z;
}
s->d = 1.0;
/* x = X */
if (!ix){
s->d = X;
res[0] = 1.;
res[1] = res[2] = 0.0;
Msg(DEBUG, "Mean plane of type 'x = c'");
}
/* y = Y */
else if (!iy){
s->d = Y;
res[1] = 1.;
res[0] = res[2] = 0.0;
Msg(DEBUG, "Mean plane of type 'y = c'");
}
/* z = Z */
else if (!iz){
s->d = Z;
res[2] = 1.;
res[1] = res[0] = 0.0;
Msg(DEBUG, "Mean plane of type 'y = c'");
}
/* by + cz = -x */
else if (!sys3x3_with_tol (sys, b, res, &det)){
s->d = 0.0;
s2s[0][0] = sys[1][1];
s2s[0][1] = sys[1][2];
s2s[1][0] = sys[1][2];
s2s[1][1] = sys[2][2];
b[0] = -sys[0][1];
b[1] = -sys[0][2];
if (sys2x2 (s2s, b, r2)){
res[0] = 1.;
res[1] = r2[0];
res[2] = r2[1];
Msg(DEBUG, "Mean plane of type 'by + cz = -x'");
}
/* ax + cz = -y */
else{
s->d = 0.0;
s2s[0][0] = sys[0][0];
s2s[0][1] = sys[0][2];
s2s[1][0] = sys[0][2];
s2s[1][1] = sys[2][2];
b[0] = -sys[0][1];
b[1] = -sys[1][2];
if (sys2x2 (s2s, b, r2)){
res[0] = r2[0];
res[1] = 1.;
res[2] = r2[1];
Msg(DEBUG, "Mean plane of type 'ax + cz = -y'");
}
/* ax + by = -z */
else{
s->d = 1.0;
s2s[0][0] = sys[0][0];
s2s[0][1] = sys[0][1];
s2s[1][0] = sys[0][1];
s2s[1][1] = sys[1][1];
b[0] = -sys[0][2];
b[1] = -sys[1][2];
if (sys2x2 (s2s, b, r2)){
res[0] = r2[0];
res[1] = r2[1];
res[2] = 1.;
Msg(DEBUG, "Mean plane of type 'ax + by = -z'");
}
else{
Msg(GERROR, "Problem in mean plane computation");
}
}
}
}
s->a = res[0];
s->b = res[1];
s->c = res[2];
mod = sqrt (res[0] * res[0] + res[1] * res[1] + res[2] * res[2]);
for (i = 0; i < 3; i++)
res[i] /= mod;
/* L'axe n'est pas l'axe des x */
ex[0] = ex[1] = ex[2] = 0.0;
if(res[0] == 0.0)
ex[0] = 1.0;
else if(res[1] == 0.0)
ex[1] = 1.0;
else
ex[2] = 1.0;
prodve (res, ex, t1);
mod = sqrt (t1[0] * t1[0] + t1[1] * t1[1] + t1[2] * t1[2]);
for (i = 0; i < 3; i++)
t1[i] /= mod;
prodve (t1, res, t2);
mod = sqrt (t2[0] * t2[0] + t2[1] * t2[1] + t2[2] * t2[2]);
for (i = 0; i < 3; i++)
t2[i] /= mod;
for (i = 0; i < 3; i++)
s->plan[0][i] = t1[i];
for (i = 0; i < 3; i++)
s->plan[1][i] = t2[i];
for (i = 0; i < 3; i++)
s->plan[2][i] = res[i];
Msg(DEBUG1, "Plane : (%g x + %g y + %g z = %g)", s->a, s->b, s->c, s->d);
Msg(DEBUG2, "Normal : (%g , %g , %g )", res[0], res[1], res[2]);
Msg(DEBUG2, "t1 : (%g , %g , %g )", t1[0], t1[1], t1[2]);
Msg(DEBUG3, "t2 : (%g , %g , %g )", t2[0], t2[1], t2[2]);
/* Matrice orthogonale */
if (!iz){
for (i = 0; i < 3; i++){
for (j = 0; j < 3; j++){
s->invplan[i][j] = (i == j) ? 1. : 0.;
s->plan[i][j] = (i == j) ? 1. : 0.;
}
}
}
else{
for (i = 0; i < 3; i++){
for (j = 0; j < 3; j++){
s->invplan[i][j] = s->plan[j][i];
}
}
}
} }
......
// $Id: Numeric.cpp,v 1.15 2001-06-02 13:09:14 geuzaine Exp $ // $Id: Numeric.cpp,v 1.16 2001-07-26 21:26:34 geuzaine Exp $
#include "Gmsh.h" #include "Gmsh.h"
#include "Const.h" #include "Const.h"
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
#include "Numeric.h" #include "Numeric.h"
#include "Interpolation.h" #include "Interpolation.h"
#include "nrutil.h" #include "nrutil.h"
#include "Context.h"
extern Context_T CTX;
double myatan2 (double a, double b){ double myatan2 (double a, double b){
if (a == 0.0 && b == 0) if (a == 0.0 && b == 0)
...@@ -67,7 +70,9 @@ int sys2x2 (double mat[2][2], double b[2], double res[2]){ ...@@ -67,7 +70,9 @@ int sys2x2 (double mat[2][2], double b[2], double res[2]){
norm = DSQR (mat[0][0]) + DSQR (mat[1][1]) + DSQR (mat[0][1]) + DSQR (mat[1][0]); norm = DSQR (mat[0][0]) + DSQR (mat[1][1]) + DSQR (mat[0][1]) + DSQR (mat[1][0]);
det = mat[0][0] * mat[1][1] - mat[1][0] * mat[0][1]; det = mat[0][0] * mat[1][1] - mat[1][0] * mat[0][1];
// TOLERANCE ! WARNING WARNING
if (norm == 0.0 || fabs (det) / norm < 1.e-07){ if (norm == 0.0 || fabs (det) / norm < 1.e-07){
Msg(DEBUG, "Assuming 2x2 matrix is singular (det/norm == %g)", fabs(det)/norm);
res[0] = res[1] = 0.0 ; res[0] = res[1] = 0.0 ;
return 0; return 0;
} }
...@@ -116,13 +121,19 @@ int sys3x3 (double mat[3][3], double b[3], double res[3], double *det){ ...@@ -116,13 +121,19 @@ int sys3x3 (double mat[3][3], double b[3], double res[3], double *det){
int sys3x3_with_tol (double mat[3][3], double b[3], double res[3], double *det){ int sys3x3_with_tol (double mat[3][3], double b[3], double res[3], double *det){
int out; int out;
double norm;
out = sys3x3(mat,b,res,det); out = sys3x3(mat,b,res,det);
norm =
if (fabs(*det) < 1.e-14){ DSQR (mat[0][0]) + DSQR (mat[0][1]) + DSQR (mat[0][2]) +
Msg(DEBUG, "Assuming 3x3 matrix is singular (det == %g)", fabs(*det)); DSQR (mat[1][0]) + DSQR (mat[1][1]) + DSQR (mat[1][2]) +
DSQR (mat[2][0]) + DSQR (mat[2][1]) + DSQR (mat[2][2]) ;
// TOLERANCE ! WARNING WARNING
if (norm == 0.0 || fabs (*det) / norm < 1.e-07){
Msg(DEBUG, "Assuming 3x3 matrix is singular (det/norm == %g)", fabs(*det)/norm);
res[0] = res[1] = res[2] = 0.0 ; res[0] = res[1] = res[2] = 0.0 ;
return (0); return 0;
} }
return out ; return out ;
...@@ -161,6 +172,242 @@ int inv3x3 (double mat[3][3], double inv[3][3], double *det){ ...@@ -161,6 +172,242 @@ int inv3x3 (double mat[3][3], double inv[3][3], double *det){
} }
void MeanPlane(List_T *points, Surface *s){
int i, j, ix, iy, iz, N;
double det,sys[3][3],b[3],res[3],mod,t1[3],t2[3],ex[3],s2s[2][2],r2[2],X,Y,Z;
Vertex *v;
N = List_Nbr (points);
for (i = 0; i < 3; i++){
b[i] = 0.0;
for (j = 0; j < 3; j++){
sys[i][j] = 0.0;
}
}
/* ax + by + cz = 1 */
ix = iy = iz = 0;
// TOLERANCE ! WARNING WARNING
double eps = 1.e-6 * CTX.lc;
for (i = 0; i < N; i++){
List_Read (points, i, &v);
if (!i){
X = v->Pos.X;
Y = v->Pos.Y;
Z = v->Pos.Z;
}
else{
if(fabs(X-v->Pos.X) > eps) ix = 1;
if(fabs(Y-v->Pos.Y) > eps) iy = 1;
if(fabs(Z-v->Pos.Z) > eps) iz = 1;
}
sys[0][0] += v->Pos.X * v->Pos.X;
sys[1][1] += v->Pos.Y * v->Pos.Y;
sys[2][2] += v->Pos.Z * v->Pos.Z;
sys[0][1] += v->Pos.X * v->Pos.Y;
sys[0][2] += v->Pos.X * v->Pos.Z;
sys[1][2] += v->Pos.Y * v->Pos.Z;
sys[2][1] = sys[1][2];
sys[1][0] = sys[0][1];
sys[2][0] = sys[0][2];
b[0] += v->Pos.X;
b[1] += v->Pos.Y;
b[2] += v->Pos.Z;
}
s->d = 1.0;
/* x = X */
if (!ix){
s->d = X;
res[0] = 1.;
res[1] = res[2] = 0.0;
Msg(DEBUG, "Mean plane of type 'x = c'");
}
/* y = Y */
else if (!iy){
s->d = Y;
res[1] = 1.;
res[0] = res[2] = 0.0;
Msg(DEBUG, "Mean plane of type 'y = c'");
}
/* z = Z */
else if (!iz){
s->d = Z;
res[2] = 1.;
res[1] = res[0] = 0.0;
Msg(DEBUG, "Mean plane of type 'z = c'");
}
/* by + cz = -x */
else if (!sys3x3_with_tol (sys, b, res, &det)){
s->d = 0.0;
s2s[0][0] = sys[1][1];
s2s[0][1] = sys[1][2];
s2s[1][0] = sys[1][2];
s2s[1][1] = sys[2][2];
b[0] = -sys[0][1];
b[1] = -sys[0][2];
if (sys2x2 (s2s, b, r2)){
res[0] = 1.;
res[1] = r2[0];
res[2] = r2[1];
Msg(DEBUG, "Mean plane of type 'by + cz = -x'");
}
/* ax + cz = -y */
else{
s->d = 0.0;
s2s[0][0] = sys[0][0];
s2s[0][1] = sys[0][2];
s2s[1][0] = sys[0][2];
s2s[1][1] = sys[2][2];
b[0] = -sys[0][1];
b[1] = -sys[1][2];
if (sys2x2 (s2s, b, r2)){
res[0] = r2[0];
res[1] = 1.;
res[2] = r2[1];
Msg(DEBUG, "Mean plane of type 'ax + cz = -y'");
}
/* ax + by = -z */
else{
s->d = 1.0;
s2s[0][0] = sys[0][0];
s2s[0][1] = sys[0][1];
s2s[1][0] = sys[0][1];
s2s[1][1] = sys[1][1];
b[0] = -sys[0][2];
b[1] = -sys[1][2];
if (sys2x2 (s2s, b, r2)){
res[0] = r2[0];
res[1] = r2[1];
res[2] = 1.;
Msg(DEBUG, "Mean plane of type 'ax + by = -z'");
}
else{
Msg(GERROR, "Problem in mean plane computation");
}
}
}
}
s->a = res[0];
s->b = res[1];
s->c = res[2];
mod = sqrt (res[0] * res[0] + res[1] * res[1] + res[2] * res[2]);
for (i = 0; i < 3; i++)
res[i] /= mod;
/* L'axe n'est pas l'axe des x */
ex[0] = ex[1] = ex[2] = 0.0;
if(res[0] == 0.0)
ex[0] = 1.0;
else if(res[1] == 0.0)
ex[1] = 1.0;
else
ex[2] = 1.0;
prodve (res, ex, t1);
mod = sqrt (t1[0] * t1[0] + t1[1] * t1[1] + t1[2] * t1[2]);
for (i = 0; i < 3; i++)
t1[i] /= mod;
prodve (t1, res, t2);
mod = sqrt (t2[0] * t2[0] + t2[1] * t2[1] + t2[2] * t2[2]);
for (i = 0; i < 3; i++)
t2[i] /= mod;
for (i = 0; i < 3; i++)
s->plan[0][i] = t1[i];
for (i = 0; i < 3; i++)
s->plan[1][i] = t2[i];
for (i = 0; i < 3; i++)
s->plan[2][i] = res[i];
Msg(DEBUG1, "Plane : (%g x + %g y + %g z = %g)", s->a, s->b, s->c, s->d);
Msg(DEBUG2, "Normal : (%g , %g , %g )", res[0], res[1], res[2]);
Msg(DEBUG2, "t1 : (%g , %g , %g )", t1[0], t1[1], t1[2]);
Msg(DEBUG3, "t2 : (%g , %g , %g )", t2[0], t2[1], t2[2]);
/* Matrice orthogonale */
if (!iz){
for (i = 0; i < 3; i++){
for (j = 0; j < 3; j++){
s->invplan[i][j] = (i == j) ? 1. : 0.;
s->plan[i][j] = (i == j) ? 1. : 0.;
}
}
}
else{
for (i = 0; i < 3; i++){
for (j = 0; j < 3; j++){
s->invplan[i][j] = s->plan[j][i];
}
}
}
// this is the end of the algo as it was used for surface drawing:
#if 0
/* L'axe n'est pas l'axe des x */
if(res[0] > res[1]){
ex[0] = 0.;
ex[1] = 1.;
ex[2] = 0.;
}
else{
ex[0] = 1.;
ex[1] = 0.;
ex[2] = 0.;
}
prodve(res,ex,t1);
mod = sqrt (t1[0] * t1[0] + t1[1] * t1[1] + t1[2] * t1[2] ) ;
for(i=0;i<3;i++) t1[i]/=mod;
prodve(t1,res,t2);
mod = sqrt (t2[0] * t2[0] + t2[1] * t2[1] + t2[2] * t2[2] ) ;
for(i=0;i<3;i++) t2[i]/=mod;
for(i=0;i<3;i++)s->plan[0][i] = t1[i];
for(i=0;i<3;i++)s->plan[1][i] = t2[i];
for(i=0;i<3;i++)s->plan[2][i] = res[i];
/* Matrice orthogonale */
for(i=0;i<3;i++){
for(j=0;j<3;j++){
s->invplan[i][j] = s->plan[j][i];
}
}
#endif
}
#define Precision 1.e-10 #define Precision 1.e-10
#define MaxIter 20 #define MaxIter 20
......
...@@ -13,6 +13,8 @@ int sys3x3 (double mat[3][3], double b[3], double res[3], double *det); ...@@ -13,6 +13,8 @@ int sys3x3 (double mat[3][3], double b[3], double res[3], double *det);
int sys3x3_with_tol (double mat[3][3], double b[3], double res[3], double *det); int sys3x3_with_tol (double mat[3][3], double b[3], double res[3], double *det);
int det3x3 (double mat[3][3], double *det); int det3x3 (double mat[3][3], double *det);
int inv3x3 (double mat[3][3], double inv[3][3], double *det); int inv3x3 (double mat[3][3], double inv[3][3], double *det);
void MeanPlane(List_T *point, Surface *s);
void find_bestuv (Surface * s, double X, double Y, void find_bestuv (Surface * s, double X, double Y,
double *U, double *V, double *Z, int N); double *U, double *V, double *Z, int N);
void XYtoUV (Surface * s, double *X, double *Y, void XYtoUV (Surface * s, double *X, double *Y,
......
$Id: VERSIONS,v 1.32 2001-07-26 15:25:36 geuzaine Exp $ $Id: VERSIONS,v 1.33 2001-07-26 21:26:35 geuzaine Exp $
New in 1.22: Fixed (yet another) bug for 2D mesh in the mean plane;
New in 1.21: Fixed more memory leaks; added -opt command line option New in 1.21: Fixed more memory leaks; added -opt command line option
to parse definitions directly from the command line; fixed missing to parse definitions directly from the command line; fixed missing
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
.\" Copyright (c) 2000-2001 J.-F. Remacle, C. Geuzaine .\" Copyright (c) 2000-2001 J.-F. Remacle, C. Geuzaine
.\" .\"
.\" ====================================================================== .\" ======================================================================
.TH Gmsh 1 "15 February 2001" "Version 1.21" "Gmsh Manual Pages" .TH Gmsh 1 "15 February 2001" "Version 1.22" "Gmsh Manual Pages"
.UC 4 .UC 4
.\" ====================================================================== .\" ======================================================================
.SH NAME .SH NAME
...@@ -220,6 +220,6 @@ Remacle (Remacle@scorec.rpi.edu). ...@@ -220,6 +220,6 @@ Remacle (Remacle@scorec.rpi.edu).
.SH SEE ALSO .SH SEE ALSO
.BR getdp (1), .BR getdp (1),
.br .br
Gmsh examples (\fI/usr/doc/gmsh-1.21/\fR), Gmsh examples (\fI/usr/doc/gmsh-1.22/\fR),
.br .br
Gmsh homepage (\fIhttp://www.geuz.org/gmsh/\fR). Gmsh homepage (\fIhttp://www.geuz.org/gmsh/\fR).
Summary: A 3D mesh generator with pre- and post-processing facilities Summary: A 3D mesh generator with pre- and post-processing facilities
Name: gmsh Name: gmsh
Version: 1.21 Version: 1.22
Source: gmsh-1.21.tar.gz Source: gmsh-1.22.tar.gz
Release: 1 Release: 1
Copyright: distributable Copyright: distributable
Group: Applications/Engineering Group: Applications/Engineering
......
...@@ -46,7 +46,7 @@ cat << EOM ...@@ -46,7 +46,7 @@ cat << EOM
page requests since<br>1998/05/24<p> page requests since<br>1998/05/24<p>
ENDSCRIPT---> ENDSCRIPT--->
<!---BEGINDATE$Date: 2001-07-25 17:53:55 $ENDDATE---> <!---BEGINDATE$Date: 2001-07-26 21:26:35 $ENDDATE--->
Copyright &copy; 1998-2001<br> Copyright &copy; 1998-2001<br>
Jean-François Remacle and Jean-François Remacle and
...@@ -324,7 +324,7 @@ ENDSCRIPT---> ...@@ -324,7 +324,7 @@ ENDSCRIPT--->
<td bgcolor="#ededed"><font face="Helvetica, Arial" size=-1> <td bgcolor="#ededed"><font face="Helvetica, Arial" size=-1>
<b>Latest Release: 1.21 (July 26, 2001)</b> <b>Latest Release: 1.22 (August 10, 2001)</b>
<p> <p>
Executable versions of Gmsh are available for Windows and for most of Executable versions of Gmsh are available for Windows and for most of
the classical UNIX platforms. These versions are free, and are all the classical UNIX platforms. These versions are free, and are all
...@@ -333,14 +333,14 @@ name="opengl-footmark"><sup>1</sup></a>. The only thing required if ...@@ -333,14 +333,14 @@ name="opengl-footmark"><sup>1</sup></a>. The only thing required if
you use Gmsh is to mention it in your work. The tutorial and demo you use Gmsh is to mention it in your work. The tutorial and demo
files are included in the archives. files are included in the archives.
<ul> <ul>
<li><A href="/gmsh/bin/gmsh-1.21-Windows.zip">Windows zip archive (95/98/NT)</A> <li><A href="/gmsh/bin/gmsh-1.22-Windows.zip">Windows zip archive (95/98/NT)</A>
<li><A href="/gmsh/bin/gmsh-1.21-1.i386.rpm">Linux RPM (Red Hat 6.2 and compatible, i386, glibc 2.1)</A> <li><A href="/gmsh/bin/gmsh-1.22-1.i386.rpm">Linux RPM (Red Hat 6.2 and compatible, i386, glibc 2.1)</A>
<li><A href="/gmsh/bin/gmsh-1.21-Linux.tgz">Linux tarball (i386, glibc 2.1)</A> <li><A href="/gmsh/bin/gmsh-1.22-Linux.tgz">Linux tarball (i386, glibc 2.1)</A>
<li><A href="/gmsh/bin/gmsh-1.21-OSF1.tgz">Compaq Tru64 tarball (OSF 4.0)</A> <li><A href="/gmsh/bin/gmsh-1.22-OSF1.tgz">Compaq Tru64 tarball (OSF 4.0)</A>
<li><A href="/gmsh/bin/gmsh-1.21-SunOS.tgz">Sun tarball (SunOS 5.5)</A> <li><A href="/gmsh/bin/gmsh-1.22-SunOS.tgz">Sun tarball (SunOS 5.5)</A>
<li><A href="/gmsh/bin/gmsh-1.21-AIX.tgz">IBM tarball (AIX)</A> <li><A href="/gmsh/bin/gmsh-1.22-AIX.tgz">IBM tarball (AIX)</A>
<li><A href="/gmsh/bin/gmsh-1.21-IRIX.tgz">SGI IRIX tarball (IRIX 6.5)</A> <li><A href="/gmsh/bin/gmsh-1.22-IRIX.tgz">SGI IRIX tarball (IRIX 6.5)</A>
<li><A href="/gmsh/bin/gmsh-1.21-HP-UX.tgz">HP tarball (HPUX 10.20)</A> <li><A href="/gmsh/bin/gmsh-1.22-HP-UX.tgz">HP tarball (HPUX 10.20)</A>
</ul> </ul>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment