diff --git a/Cassiopee/Converter/Converter/IO/GenIO_binpng.cpp b/Cassiopee/Converter/Converter/IO/GenIO_binpng.cpp index 8c7dc3944..4ba9845ef 100644 --- a/Cassiopee/Converter/Converter/IO/GenIO_binpng.cpp +++ b/Cassiopee/Converter/Converter/IO/GenIO_binpng.cpp @@ -140,7 +140,7 @@ E_Int K_IO::GenIO::pngread( // Stockage du champ E_Int nil = width; E_Int njl = height; - FldArrayF* f; + FldArrayF* f = NULL; if (components == 1) // greyscale { strcpy(varString, "x,y,z,r"); @@ -161,6 +161,10 @@ E_Int K_IO::GenIO::pngread( strcpy(varString, "x,y,z,r,g,b,a"); f = new FldArrayF(nil*njl, 7); } + else + { + printf("Warning: bin_png: unkown number of components.\n"); + } f->setAllValuesAtNull(); E_Float* fx = f->begin(1); diff --git a/Cassiopee/Generator/test/plaster.py b/Cassiopee/Generator/test/plaster.py index 10aff96fe..3990310d3 100644 --- a/Cassiopee/Generator/test/plaster.py +++ b/Cassiopee/Generator/test/plaster.py @@ -5,8 +5,8 @@ import Post as P import Geom as D -a = D.sphere( (0,0,0), 1,N=30) -a = T.subzone(a, (6,1,1), (a[2]/2,a[3],a[4])) +a = D.sphere( (0,0,0), 1, N=30) +a = T.subzone(a, (6,1,1), (a[2]//2,a[3],a[4])) a = C.convertArray2Hexa(a); a = G.close(a) # contours diff --git a/Cassiopee/KCore/Dist.py b/Cassiopee/KCore/Dist.py index edf07c9ee..977042fee 100644 --- a/Cassiopee/KCore/Dist.py +++ b/Cassiopee/KCore/Dist.py @@ -2068,13 +2068,13 @@ def checkFortranLibs(additionalLibs=[], additionalLibPaths=[], if l is not None: libs += ['f', 'rt']; paths += [l] - if useOMP: - l = checkLibFile__('libomp.so*', additionalLibPaths) - if l is None: - l = checkLibFile__('libomp.a', additionalLibPaths) - if l is not None: - libs += ['omp']; paths += [l] - else: ret = False + #if useOMP: + # l = checkLibFile__('libomp.so*', additionalLibPaths) + # if l is None: + # l = checkLibFile__('libomp.a', additionalLibPaths) + # if l is not None: + # libs += ['omp']; paths += [l] + # else: ret = False return (ret, libs, paths) @@ -2246,23 +2246,23 @@ def checkCppLibs(additionalLibs=[], additionalLibPaths=[], Cppcompiler=None, sysconfig._config_vars['CFLAGS'] = '' # kill setup flags for CC sysconfig._config_vars['LDFLAGS'] = '' # kill setup flags for LD - l = checkLibFile__('libcraymp.so*', additionalLibPaths) - if l is None: - l = checkLibFile__('libcraymp.a', additionalLibPaths) - if l is not None: - libs += ['craymp']; paths += [l] + #l = checkLibFile__('libcraymp.so*', additionalLibPaths) + #if l is None: + # l = checkLibFile__('libcraymp.a', additionalLibPaths) + #if l is not None: + # libs += ['craymp']; paths += [l] l = checkLibFile__('libsci_cray.so*', additionalLibPaths) if l is None: l = checkLibFile__('libsci_cray.a', additionalLibPaths) if l is not None: libs += ['sci_cray']; paths += [l] - if useOMP: - l = checkLibFile__('libomp.so*', additionalLibPaths) - if l is None: - l = checkLibFile__('libomp.a', additionalLibPaths) - if l is not None: - libs += ['omp']; paths += [l] - else: ret = False + #if useOMP: + # l = checkLibFile__('libomp.so*', additionalLibPaths) + # if l is None: + # l = checkLibFile__('libomp.a', additionalLibPaths) + # if l is not None: + # libs += ['omp']; paths += [l] + # else: ret = False return (ret, libs, paths) diff --git a/Cassiopee/KCore/KCore/Nuga/include/EltAlgo.cxx b/Cassiopee/KCore/KCore/Nuga/include/EltAlgo.cxx index 5c292fbe2..9929d390b 100755 --- a/Cassiopee/KCore/KCore/Nuga/include/EltAlgo.cxx +++ b/Cassiopee/KCore/KCore/Nuga/include/EltAlgo.cxx @@ -381,7 +381,6 @@ template inline bool NUGA::EltAlgo::coloring_one_connex_homogeneous (const ngon_unit& neighbors, std::vector& colors, size_t Kseed, T UNSET_COL, T color, T FRONT_COL) { - bool good_dom = true; E_Int nb_front_col{ 0 }; int_vector_type cpool; diff --git a/Cassiopee/KCore/KCore/Nuga/include/GeomMetric.h b/Cassiopee/KCore/KCore/Nuga/include/GeomMetric.h index adff336fa..35f114f0f 100755 --- a/Cassiopee/KCore/KCore/Nuga/include/GeomMetric.h +++ b/Cassiopee/KCore/KCore/Nuga/include/GeomMetric.h @@ -576,8 +576,8 @@ namespace DELAUNAY E_Float h0 = ::sqrt(1./lambda0); E_Float h1 = ::sqrt(1./lambda1); - E_Float Pix = parent_type::_pos(0,Ni); - E_Float Piy = parent_type::_pos(1,Ni); + //E_Float Pix = parent_type::_pos(0,Ni); + //E_Float Piy = parent_type::_pos(1,Ni); // P0 = Pi +/- h0*v0 NUGA::sum<3>(1., parent_type::_pos->col(Ni), h0, v0, P0); diff --git a/Cassiopee/KCore/KCore/Nuga/include/Kernel.cxx b/Cassiopee/KCore/KCore/Nuga/include/Kernel.cxx index 046038811..88d05c3e7 100755 --- a/Cassiopee/KCore/KCore/Nuga/include/Kernel.cxx +++ b/Cassiopee/KCore/KCore/Nuga/include/Kernel.cxx @@ -85,7 +85,8 @@ Kernel::~Kernel(void) template template E_Int -Kernel::insertNode(size_type N, const T& m, const ConstraintType& dummy){ +Kernel::insertNode(size_type N, const T& m, const ConstraintType& dummy) +{ #ifdef E_TIME chrono c; c.start(); @@ -102,7 +103,7 @@ Kernel::insertNode(size_type N, const T& m, const ConstraintType& dummy){ c.start(); #endif - // + // ret = __remeshCavity (N, _data->connectM, _data->neighbors, _data->ancestors, _cavity, _cboundary); if (ret) return ret; diff --git a/Cassiopee/KCore/KCore/Nuga/include/MeshData.h b/Cassiopee/KCore/KCore/Nuga/include/MeshData.h index 6a394ed9d..760457897 100755 --- a/Cassiopee/KCore/KCore/Nuga/include/MeshData.h +++ b/Cassiopee/KCore/KCore/Nuga/include/MeshData.h @@ -26,8 +26,9 @@ namespace DELAUNAY { - struct MeshData + class MeshData { + public: typedef E_Int size_type; typedef NUGA::int_vector_type int_vector_type; typedef NUGA::bool_vector_type bool_vector_type; diff --git a/Cassiopee/KCore/KCore/Nuga/include/MeshTool.cxx b/Cassiopee/KCore/KCore/Nuga/include/MeshTool.cxx index c34204876..e1fdd9097 100755 --- a/Cassiopee/KCore/KCore/Nuga/include/MeshTool.cxx +++ b/Cassiopee/KCore/KCore/Nuga/include/MeshTool.cxx @@ -471,7 +471,6 @@ void MeshTool::refine_T3s(const K_FLD::FloatArray& coord, K_FLD::IntArray& conne pg_molec.push_back(Nn); } - E_Int sz0 = new_cnt.cols(); K_MESH::Polygon::triangulate(dt, coord, &pg_molec[0], pg_molec.size(), 0, new_cnt, false, true); oids.resize(new_cnt.cols(), i); } diff --git a/Cassiopee/KCore/KCore/Nuga/include/Mesher.h b/Cassiopee/KCore/KCore/Nuga/include/Mesher.h index b03e73f47..78cc03331 100755 --- a/Cassiopee/KCore/KCore/Nuga/include/Mesher.h +++ b/Cassiopee/KCore/KCore/Nuga/include/Mesher.h @@ -480,7 +480,7 @@ namespace DELAUNAY size_type nb_nodes(_data->hardNodes.size()), Ni; std::vector newIds; - int unconstrained; + int unconstrained = 0; for (size_type i = 0; (i < nb_nodes) && (_err == 0); ++i) { Ni = _data->hardNodes[i]; @@ -792,7 +792,7 @@ namespace DELAUNAY chrono c; #endif - float contrained; + float constrained = 0.; E_Int iter = 0; bool carry_on = false; @@ -843,7 +843,7 @@ namespace DELAUNAY for (size_type i = 0; (i < nb_refine_nodes) && !_err; ++i) { Ni = refine_nodes[i]; - _err = _kernel->insertNode(Ni, (*_metric)[Ni], contrained); + _err = _kernel->insertNode(Ni, (*_metric)[Ni], constrained); _tree->insert(Ni); } diff --git a/Cassiopee/KCore/KCore/Nuga/include/Polyhedron.h b/Cassiopee/KCore/KCore/Nuga/include/Polyhedron.h index c288ba2f3..1ef920656 100755 --- a/Cassiopee/KCore/KCore/Nuga/include/Polyhedron.h +++ b/Cassiopee/KCore/KCore/Nuga/include/Polyhedron.h @@ -656,8 +656,8 @@ namespace K_MESH if (j == IDX_NONE) return 1; - const E_Int* nodesj = lpgs.get_facets_ptr(j); - E_Int nb_nodsj = lpgs.stride(j); + //const E_Int* nodesj = lpgs.get_facets_ptr(j); + //E_Int nb_nodsj = lpgs.stride(j); bool rev = (lorient[j] == -1); E_Int er = K_MESH::Polygon::get_oriented_normal(crd, lpgs, j, rev, nj, normals); diff --git a/Cassiopee/KCore/KCore/Nuga/include/TRI_Conformizer.cxx b/Cassiopee/KCore/KCore/Nuga/include/TRI_Conformizer.cxx index 58dbb2bd8..34c557790 100755 --- a/Cassiopee/KCore/KCore/Nuga/include/TRI_Conformizer.cxx +++ b/Cassiopee/KCore/KCore/Nuga/include/TRI_Conformizer.cxx @@ -1344,15 +1344,11 @@ TRI_Conformizer::__get_mesh_data keep.resize(crd.cols(), -1); for (E_Int i=0; i < n0; ++i) { - const E_Int & n1 = cnt1(0,i); - const E_Int & n2 = cnt1(1,i); keep[cnt1(0,i)]=keep[cnt1(1,i)]=1; //always keep contour points } for (E_Int i=n0; i < cnt1.cols(); ++i) { - const E_Int & n1 = cnt1(0,i); - const E_Int & n2 = cnt1(1,i); if (keep[cnt1(0,i)] != 1 || keep[cnt1(1,i)] != 1) { do_the_reject_test=true; break; diff --git a/Cassiopee/KCore/KCore/Nuga/include/ngon_t.hxx b/Cassiopee/KCore/KCore/Nuga/include/ngon_t.hxx index ab52ac639..43bd23aff 100644 --- a/Cassiopee/KCore/KCore/Nuga/include/ngon_t.hxx +++ b/Cassiopee/KCore/KCore/Nuga/include/ngon_t.hxx @@ -4633,7 +4633,7 @@ E_Int remove_phs(const std::set& PHslist) { E_Int nb_pgs = ng.PHs.stride(K); const E_Int* pKn = neighbors.get_facets_ptr(K); - const E_Int* pFn = ng.PHs.get_facets_ptr(K); + //const E_Int* pFn = ng.PHs.get_facets_ptr(K); for (size_t j = 0; j < nb_pgs; ++j) { @@ -4667,7 +4667,7 @@ E_Int remove_phs(const std::set& PHslist) E_Int nb_pgs = ng.PHs.stride(i); bool toprocess = false; - const E_Int* pKn = neighbors.get_facets_ptr(i); + //const E_Int* pKn = neighbors.get_facets_ptr(i); const E_Int* pFn = ng.PHs.get_facets_ptr(i); for (size_t j = 0; (j < nb_pgs) && !toprocess; ++j) { @@ -4680,7 +4680,6 @@ E_Int remove_phs(const std::set& PHslist) new_phs.add(nb_pgs, ng.PHs.get_facets_ptr(i)); new_neigh.add(nb_pgs, neighbors.get_facets_ptr(i)); nids[i] = nnid++; - E_Int a1 = -1; if (new_neigh.size() > 1) new_neigh.get_facet(1, 0); continue; // cannot add to a separate ngon_t as doesnt mean that this will not be an aggregate attractor diff --git a/Cassiopee/KCore/KCore/Nuga/src/GapsManager.cpp b/Cassiopee/KCore/KCore/Nuga/src/GapsManager.cpp index 8f61a3587..af5bb3d02 100755 --- a/Cassiopee/KCore/KCore/Nuga/src/GapsManager.cpp +++ b/Cassiopee/KCore/KCore/Nuga/src/GapsManager.cpp @@ -1,13 +1,22 @@ -/* - - +/* + Copyright 2013-2024 Onera. ---------- NUGA v1.0 + This file is part of Cassiopee. + Cassiopee is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + Cassiopee is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Cassiopee. If not, see . */ -//Authors : Sām Landier (sam.landier@onera.fr) +//Authors : Sam Landier (sam.landier@onera.fr) #include "Nuga/include/GapsManager.h" #include "Nuga/include/PostNodeAssociator.h" diff --git a/Cassiopee/KCore/KCore/Nuga/src/Hexahedron.cpp b/Cassiopee/KCore/KCore/Nuga/src/Hexahedron.cpp index ed6b775a7..19e0472fd 100644 --- a/Cassiopee/KCore/KCore/Nuga/src/Hexahedron.cpp +++ b/Cassiopee/KCore/KCore/Nuga/src/Hexahedron.cpp @@ -1,13 +1,22 @@ -/* +/* + Copyright 2013-2024 Onera. + This file is part of Cassiopee. + Cassiopee is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. ---------- NUGA v1.0 - - + Cassiopee is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Cassiopee. If not, see . */ -//Authors : Sām Landier (sam.landier@onera.fr) +//Authors : Sam Landier (sam.landier@onera.fr) #include "Nuga/include/Hexahedron.h" //#include "Nuga/include/macros.h"