Created
April 26, 2012 17:52
-
-
Save pwl/2501359 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program test_function_registry | |
use class_func_registry | |
use flu_module | |
use class_platonic | |
use platonic_from_lua_module | |
use flu_get_module | |
use class_function | |
use class_boundary | |
use boundary_box_module | |
use class_boundary_dirichlet | |
use helper_module | |
type(flu) :: l | |
type(func_registry) :: fr | |
type(func) :: f1, f2 | |
class(boundary), pointer :: b | |
class(platonic), pointer :: p => null() | |
type(boundary_box) :: blr | |
integer :: err | |
integer :: i | |
character(len=3) :: char(4) = ["abc","123","pqr"," "] | |
! call set_log_level(FPDE_LOG_DEBUG) | |
l = luaL_newstate() | |
if( luaL_dofile(l,"../example/function_registry.lua") ) then | |
end if | |
call lua_getglobal(l,"fr") | |
call fr%from_lua(l, error = err) | |
f1%name = "abc" | |
call lua_getglobal(l,"my_boundaries") | |
call f1%boundary%from_lua(l,err) | |
allocate(boundary_dirichlet :: b) | |
fr%func(2)%boundary%default => b | |
call fr%init(err) | |
call fr%init(err) | |
! print *, err | |
do i = 1, fr%n_func | |
print *, i, trim(fr%func(i)%name) | |
end do | |
end program test_function_registry |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment