subroutine check_variableOperations(res)
logical, intent(inout) :: res
type(treelmesh_type) :: tree
type(tem_bc_prop_type) :: boundary
type(tem_general_type) :: general
type(tem_varSys_type) :: varSys
type(tem_st_fun_linkedList_type) :: st_funList
type(flu_state) :: conf
type(tem_variable_type), allocatable :: newVar(:)
real(kind=rk) :: point(1,3)
integer, allocatable :: indices(:,:)
integer, allocatable :: vError(:)
integer :: iVar
call load_env( tree = tree, &
& boundary = boundary, &
& general = general )
call open_config_chunk(L=conf, chunk=trim(sysConf))
call tem_variable_load( me = newVar, &
& conf = conf, &
& key = 'variable', &
& vError = vError )
call tem_varSys_init(me = varSys, systemName = 'utest')
call tem_varSys_append_luaVar( luaVar = newVar, &
& varSys = varSys, &
& st_funList = st_funList )
call tem_create_subTree_of_st_funList( &
& me = st_funList, &
& tree = tree, &
& bc_prop = boundary )
point(1,:) = tem_BaryOfId( tree = tree, &
& treeID = tree%treeID(1) )
allocate(indices(varSys%method%nVals,1))
do iVar = 1, varSys%method%nVals
call varSys%method%val(iVar)%setup_indices( &
& varSys = varSys, &
& point = point, &
& iLevel = 1, &
& tree = tree, &
& nPnts = 1, &
& idx = indices(iVar,:) )
end do
call check_variableOperations_byPoint( res, general, tree, varSys, point )
call check_variableOperations_byElement( res, general, tree, varSys )
call check_variableOperations_byIndex( res, general, varSys, indices )
end subroutine check_variableOperations