From 30478303a85a05807d932e0463bc0f4db325075f Mon Sep 17 00:00:00 2001
From: odemirel <odemirel@7c7fe9aa-52eb-4d9e-b0a8-ba7d787348e9>
Date: Tue, 27 Apr 2010 14:01:47 +0000
Subject: [PATCH] ppm_module_data_mesh removed because of redundant
 duplication. (see ticket #75) related files are updated accordingly compiled
 using gnu and intel compilers maxwell client will be used to see if further
 changes needed

git-svn-id: https://ppm.inf.ethz.ch/svn/ppmnumerics/branches/ngtopo/libppmnumerics@611 7c7fe9aa-52eb-4d9e-b0a8-ba7d787348e9
---
 src/ppm_fdsolver_init.f               |   2 +-
 src/ppm_fdsolver_solve_2d.f           |   2 +-
 src/ppm_fdsolver_solve_3d.f           |   2 +-
 src/ppm_gmm_cpt.f                     |   2 +-
 src/ppm_gmm_extend.f                  |   2 +-
 src/ppm_gmm_extend_bkwd.f             |   2 +-
 src/ppm_gmm_extend_fwd.f              |   2 +-
 src/ppm_gmm_init.f                    |   2 +-
 src/ppm_gmm_kickoff.f                 |   2 +-
 src/ppm_gmm_march.f                   |   2 +-
 src/ppm_gmm_march_bkwd.f              |   2 +-
 src/ppm_gmm_march_fwd.f               |   2 +-
 src/ppm_gmm_reinitialize.f            |   2 +-
 src/ppm_hamjac_ext_3d.f               |   2 +-
 src/ppm_hamjac_ext_step_3d.f          |   2 +-
 src/ppm_hamjac_reinit_2d.f            |   2 +-
 src/ppm_hamjac_reinit_3d.f            |   2 +-
 src/ppm_hamjac_reinit_loc_3d.f        |   2 +-
 src/ppm_hamjac_reinit_loc_step_3d.f   |   2 +-
 src/ppm_hamjac_reinit_ref_3d.f        |   2 +-
 src/ppm_hamjac_reinit_russo_3d.f      |   2 +-
 src/ppm_hamjac_reinit_russo_step_3d.f |   2 +-
 src/ppm_hamjac_reinit_step_2d.f       |   2 +-
 src/ppm_hamjac_reinit_step_3d.f       |   2 +-
 src/ppm_hamjac_reinit_step_ref_3d.f   |   2 +-
 src/ppm_mg_init.f                     |  20 ++--
 src/ppm_mg_res_coarse.f               |   2 +-
 src/ppm_mg_res_fine.f                 |   2 +-
 src/ppm_mg_smooth_coarse.f            |   2 +-
 src/ppm_mg_smooth_fine.f              |   2 +-
 src/ppm_mg_solv.f                     |  72 +++++-------
 src/ppm_module_data_mesh.f            | 156 --------------------------
 32 files changed, 70 insertions(+), 236 deletions(-)
 delete mode 100644 src/ppm_module_data_mesh.f

diff --git a/src/ppm_fdsolver_init.f b/src/ppm_fdsolver_init.f
index eafb838..2dd3b65 100644
--- a/src/ppm_fdsolver_init.f
+++ b/src/ppm_fdsolver_init.f
@@ -138,7 +138,7 @@
       !  Modules
       !-------------------------------------------------------------------------
       USE ppm_module_data
-      USE ppm_module_data_mesh
+      
       USE ppm_module_mktopo
       USE ppm_module_typedef
       USE ppm_module_data_fieldsolver
diff --git a/src/ppm_fdsolver_solve_2d.f b/src/ppm_fdsolver_solve_2d.f
index 3c1fde2..a0286b4 100644
--- a/src/ppm_fdsolver_solve_2d.f
+++ b/src/ppm_fdsolver_solve_2d.f
@@ -182,7 +182,7 @@
       !  Modules
       !-------------------------------------------------------------------------
       USE ppm_module_data
-      USE ppm_module_data_mesh
+      
       USE ppm_module_substart
       USE ppm_module_substop
       USE ppm_module_write
diff --git a/src/ppm_fdsolver_solve_3d.f b/src/ppm_fdsolver_solve_3d.f
index 49bd31c..023acef 100644
--- a/src/ppm_fdsolver_solve_3d.f
+++ b/src/ppm_fdsolver_solve_3d.f
@@ -231,7 +231,7 @@
       !  Modules
       !-------------------------------------------------------------------------
       USE ppm_module_data
-      USE ppm_module_data_mesh
+      
       USE ppm_module_mktopo
       USE ppm_module_mesh_define
       USE ppm_module_fdsolver_map
diff --git a/src/ppm_gmm_cpt.f b/src/ppm_gmm_cpt.f
index 3c776cf..45bf371 100644
--- a/src/ppm_gmm_cpt.f
+++ b/src/ppm_gmm_cpt.f
@@ -34,7 +34,7 @@
       !  Modules 
       !-------------------------------------------------------------------------
       USE ppm_module_data
-      USE ppm_module_data_mesh
+      
       USE ppm_module_data_gmm
       USE ppm_module_gmm_kickoff
       USE ppm_module_substart
diff --git a/src/ppm_gmm_extend.f b/src/ppm_gmm_extend.f
index be93c7e..39633ae 100644
--- a/src/ppm_gmm_extend.f
+++ b/src/ppm_gmm_extend.f
@@ -95,7 +95,7 @@
       !  Modules 
       !-------------------------------------------------------------------------
       USE ppm_module_data
-      USE ppm_module_data_mesh
+      
       USE ppm_module_data_gmm
       USE ppm_module_gmm_init
       USE ppm_module_gmm_cpt
diff --git a/src/ppm_gmm_extend_bkwd.f b/src/ppm_gmm_extend_bkwd.f
index 000a3ca..ab20544 100644
--- a/src/ppm_gmm_extend_bkwd.f
+++ b/src/ppm_gmm_extend_bkwd.f
@@ -32,7 +32,7 @@
       !  Modules 
       !-------------------------------------------------------------------------
       USE ppm_module_data
-      USE ppm_module_data_mesh
+      
       USE ppm_module_data_gmm
       USE ppm_module_substart
       USE ppm_module_substop
diff --git a/src/ppm_gmm_extend_fwd.f b/src/ppm_gmm_extend_fwd.f
index fc0c3fa..454223d 100644
--- a/src/ppm_gmm_extend_fwd.f
+++ b/src/ppm_gmm_extend_fwd.f
@@ -32,7 +32,7 @@
       !  Modules 
       !-------------------------------------------------------------------------
       USE ppm_module_data
-      USE ppm_module_data_mesh
+      
       USE ppm_module_data_gmm
       USE ppm_module_substart
       USE ppm_module_substop
diff --git a/src/ppm_gmm_init.f b/src/ppm_gmm_init.f
index c5d2539..aba8414 100644
--- a/src/ppm_gmm_init.f
+++ b/src/ppm_gmm_init.f
@@ -17,7 +17,7 @@
       !-------------------------------------------------------------------------
       USE ppm_module_data
       USE ppm_module_data_gmm
-      USE ppm_module_data_mesh
+      
       USE ppm_module_error
       USE ppm_module_typedef
       IMPLICIT NONE
diff --git a/src/ppm_gmm_kickoff.f b/src/ppm_gmm_kickoff.f
index 3e91839..e82f328 100644
--- a/src/ppm_gmm_kickoff.f
+++ b/src/ppm_gmm_kickoff.f
@@ -59,7 +59,7 @@
       !  Modules 
       !-------------------------------------------------------------------------
       USE ppm_module_data
-      USE ppm_module_data_mesh
+      
       USE ppm_module_data_gmm
       USE ppm_module_substart
       USE ppm_module_substop
diff --git a/src/ppm_gmm_march.f b/src/ppm_gmm_march.f
index ae8f11f..3ab930e 100644
--- a/src/ppm_gmm_march.f
+++ b/src/ppm_gmm_march.f
@@ -60,7 +60,7 @@
       !  Modules
       !-------------------------------------------------------------------------
       USE ppm_module_data
-      USE ppm_module_data_mesh
+      
       USE ppm_module_data_gmm
       USE ppm_module_gmm_march_fwd
       USE ppm_module_gmm_march_bkwd
diff --git a/src/ppm_gmm_march_bkwd.f b/src/ppm_gmm_march_bkwd.f
index 8ebfadc..3c1d149 100644
--- a/src/ppm_gmm_march_bkwd.f
+++ b/src/ppm_gmm_march_bkwd.f
@@ -32,7 +32,7 @@
       !  Modules 
       !-------------------------------------------------------------------------
       USE ppm_module_data
-      USE ppm_module_data_mesh
+      
       USE ppm_module_data_gmm
       USE ppm_module_typedef
       USE ppm_module_substart
diff --git a/src/ppm_gmm_march_fwd.f b/src/ppm_gmm_march_fwd.f
index 7450ec3..67db1aa 100644
--- a/src/ppm_gmm_march_fwd.f
+++ b/src/ppm_gmm_march_fwd.f
@@ -32,7 +32,7 @@
       !  Modules 
       !-------------------------------------------------------------------------
       USE ppm_module_data
-      USE ppm_module_data_mesh
+      
       USE ppm_module_data_gmm
       USE ppm_module_substart
       USE ppm_module_substop
diff --git a/src/ppm_gmm_reinitialize.f b/src/ppm_gmm_reinitialize.f
index 0aa7983..3cbf198 100644
--- a/src/ppm_gmm_reinitialize.f
+++ b/src/ppm_gmm_reinitialize.f
@@ -38,7 +38,7 @@
       !  Modules 
       !-------------------------------------------------------------------------
       USE ppm_module_data
-      USE ppm_module_data_mesh
+      
       USE ppm_module_data_gmm
       USE ppm_module_gmm_init
       USE ppm_module_gmm_kickoff
diff --git a/src/ppm_hamjac_ext_3d.f b/src/ppm_hamjac_ext_3d.f
index 0973333..f1b35f0 100644
--- a/src/ppm_hamjac_ext_3d.f
+++ b/src/ppm_hamjac_ext_3d.f
@@ -57,7 +57,7 @@
       !  Modules 
       !-------------------------------------------------------------------------
         USE ppm_module_data
-        USE ppm_module_data_mesh
+        
         USE ppm_module_substart
         USE ppm_module_substop
         USE ppm_module_error
diff --git a/src/ppm_hamjac_ext_step_3d.f b/src/ppm_hamjac_ext_step_3d.f
index 733cd5e..8da44b7 100644
--- a/src/ppm_hamjac_ext_step_3d.f
+++ b/src/ppm_hamjac_ext_step_3d.f
@@ -54,7 +54,7 @@
 #endif
 #endif
         USE ppm_module_data
-        USE ppm_module_data_mesh
+        
         USE ppm_module_substart
         USE ppm_module_substop
         USE ppm_module_error
diff --git a/src/ppm_hamjac_reinit_2d.f b/src/ppm_hamjac_reinit_2d.f
index 1eeeb01..925ce53 100644
--- a/src/ppm_hamjac_reinit_2d.f
+++ b/src/ppm_hamjac_reinit_2d.f
@@ -45,7 +45,7 @@
 #endif
 
         USE ppm_module_data
-        USE ppm_module_data_mesh
+        
         USE ppm_module_error
         USE ppm_module_write
         USE ppm_module_substart
diff --git a/src/ppm_hamjac_reinit_3d.f b/src/ppm_hamjac_reinit_3d.f
index 9dad18d..a887016 100644
--- a/src/ppm_hamjac_reinit_3d.f
+++ b/src/ppm_hamjac_reinit_3d.f
@@ -54,7 +54,7 @@
 #endif
 
         USE ppm_module_data
-        USE ppm_module_data_mesh
+        
         USE ppm_module_error
         USE ppm_module_write
         USE ppm_module_substart
diff --git a/src/ppm_hamjac_reinit_loc_3d.f b/src/ppm_hamjac_reinit_loc_3d.f
index 9878e44..c3ccc86 100644
--- a/src/ppm_hamjac_reinit_loc_3d.f
+++ b/src/ppm_hamjac_reinit_loc_3d.f
@@ -54,7 +54,7 @@
 #endif
 
         USE ppm_module_data
-        USE ppm_module_data_mesh
+        
         USE ppm_module_error
         USE ppm_module_write
         USE ppm_module_substart
diff --git a/src/ppm_hamjac_reinit_loc_step_3d.f b/src/ppm_hamjac_reinit_loc_step_3d.f
index d1b449d..9dc4c7a 100644
--- a/src/ppm_hamjac_reinit_loc_step_3d.f
+++ b/src/ppm_hamjac_reinit_loc_step_3d.f
@@ -53,7 +53,7 @@
 #endif
 
         USE ppm_module_data
-        USE ppm_module_data_mesh
+        
         USE ppm_module_error
         USE ppm_module_substart
         USE ppm_module_substop
diff --git a/src/ppm_hamjac_reinit_ref_3d.f b/src/ppm_hamjac_reinit_ref_3d.f
index 8d822bf..4734d4b 100644
--- a/src/ppm_hamjac_reinit_ref_3d.f
+++ b/src/ppm_hamjac_reinit_ref_3d.f
@@ -45,7 +45,7 @@
 #endif
 
         USE ppm_module_data
-        USE ppm_module_data_mesh
+        
         USE ppm_module_error
         USE ppm_module_write
         USE ppm_module_substart
diff --git a/src/ppm_hamjac_reinit_russo_3d.f b/src/ppm_hamjac_reinit_russo_3d.f
index b4f9d1f..e00e29d 100644
--- a/src/ppm_hamjac_reinit_russo_3d.f
+++ b/src/ppm_hamjac_reinit_russo_3d.f
@@ -45,7 +45,7 @@
 #endif
 
         USE ppm_module_data
-        USE ppm_module_data_mesh
+        
         USE ppm_module_error
         USE ppm_module_write
         USE ppm_module_substart
diff --git a/src/ppm_hamjac_reinit_russo_step_3d.f b/src/ppm_hamjac_reinit_russo_step_3d.f
index 079b6fc..212cf76 100644
--- a/src/ppm_hamjac_reinit_russo_step_3d.f
+++ b/src/ppm_hamjac_reinit_russo_step_3d.f
@@ -45,7 +45,7 @@
 #endif
 
         USE ppm_module_data
-        USE ppm_module_data_mesh
+        
         USE ppm_module_error
         USE ppm_module_substart
         USE ppm_module_substop
diff --git a/src/ppm_hamjac_reinit_step_2d.f b/src/ppm_hamjac_reinit_step_2d.f
index cce894a..3edac69 100644
--- a/src/ppm_hamjac_reinit_step_2d.f
+++ b/src/ppm_hamjac_reinit_step_2d.f
@@ -44,7 +44,7 @@
 #endif
 
         USE ppm_module_data
-        USE ppm_module_data_mesh
+        
         USE ppm_module_error
         USE ppm_module_substart
         USE ppm_module_substop
diff --git a/src/ppm_hamjac_reinit_step_3d.f b/src/ppm_hamjac_reinit_step_3d.f
index c21f053..e67a95b 100644
--- a/src/ppm_hamjac_reinit_step_3d.f
+++ b/src/ppm_hamjac_reinit_step_3d.f
@@ -53,7 +53,7 @@
 #endif
 
         USE ppm_module_data
-        USE ppm_module_data_mesh
+        
         USE ppm_module_error
         USE ppm_module_substart
         USE ppm_module_substop
diff --git a/src/ppm_hamjac_reinit_step_ref_3d.f b/src/ppm_hamjac_reinit_step_ref_3d.f
index 6c65762..70168f0 100644
--- a/src/ppm_hamjac_reinit_step_ref_3d.f
+++ b/src/ppm_hamjac_reinit_step_ref_3d.f
@@ -48,7 +48,7 @@
 #endif
 
         USE ppm_module_data
-        USE ppm_module_data_mesh
+        
         USE ppm_module_error
         USE ppm_module_substart
         USE ppm_module_substop
diff --git a/src/ppm_mg_init.f b/src/ppm_mg_init.f
index 647fd3a..cf4fb73 100644
--- a/src/ppm_mg_init.f
+++ b/src/ppm_mg_init.f
@@ -149,7 +149,7 @@
          !  Modules 
          !----------------------------------------------------------------------
          USE ppm_module_data
-         USE ppm_module_data_mesh
+         
          USE ppm_module_data_mg
          USE ppm_module_mg_alloc
          USE ppm_module_alloc
@@ -908,9 +908,9 @@
                ldl3(1) = 1-ghostsize(1)
                ldl3(2) = 1-ghostsize(2)
                ldl3(3) = 1-ghostsize(3)
-               ldu3(1) = ppm_cart_mesh(meshid,topoid)%nnodes(1,idom)+ghostsize(1)
-               ldu3(2) = ppm_cart_mesh(meshid,topoid)%nnodes(2,idom)+ghostsize(2)
-               ldu3(3) = ppm_cart_mesh(meshid,topoid)%nnodes(3,idom)+ghostsize(3)
+               ldu3(1) = mesh%nnodes(1,idom)+ghostsize(1)
+               ldu3(2) = mesh%nnodes(2,idom)+ghostsize(2)
+               ldu3(3) = mesh%nnodes(3,idom)+ghostsize(3)
                CALL ppm_alloc(mgfield(i,mlev)%uc,ldl3,ldu3,iopt,info)
                IF (info .NE. 0) THEN
                   info = ppm_error_fatal
@@ -921,9 +921,9 @@
                tuc=>mgfield(i,mlev)%uc
                tuc=0.0_MK              
                iopt = ppm_param_alloc_fit
-               ldu3(1) = ppm_cart_mesh(meshid,topoid)%nnodes(1,idom)
-               ldu3(2) = ppm_cart_mesh(meshid,topoid)%nnodes(2,idom)
-               ldu3(3) = ppm_cart_mesh(meshid,topoid)%nnodes(3,idom)
+               ldu3(1) = mesh%nnodes(1,idom)
+               ldu3(2) = mesh%nnodes(2,idom)
+               ldu3(3) = mesh%nnodes(3,idom)
                CALL ppm_alloc(mgfield(i,mlev)%fc,ldu3,iopt,info)
                IF (info .NE. 0) THEN
                   info = ppm_error_fatal
@@ -936,9 +936,9 @@
                ldl3(1) = 1-ghostsize(1)
                ldl3(2) = 1-ghostsize(2)
                ldl3(3) = 1-ghostsize(3)
-               ldu3(1) = ppm_cart_mesh(meshid,topoid)%nnodes(1,idom)+ghostsize(1)
-               ldu3(2) = ppm_cart_mesh(meshid,topoid)%nnodes(2,idom)+ghostsize(2)
-               ldu3(3) = ppm_cart_mesh(meshid,topoid)%nnodes(3,idom)+ghostsize(3)
+               ldu3(1) = mesh%nnodes(1,idom)+ghostsize(1)
+               ldu3(2) = mesh%nnodes(2,idom)+ghostsize(2)
+               ldu3(3) = mesh%nnodes(3,idom)+ghostsize(3)
                CALL ppm_alloc(mgfield(i,mlev)%err,ldl3,ldu3,iopt,info)
                IF (info .NE. 0) THEN
                   info = ppm_error_fatal
diff --git a/src/ppm_mg_res_coarse.f b/src/ppm_mg_res_coarse.f
index df1139e..bfe6d1f 100644
--- a/src/ppm_mg_res_coarse.f
+++ b/src/ppm_mg_res_coarse.f
@@ -90,7 +90,7 @@
         !-----------------------------------------------------------------------
         USE ppm_module_data
         USE ppm_module_data_mg
-        USE ppm_module_data_mesh
+        
         USE ppm_module_substart
         USE ppm_module_substop
         USE ppm_module_error
diff --git a/src/ppm_mg_res_fine.f b/src/ppm_mg_res_fine.f
index e8d82e9..c29375e 100644
--- a/src/ppm_mg_res_fine.f
+++ b/src/ppm_mg_res_fine.f
@@ -87,7 +87,7 @@
         !-----------------------------------------------------------------------
         USE ppm_module_data
         USE ppm_module_data_mg
-        USE ppm_module_data_mesh
+        
         USE ppm_module_substart
         USE ppm_module_substop
         USE ppm_module_error
diff --git a/src/ppm_mg_smooth_coarse.f b/src/ppm_mg_smooth_coarse.f
index e9f6f62..2c7afdb 100644
--- a/src/ppm_mg_smooth_coarse.f
+++ b/src/ppm_mg_smooth_coarse.f
@@ -120,7 +120,7 @@
          USE ppm_module_error
          USE ppm_module_alloc
          USE ppm_module_map
-         USE ppm_module_data_mesh
+         
          IMPLICIT NONE
 #if    __KIND == __SINGLE_PRECISION
          INTEGER, PARAMETER :: MK = ppm_kind_single
diff --git a/src/ppm_mg_smooth_fine.f b/src/ppm_mg_smooth_fine.f
index 0ccef03..7bbaafb 100644
--- a/src/ppm_mg_smooth_fine.f
+++ b/src/ppm_mg_smooth_fine.f
@@ -114,7 +114,7 @@
          USE ppm_module_error
          USE ppm_module_alloc
          USE ppm_module_map
-         USE ppm_module_data_mesh
+         
          IMPLICIT NONE
 #if    __KIND == __SINGLE_PRECISION
          INTEGER, PARAMETER :: MK = ppm_kind_single
diff --git a/src/ppm_mg_solv.f b/src/ppm_mg_solv.f
index ef0adce..9f57ebd 100644
--- a/src/ppm_mg_solv.f
+++ b/src/ppm_mg_solv.f
@@ -121,7 +121,7 @@
          !----------------------------------------------------------------------
         USE ppm_module_data
         USE ppm_module_data_mg
-        USE ppm_module_data_mesh
+        
         USE ppm_module_substart
         USE ppm_module_substop
         USE ppm_module_error
@@ -183,6 +183,7 @@
          REAL(MK)                             :: gEu 
          INTEGER                              :: MPI_PREC
          TYPE(ppm_t_topo),      POINTER       :: topo
+         TYPE(ppm_t_equi_mesh), POINTER       :: mesh
 #if __MESH_DIM == __3D
          REAL(MK)                             :: c5,dz,rdz2
          INTEGER,DIMENSION(4)                 :: ldl4,ldu4
@@ -267,6 +268,7 @@
         ENDIF
 #endif
 		topo => ppm_topo(topo_id)%t
+		mesh => topo%mesh(meshid_g(1))
         !----------------------------------------------------------------------
         !  Check arguments
         !----------------------------------------------------------------------
@@ -282,15 +284,15 @@
            topoid=topo_id
            DO i=1,nsubs
               idom=topo%isublist(i)
-              IF (SIZE(u(:,:,i),1).LT.ppm_cart_mesh(meshid_g(1),  &
-     &           topoid)%nnodes(1,idom)+2*ghostsize(1)) THEN
+              IF (SIZE(u(:,:,i),1).LT.mesh%nnodes(1,idom)+ &
+     &                                              2*ghostsize(1)) THEN
                  info = ppm_error_error
                  CALL ppm_error(ppm_err_argument,'ppm_mg_solv',  &
      &             'solution mess with mesh points in x-dir!',__LINE__,info)  
                  GOTO 9999    
               ENDIF
-              IF (SIZE(u(:,:,i),2).LT.ppm_cart_mesh(meshid_g(1),  &
-     &           topoid)%nnodes(2,idom)+2*ghostsize(2)) THEN
+              IF (SIZE(u(:,:,i),2).LT.mesh%nnodes(2,idom) &
+     &                                             +2*ghostsize(2)) THEN
                  info = ppm_error_error
                  CALL ppm_error(ppm_err_argument,'ppm_mg_solv',  &
      &             'solution mess with mesh points in y-dir!',__LINE__,info)
@@ -306,15 +308,13 @@
            topoid=topo_id
            DO i=1,nsubs
               idom=topo%isublist(i)
-              IF (SIZE(f(:,:,i),1).LT.ppm_cart_mesh(meshid_g(1),  &
-     &                                  topoid)%nnodes(1,idom)) THEN
+              IF (SIZE(f(:,:,i),1).LT. mesh%nnodes(1,idom)) THEN
                  info = ppm_error_error
                  CALL ppm_error(ppm_err_argument,'ppm_mg_solv',  &
      &             'rhs mess with mesh points in x-dir!',__LINE__,info)
                  GOTO 9999
               ENDIF
-              IF (SIZE(f(:,:,i),2).LT.ppm_cart_mesh(meshid_g(1),  &
-     &           topoid)%nnodes(2,idom)) THEN
+              IF (SIZE(f(:,:,i),2).LT. mesh%nnodes(2,idom)) THEN
                  info = ppm_error_error
                  CALL ppm_error(ppm_err_argument,'ppm_mg_solv',  &
      &             'rhs mess with mesh points in y-dir!',__LINE__,info)
@@ -331,22 +331,22 @@
            topoid=topo_id
            DO i=1,nsubs
               idom=topo%isublist(i)
-              IF (SIZE(u(:,:,:,i),1).LT.ppm_cart_mesh(meshid_g(1),  &
-     &                                   topoid)%nnodes(1,idom)+2*ghostsize(1)) THEN
+              IF (SIZE(u(:,:,:,i),1).LT.mesh%nnodes(1,idom)+ &
+     &                                              2*ghostsize(1)) THEN
                  info = ppm_error_error
                  CALL ppm_error(ppm_err_argument,'ppm_mg_solv',  &
      &             'solution mess with mesh points in x-dir!',__LINE__,info)  
                  GOTO 9999    
               ENDIF
-              IF (SIZE(u(:,:,:,i),2).LT.ppm_cart_mesh(meshid_g(1),  &
-     &           topoid)%nnodes(2,idom)+2*ghostsize(2)) THEN
+              IF (SIZE(u(:,:,:,i),2).LT.mesh%nnodes(2,idom)+ &
+     &                                              2*ghostsize(1)) THEN
                  info = ppm_error_error
                  CALL ppm_error(ppm_err_argument,'ppm_mg_solv',  &
      &             'solution mess with mesh points in y-dir!',__LINE__,info)
                  GOTO 9999
               ENDIF
-              IF (SIZE(u(:,:,:,i),3).LT.ppm_cart_mesh(meshid_g(1),  &
-     &                                   topoid)%nnodes(3,idom)+2*ghostsize(3)) THEN
+              IF (SIZE(u(:,:,:,i),3).LT.mesh%nnodes(3,idom)+ &
+     &                                              2*ghostsize(1)) THEN
                  info = ppm_error_error
                  CALL ppm_error(ppm_err_argument,'ppm_mg_solv',  &
      &             'solution mess with mesh points in z-dir!',__LINE__,info)
@@ -362,22 +362,19 @@
            topoid=topo_id
            DO i=1,nsubs
               idom=topo%isublist(i)
-              IF (SIZE(f(:,:,:,i),1).LT.ppm_cart_mesh(meshid_g(1),  &
-     &                                    topoid)%nnodes(1,idom)) THEN
+              IF (SIZE(f(:,:,:,i),1).LT.mesh%nnodes(1,idom)) THEN
                  info = ppm_error_error
                  CALL ppm_error(ppm_err_argument,'ppm_mg_solv',  &
      &                   'rhs mess with mesh points in x-dir!',__LINE__,info)
                  GOTO 9999
               ENDIF
-              IF (SIZE(f(:,:,:,i),2).LT.ppm_cart_mesh(meshid_g(1),  &
-     &                                          topoid)%nnodes(2,idom)) THEN
+              IF (SIZE(f(:,:,:,i),2).LT.mesh%nnodes(2,idom)) THEN
                  info = ppm_error_error
                  CALL ppm_error(ppm_err_argument,'ppm_mg_solv',  &
      &            'rhs mess with mesh points in y-dir!',__LINE__,info)
                  GOTO 9999
               ENDIF
-              IF (SIZE(f(:,:,:,i),3).LT.ppm_cart_mesh(meshid_g(1),  &
-     &                                         topoid)%nnodes(3,idom)) THEN
+              IF (SIZE(f(:,:,:,i),3).LT.mesh%nnodes(3,idom)) THEN
                  info = ppm_error_error
                  CALL ppm_error(ppm_err_argument,'ppm_mg_solv',  &
      &             'rhs mess with mesh points in z-dir!',__LINE__,info)
@@ -396,15 +393,13 @@
            topoid=topo_id
            DO i=1,nsubs
               idom=topo%isublist(i)
-              IF (SIZE(u(:,:,:,i),2).LT.ppm_cart_mesh(meshid_g(1),  &
-     &           topoid)%nnodes(1,idom)+2) THEN
+              IF (SIZE(u(:,:,:,i),2).LT.mesh%nnodes(1,idom)+2) THEN
                  info = ppm_error_error
                  CALL ppm_error(ppm_err_argument,'ppm_mg_solv',  &
      &             'solution mess with mesh points in x-dir!',__LINE__,info)  
                  GOTO 9999    
               ENDIF
-              IF (SIZE(u(:,:,:,i),3).LT.ppm_cart_mesh(meshid_g(1),  &
-     &           topoid)%nnodes(2,idom)+2) THEN
+              IF (SIZE(u(:,:,:,i),3).LT.mesh%nnodes(2,idom)+2) THEN
                  info = ppm_error_error
                  CALL ppm_error(ppm_err_argument,'ppm_mg_solv',  &
      &             'solution mess with mesh points in y-dir!',__LINE__,info)
@@ -420,15 +415,13 @@
            topoid=topo_id
            DO i=1,nsubs
               idom=topo%isublist(i)
-              IF (SIZE(f(:,:,:,i),2).LT.ppm_cart_mesh(meshid_g(1),  &
-     &                                  topoid)%nnodes(1,idom)) THEN
+              IF (SIZE(f(:,:,:,i),2).LT.mesh%nnodes(1,idom)) THEN
                  info = ppm_error_error
                  CALL ppm_error(ppm_err_argument,'ppm_mg_solv',  &
      &             'rhs mess with mesh points in x-dir!',__LINE__,info)
                  GOTO 9999
               ENDIF
-              IF (SIZE(f(:,:,:,i),3).LT.ppm_cart_mesh(meshid_g(1),  &
-     &           topoid)%nnodes(2,idom)) THEN
+              IF (SIZE(f(:,:,:,i),3).LT.mesh%nnodes(2,idom)) THEN
                  info = ppm_error_error
                  CALL ppm_error(ppm_err_argument,'ppm_mg_solv',  &
      &             'rhs mess with mesh points in y-dir!',__LINE__,info)
@@ -445,22 +438,22 @@
            topoid=topo_id
            DO i=1,nsubs
               idom=topo%isublist(i)
-              IF (SIZE(u(:,:,:,:,i),2).LT.ppm_cart_mesh(meshid_g(1),  &
-     &                                   topoid)%nnodes(1,idom)+2*ghostsize(1)) THEN
+              IF (SIZE(u(:,:,:,:,i),2).LT.mesh%nnodes(1,idom)+ &
+     &                                              2*ghostsize(1)) THEN
                  info = ppm_error_error
                  CALL ppm_error(ppm_err_argument,'ppm_mg_solv',  &
      &             'solution mess with mesh points in x-dir!',__LINE__,info)  
                  GOTO 9999    
               ENDIF
-              IF (SIZE(u(:,:,:,:,i),3).LT.ppm_cart_mesh(meshid_g(1),  &
-     &           topoid)%nnodes(2,idom)+2*ghostsize(2)) THEN
+              IF (SIZE(u(:,:,:,:,i),3).LT.mesh%nnodes(2,idom)+ &
+     &                                              2*ghostsize(1)) THEN
                  info = ppm_error_error
                  CALL ppm_error(ppm_err_argument,'ppm_mg_solv',  &
      &             'solution mess with mesh points in y-dir!',__LINE__,info)
                  GOTO 9999
               ENDIF
-              IF (SIZE(u(:,:,:,:,i),4).LT.ppm_cart_mesh(meshid_g(1),  &
-     &                                   topoid)%nnodes(3,idom)+2*ghostsize(3)) THEN
+              IF (SIZE(u(:,:,:,:,i),4).LT.mesh%nnodes(3,idom)+ &
+     &                                              2*ghostsize(1)) THEN
                  info = ppm_error_error
                  CALL ppm_error(ppm_err_argument,'ppm_mg_solv',  &
      &             'solution mess with mesh points in z-dir!',__LINE__,info)
@@ -476,22 +469,19 @@
            topoid=topo_id
            DO i=1,nsubs
               idom=topo%isublist(i)
-              IF (SIZE(f(:,:,:,:,i),2).LT.ppm_cart_mesh(meshid_g(1),  &
-     &                                    topoid)%nnodes(1,idom)) THEN
+              IF (SIZE(f(:,:,:,:,i),2).LT.mesh%nnodes(1,idom)) THEN
                  info = ppm_error_error
                  CALL ppm_error(ppm_err_argument,'ppm_mg_solv',  &
      &                   'rhs mess with mesh points in x-dir!',__LINE__,info)
                  GOTO 9999
               ENDIF
-              IF (SIZE(f(:,:,:,:,i),3).LT.ppm_cart_mesh(meshid_g(1),  &
-     &                                          topoid)%nnodes(2,idom)) THEN
+              IF (SIZE(f(:,:,:,:,i),3).LT.mesh%nnodes(2,idom)) THEN
                  info = ppm_error_error
                  CALL ppm_error(ppm_err_argument,'ppm_mg_solv',  &
      &            'rhs mess with mesh points in y-dir!',__LINE__,info)
                  GOTO 9999
               ENDIF
-              IF (SIZE(f(:,:,:,:,i),4).LT.ppm_cart_mesh(meshid_g(1),  &
-     &                                         topoid)%nnodes(3,idom)) THEN
+              IF (SIZE(f(:,:,:,:,i),4).LT.mesh%nnodes(3,idom)) THEN
                  info = ppm_error_error
                  CALL ppm_error(ppm_err_argument,'ppm_mg_solv',  &
      &             'rhs mess with mesh points in z-dir!',__LINE__,info)
diff --git a/src/ppm_module_data_mesh.f b/src/ppm_module_data_mesh.f
deleted file mode 100644
index 77fd8a9..0000000
--- a/src/ppm_module_data_mesh.f
+++ /dev/null
@@ -1,156 +0,0 @@
-      !-------------------------------------------------------------------------
-      !  Module       :               ppm_module_data_mesh
-      !-------------------------------------------------------------------------
-      !
-      !  Purpose      : This module contains all data structures and
-      !                 definitions that are PRIVATE to the mesh routines.
-      !                 It also included those routines and provides
-      !                 INTERFACEs.
-      !                
-      !  Remarks      : The terminology distinguishes between meshes and
-      !                 fields (the data living on the meshes). Several
-      !                 fields can use the same mesh. Meshes are defined as
-      !                 ppm-internal TYPES, whereas fields are
-      !                 user-provided arrays.
-      !
-      !  References   :
-      !
-      !  Revisions    :
-      !-------------------------------------------------------------------------
-      !  $Log: ppm_module_data_mesh.f,v $
-      !  Revision 1.1.1.1  2007/07/13 10:18:57  ivos
-      !  CBL version of the PPM library
-      !
-      !  Revision 1.1  2004/07/26 07:28:18  ivos
-      !  Initial implementation. Originated from splitting the old ppm
-      !  modules.
-      !
-      !-------------------------------------------------------------------------
-      !  Perallel Particle Mesh Library (PPM)
-      !  Institute of Computational Science
-      !  ETH Zentrum, Hirschengraben 84
-      !  CH-8092 Zurich, Switzerland
-      !-------------------------------------------------------------------------
-
-      MODULE ppm_module_data_mesh
-
-         !----------------------------------------------------------------------
-         !  Mesh TYPEs
-         !----------------------------------------------------------------------
-         ! ppm-internal structure for equispaced cartesian meshes on subs
-         TYPE ppm_type_equi_mesh
-             ! topology ID (internal numbering) this mesh lives on
-             INTEGER                           :: topoid
-             ! The number of mesh NODES (not cells) in each direction in
-             ! each sub
-             INTEGER, DIMENSION(:,:), POINTER  :: nnodes
-             ! Starting indices of the mesh of this sub in the global mesh
-             INTEGER, DIMENSION(:,:), POINTER  :: istart
-             ! global number of mesh points in computational domain
-             INTEGER, DIMENSION(:  ), POINTER  :: Nm
-         END TYPE
-
-         ! mesh lists with translation between user numbering and internal
-         ! numbering of mesh IDs
-         TYPE ppm_type_mesh_list
-             ! translation from internal to user numbers
-             INTEGER, DIMENSION(:  ), POINTER  :: user
-             ! translation from user numbers to internal ones
-             INTEGER, DIMENSION(:  ), POINTER  :: internal
-         END TYPE
-
-         !----------------------------------------------------------------------
-         !  Internal meshes
-         !----------------------------------------------------------------------
-         ! first index: meshid (idea: several meshes can be defined on the same
-         ! topology at once, e.g. for multigrid solvers.), second: topoid
-         ! (internal numbering)
-         TYPE(ppm_type_equi_mesh), DIMENSION(:,:), POINTER :: ppm_cart_mesh
-         ! highest internal mesh ID available on each topology (internal
-         ! numbering)
-         INTEGER, DIMENSION(:  ), POINTER                  :: ppm_max_meshid
-         ! number translation lists (user<-->internal) for each topology
-         TYPE(ppm_type_mesh_list), DIMENSION(:  ), POINTER :: ppm_meshid
-
-         !----------------------------------------------------------------------
-         !  Mesh mapping, send and receive lists
-         !----------------------------------------------------------------------
-         ! list of source subs to send from local processor (local sub number
-         ! on source processor)
-         INTEGER, DIMENSION(:  ), POINTER          :: ppm_mesh_isendfromsub
-         ! start (lower-left corner) of mesh block to be sent in GLOBAL
-         ! mesh coordinates. First index: x,y[,z], 2nd: isendlist
-         INTEGER, DIMENSION(:,:), POINTER          :: ppm_mesh_isendblkstart
-         ! size (in grid points) of blocks to be sent
-         INTEGER, DIMENSION(:,:), POINTER          :: ppm_mesh_isendblksize
-         ! list of destination subs to recv to on local processors (local sub
-         ! number on destination processor)
-         INTEGER, DIMENSION(:  ), POINTER          :: ppm_mesh_irecvtosub
-         ! start (lower-left corner) of mesh block to be recvd in GLOBAL
-         ! mesh coordinates. First index: x,y[,z], 2nd: isendlist
-         INTEGER, DIMENSION(:,:), POINTER          :: ppm_mesh_irecvblkstart
-         ! size (in grid points) of blocks to be recvd
-         INTEGER, DIMENSION(:,:), POINTER          :: ppm_mesh_irecvblksize
-
-         ! define the target mesh id for mapping
-         INTEGER          :: ppm_target_meshid = -1
-         ! define the source mesh id for mapping
-         INTEGER          :: ppm_source_meshid = -1
-         ! define the target mesh id for the mapping 
-         ! NOTICE: NOT the same variable as the ppm_target_topoid in the
-         ! module ppm_module_map
-         INTEGER          :: ppm_target_topoid = -1
-
-         !----------------------------------------------------------------------
-         !  Mesh ghosts mappings
-         !----------------------------------------------------------------------
-         ! list of source subs of ghost mesh blocks (globel sub number).
-         ! These are the owner subs of the actual real mesh points
-         ! 1st index: meshblock ID, 2nd: meshid (internal numbering), 3rd:
-         ! topoid (internal numbering)
-         INTEGER, DIMENSION(:,:,:), POINTER            :: ppm_mesh_ghost_fromsub
-         ! list of target subs of ghost mesh blocks (globel sub number).
-         ! These are the subs a block will serve as a ghost on.
-         ! 1st index: meshblock ID, 2nd: meshid (internal numbering), 3rd:
-         ! topoid (internal numbering)
-         INTEGER, DIMENSION(:,:,:), POINTER            :: ppm_mesh_ghost_tosub
-         ! start (lower-left corner) of ghost mesh block in GLOBAL
-         ! mesh coordinates. First index: x,y[,z], 2nd: meshblock ID, 3rd:
-         ! meshid (internal numbering), 4th: topoid (internal numbering)
-         INTEGER, DIMENSION(:,:,:,:), POINTER          ::    &
-     &       ppm_mesh_ghost_blkstart
-         ! size (in grid points) of ghost blocks. 1st index: x,y[,z], 2nd:
-         ! meshblock ID, 3rd: meshid (internal numbering), 4th: topoid
-         ! (internal numbering)
-         INTEGER, DIMENSION(:,:,:,:), POINTER          :: ppm_mesh_ghost_blksize
-         ! mesh ghost block list. 1st index: target processor, 2nd: meshid
-         ! (internal numbering), 3rd: topoid (internal numbering)
-         INTEGER, DIMENSION(:,:,:)  , POINTER          :: ppm_mesh_ghost_blk
-         ! number of mesh blocks to be sent as ghosts. 1st: meshid, 2nd:
-         ! topoid (both internal numbering)
-         INTEGER, DIMENSION(:,:)    , POINTER          :: ppm_mesh_ghost_nsend
-         ! number of mesh blocks to be recvd as ghosts. 1st: meshid, 2nd:
-         ! topoid (both internal numbering)
-         INTEGER, DIMENSION(:,:)    , POINTER          :: ppm_mesh_ghost_nrecv
-         ! list of target subs for ghost mesh blocks to be received,
-         ! i.e. being ghost on the local processor (globel sub number).
-         ! These are the subs where the blocks will serve as ghosts
-         ! 1st index: meshblock ID, 2nd: meshid (internal numbering), 3rd:
-         ! topoid (internal numbering)
-         INTEGER, DIMENSION(:,:,:), POINTER            ::    &
-     &       ppm_mesh_ghost_recvtosub
-         ! start (lower-left corner) of received ghost mesh block in GLOBAL
-         ! mesh coordinates. First index: x,y[,z], 2nd: meshblock ID, 3rd:
-         ! meshid (internal numbering), 4th: topoid (internal numbering)
-         INTEGER, DIMENSION(:,:,:,:), POINTER          ::    &
-     &       ppm_mesh_ghost_recvblkstart
-         ! size (in grid points) of recvd ghost blocks. 1st index: x,y[,z], 2nd:
-         ! meshblock ID, 3rd: meshid (internal numbering), 4th: topoid
-         ! (internal numbering)
-         INTEGER, DIMENSION(:,:,:,:), POINTER          ::    &
-     &       ppm_mesh_ghost_recvblksize
-         ! mesh ghost block receive list. 1st index: target processor, 2nd: 
-         ! meshid (internal numbering), 3rd: topoid (internal numbering)
-         INTEGER, DIMENSION(:,:,:)  , POINTER          :: ppm_mesh_ghost_recvblk
-
-      END MODULE ppm_module_data_mesh
-- 
GitLab