Load single triangle from config file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_triangle_type), | intent(out) | :: | me |
single triangle |
||
type(tem_transformation_type), | intent(in) | :: | transform |
transformation for spatial object |
||
type(flu_State) | :: | conf |
lua state |
|||
integer, | intent(in) | :: | thandle |
subroutine tem_load_triangle_single(me, transform, conf, thandle ) !--------------------------------------------------------------------------! !inferface variables !> single triangle type(tem_triangle_type), intent(out) :: me !> transformation for spatial object type(tem_transformation_type), intent(in) :: transform !> lua state type(flu_state) :: conf integer, intent(in) :: thandle !< handle for canonical objects !--------------------------------------------------------------------------! ! local varaibles integer :: vError(3), errFatal(3) integer :: iNode integer :: sub_handle !--------------------------------------------------------------------------! errFatal = aoterr_fatal call aot_table_open(L=conf, parent=thandle, thandle=sub_handle, & & key='nodes') do iNode=1,3 call aot_get_val(L=conf, thandle=sub_handle, & & val=me%nodes(:,iNode), & & pos=iNode, ErrCode=vError) if (any(btest(vError, errFatal))) then write(logunit(0),*) ' Error in configuration: triangle node nr ', iNode write(logunit(0),*) ' is not defined' call tem_abort() end if end do call aot_table_close(L=conf, thandle=sub_handle) write(logunit(2),*) ' node 1: ', me%nodes(:,1) write(logunit(2),*) ' node 2: ', me%nodes(:,2) write(logunit(2),*) ' node 3: ', me%nodes(:,3) !apply transformation if(transform%active) then if(transform%deform%active) then do iNode=1,3 me%nodes(:,iNode) = matmul( transform%deform%matrix, & & me%nodes(:,iNode) ) enddo endif if(transform%translate%active) then do iNode=1,3 me%nodes(:,iNode) = transform%translate%vec & & + me%nodes(:,iNode) enddo endif endif end subroutine tem_load_triangle_single