Commits

Vijay Mahadevan committed 5fa2bd9

General cleanup of examples.

  • Participants
  • Parent commits 3b0d11e

Comments (0)

Files changed (2)

src/dm/impls/moab/examples/tutorials/ex1.cxx

 #include <petscts.h>
 #include <petscdmmoab.h>
 
-// MOAB includes:
-#if defined (PETSC_HAVE_MOAB)
-#  include <moab/Core.hpp>
-#  include <moab/ReadUtilIface.hpp>
-#  include <MBTagConventions.hpp>
-
-typedef moab::Range* MBRange;
-#else
-#error You must have MOAB for this example. Reconfigure using --download-moab
-#endif
-
-
 typedef struct {
   PetscScalar u,v;
 } Field;
 static PetscErrorCode FormIFunctionGhosted(TS,PetscReal,Vec,Vec,Vec,void*);
 static PetscErrorCode FormIFunctionGlobalBlocked(TS,PetscReal,Vec,Vec,Vec,void*);
 static PetscErrorCode FormIFunctionMOAB(TS,PetscReal,Vec,Vec,Vec,void*);
-//static PetscErrorCode FormIJacobian(TS,PetscReal,Vec,Vec,PetscReal,Mat*,Mat*,MatStructure*,void*);
 static PetscErrorCode FormIJacobian(TS,PetscReal,Vec,Vec,PetscReal,Mat,Mat,void*);
 
 /****************

src/dm/impls/moab/examples/tutorials/ex3.cxx

                       Usage: ./ex3 -bc_type dirichlet -nu .01 -n 10\n";
 
 
-// PETSc includes:
+/* PETSc includes */
 #include <petscksp.h>
 #include <petscdmmoab.h>
 
-// MOAB includes:
-#if defined (PETSC_HAVE_MOAB)
-#  include <moab/Core.hpp>
-#  include <moab/ReadUtilIface.hpp>
-#  include <MBTagConventions.hpp>
-#else
-#error You must have MOAB for this example. Reconfigure using --download-moab
-#endif
-
 #define LOCAL_ASSEMBLY
 
 const int NQPTS1D=2;
         if (dbdry[i]) {  /* dirichlet node */
           /* think about strongly imposing dirichlet */
           for (j=0; j < VPERE; ++j) {
-            array[i*VPERE+j] = 0.0;
             /* TODO: symmetrize the system - need the RHS */
-            /*
-            const PetscScalar xx=(vpos[3*q]-user->xref)*(vpos[3*q]-user->xref);
-            const PetscScalar yy=(vpos[3*q+1]-user->yref)*(vpos[3*q+1]-user->yref);
-            barray[j*VPERE] -= array[j*VPERE+i]*barray[i*VPERE];
-            array[j*VPERE+i] = 0.0;
-            */
+            array[i*VPERE+j] = 0.0;
           }
           array[i*VPERE+i] = 1.0;
         }
 *
 *    Output, PetscScalar jxw[NQPTS], the product of Jacobian of the physical element times the weights at the quadrature points.
 */
-
+#undef __FUNCT__
+#define __FUNCT__ "ComputeQuadraturePointsPhysical"
 PetscErrorCode ComputeQuadraturePointsPhysical(const PetscScalar verts[VPERE*3], PetscScalar quad[NQPTS*3], PetscScalar jxw[NQPTS])
 {
   int i,j;