diff --git a/smooth3D/CMakeLists.txt b/smooth3D/CMakeLists.txt index d58afc5..345b665 100755 --- a/smooth3D/CMakeLists.txt +++ b/smooth3D/CMakeLists.txt @@ -86,7 +86,7 @@ add_library(smooth3D ${SMOOTH3D_HEADER_FILES} ${SMOOTH3D_SRC_FILES}) #target_compile_features(gmds PUBLIC cxx_std_11) -target_link_libraries(smooth3D PRIVATE gmds) +target_link_libraries(smooth3D PRIVATE GMDSIg) target_link_libraries(smooth3D PRIVATE Lima::Lima Mesquite::Mesquite) target_link_libraries(smooth3D PUBLIC MachineTypes::MachineTypes) diff --git a/smooth3D/inc/smooth3D/smooth3d.h b/smooth3D/inc/smooth3D/smooth3d.h index 8167a15..db88f4a 100644 --- a/smooth3D/inc/smooth3D/smooth3d.h +++ b/smooth3D/inc/smooth3D/smooth3d.h @@ -39,6 +39,7 @@ int S3_ConditionNumber2D(int_type nb_cells, int_type nb_nodes, double *y, double *z, const double * weights, const double * relax, int_type n_iter); +// S3_GETMe2D is no longer available. int S3_GETMe2D(const double alpha, const double beta, int_type nb_cells, int_type nb_nodes, const int_type * nb_nodes_per_cell, const int_type *nodes_number, double *x, double *y, double *z, diff --git a/smooth3D/src/getme/GetMe2D.cpp b/smooth3D/src/getme/GetMe2D.cpp index c9a1ccd..44b0993 100644 --- a/smooth3D/src/getme/GetMe2D.cpp +++ b/smooth3D/src/getme/GetMe2D.cpp @@ -11,13 +11,14 @@ #include // pour rand #include "smooth3D/smooth.h" -#include -#include +#include +#include #include "math/Real3.h" #include "math/MeanRatio.h" -// Fonction spécialisée pour calculer le meanRatio pour un triangle +/* +// Fonction sp�cialis�e pour calculer le meanRatio pour un triangle static Smooth3D::Real computeMeanRatio(gmds::Node& n0, gmds::Node& n1, gmds::Node& n2) { Smooth3D::Real3 p[3]; @@ -39,7 +40,7 @@ static Smooth3D::Real computeMeanRatio(gmds::Node& n0, gmds::Node& n1, return (mean_ratio); } -// Fonction spécialisée pour calculer le meanRatio pour un quadrilatère +// Fonction sp�cialis�e pour calculer le meanRatio pour un quadrilat�re static Smooth3D::Real computeMeanRatio(gmds::Node& n0, gmds::Node& n1, gmds::Node& n2, gmds::Node& n3) { static const int kTriQuads[4][3] = { { 0, 1, 3 }, { 1, 2, 0 }, { 2, 3, 1 }, { @@ -225,11 +226,11 @@ static FourNodes computeGetMeQuadrangle3D(gmds::Face& face, return compute_nodes; } -static void computeN2N(gmds::IGMesh& mesh) { +static void computeN2N(gmds::Mesh& mesh) { std::map > n2n; - gmds::IGMesh::face_iterator it_faces = mesh.faces_begin(); + gmds::Mesh::face_iterator it_faces = mesh.faces_begin(); while (!it_faces.isDone()) { gmds::Face f = it_faces.value(); @@ -255,14 +256,17 @@ static void computeN2N(gmds::IGMesh& mesh) { current_node.set(adj_nodes); } } - +*/ extern "C" int S3_GETMe2D(const double alpha, const double beta, int_type nb_cells, int_type nb_nodes, const int_type * nb_nodes_per_cell, const int_type *nodes_number, double *x, double *y, double *z, const double * weights, const double * relax, int_type n_iter) { + std::cerr<<"S3_GETMe2D is no longer available."< +#include +#include namespace Smooth3D { diff --git a/smooth3D/src/opt2D/s3_conditionnumber2D.cpp b/smooth3D/src/opt2D/s3_conditionnumber2D.cpp index 1f65781..467fa5d 100644 --- a/smooth3D/src/opt2D/s3_conditionnumber2D.cpp +++ b/smooth3D/src/opt2D/s3_conditionnumber2D.cpp @@ -13,8 +13,8 @@ #include // pour rand #include "smooth3D/smooth.h" -#include -#include +#include +#include #include "math/Real3.h" @@ -32,7 +32,7 @@ extern "C" int S3_ConditionNumber2D( int_type n_iter) { const int tGMDSMask = gmds::DIM3 | gmds::N | gmds::F | gmds::F2N | gmds::N2F; - gmds::IGMesh internal_mesh(tGMDSMask); + gmds::Mesh internal_mesh(tGMDSMask); gmds::Node * temp_array_nodes = new gmds::Node [nb_nodes]; @@ -47,7 +47,7 @@ extern "C" int S3_ConditionNumber2D( internal_mesh.newFace(nodes_cell); } - gmds::IGMeshDoctor mesh_doc(&internal_mesh); + gmds::MeshDoctor mesh_doc(&internal_mesh); mesh_doc.updateUpwardConnectivity(); delete[] temp_array_nodes; @@ -61,14 +61,13 @@ extern "C" int S3_ConditionNumber2D( for (int iter = 0; iter < n_iter; iter++) { // LOOP 2 : FOR ALL NODES - for (gmds::IGMesh::node_iterator it = internal_mesh.nodes_begin(); - !it.isDone(); it.next()) { - gmds::Node current_node = it.value(); - if (relax[current_node.getID()] != 0.0) { + for (auto i : internal_mesh.nodes()){ + auto current_node = internal_mesh.get(i); + if (relax[current_node.id()] != 0.0) { // We are only interested on Relaxed nodes condition.set_node(current_node); - int nb_faces = current_node.getNbFaces(); + int nb_faces = current_node.nbFaces(); // First face connected to the node is chosen ramdomly int face_int = std::rand() % nb_faces; @@ -147,10 +146,9 @@ extern "C" int S3_ConditionNumber2D( } - for (gmds::IGMesh::node_iterator it = internal_mesh.nodes_begin(); - !it.isDone(); it.next()) { - gmds::Node current_node = it.value(); - int vtx = current_node.getID(); + for (auto i : internal_mesh.nodes()){ + auto current_node = internal_mesh.get(i); + int vtx = current_node.id(); double rel = relax[vtx]; if (rel != 0.0) diff --git a/smooth3D/src/opt2D/s3_orthogonal2D.cpp b/smooth3D/src/opt2D/s3_orthogonal2D.cpp index f4dc7b0..d49d625 100644 --- a/smooth3D/src/opt2D/s3_orthogonal2D.cpp +++ b/smooth3D/src/opt2D/s3_orthogonal2D.cpp @@ -13,8 +13,8 @@ #include // pour rand #include "smooth3D/smooth.h" -#include -#include +#include +#include #include "math/Real3.h" @@ -32,7 +32,7 @@ extern "C" int S3_Orthogonal2D( int_type n_iter) { const int tGMDSMask = gmds::DIM3 | gmds::N | gmds::F | gmds::F2N | gmds::N2F; - gmds::IGMesh internal_mesh(tGMDSMask); + gmds::Mesh internal_mesh(tGMDSMask); gmds::Node * temp_array_nodes = new gmds::Node [nb_nodes]; @@ -47,7 +47,7 @@ extern "C" int S3_Orthogonal2D( internal_mesh.newFace(nodes_cell); } - gmds::IGMeshDoctor mesh_doc(&internal_mesh); + gmds::MeshDoctor mesh_doc(&internal_mesh); mesh_doc.updateUpwardConnectivity(); delete[] temp_array_nodes; @@ -61,14 +61,16 @@ extern "C" int S3_Orthogonal2D( for (int iter = 0; iter < n_iter; iter++) { // LOOP 2 : FOR ALL NODES - for (gmds::IGMesh::node_iterator it = internal_mesh.nodes_begin(); - !it.isDone(); it.next()) { - gmds::Node current_node = it.value(); - if (relax[current_node.getID()] != 0.0) { + //for (gmds::Mesh::node_iterator it = internal_mesh.nodes_begin(); + //!it.isDone(); it.next()) { + for (auto i : internal_mesh.nodes()){ + //gmds::Node current_node = it.value(); + auto current_node = internal_mesh.get(i); + if (relax[current_node.id()] != 0.0) { // We are only interested on Relaxed nodes orthogonal.setNode(current_node); - int nb_faces = current_node.getNbFaces(); + int nb_faces = current_node.nbFaces(); // First face connected to the node is chosen ramdomly int face_int = std::rand() % nb_faces; @@ -145,12 +147,13 @@ extern "C" int S3_Orthogonal2D( } } } - - - for (gmds::IGMesh::node_iterator it = internal_mesh.nodes_begin(); - !it.isDone(); it.next()) { - gmds::Node current_node = it.value(); - int vtx = current_node.getID(); + +// for (gmds::Mesh::node_iterator it = internal_mesh.nodes_begin(); +// !it.isDone(); it.next()) { +// gmds::Node current_node = it.value(); + for (auto i : internal_mesh.nodes()){ + auto current_node = internal_mesh.get(i); + int vtx = current_node.id(); double rel = relax[vtx]; if (rel != 0.0)