Example a/evaluate_grid: evaluate_grid: Evaluate a curve product field into grid points.

This example uses multiplies three curves to define a potential field which varies with the xi directions. This field is evaluated into an existing grid point storage and written out.

Screenshot of example a/evaluate_grid


The comfile run by this example is as follows:

#This example uses multiplies three curves to define a potential field which
#varies with the xi directions.
#This field is evaluated into an existing grid point storage and written out.

#Read in our element geometry
gfx read node $example/stomach.exnode
gfx read elem $example/stomach.exelem

#Define a grid by reading in one that has the desired resolution
gfx read elem $example/field.exelem.bz2
#Specify the grid point numbers for the grid points
gfx read elem $example/grid.exelem.bz2

#Read in three curves which are going to be multiplied into a
#product to define the field values we want.
open com $example/epsilon_xi1.curve.com exec
open com $example/epsilon_xi2.curve.com exec
open com $example/epsilon_xi3.curve.com exec

$SEED_ELEMENT = 1;
$GROUP = "stomach";

gfx define field xi_texture xi_texture_coordinates seed_element $SEED_ELEMENT
gfx define field xi1_curve curve_lookup curve xi1 source xi_texture.1
gfx define field xi2_curve curve_lookup curve xi2 source xi_texture.2
gfx define field xi3_curve curve_lookup curve xi3 source xi_texture.3
gfx define field temp multiply fields xi1_curve xi2_curve
gfx define field values multiply fields temp xi3_curve

#Evaluate the field values into the grid point storage
gfx evaluate egroup $GROUP destination potential source values

#Write out the evaluated grid point values
gfx write elem values_$GROUP.exelem group $GROUP fields potential;
#Write out the corresponding grid point numbers
gfx write elem number_$GROUP.exelem group $GROUP fields grid_point_number


Files used by this example are:

Name                      Modified     Size

evaluate_grid.com 20-Apr-2012 1.5k COPYRIGHT 19-Apr-2012 504 epsilon_xi1.curve.com 20-Apr-2012 155 epsilon_xi1.curve.exelem 20-Apr-2012 843 epsilon_xi1.curve.exnode 20-Apr-2012 748 epsilon_xi2.curve.com 20-Apr-2012 154 epsilon_xi2.curve.exelem 20-Apr-2012 843 epsilon_xi2.curve.exnode 20-Apr-2012 748 epsilon_xi3.curve.com 20-Apr-2012 153 epsilon_xi3.curve.exelem 20-Apr-2012 640 epsilon_xi3.curve.exnode 20-Apr-2012 377 field.exelem.bz2 20-Apr-2012 62k grid.exelem.bz2 20-Apr-2012 833k stomach.exelem 20-Apr-2012 512k stomach.exnode 20-Apr-2012 150k

Download the entire example:

Name                             Modified     Size

examples_a_evaluate_grid.tar.gz 20-Apr-2012 2.1M

Testing status by version:

StatusTestedReal time (s)
i686-linux
cmgui-wxSuccessWed May 16 00:43:32 201239
cmgui-wx-debugSuccessWed May 16 01:06:45 201260
cmgui-wx-debug-memorycheckSuccessWed May 16 02:47:20 2012185
cmgui-wx-debug-valgrindSuccessTue May 8 04:10:18 20122705
x86_64-linux
cmgui-wxSuccessWed May 16 00:10:31 20125
cmgui-wx-debugSuccessWed May 16 00:12:54 201213
cmgui-wx-debug-memorycheckSuccessWed May 16 00:22:34 201242
cmgui-wx-debug-valgrindSuccessWed May 16 01:26:22 2012477
cmgui-wx-gcc-cad-debug-valgrindSuccessWed May 16 01:22:20 2012480

Testing status by file:


Html last generated: Wed May 16 05:57:37 2012

Input last modified: Fri Apr 20 15:58:46 2012


CMISS Help / Examples / a / evaluate_grid