Histrogram Objects
Histogram Objects can be created within the ProblemModuleInit routine in problem.f90. To create histograms you first need to add two USE statements to your problem.f90
USE Histograms USE Fields
Then in ProblemModuleInit declare a variable pointer of type HistogramDef
TYPE(HistogramDef), POINTER :: Histogram
Then create the Histogram and set the various parameters as in the following example
CALL CreateHistogram(Histogram)
Histogram%Field%id=MixingRatio12_Field
Histogram%Field%component=GASCOMP
Histogram%Field%name='Mixing_Ratio'
Histogram%minvalue0d0
Histogram%maxvalue=1d0
Histogram%nbins=100
Histogram%scale=LINEARSCALE
Histogram%WeightField=BINBYMASS
- For more information on the Field sub-object's properties see ProcessingFields
- If you are making several histograms, you can reuse the Histogram Pointer (with or without Nullifying it) by calling
CreateHistogram(Histogram)for each new histogram.
Here is a full list of the various Histogram parameters with the default values in brackets:
INTEGER :: Scale=[LINEARSCALE], LOGSCALE
REAL(KIND=qPREC) :: minvalue=[MINOVERALL], or any real number
REAL(KIND=qPREC) :: maxvalue=[MAXOVERALL], or any real number
INTEGER :: nBins=[100], or any integer
INTEGER :: WeightField=[BINBYVOLUME], BINBYMASS, or any valid FieldID
Then at each process event (currently each frame) a curve file will be generated in the out directory ie. out/Histogram00021.curve that will contain all of the histograms for that frame. See CurveFiles for more information on plotting curve files in visit.
Attachments (1)
- SampleHistogram.png (18.4 KB ) - added by 14 years ago.
Download all attachments as: .zip
