28 integer,
parameter :: verb = 2
38 character(len=150) :: msh_file
45 real(RP),
dimension(:),
allocatable :: f_h
49 character(len=150) :: feSpace_file, str
59 write(*,*)
'mesh_visu: start' 61 write(*,*)
" ASSEMBLE A MESH " 63 write(*,*)
" and visualise it with gmsh" 70 msh_file = trim(gmsh_dir)//
"testMesh/square.msh" 76 write(*,*)
"================================== ASSEMBLING THE MESH " 77 msh = mesh(trim(msh_file),
"gmsh")
78 if (verb>1)
call print(msh)
82 write(*,*)
"================================== ASSEMBLING THE& 83 & FINITE ELEMENT SPACE X_h" 90 write(*,*)
"================================== DISPLAY THE& 91 & FINITE ELEMENT NODES" 92 fespace_file =
"feSpace.msh" 93 call write(x_h, fespace_file,
"gmsh")
94 call system(
"gmsh -option & 95 &"//trim(gmsh_dir)//
"gmsh-options-mesh "//trim(fespace_file))
99 write(*,*)
"================================== DISPLAY A& 100 & FUNCTION INTERPOLATED ON X_h" 103 call interp_scal_func(f_h,
f, x_h)
106 call gmsh_addview(x_h, f_h, fespace_file, &
107 &
'Interpolant of the Function f', 0._rp, 0)
110 str=
'gmsh -option '//trim(gmsh_dir)//
'gmsh-options-view '&
111 &//trim(fespace_file)
112 call system(trim(str))
118 real(RP),
dimension(3),
intent(in) :: x
121 f = sin(2*pi*x(1)) * sin(2*pi*x(2))
subroutine, public choral_init(verb)
Initialisation for the CHORAL library
program fespace_visu
ASSEMBLE A FINITE ELEMENS SPACE of type feSpace
TOP-LEVEL MODULE FOR THE LIBRARY CHORAL
integer, parameter fe_p2_2d
real(rp) function f(x)
right hand side 'f'