Commits

Nathan Collier committed 886bcb7

minor cleanup to app codes

Comments (0)

Files changed (2)

demo/CahnHilliard3D.c

   PetscScalar      rtol = 1.0e-3;
   PetscScalar      atol = 1.0e-3;
   PetscScalar       rho = 0.9;
-  PetscScalar       dE2 = EstimateSecondDerivative(*th);
+  //PetscScalar       dE2 = EstimateSecondDerivative(*th);
   
   /* If the SNES fails, reject the step and reduce the step by the
      maximum amount */

demo/PhaseFieldCrystal2D.c

 {
   PetscErrorCode ierr;
   PetscFunctionBegin;
-  ierr = WriteSolution(U,"ch%d.dat",step);CHKERRQ(ierr);
+  ierr = WriteSolution(U,"pfc%d.dat",step);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
   user.C2[0]=600.0;user.C2[1]=200.0;
   user.C3[0]=400.0;user.C3[1]=700.0;
   user.ang[0]=-0.25*PETSC_PI; user.ang[0]=0.0; user.ang[2]=0.25*PETSC_PI;
-  user.dist=100.0;
+  user.dist=20.0;
   user.coefC=0.466;
-  user.coefq=0.1; //0.66;
+  user.coefq=0.66; 
 
   /* Set discretization options */
-  PetscInt N=64, p=3, C=PETSC_DECIDE;
+  PetscInt N=1024, p=3, C=PETSC_DECIDE;
   PetscBool output = PETSC_FALSE; 
   PetscBool monitor = PETSC_FALSE; 
   char initial[PETSC_MAX_PATH_LEN] = {0};
   ierr = PetscOptionsBool("-pfc_output","Enable output files",__FILE__,output,&output,PETSC_NULL);CHKERRQ(ierr);
   ierr = PetscOptionsBool("-pfc_monitor","Compute and show statistics of solution",__FILE__,monitor,&monitor,PETSC_NULL);CHKERRQ(ierr);
   ierr = PetscOptionsReal("-pfc_cbar","Initial atomistic density field",__FILE__,user.cbar,&user.cbar,PETSC_NULL);CHKERRQ(ierr);
-  //ierr = PetscOptionsReal("-pfc_alpha","Characteristic parameter",__FILE__,user.alpha,&user.alpha,PETSC_NULL);CHKERRQ(ierr);
   ierr = PetscOptionsReal("-pfc_g","Physical parameter",__FILE__,user.g,&user.g,PETSC_NULL);CHKERRQ(ierr);
   ierr = PetscOptionsReal("-pfc_k","Positive number",__FILE__,user.k,&user.k,PETSC_NULL);CHKERRQ(ierr);
   ierr = PetscOptionsReal("-pfc_Eps","Physical parameter",__FILE__,user.Eps,&user.Eps,PETSC_NULL);CHKERRQ(ierr);
 
   TS ts;
   ierr = IGACreateTS(iga,&ts);CHKERRQ(ierr);
-  ierr = TSSetDuration(ts,10000000,2000.0);CHKERRQ(ierr);
-  ierr = TSSetTimeStep(ts,1e-1);CHKERRQ(ierr);
+  ierr = TSSetDuration(ts,10000000,10000.0);CHKERRQ(ierr);
+  ierr = TSSetTimeStep(ts,1.);CHKERRQ(ierr);
 
   ierr = TSSetType(ts,TSALPHA);CHKERRQ(ierr);
   ierr = TSAlphaSetRadius(ts,1.0);CHKERRQ(ierr);
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.