wiki:SpectraObject

Version 2 (modified by Jonathan, 13 years ago) ( diff )

BackLinksMenu()

Spectra Objects

Spectra Objects can be created within the ProblemModuleInit routine in problem.f90. To create spectras you first need to add two USE statements to your problem.f90

  USE Spectras
  USE Fields

Then in ProblemModuleInit declare a variable pointer of type SpectraDef

  TYPE(SpectraDef), POINTER :: Spectra

Then create the Spectra and set the various parameters as in the following example

     CALL CreateSpectra(Spectra)
     ALLOCATE(Spectra%Fields(3))
     Spectra%Fields(:)%id=(/vx_Field, vy_Field, vz_Field/)
     Spectra%type=VECTOR_SPECT
     CALL CreateSpectra(Spectra)
     ALLOCATE(Spectra%Fields(1))
     Spectra%Fields(:)%id=(/Mass_Field/)
     Spectra%type=SCALAR_SPECT

  • For more information on the Field sub-object's properties see ProcessingFields
  • If you are making several spectras, you can reuse the Spectra Pointer (with or without Nullifying it) by calling CreateSpectra(Spectra) for each new spectra.
  • The spectra are calculated using the PFFT module

Here is a full list of the various Spectra parameters with the default values in brackets:

     TYPE(FieldDef), ALLOCATABLE :: Fields(:)
     REAL(KIND=qPREC), DIMENSION(:,:), ALLOCATABLE :: Data
     INTEGER :: Level=MAXIMUMSPECTRALEVEL
     REAL(KIND=qPREC) :: kmin
     REAL(KIND=qPREC) :: dk=1d0
     INTEGER :: Type = SCALAR_SPECT
     TYPE(SpectraDef), POINTER :: next

Then at each process event (currently each frame) a curve file will be generated in the out directory ie. out/Spectra00021.curve that will contain all of the spectra for that frame. See CurveFiles for more information on plotting curve files in visit.

Attachments (14)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.