Skip to content

Commit

Permalink
All: portage craycc 3
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit128 committed Oct 18, 2024
1 parent 6d7fe5e commit 57aabb2
Show file tree
Hide file tree
Showing 14 changed files with 68 additions and 51 deletions.
6 changes: 5 additions & 1 deletion Cassiopee/Converter/Converter/IO/GenIO_binpng.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions Cassiopee/Generator/test/plaster.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
38 changes: 19 additions & 19 deletions Cassiopee/KCore/Dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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)

Expand Down
1 change: 0 additions & 1 deletion Cassiopee/KCore/KCore/Nuga/include/EltAlgo.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,6 @@ template<typename T>
inline bool
NUGA::EltAlgo<ElementType>::coloring_one_connex_homogeneous (const ngon_unit& neighbors, std::vector<T>& 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;
Expand Down
4 changes: 2 additions & 2 deletions Cassiopee/KCore/KCore/Nuga/include/GeomMetric.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 3 additions & 2 deletions Cassiopee/KCore/KCore/Nuga/include/Kernel.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ Kernel<T>::~Kernel(void)
template <typename T>
template <typename ConstraintType>
E_Int
Kernel<T>::insertNode(size_type N, const T& m, const ConstraintType& dummy){
Kernel<T>::insertNode(size_type N, const T& m, const ConstraintType& dummy)
{
#ifdef E_TIME
chrono c;
c.start();
Expand All @@ -102,7 +103,7 @@ Kernel<T>::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;
Expand Down
3 changes: 2 additions & 1 deletion Cassiopee/KCore/KCore/Nuga/include/MeshData.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion Cassiopee/KCore/KCore/Nuga/include/MeshTool.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
6 changes: 3 additions & 3 deletions Cassiopee/KCore/KCore/Nuga/include/Mesher.h
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ namespace DELAUNAY
size_type nb_nodes(_data->hardNodes.size()), Ni;

std::vector<E_Int> newIds;
int unconstrained;
int unconstrained = 0;
for (size_type i = 0; (i < nb_nodes) && (_err == 0); ++i)
{
Ni = _data->hardNodes[i];
Expand Down Expand Up @@ -792,7 +792,7 @@ namespace DELAUNAY
chrono c;
#endif

float contrained;
float constrained = 0.;
E_Int iter = 0;
bool carry_on = false;

Expand Down Expand Up @@ -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);
}

Expand Down
4 changes: 2 additions & 2 deletions Cassiopee/KCore/KCore/Nuga/include/Polyhedron.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 0 additions & 4 deletions Cassiopee/KCore/KCore/Nuga/include/TRI_Conformizer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1344,15 +1344,11 @@ TRI_Conformizer<DIM>::__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;
Expand Down
5 changes: 2 additions & 3 deletions Cassiopee/KCore/KCore/Nuga/include/ngon_t.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -4633,7 +4633,7 @@ E_Int remove_phs(const std::set<E_Int>& 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)
{
Expand Down Expand Up @@ -4667,7 +4667,7 @@ E_Int remove_phs(const std::set<E_Int>& 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)
{
Expand All @@ -4680,7 +4680,6 @@ E_Int remove_phs(const std::set<E_Int>& 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
Expand Down
19 changes: 14 additions & 5 deletions Cassiopee/KCore/KCore/Nuga/src/GapsManager.cpp
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.
*/
//Authors : Sâm Landier ([email protected])
//Authors : Sam Landier ([email protected])

#include "Nuga/include/GapsManager.h"
#include "Nuga/include/PostNodeAssociator.h"
Expand Down
19 changes: 14 additions & 5 deletions Cassiopee/KCore/KCore/Nuga/src/Hexahedron.cpp
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.
*/
//Authors : Sâm Landier ([email protected])
//Authors : Sam Landier ([email protected])

#include "Nuga/include/Hexahedron.h"
//#include "Nuga/include/macros.h"
Expand Down

0 comments on commit 57aabb2

Please sign in to comment.