[cig-commits] r12023 - in long/3D/Gale/trunk: . src/Gale/plugins/SurfaceProcess
walter at geodynamics.org
walter at geodynamics.org
Sun May 25 01:07:25 PDT 2008
Author: walter
Date: 2008-05-25 01:07:25 -0700 (Sun, 25 May 2008)
New Revision: 12023
Modified:
long/3D/Gale/trunk/
long/3D/Gale/trunk/src/Gale/plugins/SurfaceProcess/SurfaceProcess.c
Log:
r2193 at earth: boo | 2008-05-25 01:07:07 -0700
Make SurfaceProcess go last, because otherwise it gets overwritten by EulerDeform. Also SurfaceProcess now reads in a diffusion coefficient from the input file
Property changes on: long/3D/Gale/trunk
___________________________________________________________________
Name: svk:merge
- 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:2191
+ 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:2193
Modified: long/3D/Gale/trunk/src/Gale/plugins/SurfaceProcess/SurfaceProcess.c
===================================================================
--- long/3D/Gale/trunk/src/Gale/plugins/SurfaceProcess/SurfaceProcess.c 2008-05-25 05:02:46 UTC (rev 12022)
+++ long/3D/Gale/trunk/src/Gale/plugins/SurfaceProcess/SurfaceProcess.c 2008-05-25 08:07:25 UTC (rev 12023)
@@ -73,6 +73,10 @@
*/
#if 1
{
+ Dictionary* dictionary = galeCtx->dictionary;
+
+ double K = Dictionary_GetDouble(dictionary,
+ "diffusionCoefficient");
if( surface->topo->nDims == 1 ) {
int n_i, nx;
double *newVal;
@@ -84,14 +88,14 @@
if( n_i > 0 && n_i < nx - 1 ) {
double dx = surface->verts[n_i][0]
- surface->verts[n_i - 1][0];
-
+
newVal[n_i] = (heights[n_i - 1] - 2.0 * heights[n_i]
+ heights[n_i + 1]) / (dx * dx);
}
}
for( n_i = 0; n_i < nx; n_i++ ) {
if( n_i > 0 && n_i < nx - 1 ) {
- heights[n_i] = heights[n_i] + newVal[n_i]*dt;
+ heights[n_i] = heights[n_i] + newVal[n_i]*dt*K;
}
}
free(newVal);
@@ -126,7 +130,7 @@
}
}
for( n_i = 0; n_i < nx; n_i++ ) {
- heights[n_i] = heights[n_i] + newVal[n_i]*dt;
+ heights[n_i] = heights[n_i] + newVal[n_i]*dt*K;
}
free(newVal);
@@ -382,7 +386,9 @@
** Insert the operations into the appropriate entry points.
*/
- /* Prepend to the list of time integratee finish routines. */
+ /* Append to the list of time integratee finish routines. It
+ should come last, because EulerDeform will reset the
+ values. */
TimeIntegrator_PrependFinishEP( galeCtx->timeIntegrator,
"Gale_SurfaceProcess_Execute",
Gale_SurfaceProcess_Execute,
More information about the cig-commits
mailing list