[cig-commits] r6317 - in mc/3D/CitcomS/trunk: CitcomS/Components
lib module
tan2 at geodynamics.org
tan2 at geodynamics.org
Mon Mar 19 23:27:56 PDT 2007
Author: tan2
Date: 2007-03-19 23:27:56 -0700 (Mon, 19 Mar 2007)
New Revision: 6317
Modified:
mc/3D/CitcomS/trunk/CitcomS/Components/Tracer.py
mc/3D/CitcomS/trunk/lib/Full_tracer_advection.c
mc/3D/CitcomS/trunk/lib/Regional_tracer_advection.c
mc/3D/CitcomS/trunk/lib/Tracer_setup.c
mc/3D/CitcomS/trunk/lib/tracer_defs.h
mc/3D/CitcomS/trunk/module/setProperties.c
Log:
Removed the 'tracer_interpolation_scheme' and 'tracer_advection_scheme' parameters
Modified: mc/3D/CitcomS/trunk/CitcomS/Components/Tracer.py
===================================================================
--- mc/3D/CitcomS/trunk/CitcomS/Components/Tracer.py 2007-03-20 06:26:19 UTC (rev 6316)
+++ mc/3D/CitcomS/trunk/CitcomS/Components/Tracer.py 2007-03-20 06:27:56 UTC (rev 6317)
@@ -81,20 +81,6 @@
z_interface = inv.float("z_interface", default=0.7)
- # Advection Scheme
-
- # itracer_advection_scheme=1
- # (simple predictor corrector -uses only V(to))
- # itracer_advection_scheme=2
- # (predictor-corrector - uses V(to) and V(to+dt))
- tracer_advection_scheme = inv.int("tracer_advection_scheme", default=1)
-
- # Interpolation Scheme
- # itracer_interpolation_scheme=1 (gnometric projection)
- # itracer_interpolation_scheme=2 (simple average, not implemented) TODO:remove
- tracer_interpolation_scheme = inv.int("tracer_interpolation_scheme",
- default=1)
-
# Regular grid parameters
regular_grid_deltheta = inv.float("regular_grid_deltheta", default=1.0)
regular_grid_delphi = inv.float("regular_grid_delphi", default=1.0)
Modified: mc/3D/CitcomS/trunk/lib/Full_tracer_advection.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Full_tracer_advection.c 2007-03-20 06:26:19 UTC (rev 6316)
+++ mc/3D/CitcomS/trunk/lib/Full_tracer_advection.c 2007-03-20 06:27:56 UTC (rev 6317)
@@ -33,10 +33,6 @@
#include "parallel_related.h"
#include "composition_related.h"
-static void gnomonic_interpolation(struct All_variables *E,
- int j, int nelem,
- double theta, double phi, double rad,
- double *velocity_vector);
static void get_2dshape(struct All_variables *E,
int j, int nelem,
double u, double v,
@@ -103,20 +99,6 @@
int m = E->parallel.me;
- /* Interpolation Scheme */
- /* itracer_interpolation_scheme=1 (gnometric projection) */
- /* itracer_interpolation_scheme=2 (simple average) */
-
- E->trace.itracer_interpolation_scheme=1;
- input_int("tracer_interpolation_scheme",&(E->trace.itracer_interpolation_scheme),
- "1,0,nomax",m);
- if (E->trace.itracer_interpolation_scheme<1 || E->trace.itracer_interpolation_scheme>2)
- {
- fprintf(stderr,"Sorry, only interpolation scheme 1 and 2 available\n");
- fflush(stderr);
- parallel_process_termination();
- }
-
/* Regular grid parameters */
/* (first fill uniform del[0] value) */
/* (later, in make_regular_grid, will adjust and distribute to caps */
@@ -198,7 +180,7 @@
/* Fixed positions in tracer array */
/* Flavor is always in extraq position 0 */
/* Current coordinates are always kept in basicq positions 0-5 */
- /* Other positions may be used depending on advection scheme and/or science being done */
+ /* Other positions may be used depending on science being done */
/* Some error control regarding size of pointer arrays */
@@ -223,10 +205,8 @@
/* Gnometric projection for velocity interpolation */
- if (E->trace.itracer_interpolation_scheme==1) {
- define_uv_space(E);
- determine_shape_coefficients(E);
- }
+ define_uv_space(E);
+ determine_shape_coefficients(E);
/* The bounding box of neiboring processors */
@@ -993,75 +973,45 @@
/******** GET VELOCITY ***************************************/
+/********************** GNOMONIC INTERPOLATION *******************************/
+/* */
+/* This function interpolates tracer velocity using gnominic interpolation. */
+/* Real theta,phi,rad space is transformed into u,v space. This transformation */
+/* maps great circles into straight lines. Here, elements boundaries are */
+/* assumed to be great circle planes (not entirely true, it is actually only */
+/* the nodal arrangement that lies upon great circles). Element boundaries */
+/* are then mapped into planes. The element is then divided into 2 wedges */
+/* in which standard shape functions are used to interpolate velocity. */
+/* This transformation was found on the internet (refs were difficult to */
+/* to obtain). It was tested that nodal configuration is indeed transformed */
+/* into straight lines. */
+/* The transformations require a reference point along each cap. Here, the */
+/* midpoint is used. */
+/* Radial and azimuthal shape functions are decoupled. First find the shape */
+/* functions associated with the 2D surface plane, then apply radial shape */
+/* functions. */
+/* */
+/* Wedge information: */
+/* */
+/* Wedge 1 Wedge 2 */
+/* _______ _______ */
+/* */
+/* wedge_node real_node wedge_node real_node */
+/* ---------- --------- ---------- --------- */
+/* */
+/* 1 1 1 1 */
+/* 2 2 2 3 */
+/* 3 3 3 4 */
+/* 4 5 4 5 */
+/* 5 6 5 7 */
+/* 6 7 6 8 */
+
void full_get_velocity(struct All_variables *E,
int j, int nelem,
double theta, double phi, double rad,
double *velocity_vector)
{
-
- /* gnomonic projection */
-
- if (E->trace.itracer_interpolation_scheme==1)
- {
- gnomonic_interpolation(E,j,nelem,theta,phi,rad,velocity_vector);
- }
- else if (E->trace.itracer_interpolation_scheme==2)
- {
- fprintf(E->trace.fpt,"Error(get velocity)-not ready for simple average interpolation scheme\n");
- fflush(E->trace.fpt);
- exit(10);
- }
- else
- {
- fprintf(E->trace.fpt,"Error(get velocity)-not ready for other interpolation schemes\n");
- fflush(E->trace.fpt);
- exit(10);
- }
-
- return;
-}
-
-/********************** GNOMONIC INTERPOLATION *********************************/
-/* */
-/* This function interpolates tracer velocity using gnominic interpolation. */
-/* Real theta,phi,rad space is transformed into u,v space. This transformation */
-/* maps great circles into straight lines. Here, elements boundaries are */
-/* assumed to be great circle planes (not entirely true, it is actually only */
-/* the nodal arrangement that lies upon great circles). Element boundaries */
-/* are then mapped into planes. The element is then divided into 2 wedges */
-/* in which standard shape functions are used to interpolate velocity. */
-/* This transformation was found on the internet (refs were difficult to */
-/* to obtain). It was tested that nodal configuration is indeed transformed */
-/* into straight lines. */
-/* The transformations require a reference point along each cap. Here, the */
-/* midpoint is used. */
-/* Radial and azimuthal shape functions are decoupled. First find the shape */
-/* functions associated with the 2D surface plane, then apply radial shape */
-/* functions. */
-/* */
-/* Wedge information: */
-/* */
-/* Wedge 1 Wedge 2 */
-/* _______ _______ */
-/* */
-/* wedge_node real_node wedge_node real_node */
-/* ---------- --------- ---------- --------- */
-/* */
-/* 1 1 1 1 */
-/* 2 2 2 3 */
-/* 3 3 3 4 */
-/* 4 5 4 5 */
-/* 5 6 5 7 */
-/* 6 7 6 8 */
-
-
-static void gnomonic_interpolation(struct All_variables *E,
- int j, int nelem,
- double theta, double phi, double rad,
- double *velocity_vector)
-{
-
int iwedge,inum;
int kk;
int ival;
@@ -2052,47 +2002,7 @@
}
}
- if (E->trace.itracer_advection_scheme==1)
- {
- fprintf(E->trace.fpt,"\nSimple predictor-corrector method used\n");
- fprintf(E->trace.fpt,"(Uses only velocity at to) \n");
- fprintf(E->trace.fpt,"(xf=x0+0.5*dt*(v(x0,y0,z0) + v(xp,yp,zp))\n\n");
- }
- else if (E->trace.itracer_advection_scheme==2)
- {
- fprintf(E->trace.fpt,"\nPredictor-corrector method used\n");
- fprintf(E->trace.fpt,"(Uses only velocity at to and to+dt) \n");
- fprintf(E->trace.fpt,"(xf=x0+0.5*dt*(v(x0,y0,z0,to) + v(xp,yp,zp,to+dt))\n\n");
- }
- else
- {
- fprintf(E->trace.fpt,"Sorry-Other Advection Schemes are Unavailable %d\n",E->trace.itracer_advection_scheme);
- fflush(E->trace.fpt);
- parallel_process_termination();
- }
- if (E->trace.itracer_interpolation_scheme==1)
- {
- fprintf(E->trace.fpt,"\nGreat Circle Projection Interpolation Scheme \n");
- }
- else if (E->trace.itracer_interpolation_scheme==2)
- {
- fprintf(E->trace.fpt,"\nSimple Averaging Interpolation Scheme \n");
- fprintf(E->trace.fpt,"\n(Not that great of a scheme!) \n");
-
- fprintf(E->trace.fpt,"Sorry-Other Interpolation Schemes are Unavailable\n");
- fflush(E->trace.fpt);
- parallel_process_termination();
-
- }
- else
- {
- fprintf(E->trace.fpt,"Sorry-Other Interpolation Schemes are Unavailable\n");
- fflush(E->trace.fpt);
- parallel_process_termination();
- }
-
-
/* regular grid stuff */
fprintf(E->trace.fpt,"Regular Grid-> deltheta: %f delphi: %f\n",
Modified: mc/3D/CitcomS/trunk/lib/Regional_tracer_advection.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Regional_tracer_advection.c 2007-03-20 06:26:19 UTC (rev 6316)
+++ mc/3D/CitcomS/trunk/lib/Regional_tracer_advection.c 2007-03-20 06:27:56 UTC (rev 6317)
@@ -108,7 +108,7 @@
/* Fixed positions in tracer array */
/* Flavor is always in extraq position 0 */
/* Current coordinates are always kept in basicq positions 0-5 */
- /* Other positions may be used depending on advection scheme and/or science being done */
+ /* Other positions may be used depending on science being done */
/* Some error control regarding size of pointer arrays */
Modified: mc/3D/CitcomS/trunk/lib/Tracer_setup.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Tracer_setup.c 2007-03-20 06:26:19 UTC (rev 6316)
+++ mc/3D/CitcomS/trunk/lib/Tracer_setup.c 2007-03-20 06:27:56 UTC (rev 6317)
@@ -116,28 +116,7 @@
input_double("z_interface",&(E->trace.z_interface),"0.7",m);
- /* Advection Scheme */
- /* itracer_advection_scheme=1 (simple predictor corrector -uses only V(to)) */
- /* itracer_advection_scheme=2 (predictor-corrector - uses V(to) and V(to+dt)) */
-
- E->trace.itracer_advection_scheme=2;
- input_int("tracer_advection_scheme",&(E->trace.itracer_advection_scheme),
- "2,0,nomax",m);
-
- if (E->trace.itracer_advection_scheme==1)
- {}
- else if (E->trace.itracer_advection_scheme==2)
- {}
- else {
- fprintf(stderr,"Sorry, only advection scheme 1 and 2 available (%d)\n",E->trace.itracer_advection_scheme);
- fflush(stderr);
- parallel_process_termination();
- }
-
-
-
-
if(E->parallel.nprocxy == 12)
full_tracer_input(E);
@@ -268,7 +247,6 @@
/* */
/* Note positions used in tracer array */
/* [positions 0-5 are always fixed with current coordinates */
-/* regardless of advection scheme]. */
/* Positions 6-8 contain original Cartesian coordinates. */
/* Positions 9-11 contain original Cartesian velocities. */
/* */
@@ -364,7 +342,6 @@
/* */
/* Note positions used in tracer array */
/* [positions 0-5 are always fixed with current coordinates */
-/* regardless of advection scheme]. */
/* Positions 6-8 contain original Cartesian coordinates. */
/* Positions 9-11 contain original Cartesian velocities. */
/* */
Modified: mc/3D/CitcomS/trunk/lib/tracer_defs.h
===================================================================
--- mc/3D/CitcomS/trunk/lib/tracer_defs.h 2007-03-20 06:26:19 UTC (rev 6316)
+++ mc/3D/CitcomS/trunk/lib/tracer_defs.h 2007-03-20 06:27:56 UTC (rev 6317)
@@ -41,7 +41,6 @@
int ianalytical_tracer_test;
int ic_method;
int itperel;
- int itracer_advection_scheme;
int itracer_interpolation_scheme;
double box_cushion;
Modified: mc/3D/CitcomS/trunk/module/setProperties.c
===================================================================
--- mc/3D/CitcomS/trunk/module/setProperties.c 2007-03-20 06:26:19 UTC (rev 6316)
+++ mc/3D/CitcomS/trunk/module/setProperties.c 2007-03-20 06:27:56 UTC (rev 6317)
@@ -614,9 +614,6 @@
if(E->parallel.nprocxy == 12) {
- getIntProperty(properties, "tracer_advection_scheme", E->trace.itracer_advection_scheme, fp);
- getIntProperty(properties, "tracer_interpolation_scheme", E->trace.itracer_interpolation_scheme, fp);
-
getDoubleProperty(properties, "regular_grid_deltheta", tmp, fp);
E->trace.deltheta[0] = tmp;
getDoubleProperty(properties, "regular_grid_delphi", tmp, fp);
More information about the cig-commits
mailing list