Version 2 (modified by 12 years ago) ( diff ) | ,
---|
To illustrate the use of tracers inside of an object, this page will follow adding a tracer to the clump object.
Inside of clumps.f90, ClumpDef, there is:
INTEGER :: iTracer=0
This integer indexes the position in q of the clump tracer. When it is set to 0, there is no slot in q that holds the tracer, hence no tracer is assigned to the clump object.
To add a tracer to the clump object, one must assign a slot in q to hold the tracer. This is done by adding the following to ProblemModuleInit in problem.f90:
CALL AddTracer(MyClump%iTracer, "ClumpTracer")
This call passes in a non-zero integer to index the tracer in q, which is assigned in the routine AddTracer, by identifying the next empty slot in q, as well as the name of the tracer, here "ClumpTracer". This name is then recognized by a visualization program such as Visit as a new variable.
Next, the tracer is