mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
eliminate warnings
This commit is contained in:
parent
34d9ea3da5
commit
5d297fdc7f
24
configure.ac
24
configure.ac
@ -171,7 +171,7 @@ TEA_PUBLIC_TCL_HEADERS
|
||||
TEA_PUBLIC_TK_HEADERS
|
||||
|
||||
AC_SUBST([TOGLLIBDIR], ["$togllibfl"])
|
||||
AC_CHECK_HEADER([togl.h])
|
||||
# AC_CHECK_HEADER([togl.h])
|
||||
AC_CHECK_HEADER([GL/gl.h])
|
||||
|
||||
|
||||
@ -190,7 +190,7 @@ case "${TEA_WINDOWINGSYSTEM}" in
|
||||
;;
|
||||
x11)
|
||||
AC_SUBST(TOGL_WINDOWINGSYSTEM,TOGL_X11)
|
||||
TEA_ADD_LIBS([-lGL -lXmu])
|
||||
TEA_ADD_LIBS([-lGL -lXmu -lX11])
|
||||
LIBGLU=-lGLU
|
||||
;;
|
||||
win32)
|
||||
@ -217,16 +217,24 @@ AM_CONDITIONAL([NGGUI], [test x$ngguion = xtrue])
|
||||
AM_CONDITIONAL([NGMKL], [test x$mklon = xtrue])
|
||||
AM_CONDITIONAL([NGPYTHON], [test x$pythonon = xtrue])
|
||||
|
||||
AC_CHECK_HEADER(pthread.h)
|
||||
# AC_CHECK_HEADER(pthread.h)
|
||||
|
||||
AC_CHECK_FUNCS([pow])
|
||||
AC_CHECK_FUNCS([floor])
|
||||
AC_CHECK_FUNCS([matherr])
|
||||
AC_CHECK_HEADERS([limits.h])
|
||||
# AC_CHECK_FUNCS([pow])
|
||||
# AC_CHECK_FUNCS([floor])
|
||||
# AC_CHECK_FUNCS([matherr])
|
||||
# AC_CHECK_HEADERS([limits.h])
|
||||
|
||||
AC_CHECK_LIB(pthread, pthread_create)
|
||||
# AC_CHECK_LIB(pthread, pthread_create)
|
||||
|
||||
|
||||
# LDFLAGS+=" -L/usr/lib/Togl1.7"
|
||||
# AC_SEARCH_LIBS(Togl_Init,[Togl Togl1.7],
|
||||
# MYTOGL_LIB=$LIBS
|
||||
# LIBS="",
|
||||
# ,
|
||||
# [-lGL -lXmu -ltk8.5 -ltcl8.5])
|
||||
# echo "libs = $LIBS"
|
||||
# echo "TOGL_LIB = $MYTOGL_LIB"
|
||||
|
||||
|
||||
AC_CONFIG_FILES(Makefile libsrc/Makefile libsrc/csg/Makefile
|
||||
|
@ -10,10 +10,6 @@ METASOURCES = AUTO
|
||||
|
||||
lib_LTLIBRARIES = libcsg.la
|
||||
|
||||
if NGGUI
|
||||
lib_LTLIBRARIES += libcsgvis.la
|
||||
endif
|
||||
|
||||
|
||||
libcsg_la_SOURCES = algprim.cpp brick.cpp \
|
||||
bspline2d.cpp csgeom.cpp csgparser.cpp curve2d.cpp edgeflw.cpp \
|
||||
@ -21,12 +17,16 @@ explicitcurve2d.cpp extrusion.cpp gencyl.cpp genmesh.cpp identify.cpp \
|
||||
manifold.cpp meshsurf.cpp polyhedra.cpp revolution.cpp singularref.cpp \
|
||||
solid.cpp specpoin.cpp spline3d.cpp surface.cpp triapprox.cpp
|
||||
|
||||
libcsg_la_LIBADD = $(top_builddir)/libsrc/meshing/libmesh.la
|
||||
|
||||
|
||||
|
||||
if NGGUI
|
||||
lib_LTLIBRARIES += libcsgvis.la
|
||||
|
||||
libcsgvis_la_SOURCES = vscsg.cpp csgpkg.cpp
|
||||
|
||||
|
||||
libcsgvis_la_LIBADD = libcsg.la
|
||||
libcsg_la_LIBADD = $(top_builddir)/libsrc/meshing/libmesh.la
|
||||
endif
|
||||
|
||||
# $(top_builddir)/libsrc/geom2d/libgeom2d.la
|
||||
|
||||
|
@ -1608,7 +1608,7 @@ namespace netgen
|
||||
double abs2 = Abs2(v1);
|
||||
double tau = v1 * n;
|
||||
double rho = sqrt (abs2 - tau*tau);
|
||||
double func = sqr (R - rho) + tau*tau - r*r;
|
||||
// double func = sqr (R - rho) + tau*tau - r*r;
|
||||
|
||||
Vec<3> gradabs2 = 2 * v1;
|
||||
Vec<3> gradtau = n;
|
||||
|
@ -50,7 +50,7 @@ namespace netgen
|
||||
double sum = 0;
|
||||
for (int i = 1; i <= n; i++)
|
||||
{
|
||||
double t = (i-0.5)*dt;
|
||||
// double t = (i-0.5)*dt;
|
||||
double fun = hi[i-1];
|
||||
sum += dt / fun;
|
||||
}
|
||||
|
@ -26,9 +26,16 @@ namespace netgen
|
||||
public:
|
||||
Point () { ; }
|
||||
Point (double ax) { for (int i = 0; i < D; i++) x[i] = ax; }
|
||||
Point (double ax, double ay) { x[0] = ax; x[1] = ay; }
|
||||
Point (double ax, double ay)
|
||||
{
|
||||
// static_assert(D==2, "Point<D> constructor with 2 args called");
|
||||
x[0] = ax; x[1] = ay;
|
||||
}
|
||||
Point (double ax, double ay, double az)
|
||||
{ x[0] = ax; x[1] = ay; x[2] = az; }
|
||||
{
|
||||
// static_assert(D==3, "Point<D> constructor with 3 args called");
|
||||
x[0] = ax; x[1] = ay; x[2] = az;
|
||||
}
|
||||
Point (double ax, double ay, double az, double au)
|
||||
{ x[0] = ax; x[1] = ay; x[2] = az; x[3] = au;}
|
||||
|
||||
@ -57,10 +64,6 @@ namespace netgen
|
||||
operator const double* () const { return x; }
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <int D>
|
||||
class Vec
|
||||
{
|
||||
@ -71,9 +74,16 @@ namespace netgen
|
||||
public:
|
||||
Vec () { ; } // for (int i = 0; i < D; i++) x[i] = 0; }
|
||||
Vec (double ax) { for (int i = 0; i < D; i++) x[i] = ax; }
|
||||
Vec (double ax, double ay) { x[0] = ax; x[1] = ay; }
|
||||
Vec (double ax, double ay)
|
||||
{
|
||||
// static_assert(D==2, "Vec<D> constructor with 2 args called");
|
||||
x[0] = ax; x[1] = ay;
|
||||
}
|
||||
Vec (double ax, double ay, double az)
|
||||
{ x[0] = ax; x[1] = ay; x[2] = az; }
|
||||
{
|
||||
// static_assert(D==3, "Vec<D> constructor with 3 args called");
|
||||
x[0] = ax; x[1] = ay; x[2] = az;
|
||||
}
|
||||
Vec (double ax, double ay, double az, double au)
|
||||
{ x[0] = ax; x[1] = ay; x[2] = az; x[3] = au; }
|
||||
|
||||
|
@ -101,13 +101,17 @@ namespace netgen
|
||||
template<int D>
|
||||
inline Point<D> SplineSeg3<D> :: GetPoint (double t) const
|
||||
{
|
||||
double x, y, w;
|
||||
double b1, b2, b3;
|
||||
|
||||
b1 = (1-t)*(1-t);
|
||||
b2 = weight * t * (1-t);
|
||||
b3 = t * t;
|
||||
|
||||
Vec<D> hp = b1 * Vec<D>(p1) + b2 * Vec<D>(p2) + b3 * Vec<D>(p3);
|
||||
double w = b1+b2+b3;
|
||||
return Point<D> ((1.0/w)*hp);
|
||||
/*
|
||||
double x, y, w;
|
||||
x = p1(0) * b1 + p2(0) * b2 + p3(0) * b3;
|
||||
y = p1(1) * b1 + p2(1) * b2 + p3(1) * b3;
|
||||
w = b1 + b2 + b3;
|
||||
@ -119,6 +123,7 @@ namespace netgen
|
||||
}
|
||||
else
|
||||
return Point<D> (x/w, y/w);
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
@ -484,14 +484,33 @@ namespace netgen
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
template<int D>
|
||||
Point<D> CircleSeg<D> :: GetPoint (double t) const
|
||||
{
|
||||
if (t >= 1.0) { return p3; }
|
||||
|
||||
double phi = StartAngle() + t*(EndAngle()-StartAngle());
|
||||
Vec<D> tmp(cos(phi),sin(phi));
|
||||
return pm + Radius()*tmp;
|
||||
}
|
||||
*/
|
||||
template<>
|
||||
inline Point<3> CircleSeg<3> :: GetPoint (double t) const
|
||||
{
|
||||
// not really useful, but keep it as it was ...
|
||||
if (t >= 1.0) { return p3; }
|
||||
double phi = StartAngle() + t*(EndAngle()-StartAngle());
|
||||
Vec<3> tmp(cos(phi),sin(phi),0);
|
||||
return pm + Radius()*tmp;
|
||||
}
|
||||
|
||||
template<>
|
||||
inline Point<2> CircleSeg<2> :: GetPoint (double t) const
|
||||
{
|
||||
if (t >= 1.0) { return p3; }
|
||||
|
||||
double phi = StartAngle() + t*(EndAngle()-StartAngle());
|
||||
Vec<2> tmp(cos(phi),sin(phi));
|
||||
|
||||
return pm + Radius()*tmp;
|
||||
}
|
||||
|
@ -1626,6 +1626,10 @@ int Ng_GetNVertexElements (int vnr)
|
||||
if ( ((*mesh)[i][0] == vnr) || ((*mesh)[i][1] == vnr) ) cnt++;
|
||||
return cnt;
|
||||
}
|
||||
default:
|
||||
cerr << "error: mesh->GetDimension() gives "
|
||||
<< mesh->GetDimension() << endl;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ namespace netgen
|
||||
int modelverts,modeledges,modelfaces,modelcells;
|
||||
Point3d p;
|
||||
int numObj3D,numObj2D,numObj1D,numObj0D;
|
||||
bool nullstarted;
|
||||
// bool nullstarted;
|
||||
Array<int> eldom;
|
||||
int minId3D = -1, minId2D = -1;
|
||||
int maxId3D(-1), maxId2D(-1), maxId1D(-1), maxId0D(-1);
|
||||
@ -222,7 +222,7 @@ namespace netgen
|
||||
case 14:
|
||||
// EdgeID, NodeID0, NodeID1, Type (0=Reg 1=PMaster 2=PSlave 3=CPMaster 4=CPSlave), PID
|
||||
cout << "read edges" << endl;
|
||||
nullstarted = false;
|
||||
// nullstarted = false;
|
||||
segmentdata.SetSize(nedges);
|
||||
for(int i=0; i<nedges; i++)
|
||||
{
|
||||
@ -272,7 +272,7 @@ namespace netgen
|
||||
int segnum_ng[3];
|
||||
bool neg[3];
|
||||
cout << "read faces" << endl;
|
||||
nullstarted = false;
|
||||
// nullstarted = false;
|
||||
for(int i=0; i<nfaces; i++)
|
||||
{
|
||||
int trinum;
|
||||
@ -331,8 +331,8 @@ namespace netgen
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
nullstarted = true;
|
||||
// else
|
||||
// nullstarted = true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -397,7 +397,7 @@ namespace netgen
|
||||
#ifdef WIN32
|
||||
<< "%%\r"
|
||||
#else
|
||||
<< "\%\r"
|
||||
<< "%\r"
|
||||
#endif
|
||||
<< flush;
|
||||
in >> elemid;
|
||||
|
@ -89,7 +89,7 @@ namespace netgen
|
||||
strcmp (&filename[strlen (filename)-4], ".unv") == 0 )
|
||||
{
|
||||
char reco[100];
|
||||
int invert;
|
||||
// int invert;
|
||||
|
||||
ifstream in(filename);
|
||||
|
||||
|
@ -544,6 +544,13 @@ namespace netgen
|
||||
hps = &refhex_1f_0e_0v; break;
|
||||
case HP_HEX_1FA_1FB_0E_0V:
|
||||
hps = &refhex_1fa_1fb_0e_0v; break;
|
||||
|
||||
|
||||
|
||||
default:
|
||||
{
|
||||
hps = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1518,7 +1525,7 @@ namespace netgen
|
||||
}
|
||||
for(SurfaceElementIndex i=0;i<mesh.GetNSE(); i++)
|
||||
{
|
||||
Element2d el = mesh[i] ;
|
||||
// Element2d el = mesh[i] ;
|
||||
HPRefElement & hpel = hpelements[mesh[i].hp_elnr];
|
||||
const ELEMENT_EDGE * edges = MeshTopology::GetEdges1 (mesh[i].GetType());
|
||||
double dist[3] = {0,0,0};
|
||||
@ -1877,7 +1884,7 @@ bool CheckSingularities(Mesh & mesh, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HAS
|
||||
}
|
||||
case HP_HEX:
|
||||
{
|
||||
hpel.type = hpel.type = ClassifyHex(hpel, edges, edgepoint_dom, cornerpoint, edgepoint, faces,
|
||||
hpel.type = ClassifyHex(hpel, edges, edgepoint_dom, cornerpoint, edgepoint, faces,
|
||||
face_edges, surf_edges, facepoint);
|
||||
break;
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ class MeshOptimize2d
|
||||
public:
|
||||
///
|
||||
MeshOptimize2d ();
|
||||
virtual ~MeshOptimize2d() { ; }
|
||||
///
|
||||
void ImproveMesh (Mesh & mesh2d, const MeshingParameters & mp);
|
||||
void ImproveMeshJacobian (Mesh & mesh2d, const MeshingParameters & mp);
|
||||
|
@ -474,7 +474,7 @@ namespace netgen
|
||||
|
||||
root->flags.isinner = 0;
|
||||
|
||||
Point<2> rpmid(root->xmid[0], root->xmid[1], root->xmid[2]);
|
||||
Point<2> rpmid(root->xmid[0], root->xmid[1]); // , root->xmid[2]);
|
||||
Vec<2> rv(root->h2, root->h2);
|
||||
Point<2> rx2 = rpmid + rv;
|
||||
// Point<2> rx1 = rpmid - rv;
|
||||
|
@ -360,14 +360,12 @@ namespace netgen
|
||||
errpow = err;
|
||||
grad = graderr;
|
||||
}
|
||||
|
||||
if (teterrpow == 2)
|
||||
else if (teterrpow == 2)
|
||||
{
|
||||
errpow = err*err;
|
||||
grad = (2 * err) * graderr;
|
||||
}
|
||||
|
||||
if(teterrpow > 2)
|
||||
else
|
||||
{
|
||||
errpow = pow (err, teterrpow);
|
||||
grad = (teterrpow * errpow / err) * graderr;
|
||||
|
@ -869,7 +869,7 @@ void vnetrule :: LoadRule (istream & ist)
|
||||
|
||||
for (k = 1; k <= freesetfaces.Size(); k++)
|
||||
{
|
||||
threeint tr = freesetfaces.Get(k);
|
||||
// threeint tr = freesetfaces.Get(k);
|
||||
|
||||
for (l = k+1; l <= freesetfaces.Size(); l++)
|
||||
{
|
||||
|
@ -229,7 +229,8 @@ int Meshing3 :: ApplyRules
|
||||
NgProfiler::RegionTimer regx1(base);
|
||||
NgProfiler::RegionTimer regx(base+ri);
|
||||
|
||||
sprintf (problems.Elem(ri), "");
|
||||
// sprintf (problems.Elem(ri), "");
|
||||
*problems.Elem(ri) = '\0';
|
||||
|
||||
rule = rules.Get(ri);
|
||||
|
||||
|
@ -310,7 +310,7 @@ namespace netgen
|
||||
PointFunction (Mesh::T_POINTS & apoints,
|
||||
const Mesh::T_VOLELEMENTS & aelements,
|
||||
const MeshingParameters & amp);
|
||||
|
||||
virtual ~PointFunction () { ; }
|
||||
virtual void SetPointIndex (PointIndex aactpind);
|
||||
void SetLocalH (double ah) { h = ah; }
|
||||
double GetLocalH () const { return h; }
|
||||
|
@ -2116,7 +2116,13 @@ namespace netgen
|
||||
return TCL_ERROR;
|
||||
}
|
||||
sprintf(str,"rm %s", filename2);
|
||||
system(str);
|
||||
|
||||
err = system(str);
|
||||
if (err != 0)
|
||||
{
|
||||
Tcl_SetResult (Togl_Interp(togl), (char*)"Cannot delete temporary file", TCL_VOLATILE);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
return TCL_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user