[cig-commits] commit: Remove all fortran

Mercurial hg at geodynamics.org
Fri Feb 25 14:15:15 PST 2011


changeset:   57:bb5830394aba
user:        Walter Landry <wlandry at caltech.edu>
date:        Fri Jan 14 11:11:24 2011 -0800
files:       FACStokes/initializeLevelData.C Makefile fortran/facpoisson2d.m4 fortran/facpoisson3d.m4
description:
Remove all fortran


diff -r b5f96e19224f -r bb5830394aba FACStokes/initializeLevelData.C
--- a/FACStokes/initializeLevelData.C	Fri Jan 14 10:57:51 2011 -0800
+++ b/FACStokes/initializeLevelData.C	Fri Jan 14 11:11:24 2011 -0800
@@ -83,37 +83,15 @@ namespace SAMRAI {
         TBOX_ERROR(d_object_name
                    << ": Cannot find patch.  Null patch pointer.");
       }
-      hier::Box pbox = patch->getBox();
-      tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
-        patch->getPatchGeometry();
-
-      tbox::Pointer<pdat::CellData<double> > p_exact_data =
-        patch->getPatchData(p_exact_id);
       tbox::Pointer<pdat::CellData<double> > p_rhs_data =
         patch->getPatchData(p_rhs_id);
 
-      /*
-       * Set source function and exact solution.
-       */
-
-      F77_FUNC(setexactandrhs2d, SETEXACTANDRHS2D) (
-                                                    pbox.lower()[0],
-                                                    pbox.upper()[0],
-                                                    pbox.lower()[1],
-                                                    pbox.upper()[1],
-                                                    p_exact_data->getPointer(),
-                                                    p_rhs_data->getPointer(),
-                                                    patch_geom->getDx(),
-                                                    patch_geom->getXLower());
-
-      for(pdat::CellIterator ci(pbox); ci; ci++)
-        {
-          pdat::CellIndex c=ci();
-          (*p_rhs_data)(c)=0;
-        }
+      p_rhs_data->fill(0.0);
 
       tbox::Pointer<pdat::SideData<double> > v_rhs_data =
         patch->getPatchData(v_rhs_id);
+
+      hier::Box pbox = v_rhs_data->getBox();
 
       for(pdat::SideIterator si(pbox,0); si; si++)
         {
@@ -123,6 +101,7 @@ namespace SAMRAI {
       for(pdat::SideIterator si(pbox,1); si; si++)
         {
           pdat::SideIndex s=si();
+
           (*v_rhs_data)(s)=10;
         }
     }    // End patch loop.
diff -r b5f96e19224f -r bb5830394aba Makefile
--- a/Makefile	Fri Jan 14 10:57:51 2011 -0800
+++ b/Makefile	Fri Jan 14 11:11:24 2011 -0800
@@ -68,10 +68,9 @@ CXX_OBJS      = main.o FACStokes/FACStok
 	StokesFACSolver/setBoundaries.o \
 	StokesFACSolver/solveSystem.o \
 	StokesHypreSolver.o StokesSpecifications.o
-F_OBJS      = facpoisson2d.o facpoisson3d.o
 
-main:	$(CXX_OBJS) $(F_OBJS) $(LIBSAMRAIDEPEND)
-	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXX_OBJS) $(F_OBJS) \
+main:	$(CXX_OBJS) $(LIBSAMRAIDEPEND)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXX_OBJS) \
 	$(LIBSAMRAI3D) $(LIBSAMRAI3D) $(LIBSAMRAI) $(LDLIBS) -o main
 
 check:
@@ -125,13 +124,3 @@ redo:
 
 include $(SRCDIR)/Makefile.depend
 
-FORTRAN       = $(SRCDIR)/fortran
-M4DIRS          = -DFORTDIR=$(FORTRAN) $(SAMRAI_M4_FLAGS)
-
-facpoisson2d.o:	$(FORTRAN)/facpoisson2d.m4
-	$(M4) $(M4DIRS) $(FORTRAN)/facpoisson2d.m4 > facpoisson2d.f
-	$(F77) $(FFLAGS) -c facpoisson2d.f -o $@
-
-facpoisson3d.o:	$(FORTRAN)/facpoisson3d.m4
-	$(M4) $(M4DIRS) $(FORTRAN)/facpoisson3d.m4 > facpoisson3d.f
-	$(F77) $(FFLAGS) -c facpoisson3d.f -o $@
diff -r b5f96e19224f -r bb5830394aba fortran/facpoisson2d.m4
--- a/fortran/facpoisson2d.m4	Fri Jan 14 10:57:51 2011 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-define(NDIM,2)dnl
-define(REAL,`double precision')dnl
-include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
-
-      subroutine setexactandrhs2d(
-     &  ifirst0,ilast0,ifirst1,ilast1,
-     &  exact,rhs,dx,xlower)
-c***********************************************************************
-      implicit none
-c***********************************************************************
-c***********************************************************************     
-c input arrays:
-      integer ifirst0,ilast0,ifirst1,ilast1
-c variables in 1d axis indexed
-c
-      REAL 
-     &     dx(0:NDIM-1),
-     &     xlower(0:NDIM-1)
-c variables in 2d cell indexed         
-      REAL
-     &     exact(CELL2d(ifirst,ilast,1)),
-     &     rhs(CELL2d(ifirst,ilast,0))
-c
-c***********************************************************************     
-c
-      integer ic0,ic1
-      REAL x, y, sinsin, pi
-
-      pi=3.141592654
-
-      do ic1=ifirst1,ilast1
-        y = xlower(1) + dx(1)*(ic1-ifirst1+0.5)
-        do ic0=ifirst0,ilast0
-          x = xlower(0) + dx(0)*(ic0-ifirst0+0.5)
-          sinsin = sin(pi*x) * sin(pi*y)
-          exact(ic0,ic1) = sinsin
-          rhs(ic0,ic1) = -NDIM*pi*pi*sinsin
-        enddo
-      enddo
-
-      return
-      end   
-c
diff -r b5f96e19224f -r bb5830394aba fortran/facpoisson3d.m4
--- a/fortran/facpoisson3d.m4	Fri Jan 14 10:57:51 2011 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-define(NDIM,3)dnl
-define(REAL,`double precision')dnl
-include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
-
-      subroutine setexactandrhs3d(
-     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
-     &  exact,rhs,dx,xlower)
-c***********************************************************************
-      implicit none
-c***********************************************************************
-c***********************************************************************     
-c input arrays:
-      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
-c variables in 1d axis indexed
-c
-      REAL 
-     &     dx(0:NDIM-1),
-     &     xlower(0:NDIM-1)
-c variables in 3d cell indexed         
-      REAL
-     &     exact(CELL3d(ifirst,ilast,1)),
-     &     rhs(CELL3d(ifirst,ilast,0))
-c
-c***********************************************************************     
-c
-      integer ic0,ic1,ic2
-      REAL x, y, z, sinsin, pi
-
-      pi=3.141592654
-
-c     write(6,*) "In fluxcorrec()"
-c     ******************************************************************
-      do ic2=ifirst2,ilast2
-         z = xlower(2) + dx(2)*(ic2-ifirst2+0.5)
-         do ic1=ifirst1,ilast1
-            y = xlower(1) + dx(1)*(ic1-ifirst1+0.5)
-            do ic0=ifirst0,ilast0
-               x = xlower(0) + dx(0)*(ic0-ifirst0+0.5)
-               sinsin = sin(pi*x) * sin(pi*y) * sin(pi*z)
-               exact(ic0,ic1,ic2) = sinsin
-               rhs(ic0,ic1,ic2) = -NDIM*pi*pi*sinsin
-            enddo
-         enddo
-      enddo
-
-      return
-      end   
-c



More information about the CIG-COMMITS mailing list