[cig-commits] [commit] master: Unified tracer handling by combining several function calls to new function transfer_marker_properties (0682cfb)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Wed Nov 5 19:01:04 PST 2014
Repository : https://github.com/geodynamics/citcomcu
On branch : master
Link : https://github.com/geodynamics/citcomcu/compare/4f7838affd00b015f9344d69fe68c026590b6cde...0682cfb4c5ae2ee04193ba2685c49b202a5315c4
>---------------------------------------------------------------
commit 0682cfb4c5ae2ee04193ba2685c49b202a5315c4
Author: thwbecker <thorstinski at gmail.com>
Date: Thu Apr 10 13:49:54 2014 -0700
Unified tracer handling by combining several function calls to new
function transfer_marker_properties
>---------------------------------------------------------------
0682cfb4c5ae2ee04193ba2685c49b202a5315c4
src/Composition_adv.c | 46 +++++++++++++++++++++++++++++++++-------------
src/Instructions.c | 6 ++++--
src/Viscosity_structures.c | 4 ++++
src/prototypes.h | 3 +++
4 files changed, 44 insertions(+), 15 deletions(-)
diff --git a/src/Composition_adv.c b/src/Composition_adv.c
index cbc6a62..097fd75 100644
--- a/src/Composition_adv.c
+++ b/src/Composition_adv.c
@@ -91,15 +91,10 @@ void Runge_Kutta(struct All_variables *E, float *C, float *V[4], int on_off)
}
}
- transfer_markers_processors(E, on_off);
- /* assign element numbers to markers */
- element_markers(E, on_off);
+ /* assign to elements */
+ transfer_marker_properties(E,C,on_off);
- /* get nodal values from markers */
- get_C_from_markers(E, C);
- if(E->tracers_add_flavors)
- get_CF_from_markers(E,E->CF);
E->advection.markers_g = -1;
if(E->advection.timesteps % 10 == 0)
@@ -138,15 +133,12 @@ void Euler(struct All_variables *E, float *C, float *V[4], int on_off)
E->XMCpred[3][i] = temp3;
}
}
- transfer_markers_processors(E, on_off);
+
/* predicted compositional field at t+dt */
- element_markers(E, on_off);
- /* update nodal values */
- get_C_from_markers(E, C);
- if(E->tracers_add_flavors)
- get_CF_from_markers(E,E->CF);
+ /* assign to processor and then to elements */
+ transfer_marker_properties(E,C,on_off);
return;
}
@@ -505,6 +497,34 @@ int locate_processor(struct All_variables *E, CITCOM_XMC_PREC XMC1, CITCOM_XMC_P
return (proc);
}
+
+
+/*
+
+ assign all properties from markers to elements
+ con: 1: use old location 0: use new location
+
+*/
+
+void transfer_marker_properties(struct All_variables *E, float *C, int con)
+{
+
+ /* assign to processor */
+ transfer_markers_processors(E, con);
+
+ /* assign element numbers to markers */
+ element_markers(E, con);
+ /*
+ get elemental values from markers
+ */
+ get_C_from_markers(E, C); /* composition */
+
+ if(E->tracers_add_flavors)
+ get_CF_from_markers(E,E->CF); /* flavors */
+
+}
+
+
/* ================================================
================================================ */
void get_C_from_markers(struct All_variables *E, float *C)
diff --git a/src/Instructions.c b/src/Instructions.c
index 68f9c26..0f7c49f 100644
--- a/src/Instructions.c
+++ b/src/Instructions.c
@@ -687,7 +687,6 @@ void read_initial_settings(struct All_variables *E)
m = E->parallel.me;
-
input_string("Problem", E->control.PROBLEM_TYPE, NULL, m);
if(strcmp(E->control.PROBLEM_TYPE, "convection") == 0)
{
@@ -710,6 +709,8 @@ void read_initial_settings(struct All_variables *E)
}
input_string("Geometry", E->control.GEOMETRY, NULL, m);
+
+
if(strcmp(E->control.GEOMETRY, "cart2d") == 0)
{
E->control.CART2D = 1;
@@ -737,12 +738,12 @@ void read_initial_settings(struct All_variables *E)
else
{
fprintf(E->fp, "Unable to determine geometry, assuming cartesian 2d ... \n");
+ force_report(E,"Unable to determine geometry, assuming cartesian 2d ... ");
E->control.CART2D = 1;
set_2dc_defaults(E);
}
-
input_string("Solver", E->control.SOLVER_TYPE, NULL, m);
if(strcmp(E->control.SOLVER_TYPE, "cgrad") == 0)
{
@@ -840,6 +841,7 @@ void read_initial_settings(struct All_variables *E)
input_int("solution_cycles_out",&(E->monitor.solution_cycles_out),"5",m);
#ifdef USE_GGRD
+
/* ggrd control */
ggrd_init_master(&(E->control.ggrd));
diff --git a/src/Viscosity_structures.c b/src/Viscosity_structures.c
index 8efe070..f0e82dc 100644
--- a/src/Viscosity_structures.c
+++ b/src/Viscosity_structures.c
@@ -752,7 +752,11 @@ void visc_from_S(struct All_variables *E, float *Eta, float *EEta, int propogate
return;
}
+/*
+
+ compute the second invariant for every element
+ */
void strain_rate_2_inv(struct All_variables *E, float *EEDOT,
int SQRT)
{
diff --git a/src/prototypes.h b/src/prototypes.h
index 5800256..23bc62a 100644
--- a/src/prototypes.h
+++ b/src/prototypes.h
@@ -1,4 +1,7 @@
+void transfer_marker_properties(struct All_variables *, float *, int );
+
/* Advection_diffusion.c */
+
void advection_diffusion_parameters(struct All_variables *);
void advection_diffusion_allocate_memory(struct All_variables *);
void PG_timestep_particle(struct All_variables *);
More information about the CIG-COMMITS
mailing list