Monomial3D example 2
- This example shows the usage of [[Monomial3D_]] class.
- We test [[Monomial3D_#Monomial3D_Pointer]] Method.
Modules and classes
- [[Monomial3D_]]
Usage
PROGRAM main
use easifemBase
use easifemClasses
implicit none
class(Monomial3D_), pointer :: obj
integer(I4B) :: n1, n2, n3
character(len=*), parameter :: varname1="x", varname2="y", varname3="z"
!!! note "" Initiate the object.
n1=0; n2=0; n3=0
obj=>Monomial3D_Pointer( n1=n1, n2=n2, n3=n3, varname1=varname1, &
& varname2=varname2, varname3=varname3 )
call obj%display( 'f(x,y,z)=' )
deallocate(obj)
!!! example "result"
!!! note ""
n1=1; n2=0; n3=0
obj=>Monomial3D_Pointer( n1=n1, n2=n2, n3=n3, varname1=varname1, &
& varname2=varname2, varname3=varname3 )
call obj%display( 'f(x,y,z)=' )
deallocate(obj)
!!! example "result" f(x,y,z)=x^1
!!! note ""
n1=0; n2=1; n3=0
obj=>Monomial3D_Pointer( n1=n1, n2=n2, n3=n3, varname1=varname1, &
& varname2=varname2, varname3=varname3 )
call obj%display( 'f(x,y,z)=' )
deallocate(obj)
!!! example "result" f(x,y,z)=y^1
!!! note ""
n1=1; n2=1; n3=1
obj=>Monomial3D_Pointer( n1=n1, n2=n2, n3=n3, varname1=varname1, &
& varname2=varname2, varname3=varname3 )
call obj%display( 'f(x,y,z)=' )
deallocate(obj)
!!! example "result" f(x,y,z)=x^1 y^1 z^1
!!! note ""
n1=2; n2=1; n3=1
obj=>Monomial3D_Pointer( n1=n1, n2=n2, n3=n3, varname1=varname1, &
& varname2=varname2, varname3=varname3 )
call obj%display( 'f(x,y,z)=' )
deallocate(obj)
!!! example "result" f(x,y,z)=x^2 y^1 z^1
END PROGRAM main