The Higher Education and Research forge

Home My Page Projects Code Snippets Project Openings MMD
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

authoralainbastide <alain.bastide@univ-reunion.fr>
Thu, 16 Jul 2020 17:07:16 +0000 (21:07 +0400)
committeralainbastide <alain.bastide@univ-reunion.fr>
Thu, 16 Jul 2020 17:07:16 +0000 (21:07 +0400)
src/main.c
src/mmd.c
src/mmd.h
src/savedata.c

index 18dd327..21ae73b 100644 (file)
@@ -38,6 +38,7 @@ Author
 #include "listop.h"
 #include "memory.h"
 #include "dual.h"
+#include "savedata.h"
 
 
 
@@ -138,7 +139,7 @@ int main (void)
   myPrimalMesh.faceNumber = 0;//HEXAHEDRON_FACES*myPrimalMesh.cellNumber;//(myPrimalMesh.M+1) * (myPrimalMesh.N+1) * (myPrimalMesh.P+1);
   myPrimalMesh.segmentNumber = 0;//QUAD*myPrimalMesh.faceNumber;//HEXAHEDRON_SEGMENTS * myPrimalMesh.cellNumber;; //2*(myPrimalMesh.M+1) * (myPrimalMesh.N+1) * (myPrimalMesh.P+1);
   
-  setHandler(fault_handler);   
+//  setHandler(fault_handler); 
   
   myDualMesh.internalDualFacesNumber = 0;
   
@@ -188,6 +189,9 @@ int main (void)
   
   setHexahedreBoundaryFaces(&myPrimalMesh);
   
+#ifdef DEBUG
+  writeVTK(&myPrimalMesh, &myReadWriteVTK);
+#endif 
   
   warning("VOIR TO DO FILE");
   
index f54fea9..661f9b9 100644 (file)
--- a/src/mmd.c
+++ b/src/mmd.c
@@ -102,11 +102,11 @@ void setHandler(void (*handler)(int,siginfo_t *,void *))
  
 }
 
-void fault_handler(int signo, siginfo_t *info, void *extra) 
-{
-       printf("Signal %d received\n", signo);
-       abort();
-}
+//void fault_handler(int signo, siginfo_t *info, void *extra) 
+//{
+//     printf("Signal %d received\n", signo);
+//     abort();
+//}
 
 
 //void fault_handler(int signo, siginfo_t *info, void *extra) 
index eca12e4..80d1c91 100644 (file)
--- a/src/mmd.h
+++ b/src/mmd.h
@@ -77,8 +77,8 @@ typedef u_char connectivity_short;
 typedef u_int64_t connectivity_int;
 typedef u_int64_t count_int;
 
-static dataType SMALL   = 1.0E-16;
-static dataType VSMALL  = 1.0E-30;
+static const dataType SMALL   = 1.0E-16;
+static const dataType VSMALL  = 1.0E-30;
 
 
 #define ZEROVECTOR  {0.0, 0.0, 0.0}
@@ -163,7 +163,7 @@ struct primalMesh {
     // Surfaces
     connectivity_int **     faces;
     connectivity_int **     cellToFaces;
-    connectivity_short      cellToFacesNumber;
+    connectivity_short *     cellToFacesNumber;
     connectivity_int **     cellToFacesOwner;
     connectivity_int **     cellToFacesNeighbour;
     connectivity_short *    cellToFacesOwnerNumber;
index c55c746..d7616cd 100644 (file)
@@ -75,7 +75,7 @@ void writeVTK(struct primalMesh * myPrimalMesh, struct readWriteVTK * myReadWrit
   for (connectivity_int i=0;i<myPrimalMesh->cellNumber;i++)
     {
       
-      fprintf(myReadWriteVTK->handle,"%ld ",myPrimalMesh->cellToVertexNumber[i]);
+      fprintf(myReadWriteVTK->handle,"%d ",myPrimalMesh->cellToVertexNumber[i]);
       for (connectivity_int j=0;j<myPrimalMesh->cellToVertexNumber[i];j++)
         fprintf(myReadWriteVTK->handle,"%ld ",myPrimalMesh->cellToVertex[i][j]);
       fprintf(myReadWriteVTK->handle,"\n");