Polynomial2D example 6
This example shows the usage of [[Polynomial2D_]] class. In this example we test Assign
method. Following operations are allowed.
-
obj=obj
-
obj=mono2
-
obj=1
-
obj=1.0
-
obj
is an instance of [[Polynomial2D_]] -
mono
is an instance of [[Monomial2D_]]
Modules and classes
- [[Polynomial2D_]]
Usage
PROGRAM main
use easifemBase
use easifemClasses
implicit none
type(Polynomial2D_) :: f1
type(Monomial2D_) :: m1
!!! note "Initiate" Initiate the [[Monomial2D_]] object.
m1 = Monomial2D( 1,1,"x","y" )
f1 = m1
call f1%display( 'f(x,y)=' )
!!! example "result"
!!! note "Initiate" Now we assign a polynomial a scalar value.
f1 = 2
call f1%display( 'f(x,y)=')
!!! example "result"
f1 = 2.0
call f1%display( 'f(x,y)=')
!!! example "result"
END PROGRAM main