60 |
|
!! @author J. Daniel Gezelter |
61 |
|
!! @author Charles F. Vardeman II |
62 |
|
!! @author Matthew Meineke |
63 |
< |
!! @version $Id: vector_class.F90,v 1.2 2005-01-12 22:41:39 gezelter Exp $, $Date: 2005-01-12 22:41:39 $, $Name: not supported by cvs2svn $, $Revision: 1.2 $ |
63 |
> |
!! @version $Id: vector_class.F90,v 1.3 2005-04-12 00:28:29 chuckv Exp $, $Date: 2005-04-12 00:28:29 $, $Name: not supported by cvs2svn $, $Revision: 1.3 $ |
64 |
|
|
65 |
|
module Vector_class |
66 |
|
|
68 |
|
PRIVATE |
69 |
|
|
70 |
|
public :: initialize |
71 |
+ |
public :: destroy |
72 |
|
public :: getSize |
73 |
|
public :: getElementAt |
74 |
|
public :: getPropertyListSize |
78 |
|
public :: getElementProperty |
79 |
|
public :: getMatchingElementList |
80 |
|
public :: getFirstMatchingElement |
81 |
+ |
|
82 |
|
|
83 |
|
integer, parameter :: logical_data_type = 1 |
84 |
|
integer, parameter :: integer_data_type = 2 |
826 |
|
end function initialize_3i |
827 |
|
|
828 |
|
function initialize_4i(cap, nprop, capinc, propinc) result(this) |
829 |
< |
integer, intent(in) :: cap, nprop, capinc, propinc |
829 |
> |
integer, intent(in) :: cap, nprop, capinc, propinc |
830 |
|
integer :: error |
831 |
|
type(Vector), pointer :: this |
832 |
|
|
877 |
|
if(error .ne. 0) write(*,*) 'Could not allocate logicalElementProperties!' |
878 |
|
|
879 |
|
end function initialize_4i |
880 |
< |
|
881 |
< |
|
880 |
> |
|
881 |
> |
!! This function destroys the vector components.... |
882 |
> |
function destroy(this) result(null_this) |
883 |
> |
logical :: done |
884 |
> |
type(Vector), pointer :: this |
885 |
> |
type(Vector), pointer :: null_this |
886 |
> |
|
887 |
> |
!! Walk down the list and deallocate each of the vector components |
888 |
> |
if(associated(this%elementData)) then |
889 |
> |
deallocate(this%elementData) |
890 |
> |
this%elementData=>null() |
891 |
> |
endif |
892 |
> |
|
893 |
> |
|
894 |
> |
if(associated(this%PropertyDescriptions)) then |
895 |
> |
deallocate(this%PropertyDescriptions) |
896 |
> |
this%PropertyDescriptions=>null() |
897 |
> |
endif |
898 |
> |
|
899 |
> |
|
900 |
> |
|
901 |
> |
if(associated(this%PropertyDataType)) then |
902 |
> |
deallocate(this%PropertyDataType) |
903 |
> |
this%PropertyDataType=>null() |
904 |
> |
endif |
905 |
> |
|
906 |
> |
|
907 |
> |
if(associated(this%integerElementProperties)) then |
908 |
> |
deallocate(this%integerElementProperties) |
909 |
> |
this%integerElementProperties=>null() |
910 |
> |
endif |
911 |
> |
|
912 |
> |
|
913 |
> |
if(associated(this%realElementProperties)) then |
914 |
> |
deallocate(this%realElementProperties) |
915 |
> |
this%realElementProperties=>null() |
916 |
> |
endif |
917 |
> |
|
918 |
> |
if(associated(this%logicalElementProperties)) then |
919 |
> |
deallocate(this%logicalElementProperties) |
920 |
> |
this%logicalElementProperties=>null() |
921 |
> |
endif |
922 |
> |
null_this => null() |
923 |
> |
end function destroy |
924 |
|
|
925 |
|
end module Vector_class |