Monomial2D example 1
This example shows the usage of [[Monomial2D_]] class. In this example we test Monomial2D
function. We create Monomial2D from two [[Monomial1D_]] instances.
Modules and classes
- [[Monomial2D_]]
- [[Monomial1D_]]
Usage
PROGRAM main
use easifemBase
use easifemClasses
implicit none
type(Monomial2D_) :: obj
type(Monomial1D_) :: f1, f2
!!! note "Initiate" Initiate the object.
f1=Monomial1D( 0_I4B, "x" )
f2=Monomial1D( 0_I4B, "y" )
obj=Monomial2D( f1, f2 )
call obj%display( 'f(x,y)=' )
!!! example "results" f(x,y)=x^0*y^0
!!! note ""
f1=Monomial1D( 1_I4B, "x" )
f2=Monomial1D( 0_I4B, "y" )
obj=Monomial2D( f1, f2 )
call obj%display( 'f(x,y)=' )
!!! example "results" f(x,y)=x^1*y^0
!!! note ""
f1=Monomial1D( 0_I4B, "x" )
f2=Monomial1D( 1_I4B, "y" )
obj=Monomial2D( f1, f2 )
call obj%display( 'f(x,y)=' )
!!! example "result" f(x,y)=x^0*y^1
!!! note ""
f1=Monomial1D( 1_I4B, "x" )
f2=Monomial1D( 1_I4B, "y" )
obj=Monomial2D( f1, f2 )
call obj%display( 'f(x,y)=' )
!!! example "result" f(x,y)=x^1*y^1
END PROGRAM main