fixing warnings

This commit is contained in:
Joachim Schoeberl 2023-08-05 12:01:01 +02:00
parent 1461ad34bb
commit e1f7935f0b
44 changed files with 127 additions and 126 deletions

View File

@ -122,7 +122,7 @@ namespace ngcore
auto libname = s.substr(0, brace_open_pos);
auto funcname = s.substr(brace_open_pos+1, plus_pos - brace_open_pos - 1);
auto offset = std::strtoul(s.substr(plus_pos+1, brace_close_pos - plus_pos - 1).c_str(), 0, 16);
auto position = std::strtoul(s.substr(bracket_open_pos+1, bracket_close_pos - bracket_open_pos - 1).c_str(), 0, 16);
// auto position = std::strtoul(s.substr(bracket_open_pos+1, bracket_close_pos - bracket_open_pos - 1).c_str(), 0, 16);
std::stringstream out;
if(!funcname.empty())
@ -181,7 +181,7 @@ namespace ngcore
for (i = 1; i < bt_size-1; i++)
{
dladdr(bt[i], &info);
size_t len = strlen(bt_syms[i]);
// size_t len = strlen(bt_syms[i]);
result << '#'<< i << '\t' << detail::TranslateBacktrace( bt_syms[i], info.dli_fname );
}
free(bt_syms);

View File

@ -199,7 +199,7 @@ namespace ngcore
{ }
PajeEvent( int aevent_type, double atime, int atype, int acontainer, std::string as_value, int aid = 0 )
: time(atime), event_type(aevent_type), type(atype), container(acontainer), id(aid), s_value(as_value), value_is_alias(false), value_is_int(false)
: time(atime), event_type(aevent_type), type(atype), container(acontainer), s_value(as_value), id(aid), value_is_alias(false), value_is_int(false)
{ }
PajeEvent( int aevent_type, double atime, int atype, int acontainer, int avalue, int astart_container, int akey )

View File

@ -412,7 +412,7 @@ namespace ngcore
}
}
catch (Exception e)
catch (Exception & e)
{
{
lock_guard<mutex> guard(copyex_mutex);
@ -548,7 +548,7 @@ namespace ngcore
}
}
catch (Exception e)
catch (Exception & e)
{
{
// cout << "got exception in TM" << endl;

View File

@ -781,7 +781,7 @@ namespace netgen
Point<2> p2d;
faces[0]->CalcProj(p,p2d);
int intersections_before(0), intersections_after(0);
[[maybe_unused]] int intersections_before(0), intersections_after(0);
double randomx = 7.42357;
double randomy = 1.814756;
double randomlen = sqrt(randomx*randomx+randomy*randomy);

View File

@ -393,9 +393,9 @@ namespace netgen
glBitmap (7, 7, 3, 3, 0, 0, &knoedel[0]);
}
*/
for (const Point3d & p : mesh->Points())
for (Point<3> p : mesh->Points())
{
glRasterPos3d (p.X(), p.Y(), p.Z());
glRasterPos3d (p(0), p(1), p(2));
glBitmap (7, 7, 3, 3, 0, 0, &knoedel[0]);
}
}

View File

@ -12,7 +12,6 @@
*/
#include "../include/mystdlib.h"
#include "../include/mydefs.hpp"

View File

@ -670,7 +670,7 @@ IntersectionType Intersect( Spline p, Spline s, double &alpha, double &beta)
if(have_intersection)
{
for(auto i : IntRange(10))
for([[maybe_unused]] auto i : IntRange(10))
NewtonIntersect(p, s, alpha, beta);
return ClassifyNonOverlappingIntersection( alpha, beta );
}
@ -1733,7 +1733,7 @@ Solid2d ClipSolids ( Solid2d && s1, Solid2d && s2, char op)
res.polys.Append(std::move(res_polys));
return std::move(res);
return res;
}
Vertex* Loop :: getNonIntersectionVertex()

View File

@ -602,7 +602,7 @@ struct Loop
size_t cnt = 0;
for(auto v : Vertices(ALL))
for([[maybe_unused]] auto v : Vertices(ALL))
cnt++;
return cnt;

View File

@ -81,7 +81,7 @@ namespace netgen
for (int j = 1; j <= n && i < nel; j++)
{
double t = (j-0.5)*dt;
// double t = (j-0.5)*dt;
double fun = hi[j-1];
f = oldf + dt / fun;
@ -92,7 +92,7 @@ namespace netgen
i++;
}
oldf = f;
t += dt;
// t += dt;
}
points.Append (len);
}
@ -511,7 +511,7 @@ namespace netgen
t_h.Stop();
int bnp = mesh->GetNP(); // boundary points
auto BndPntRange = mesh->Points().Range();
// auto BndPntRange = mesh->Points().Range();
int hquad = mp.quad;

View File

@ -600,7 +600,7 @@ namespace netgen
void WriteOpenFOAM15xFormat (const Mesh & mesh, const filesystem::path & dirname, const bool compressed)
{
bool error = false;
char casefiles[256];
// char casefiles[256];
// Make sure that the mesh data has been updated
const_cast<Mesh&> (mesh).Compress();

View File

@ -57,7 +57,7 @@ void WriteElmerFormat (const Mesh &mesh,
int ne = mesh.GetNE();
int nse = mesh.GetNSE();
int i, j;
char str[200];
// char str[200];
int inverttets = mparam.inverttets;
int invertsurf = mparam.inverttrigs;

View File

@ -830,12 +830,12 @@ void WriteEdgeElementFormat (const Mesh & mesh,
auto eledges = top->GetEdges(ElementIndex(i-1));
outfile << endl << " ";
outfile.width(8);
outfile << edges.Size();
for (j=1; j <= edges.Size(); j++)
outfile << eledges.Size();
for (j=1; j <= eledges.Size(); j++)
{
outfile << " ";
outfile.width(8);
outfile << edges[j-1]+1;
outfile << eledges[j-1]+1;
}
outfile << "\n";

View File

@ -357,12 +357,14 @@ void AdFront3 :: RebuildInternalTables ()
faces.Elem(i).cluster =
points[faces.Get(i).Face().PNum(1)].cluster;
}
/*
int cntcl = 0;
for (int i = PointIndex::BASE;
i < np+PointIndex::BASE; i++)
if (usecl[i])
cntcl++;
*/
NgArray<double, PointIndex::BASE> clvol (np);
clvol = 0.0;

View File

@ -513,7 +513,7 @@ namespace netgen
tdivedgesections.Stop();
auto n = hvalue.Size()-1;
// auto n = hvalue.Size()-1;
int nsubedges = max2(1, int(floor(hvalue.Last()+0.5)));
points.SetSize(nsubedges-1);
params.SetSize(nsubedges+1);
@ -590,7 +590,7 @@ namespace netgen
ident.name,
ident.type);
size_t segnr = 0;
// size_t segnr = 0;
auto nedges = edges.Size();
Array<Array<PointIndex>> all_pnums(nedges);
Array<Array<double>> all_params(nedges);
@ -644,7 +644,7 @@ namespace netgen
{
auto nr_primary = edge->primary->nr;
auto & pnums_primary = all_pnums[nr_primary];
auto & params_primary = all_params[nr_primary];
// auto & params_primary = all_params[nr_primary];
auto trafo = edge->primary_to_me;
auto np = pnums_primary.Size();
@ -707,7 +707,7 @@ namespace netgen
for(auto i : Range(pnums.Size()-1))
{
segnr++;
// segnr++;
Segment seg;
seg[0] = pnums[i];
seg[1] = pnums[i+1];
@ -866,7 +866,7 @@ namespace netgen
{
auto edgenr = s.edgenr-1;
auto & edge = *edges[edgenr];
ShapeIdentification *edge_mapping;
// ShapeIdentification *edge_mapping;
// have edgenr first time, search for closesurface identification

View File

@ -41,7 +41,7 @@ namespace netgen
ned = top.GetNEdges();
nfa = top.GetNFaces();
ne = mesh.GetNE();
int nse = mesh.GetNSE();
// int nse = mesh.GetNSE();
cluster_reps.SetSize (nv+ned+nfa+ne);
cluster_reps = -1;
@ -218,13 +218,13 @@ namespace netgen
static const int tet_cluster34[] =
{ 2, 3, 1, 1, 4, 5, 1, 6, 4, 5, 5, 4, 7, 7, 7 };
int cnt = 0;
// int cnt = 0;
do
{
static Timer t("update cluster, identify");
RegionTimer rtr(t);
cnt++;
// cnt++;
changed = 0;
for (int i = 1; i <= ne; i++)

View File

@ -3313,10 +3313,10 @@ namespace netgen
int vi1 = (edges[i][0]-1), vi2 = (edges[i][1]-1);
if (el[vi1] > el[vi2]) swap (vi1, vi2);
T bubz = lamiz[vi1] * lamiz[vi2];
T dbubz = dlamiz[vi1]*lamiz[vi2] + lamiz[vi1]*dlamiz[vi2];
T polyz = lamiz[vi1] - lamiz[vi2];
T dpolyz = dlamiz[vi1] - dlamiz[vi2];
// T bubz = lamiz[vi1] * lamiz[vi2];
// T dbubz = dlamiz[vi1]*lamiz[vi2] + lamiz[vi1]*dlamiz[vi2];
// T polyz = lamiz[vi1] - lamiz[vi2];
// T dpolyz = dlamiz[vi1] - dlamiz[vi2];
T bubxy = lami[(vi1)%3];
T dbubxydx = dlami[(vi1)%3][0];
T dbubxydy = dlami[(vi1)%3][1];

View File

@ -340,7 +340,7 @@ namespace netgen
break;
}
double dummyt;
double dummyt{0};
stepper.StartNextValCalc(points.Last(),dummyt,h,true);
stepper.FeedNextF(v);
bool drawelem = false;

View File

@ -199,9 +199,9 @@ namespace netgen
int ez = int((maxp.Z()-minext.Z())/elemsize.Z()+1.);
int ix,iy,iz,i,k;
int cnt1 = 0; // test, how efficient hashtable is
int cnt2 = 0;
int cnt3 = 0;
[[maybe_unused]] int cnt1 = 0; // test, how efficient hashtable is
[[maybe_unused]] int cnt2 = 0;
[[maybe_unused]] int cnt3 = 0;
for (ix = sx; ix <= ex; ix++)
{

View File

@ -602,7 +602,7 @@ namespace netgen
auto elementsonnode = mesh.CreatePoint2SurfaceElementTable(faceindex);
int ntasks = ngcore::TaskManager::GetMaxThreads();
// int ntasks = ngcore::TaskManager::GetMaxThreads();
Array<std::tuple<PointIndex, PointIndex>> edges;
BuildEdgeList( mesh, elementsonnode, edges );

View File

@ -224,7 +224,7 @@ double MeshOptimize3d :: CombineImproveEdge (Mesh & mesh,
for (auto ei : has_one_point)
{
Element elem = mesh[ei];
int l;
// int l;
for (int l = 0; l < 4; l++)
if (elem[l] == pi1)
{
@ -392,7 +392,7 @@ void MeshOptimize3d :: CombineImprove (Mesh & mesh,
double MeshOptimize3d :: SplitImproveEdge (Mesh & mesh, OPTIMIZEGOAL goal, Table<ElementIndex,PointIndex> & elementsonnode, Array<double> &elerrs, NgArray<INDEX_3> &locfaces, double badmax, PointIndex pi1, PointIndex pi2, PointIndex ptmp, bool check_only)
{
double d_badness = 0.0;
int cnt = 0;
// int cnt = 0;
ArrayMem<ElementIndex, 20> hasbothpoints;
@ -526,7 +526,7 @@ double MeshOptimize3d :: SplitImproveEdge (Mesh & mesh, OPTIMIZEGOAL goal, Table
if (d_badness<0.0)
{
cnt++;
// cnt++;
PointIndex pinew = mesh.AddPoint (pnew);
@ -562,7 +562,7 @@ void MeshOptimize3d :: SplitImprove (Mesh & mesh,
static Timer topt("Optimize");
static Timer tsearch("Search");
int np = mesh.GetNP();
// int np = mesh.GetNP();
int ne = mesh.GetNE();
double bad = 0.0;
double badmax = 0.0;
@ -646,7 +646,7 @@ void MeshOptimize3d :: SplitImprove (Mesh & mesh,
bad = mesh.CalcTotalBad (mp);
(*testout) << "Total badness = " << bad << endl;
int cntill = 0;
[[maybe_unused]] int cntill = 0;
ne = mesh.GetNE();
for (ElementIndex ei = 0; ei < ne; ei++)
if (!mesh.LegalTet (mesh[ei]))
@ -1247,7 +1247,7 @@ double MeshOptimize3d :: SwapImproveEdge (Mesh & mesh, OPTIMIZEGOAL goal,
for (int k = bestl+1; k <= nsuround + bestl - 2; k++)
{
int k1;
// int k1;
hel[0] = suroundpts[bestl];
hel[1] = suroundpts[k % nsuround];
@ -1297,8 +1297,8 @@ void MeshOptimize3d :: SwapImprove (Mesh & mesh, OPTIMIZEGOAL goal,
int cnt = 0;
int np = mesh.GetNP();
int ne = mesh.GetNE();
// int np = mesh.GetNP();
// int ne = mesh.GetNE();
mesh.BuildBoundaryEdges(false);
BitArray free_points(mesh.GetNP()+PointIndex::BASE);
@ -1449,7 +1449,7 @@ void MeshOptimize3d :: SwapImproveSurface (Mesh & mesh, OPTIMIZEGOAL goal,
}
PointIndex pi1, pi2, pi3, pi4, pi5, pi6;
PointIndex pi1, pi2; // , pi3, pi4, pi5, pi6;
PointIndex pi1other, pi2other;
int cnt = 0;
@ -2466,7 +2466,7 @@ void MeshOptimize3d :: SwapImprove2 (Mesh & mesh, OPTIMIZEGOAL goal)
mesh.BuildBoundaryEdges(false);
int cnt = 0;
double bad1, bad2;
// double bad1, bad2;
int np = mesh.GetNP();
int ne = mesh.GetNE();
@ -2478,7 +2478,7 @@ void MeshOptimize3d :: SwapImprove2 (Mesh & mesh, OPTIMIZEGOAL goal)
PrintMessage (3, "SwapImprove2 ");
(*testout) << "\n" << "Start SwapImprove2" << "\n";
bad1 = mesh.CalcTotalBad (mp);
double bad1 = mesh.CalcTotalBad (mp);
(*testout) << "Total badness = " << bad1 << endl;
// find elements on node

View File

@ -1180,7 +1180,7 @@ namespace netgen
throw NgException ("mesh file not found");
}
int rank = GetCommunicator().Rank();
// int rank = GetCommunicator().Rank();
int ntasks = GetCommunicator().Size();
char str[100];
@ -1215,7 +1215,7 @@ namespace netgen
{
int nfd;
infile >> nfd;
for(auto i : Range(nfd))
for([[maybe_unused]] auto i : Range(nfd))
{
int surfnr, domin, domout, tlosurf, bcprop;
infile >> surfnr >> domin >> domout >> tlosurf >> bcprop;
@ -1439,7 +1439,7 @@ namespace netgen
if (strcmp (str, "materials") == 0)
{
infile >> n;
for ( auto i : Range(n) )
for ([[maybe_unused]] auto i : Range(n) )
{
int nr;
string mat;
@ -1615,7 +1615,7 @@ namespace netgen
{
int cnt_facedesc = GetNFD();
infile >> n;
int index = 1;
// int index = 1;
if(n == cnt_facedesc)
{
for(int index = 1; index <= n; index++)
@ -1676,7 +1676,7 @@ namespace netgen
if (comm.Rank() == 0)
archive & dimension;
auto rank = comm.Rank();
// auto rank = comm.Rank();
auto & partop = GetParallelTopology();
@ -1833,7 +1833,7 @@ namespace netgen
if (archive.Input())
{
int rank = GetCommunicator().Rank();
// int rank = GetCommunicator().Rank();
int ntasks = GetCommunicator().Size();
RebuildSurfaceElementLists();
@ -2391,8 +2391,8 @@ namespace netgen
cerr << "Mesh::FixPoints: sizes don't fit" << endl;
return;
}
int np = GetNP();
/*
int np = GetNP();
for (int i = 1; i <= np; i++)
if (fixpoints.Test(i))
{
@ -2412,7 +2412,7 @@ namespace netgen
static Timer t_pointloop("Mesh::FindOpenElements - pointloop");
int np = GetNP();
int ne = GetNE();
// int ne = GetNE();
int nse = GetNSE();
t_table.Start();
@ -2957,7 +2957,7 @@ namespace netgen
for (int j = 1; j <= el.GetNP(); j++)
{
INDEX_3 seg (el.PNumMod(j), el.PNumMod(j+1), el.GetIndex());
int data;
// int data;
if (seg.I1() < PointIndex::BASE || seg.I2() < PointIndex::BASE)
cerr << "seg = " << seg << endl;
@ -5710,7 +5710,7 @@ namespace netgen
double delta=1;
bool retval;
// bool retval;
int i = 0;
@ -7413,7 +7413,7 @@ namespace netgen
auto l = v.Length();
if(l<eps) return true;
auto ret = fabs(v*n_plane)/l;
// auto ret = fabs(v*n_plane)/l;
return fabs(v*n_plane) < eps;
};

View File

@ -54,7 +54,7 @@ namespace netgen
Array<Array<PointIndex, PointIndex>> ipmap;
ipmap.SetSize(num_domains);
auto dim = mesh.GetDimension();
// auto dim = mesh.GetDimension();
auto num_points = mesh.GetNP();
auto num_facedescriptors = mesh.GetNFD();
@ -635,7 +635,7 @@ namespace netgen
const char* savetask = multithread.task;
multithread.task = "Optimize Volume";
int i;
// int i;
PrintMessage (1, "Volume Optimization");

View File

@ -285,7 +285,7 @@ namespace netgen
NgArray<int> plainzones;
auto loclinesptr = make_shared<NgArray<INDEX_2>>();
auto &loclines = *loclinesptr;
int cntelem = 0, trials = 0, nfaces = 0;
int trials = 0, nfaces = 0;
int oldnl = 0;
UpdateVisSurfaceMeshData(oldnl, locpointsptr, loclinesptr, plainpointsptr);
@ -1379,7 +1379,7 @@ namespace netgen
mesh.AddSurfaceElement (mtri);
cntelem++;
// cntelem++;
// cout << "elements: " << cntelem << endl;

View File

@ -219,7 +219,7 @@ GenerateMesh (Mesh & mesh, const MeshingParameters & mp)
float minerr;
int hasfound;
double tetvol;
[[maybe_unused]] double tetvol;
// int giveup = 0;

View File

@ -216,7 +216,7 @@ namespace netgen
static Timer tbuildelementtable("SendMesh::Build_elementtable");
NgMPI_Comm comm = GetCommunicator();
int id = comm.Rank();
// int id = comm.Rank();
int ntasks = comm.Size();
int dim = GetDimension();
@ -630,7 +630,7 @@ namespace netgen
size_t nse = GetNSE();
NgArray<SurfaceElementIndex> ided_sel(nse);
ided_sel = -1;
bool has_ided_sels = false;
[[maybe_unused]] bool has_ided_sels = false;
if(GetNE() && has_periodic) //we can only have identified surf-els if we have vol-els (right?)
{
Array<SurfaceElementIndex> os1, os2;
@ -661,8 +661,8 @@ namespace netgen
if(os1.Size()>1) {
throw NgException("SurfaceElement identified with more than one other??");
}
const Element2d & sel2 = (*this)[sei];
auto points2 = sel2.PNums();
// const Element2d & sel2 = (*this)[sei];
// auto points2 = sel2.PNums();
has_ided_sels = true;
ided_sel[sei] = os1[0];
ided_sel[os1[0]] = sei;
@ -937,13 +937,13 @@ namespace netgen
self.segments = Array<Segment>(0);
self.pointelements = Array<Element0d>(0);
self.lockedpoints = Array<PointIndex>(0);
/*
auto cleanup_ptr = [](auto & ptr) {
if (ptr != nullptr) {
delete ptr;
ptr = nullptr;
}
};
/*
cleanup_ptr(self.boundaryedges);
cleanup_ptr(self.segmentht);
cleanup_ptr(self.surfelementht);
@ -991,7 +991,7 @@ namespace netgen
NgMPI_Comm comm = GetCommunicator();
int id = comm.Rank();
int ntasks = comm.Size();
// int ntasks = comm.Size();
int dim;
comm.Bcast(dim);

View File

@ -319,7 +319,7 @@ namespace netgen
{
topology.GetElementFaces (el, faces);
topology.GetElementEdges (el, edges);
const Element & volel = mesh.VolumeElement (el);
// const Element & volel = mesh.VolumeElement (el);
// NgArray<int> & sendarray = *sendarrays[volel.GetPartition()];
NgArray<int> & sendarray = *sendarrays[mesh.vol_partition[el-1]];
@ -333,7 +333,7 @@ namespace netgen
for (int el = 1; el <= mesh.GetNSE(); el++)
{
topology.GetSurfaceElementEdges (el, edges);
const Element2d & surfel = mesh.SurfaceElement (el);
// const Element2d & surfel = mesh.SurfaceElement (el);
// NgArray<int> & sendarray = *sendarrays[surfel.GetPartition()];
NgArray<int> & sendarray = *sendarrays[mesh.surf_partition[el-1]];
@ -409,7 +409,7 @@ namespace netgen
PrintMessage (1, "update parallel topology");
const MeshTopology & topology = mesh.GetTopology();
// const MeshTopology & topology = mesh.GetTopology();
Array<int> cnt_send(ntasks);
@ -542,7 +542,7 @@ namespace netgen
// static int timerv = NgProfiler::CreateTimer ("UpdateCoarseGrid - ex vertices");
static int timere = NgProfiler::CreateTimer ("UpdateCoarseGrid - ex edges");
static int timerf = NgProfiler::CreateTimer ("UpdateCoarseGrid - ex faces");
// static int timerf = NgProfiler::CreateTimer ("UpdateCoarseGrid - ex faces");
NgProfiler::StartTimer (timere);

View File

@ -1058,13 +1058,13 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
self.Points().SetAllocSize(self.Points().Size()+info.shape[0]);
if (info.shape[1]==2)
for (auto i : Range(info.shape[0]))
for ([[maybe_unused]] auto i : Range(info.shape[0]))
{
self.AddPoint (Point<3>(ptr[0], ptr[1], 0));
ptr += 2;
}
if (info.shape[1]==3)
for (auto i : Range(info.shape[0]))
for ([[maybe_unused]] auto i : Range(info.shape[0]))
{
self.AddPoint (Point<3>(ptr[0], ptr[1], ptr[2]));
ptr += 3;
@ -1089,10 +1089,10 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
int * ptr = static_cast<int*> (info.ptr);
if (dim == 1)
{
ELEMENT_TYPE type;
// ELEMENT_TYPE type;
int np = info.shape[1];
self.LineSegments().SetAllocSize(self.LineSegments().Size()+info.shape[0]);
for (auto i : Range(info.shape[0]))
for ([[maybe_unused]] auto i : Range(info.shape[0]))
{
Segment el;
for (int j = 0; j < np; j++)
@ -1116,7 +1116,7 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
throw Exception("unsupported 2D element with "+ToString(np)+" points");
}
self.SurfaceElements().SetAllocSize(self.SurfaceElements().Size()+info.shape[0]);
for (auto i : Range(info.shape[0]))
for ([[maybe_unused]] auto i : Range(info.shape[0]))
{
Element2d el(type);
for (int j = 0; j < np; j++)
@ -1142,7 +1142,7 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
throw Exception("unsupported 3D element with "+ToString(np)+" points");
}
self.VolumeElements().SetAllocSize(self.VolumeElements().Size()+info.shape[0]);
for (auto i : Range(info.shape[0]))
for ([[maybe_unused]] auto i : Range(info.shape[0]))
{
Element el(type);
for (int j = 0; j < np;j ++)
@ -1350,7 +1350,7 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
size_t npts = ref_info.shape[0];
size_t dim = ref_info.shape[1];
size_t nel = phys_info.shape[0];
// size_t nel = phys_info.shape[0];
size_t dim_phys = phys_info.shape[2];
size_t stride_refpts = ref_info.strides[0]/sizeof(double);

View File

@ -1001,7 +1001,6 @@ void JacobianPointFunction :: SetPointIndex (PointIndex aactpind)
double JacobianPointFunction :: Func (const Vector & v) const
{
int j;
double badness = 0;
Point<3> hp = points[actpind];
@ -1027,7 +1026,7 @@ double JacobianPointFunction :: Func (const Vector & v) const
double JacobianPointFunction ::
FuncGrad (const Vector & x, Vector & g) const
{
int j, k;
int k;
int lpi;
double badness = 0;//, hbad;
@ -1094,7 +1093,7 @@ FuncGrad (const Vector & x, Vector & g) const
double JacobianPointFunction ::
FuncDeriv (const Vector & x, const Vector & dir, double & deriv) const
{
int j, k;
int k;
int lpi;
double badness = 0;
@ -1338,7 +1337,7 @@ void Mesh :: ImproveMesh (const MeshingParameters & mp, OPTIMIZEGOAL goal)
(*testout) << "Improve Mesh" << "\n";
PrintMessage (3, "ImproveMesh");
int np = GetNP();
// int np = GetNP();
int ne = GetNE();
PointFunction pf_glob(*this, mp);

View File

@ -120,7 +120,7 @@ namespace netgen
Array<Vec<3>> tangs(2);
Vec<3> diff, f_uu, f_vv, f_uv;
Vec<2> r, dx;
double norm_r, det, energy=0.0, new_energy=0.0, alpha=2.0,u=0.0,v=0.0,maxerr=1e-16;
double norm_r, energy=0.0, new_energy=0.0, alpha=2.0,u=0.0,v=0.0,maxerr=1e-16;
Mat<2,2> mat, inv;
int num=0, maxit=25;
double damping=0.5;

View File

@ -162,8 +162,9 @@ namespace netgen
{ // triangle
INDEX_4 face(el[elfaces[j][0]], el[elfaces[j][1]],
el[elfaces[j][2]], 0);
int facedir = 0;
[[maybe_unused]] int facedir = 0;
if (face.I1() > face.I2())
{ swap (face.I1(), face.I2()); facedir += 1; }
if (face.I2() > face.I3())
@ -753,7 +754,7 @@ namespace netgen
{
INT<2> paedge1, paedge2, paedge3;
int orient1 = 0, orient2 = 0, orient3=0;
int orient_inner = 0;
// int orient_inner = 0;
paedge1 = INT<2> (pa0[0], pa0[1]);
paedge2 = INT<2> (pa1[0], pa1[1]);
// find common vertex and the third pa edge

View File

@ -5,7 +5,7 @@
#include <meshing.hpp>
#include <myadt.hpp>
class Ng_SolutionData;
struct Ng_SolutionData;
// Function pointers for visualization purposed, all set to nullptr by default and initialized correctly when the GUI library is loaded
@ -15,7 +15,7 @@ DLL_HEADER extern void (*Ptr_Ng_SetSolutionData) (Ng_SolutionData * soldata);
DLL_HEADER extern void (*Ptr_Ng_Redraw) (bool blocking);
// Tcl wrapper functions
class Tcl_Interp;
struct Tcl_Interp;
typedef int (Tcl_CmdProc) (void * clientData, Tcl_Interp *interp,
int argc, const char *argv[]);
typedef void (Tcl_FreeProc) (char *blockPtr);

View File

@ -249,7 +249,7 @@ namespace netgen
multithread.percent = 100 * k / (mesh.GetNFD() + VSMALL);
geom.facemeshstatus[k-1] = -1;
FaceDescriptor & fd = mesh.GetFaceDescriptor(k);
// FaceDescriptor & fd = mesh.GetFaceDescriptor(k);
auto face = TopoDS::Face(geom.fmap(k));
const auto& occface = dynamic_cast<const OCCFace&>(geom.GetFace(k-1));
@ -342,7 +342,7 @@ namespace netgen
Array<PointGeomInfo> gis(2*segments.Size());
gis.SetSize (0);
glob2loc = 0;
int cntpt = 0;
// int cntpt = 0;
Box<2> uv_box(Box<2>::EMPTY_BOX);
for(auto & seg : segments)
@ -735,7 +735,7 @@ namespace netgen
gp_Vec d0 = prop.D1().Normalized();
double s_start = s0;
int count = 0;
// int count = 0;
for (int j = 1; j <= sections; j++)
{
double s = s0 + (s1-s0)*(double)j/(double)sections;
@ -744,7 +744,7 @@ namespace netgen
double cosalpha = fabs(d0*d1);
if ((j == sections) || (cosalpha < cos(10.0/180.0*M_PI)))
{
count++;
// count++;
gp_Pnt p0 = c->Value (s_start);
gp_Pnt p1 = c->Value (s);
lines[nlines].p0 = Point<3> (p0.X(), p0.Y(), p0.Z());

View File

@ -1335,7 +1335,7 @@ namespace netgen
const auto& occface = dynamic_cast<const OCCFace&>(face);
for(auto& vert : GetVertices(occface.Shape()))
verts.Append(&GetVertex(vert));
return std::move(verts);
return verts;
}
@ -2243,7 +2243,7 @@ namespace netgen
auto & identifications = OCCGeometry::GetIdentifications(shape);
if(identifications.size()==0)
return;
auto n = identifications.size();
// auto n = identifications.size();
Array<Handle(StepRepr_RepresentationItem)> ident_items;
ident_items.Append(item);

View File

@ -37,7 +37,7 @@ namespace netgen
double setu=geominfo.u,setv=geominfo.v;
double ustep = 0.01*(umax-umin);
double vstep = 0.01*(vmax-vmin);
// double vstep = 0.01*(vmax-vmin);
n=0;

View File

@ -14,7 +14,7 @@ namespace netgen
{
NgArray<int> trilists;
NgArray<int> linelists;
int selsurf;
// int selsurf;
class OCCGeometry * occgeometry;
public:
VisualSceneOCCGeometry ();

View File

@ -536,7 +536,7 @@ void STLGeometry :: SmoothNormals(const STLParameters& stlparam)
area2 += area;
}
}
}
(*testout) << "area1 = " << area1 << " area2 = " << area2 << endl;
if (area1 < 0.1 * area2)
@ -2630,10 +2630,10 @@ void STLGeometry :: FindEdgesFromAngles(const STLParameters& stlparam)
if (stlparam.contyangle < stlparam.yangle)
{
int changed = 1;
int its = 0;
[[maybe_unused]] int its = 0;
while (changed && stlparam.contyangle < stlparam.yangle)
{
its++;
its++;
//(*mycout) << "." << flush;
changed = 0;
for (int i = 1; i <= edgedata->Size(); i++)
@ -3659,7 +3659,7 @@ void STLGeometry :: WriteChartToFile( ChartId chartnumber, filesystem::path file
pts[k] = GetPoint(trig[k]);
box.Add(pts[k]);
}
Vec3d normal = Cross( pts[1]-pts[0], pts[2]-pts[0] );
// Vec3d normal = Cross( pts[1]-pts[0], pts[2]-pts[0] );
readtrigs.Append(STLReadTriangle(pts, trig.Normal()));
}
auto dist = box.PMax() - box.PMin();

View File

@ -749,7 +749,7 @@ void STLGeometry :: GetDirtyChartTrigs(int chartnum, STLChart& chart,
dirtytrigs.SetSize(0);
int cnt = 0;
// int cnt = 0;
for (int j = 1; j <= chart.GetNChartT(); j++)
{
@ -766,13 +766,13 @@ void STLGeometry :: GetDirtyChartTrigs(int chartnum, STLChart& chart,
if (!IsEdge(np1,np2))
{
dirtytrigs.Append(j); //local numbers!!!
cnt++;
// cnt++;
break; //only once per trig!!!
}
}
}
}
cnt = 0;
// cnt = 0;
STLPointId ap1, ap2, pn;
Array<STLTrigId> trigsaroundp;
@ -832,7 +832,7 @@ void STLGeometry :: GetDirtyChartTrigs(int chartnum, STLChart& chart,
if (problem && !dirtytrigs.Contains(j))
{
dirtytrigs.Append(j);
cnt++;
// cnt++;
break; //only once per triangle
}
}

View File

@ -536,11 +536,11 @@ int STLGeometry :: Project(Point<3> & p3d) const
{
Point<3> p, pf;
int j;
// int j;
int fi = 0;
int cnt = 0;
// int cnt = 0;
int different = 0;
const double lamtol = 1e-6;
// const double lamtol = 1e-6;
const STLChart& chart = GetChart(meshchart);

View File

@ -1172,7 +1172,7 @@ bool STLBoundary :: TestSeg(const Point<3>& p1, const Point<3> & p2, const Vec<3
}
#endif
int i,j,k;
int i,k;
Point<3> seg1p/*, seg2p*/;
Point<3> sp1,sp2;
double lambda1, lambda2, vlen2;

View File

@ -353,7 +353,7 @@ STLGeometry * STLTopology ::Load (istream & ist, bool surface)
if(std::isblank(buf[istart])==0)
break;
for (auto i : Range(buflen))
for ([[maybe_unused]] auto i : Range(buflen))
ist.unget();
// does not start with "solid" -> binary file
@ -374,7 +374,7 @@ STLGeometry * STLTopology ::Load (istream & ist, bool surface)
Point<3> pts[3];
Vec<3> normal;
int cntface = 0;
[[maybe_unused]] int cntface = 0;
int vertex = 0;
bool badnormals = false;
ist >> buf; // skip first line

View File

@ -950,7 +950,7 @@ namespace netgen
// glEnable (GL_LIGHTING);
double shine = vispar.shininess;
double transp = vispar.transp;
// double transp = vispar.transp;
glMaterialf (GL_FRONT_AND_BACK, GL_SHININESS, shine);
glLogicOp (GL_COPY);

View File

@ -873,7 +873,7 @@ namespace netgen
int n = data.Size()/4;
colors.width = min2(n, 1024);
colors.height = (n+colors.width-1)/colors.width;
for(auto i: Range(n, colors.width*colors.height))
for([[maybe_unused]] auto i: Range(n, colors.width*colors.height))
data.Append({0.0f, 0.0f, 0.0f, 0.0f});
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, colors.width, colors.height, 0, GL_RGBA, GL_FLOAT, data.Data());
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
@ -986,8 +986,8 @@ namespace netgen
glBindTexture(GL_TEXTURE_2D, colors.texture);
}
GLfloat matcol[] = { 0, 1, 0, 1 };
GLfloat matcolsel[] = { 1, 0, 0, 1 };
// GLfloat matcol[] = { 0, 1, 0, 1 };
// GLfloat matcolsel[] = { 1, 0, 0, 1 };
GLint rendermode;
glGetIntegerv (GL_RENDER_MODE, &rendermode);
@ -1021,7 +1021,7 @@ namespace netgen
SurfaceElementIndex sei = seia[hi];
const Element2d & el = (*mesh)[sei];
bool drawel = (!el.IsDeleted() & el.IsVisible());
bool drawel = (!el.IsDeleted() && el.IsVisible());
#ifdef STLGEOM
if (checkvicinity)
@ -1364,7 +1364,7 @@ namespace netgen
{
const Element2d & el = (*mesh)[sei];
bool drawel = (!el.IsDeleted() & el.IsVisible());
bool drawel = (!el.IsDeleted() && el.IsVisible());
#ifdef STLGEOM
if (checkvicinity)
@ -3135,7 +3135,7 @@ namespace netgen
}
glGetIntegerv (GL_VIEWPORT, select.viewport);
GLenum err;
// GLenum err;
if(select.framebuffer == 0 || select.viewport[2] != select.width || select.viewport[3] != select.height)
{
select.width = select.viewport[2];

View File

@ -4736,7 +4736,7 @@ namespace netgen
void VisualSceneSolution :: MouseDblClick (int px, int py)
{
auto mesh = GetMesh();
auto dim = mesh->GetDimension();
// auto dim = mesh->GetDimension();
marker = nullopt;
auto formatComplex = [](double real, double imag)
@ -4817,7 +4817,7 @@ namespace netgen
// marker = p;
bool have_scal_func = scalfunction!=-1 && soldata[scalfunction]->draw_volume;
bool have_vec_func = vecfunction!=-1 && soldata[vecfunction]->draw_volume;
// bool have_vec_func = vecfunction!=-1 && soldata[vecfunction]->draw_volume;
if(have_scal_func)
{

View File

@ -15,10 +15,10 @@ int main (int argc, char ** argv)
exit(1);
}
char line[maxlen], infile[maxlen], outfile[maxlen];\
char line[maxlen]; // , infile[maxlen], outfile[maxlen];
char ch;
int i, j;
int i;
/*
cout << "infile: ";