Skip to main content

VTKPlot example 4

This example shows how to use plot function from [[VTKPlot_]] class. We plot a cartesian grid. We use x and y created by meshgrid.

Use association

  • [[VTKPlot_]]

Usage

PROGRAM MAIN
USE easifemBase
USE easifemClasses
IMPLICIT NONE
TYPE( VTKPlot_ ) :: obj
REAL( DFP ), ALLOCATABLE :: x( :, : ), y( :, : )

!!! note "" Plotting a two dimensional structured grid.

  CALL MeshGrid( x=x, y = y, &
& xgv=linspace( 0.0_DFP, 1.0_DFP, 5), &
& ygv=linspace( 0.0_DFP, 1.0_DFP, 5) &
& )
CALL obj%initiate( )
CALL obj%plot( x, y, "./test_4.vts")
CALL obj%deallocate()
end program