Monomial3D example 1
This example shows the usage of [[Monomial3D_]] class.
Modules and classes
- [[Monomial3D_]]
Usage
PROGRAM main
use easifemBase
use easifemClasses
implicit none
type(Monomial3D_) :: 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( n1=n1, n2=n2, n3=n3, varname1=varname1, &
& varname2=varname2, varname3=varname3 )
call obj%display( 'f(x,y,z)=' )
!!! example "result" f(x,y,z)=
!!! note ""
n1=1; n2=0; n3=0
obj=Monomial3D( n1=n1, n2=n2, n3=n3, varname1=varname1, &
& varname2=varname2, varname3=varname3 )
call obj%display( 'f(x,y,z)=' )
!!! example "result" f(x,y,z)=x^1
!!! note ""
n1=0; n2=1; n3=0
obj=Monomial3D( n1=n1, n2=n2, n3=n3, varname1=varname1, &
& varname2=varname2, varname3=varname3 )
call obj%display( 'f(x,y,z)=' )
!!! example "result" f(x,y,z)=y^1
!!! note ""
n1=1; n2=1; n3=1
obj=Monomial3D( n1=n1, n2=n2, n3=n3, varname1=varname1, &
& varname2=varname2, varname3=varname3 )
call obj%display( 'f(x,y,z)=' )
!!! example "result" f(x,y,z)=x^1 y^1 z^1
!!! note ""
n1=2; n2=1; n3=1
obj=Monomial3D( n1=n1, n2=n2, n3=n3, varname1=varname1, &
& varname2=varname2, varname3=varname3 )
call obj%display( 'f(x,y,z)=' )
!!! example "result" f(x,y,z)=x^2 y^1 z^1
END PROGRAM main