getfem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Getfem-commits] [getfem-commits] branch master updated: Fix preprocesso


From: Konstantinos Poulios
Subject: [Getfem-commits] [getfem-commits] branch master updated: Fix preprocessor options handling
Date: Wed, 24 Apr 2024 05:50:51 -0400

This is an automated email from the git hooks/post-receive script.

logari81 pushed a commit to branch master
in repository getfem.

The following commit(s) were added to refs/heads/master by this push:
     new 12935f5a Fix preprocessor options handling
12935f5a is described below

commit 12935f5a868c71e08aed4d7e32993159f742e309
Author: Konstantinos Poulios <logari81@gmail.com>
AuthorDate: Wed Apr 24 11:50:38 2024 +0200

    Fix preprocessor options handling
---
 contrib/xfem_contact/xfem_dirichlet.cc                       | 12 ++++++------
 contrib/xfem_stab_unilat_contact/xfem_stab_unilat_contact.cc |  4 ++--
 interface/src/gf_asm.cc                                      |  4 ++--
 src/getfem/getfem_config.h                                   |  2 +-
 src/getfem_mesh.cc                                           |  4 ++--
 src/gmm/gmm_std.h                                            |  4 ++--
 6 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/contrib/xfem_contact/xfem_dirichlet.cc 
b/contrib/xfem_contact/xfem_dirichlet.cc
index 6c1eefaf..dc792d51 100644
--- a/contrib/xfem_contact/xfem_dirichlet.cc
+++ b/contrib/xfem_contact/xfem_dirichlet.cc
@@ -38,7 +38,7 @@
 #include "getfem/bgeot_mesh_structure.h"
 #include "getfem/getfem_config.h"
 
-#if GETFEM_HAVE_METIS_OLD_API
+#if defined(GETFEM_HAVE_METIS_OLD_API)
 extern "C" void METIS_PartGraphKway(int *, int *, int *, int *, int *, int *,
                                     int *, int *, int *, int *, int *);
 extern "C" void METIS_PartGraphRecursive(int *, int *, int *, int *, int *, 
int *,
@@ -47,7 +47,7 @@ extern "C" void METIS_mCPartGraphKway(int *, int *, int *, 
int *, int *, int *,
                                       int *, int *, float *, int *, int *, int 
*);
 extern "C" void METIS_mCPartGraphRecursive(int *, int *, int *, int *, int *, 
int *, int *,
                                            int *, int *, int *, int *, int *);
-#elif GETFEM_HAVE_METIS
+#elif defined(GETFEM_HAVE_METIS)
 # include <metis.h>
 #endif
 
@@ -471,9 +471,9 @@ h
   cout<<"ratio size beween mesh and coarse mesh= "<< ratio_size <<endl;
 
   int nparts = 1;
-#if GETFEM_HAVE_METIS
+#if defined(GETFEM_HAVE_METIS)
   nparts = int(size_of_crack/(ratio_size*h));
-# ifdef GETFEM_HAVE_METIS_OLD_API
+# if defined(GETFEM_HAVE_METIS_OLD_API)
   std::vector<int> adjwgt(k); // actually Metis would also accept NULL instead 
of an empty array
   int wgtflag = 2, numflag = 0, edgecut;
   // float ubvec[1] = {1.03f};
@@ -885,9 +885,9 @@ int main(int argc, char *argv[]) {
       cout<<"ratio size between mesh and coarse mesh= "<< ratio_size <<endl;
 
       int nparts = 1;
-#if GETFEM_HAVE_METIS
+#if defined(GETFEM_HAVE_METIS)
       nparts = int(size_of_crack/(ratio_size*h));
-# ifdef GETFEM_HAVE_METIS_OLD_API
+# if defined(GETFEM_HAVE_METIS_OLD_API)
       std::vector<int> adjwgt(k); // actually Metis would also accept NULL 
instead of an empty array
       int wgtflag = 2, numflag = 0, edgecut;
       int options[5] = {0,0,0,0,0};
diff --git a/contrib/xfem_stab_unilat_contact/xfem_stab_unilat_contact.cc 
b/contrib/xfem_stab_unilat_contact/xfem_stab_unilat_contact.cc
index 4f5a7ea4..9ece2d64 100644
--- a/contrib/xfem_stab_unilat_contact/xfem_stab_unilat_contact.cc
+++ b/contrib/xfem_stab_unilat_contact/xfem_stab_unilat_contact.cc
@@ -41,7 +41,7 @@
 #include "getfem/getfem_mesh_fem_sum.h"
 #include "gmm/gmm_inoutput.h"
 
-#if GETFEM_HAVE_METIS_OLD_API
+#if defined(GETFEM_HAVE_METIS_OLD_API)
 extern "C" void METIS_PartGraphKway(int *, int *, int *, int *, int *, int *,
                                     int *, int *, int *, int *, int *);
 extern "C" void METIS_PartGraphRecursive(int *, int *, int *, int *, int *, 
int *,
@@ -50,7 +50,7 @@ extern "C" void METIS_mCPartGraphKway(int *, int *, int *, 
int *, int *, int *,
                                       int *, int *, float *, int *, int *, int 
*);
 extern "C" void METIS_mCPartGraphRecursive(int *, int *, int *, int *, int *, 
int *, int *,
                                            int *, int *, int *, int *, int *);
-#elif GETFEM_HAVE_METIS
+#elif defined(GETFEM_HAVE_METIS)
 # include <metis.h>
 #endif
 
diff --git a/interface/src/gf_asm.cc b/interface/src/gf_asm.cc
index 7a4da996..5d666cf9 100644
--- a/interface/src/gf_asm.cc
+++ b/interface/src/gf_asm.cc
@@ -33,7 +33,7 @@
 #include <getfemint_misc.h>
 #include <getfemint_gsparse.h>
 
-#if GETFEM_HAVE_METIS_OLD_API
+#if defined(GETFEM_HAVE_METIS_OLD_API)
 extern "C" void METIS_PartGraphKway(int *, int *, int *, int *, int *, int *,
                                     int *, int *, int *, int *, int *);
 extern "C" void METIS_PartGraphRecursive(int *, int *, int *, int *, int *,
@@ -46,7 +46,7 @@ extern "C" void METIS_mCPartGraphRecursive(int *, int *, int 
*, int *, int *,
                                            int *, int *, int *, int *, int *,
                                            int *, int *);
 
-#elif GETFEM_HAVE_METIS
+#elif defined(GETFEM_HAVE_METIS)
 # include <metis.h>
 #endif
 
diff --git a/src/getfem/getfem_config.h b/src/getfem/getfem_config.h
index 64bd5e1d..ef0aba89 100644
--- a/src/getfem/getfem_config.h
+++ b/src/getfem/getfem_config.h
@@ -167,7 +167,7 @@
 #define GETFEM_MPI_INIT(argc, argv) {GMM_TRACE1("Running sequential Getfem");}
 #define GETFEM_MPI_FINALIZE {}
 
-#if GMM_USES_MPI > 0
+#if defined(GMM_USES_MPI)
 # include <mpi.h>
 
 # undef GMM_TRACE_MSG_MPI
diff --git a/src/getfem_mesh.cc b/src/getfem_mesh.cc
index ecaba792..35649d99 100644
--- a/src/getfem_mesh.cc
+++ b/src/getfem_mesh.cc
@@ -25,10 +25,10 @@
 #include "getfem/getfem_mesh.h"
 #include "getfem/getfem_integration.h"
 
-#if GETFEM_HAVE_METIS_OLD_API
+#if defined(GETFEM_HAVE_METIS_OLD_API)
 extern "C" void METIS_PartGraphKway(int *, int *, int *, int *, int *, int *,
                                     int *, int *, int *, int *, int *);
-#elif GETFEM_HAVE_METIS
+#elif defined(GETFEM_HAVE_METIS)
 #  include <metis.h>
 #endif
 
diff --git a/src/gmm/gmm_std.h b/src/gmm/gmm_std.h
index c0ade0fc..bf80a473 100644
--- a/src/gmm/gmm_std.h
+++ b/src/gmm/gmm_std.h
@@ -334,7 +334,7 @@ typedef fixed_size_integer_generator<8>::uint_base_type 
uint64_type;
 #     define APIDECL
 #  endif
 #   if defined(IMPORTED_FROM_SHARED_LIB)
-#        error INTENTIONAL COMPILCATION ERROR, DLL IMPORT AND EXPORT ARE 
INCOMPITABLE
+#        error INTENTIONAL COMPILATION ERROR, DLL IMPORT AND EXPORT ARE 
INCOMPATIBLE
 #   endif
 #endif
 
@@ -345,7 +345,7 @@ typedef fixed_size_integer_generator<8>::uint_base_type 
uint64_type;
 #     define APIDECL
 #  endif
 #   if defined(EXPORTED_TO_SHARED_LIB)
-#        error INTENTIONAL COMPILCATION ERROR, DLL IMPORT AND EXPORT ARE 
INCOMPITABLE
+#        error INTENTIONAL COMPILATION ERROR, DLL IMPORT AND EXPORT ARE 
INCOMPATIBLE
 #   endif
 #endif
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]