[cig-commits] commit: fixed createInitialConditions for new BC's

Mercurial hg at geodynamics.org
Thu May 29 11:26:23 PDT 2008


changeset:   134:8bd7f2c080c7
tag:         tip
user:        Marc Spiegelman <mspieg at ldeo.columbia.edu>
date:        Thu May 29 14:21:23 2008 -0400
files:       example/InitialPorosity1DWave.input example/InitialPorosityGaussian.input matlab/createInitialConditions.m
description:
fixed createInitialConditions for new BC's
M   example/InitialPorosity1DWave.input
M   example/InitialPorosityGaussian.input
M   matlab/createInitialConditions.m
	added bcFlags for doubly periodic


diff -r 97635524c180 -r 8bd7f2c080c7 example/InitialPorosity1DWave.input
Binary file example/InitialPorosity1DWave.input has changed
diff -r 97635524c180 -r 8bd7f2c080c7 example/InitialPorosityGaussian.input
Binary file example/InitialPorosityGaussian.input has changed
diff -r 97635524c180 -r 8bd7f2c080c7 matlab/createInitialConditions.m
--- a/matlab/createInitialConditions.m	Thu May 29 11:36:26 2008 -0400
+++ b/matlab/createInitialConditions.m	Thu May 29 14:21:23 2008 -0400
@@ -20,6 +20,9 @@ height = 64;
 height = 64;
 xzRange = [ width height ];
 
+% assume doubly periodic initially (0 periodic, 1 dirichlet or neumann)
+bcFlags = [ 0 0 ];
+
 % multi-grid parameters
 mglevels = 5;
 ni_coarse = 8;
@@ -41,7 +44,7 @@ filename = sprintf('InitialPorosityGauss
 filename = sprintf('InitialPorosityGaussian');
 wavespeed = 2*amp-1; % scale to 1-D solitary wave speed
 
-[phi, x, z] = writeSolitaryWave2DInputFile(filename,@(x,z) initPhi2DGaussian(x,z,amp,xCenter,sigma),wavespeed,xzRange,mglevels,nCoarse);
+[phi, x, z] = writeSolitaryWave2DInputFile(filename,@(x,z) initPhi2DGaussian(x,z,amp,xCenter,sigma),wavespeed,xzRange,mglevels,nCoarse,bcFlags);
 
 if doVis
    figure;
@@ -58,7 +61,7 @@ filename = sprintf('InitialPorosity1DWav
 filename = sprintf('InitialPorosity1DWave');
 wavespeed = 7; 
 
-[phi, x, z] = writeSolitaryWave2DInputFile(filename,@(x,z) initPhi1DWave(x,z,wavespeed,xCenter(2)),wavespeed,xzRange,mglevels,nCoarse);
+[phi, x, z] = writeSolitaryWave2DInputFile(filename,@(x,z) initPhi1DWave(x,z,wavespeed,xCenter(2)),wavespeed,xzRange,mglevels,nCoarse,bcFlags);
 
 if doVis
    figure;
@@ -74,7 +77,7 @@ filename = sprintf('InitialPorosity2DWav
 filename = sprintf('InitialPorosity2DWave');
 wavespeed = 7; 
 
-[phi, x, z] = writeSolitaryWave2DInputFile(filename,@(x,z) initPhi2DWave(x,z,wavespeed,xCenter),wavespeed,xzRange,mglevels,nCoarse);
+[phi, x, z] = writeSolitaryWave2DInputFile(filename,@(x,z) initPhi2DWave(x,z,wavespeed,xCenter),wavespeed,xzRange,mglevels,nCoarse,bcFlags);
 
 if doVis
    figure;



More information about the cig-commits mailing list