OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
mumps_memory_mod::mumps_realloc Interface Reference

Public Member Functions

subroutine mumps_irealloc (array, minsize, info, lp, force, copy, string, memcnt, errcode)
subroutine mumps_drealloc (array, minsize, info, lp, force, copy, string, memcnt, errcode)
subroutine mumps_srealloc (array, minsize, info, lp, force, copy, string, memcnt, errcode)
subroutine mumps_zrealloc (array, minsize, info, lp, force, copy, string, memcnt, errcode)
subroutine mumps_crealloc (array, minsize, info, lp, force, copy, string, memcnt, errcode)

Detailed Description

Definition at line 18 of file mumps_memory_mod.F.

Member Function/Subroutine Documentation

◆ mumps_crealloc()

subroutine mumps_memory_mod::mumps_realloc::mumps_crealloc ( complex(kind((1.e0,1.e0))), dimension(:), pointer array,
integer minsize,
integer, dimension(:) info,
integer lp,
logical, optional force,
logical, optional copy,
character, dimension(*), optional string,
integer(8), optional memcnt,
integer, optional errcode )

Definition at line 635 of file mumps_memory_mod.F.

637 COMPLEX(kind((1.E0,1.E0))), POINTER :: ARRAY(:)
638 INTEGER :: INFO(:)
639 INTEGER :: MINSIZE, LP
640 LOGICAL, OPTIONAL :: FORCE
641 LOGICAL, OPTIONAL :: COPY
642 CHARACTER, OPTIONAL :: STRING*(*)
643 INTEGER, OPTIONAL :: ERRCODE
644 INTEGER(8), OPTIONAL :: MEMCNT
645 LOGICAL :: ICOPY, IFORCE
646 COMPLEX(kind((1.E0,1.E0))), POINTER :: TEMP(:)
647 INTEGER :: I, IERR, ERRTPL(2)
648 CHARACTER(len=60) :: FMTA, FMTD
649 IF(present(copy)) THEN
650 icopy = copy
651 ELSE
652 icopy = .false.
653 END IF
654 IF (present(force)) THEN
655 iforce = force
656 ELSE
657 iforce = .false.
658 END IF
659 IF (present(string)) THEN
660 fmta = "Allocation failed inside realloc: "//string
661 fmtd = "Deallocation failed inside realloc: "//string
662 ELSE
663 fmta = "Allocation failed inside realloc: "
664 fmtd = "Deallocation failed inside realloc: "
665 END IF
666 IF (present(errcode)) THEN
667 errtpl(1) = errcode
668 errtpl(2) = minsize
669 ELSE
670 errtpl(1) = -13
671 errtpl(2) = minsize
672 END IF
673 IF(icopy) THEN
674 IF(associated(array)) THEN
675 IF ((size(array) .LT. minsize) .OR.
676 & ((size(array).NE.minsize) .AND. iforce)) THEN
677 allocate(temp(minsize), stat=ierr)
678 IF(ierr .LT. 0) THEN
679 WRITE(lp,fmta)
680 info(1:2) = errtpl
681 RETURN
682 ELSE
683 IF(present(memcnt))memcnt = memcnt+
684 & int(minsize,8)*csize
685 END IF
686 DO i=1, min(size(array), minsize)
687 temp(i) = array(i)
688 END DO
689 IF(present(memcnt))memcnt = memcnt-
690 & int(size(array),8)*csize
691 deallocate(array, stat=ierr)
692 IF(ierr .LT. 0) THEN
693 WRITE(lp,fmtd)
694 info(1:2) = errtpl
695 RETURN
696 END IF
697 NULLIFY(array)
698 array => temp
699 NULLIFY(temp)
700 END IF
701 ELSE
702 WRITE(lp,
703 & '("Input array is not associated. nothing to copy here")')
704 RETURN
705 END IF
706 ELSE
707 IF(associated(array)) THEN
708 IF ((size(array) .LT. minsize) .OR.
709 & ((size(array).NE.minsize) .AND. iforce)) THEN
710 IF(present(memcnt))memcnt = memcnt-
711 & int(size(array),8)*csize
712 deallocate(array, stat=ierr)
713 IF(ierr .LT. 0) THEN
714 WRITE(lp,fmtd)
715 info(1:2) = errtpl
716 RETURN
717 END IF
718 ELSE
719 RETURN
720 END IF
721 END IF
722 allocate(array(minsize), stat=ierr)
723 IF(ierr .LT. 0) THEN
724 WRITE(lp,fmta)
725 info(1:2) = errtpl
726 RETURN
727 ELSE
728 IF(present(memcnt)) memcnt = memcnt+
729 & int(minsize,8)*csize
730 END IF
731 END IF
732 RETURN
subroutine icopy(n, sx, incx, sy, incy)
ICOPY
Definition icopy.f:75
#define min(a, b)
Definition macros.h:20

◆ mumps_drealloc()

subroutine mumps_memory_mod::mumps_realloc::mumps_drealloc ( real(kind(1.d0)), dimension(:), pointer array,
integer minsize,
integer, dimension(:) info,
integer lp,
logical, optional force,
logical, optional copy,
character, dimension(*), optional string,
integer(8), optional memcnt,
integer, optional errcode )

Definition at line 536 of file mumps_memory_mod.F.

538 REAL(kind(1.D0)), POINTER :: ARRAY(:)
539 INTEGER :: INFO(:)
540 INTEGER :: MINSIZE, LP
541 LOGICAL, OPTIONAL :: FORCE
542 LOGICAL, OPTIONAL :: COPY
543 CHARACTER, OPTIONAL :: STRING*(*)
544 INTEGER, OPTIONAL :: ERRCODE
545 INTEGER(8), OPTIONAL :: MEMCNT
546 LOGICAL :: ICOPY, IFORCE
547 REAL(kind(1.D0)), POINTER :: TEMP(:)
548 INTEGER :: I, IERR, ERRTPL(2)
549 CHARACTER(len=60) :: FMTA, FMTD
550 IF(present(copy)) THEN
551 icopy = copy
552 ELSE
553 icopy = .false.
554 END IF
555 IF (present(force)) THEN
556 iforce = force
557 ELSE
558 iforce = .false.
559 END IF
560 IF (present(string)) THEN
561 fmta = "Allocation failed inside realloc: "//string
562 fmtd = "Deallocation failed inside realloc: "//string
563 ELSE
564 fmta = "Allocation failed inside realloc: "
565 fmtd = "Deallocation failed inside realloc: "
566 END IF
567 IF (present(errcode)) THEN
568 errtpl(1) = errcode
569 errtpl(2) = minsize
570 ELSE
571 errtpl(1) = -13
572 errtpl(2) = minsize
573 END IF
574 IF(icopy) THEN
575 IF(associated(array)) THEN
576 IF ((size(array) .LT. minsize) .OR.
577 & ((size(array).NE.minsize) .AND. iforce)) THEN
578 allocate(temp(minsize), stat=ierr)
579 IF(ierr .LT. 0) THEN
580 WRITE(lp,fmta)
581 info(1:2) = errtpl
582 RETURN
583 ELSE
584 IF(present(memcnt))memcnt = memcnt+
585 & int(minsize,8)*dsize
586 END IF
587 DO i=1, min(size(array), minsize)
588 temp(i) = array(i)
589 END DO
590 IF(present(memcnt))memcnt = memcnt-
591 & int(size(array),8)*dsize
592 deallocate(array, stat=ierr)
593 IF(ierr .LT. 0) THEN
594 WRITE(lp,fmtd)
595 info(1:2) = errtpl
596 RETURN
597 END IF
598 NULLIFY(array)
599 array => temp
600 NULLIFY(temp)
601 END IF
602 ELSE
603 WRITE(lp,
604 & '("Input array is not associated. nothing to copy here")')
605 RETURN
606 END IF
607 ELSE
608 IF(associated(array)) THEN
609 IF ((size(array) .LT. minsize) .OR.
610 & ((size(array).NE.minsize) .AND. iforce)) THEN
611 IF(present(memcnt))memcnt = memcnt-
612 & int(size(array),8)*dsize
613 deallocate(array, stat=ierr)
614 IF(ierr .LT. 0) THEN
615 WRITE(lp,fmtd)
616 info(1:2) = errtpl
617 RETURN
618 END IF
619 ELSE
620 RETURN
621 END IF
622 END IF
623 allocate(array(minsize), stat=ierr)
624 IF(ierr .LT. 0) THEN
625 WRITE(lp,fmta)
626 info(1:2) = errtpl
627 RETURN
628 ELSE
629 IF(present(memcnt)) memcnt = memcnt+
630 & int(minsize,8)*dsize
631 END IF
632 END IF
633 RETURN

◆ mumps_irealloc()

subroutine mumps_memory_mod::mumps_realloc::mumps_irealloc ( integer, dimension(:), pointer array,
integer minsize,
integer, dimension(:) info,
integer lp,
logical, optional force,
logical, optional copy,
character, dimension(*), optional string,
integer(8), optional memcnt,
integer, optional errcode )

Definition at line 40 of file mumps_memory_mod.F.

42 INTEGER, POINTER :: ARRAY(:)
43 INTEGER :: INFO(:)
44 INTEGER :: MINSIZE, LP
45 LOGICAL, OPTIONAL :: FORCE
46 LOGICAL, OPTIONAL :: COPY
47 CHARACTER, OPTIONAL :: STRING*(*)
48 INTEGER, OPTIONAL :: ERRCODE
49 INTEGER(8), OPTIONAL :: MEMCNT
50 LOGICAL :: ICOPY, IFORCE
51 INTEGER, POINTER :: TEMP(:)
52 INTEGER :: I, IERR, ERRTPL(2)
53 CHARACTER(len=60) :: FMTA, FMTD
54 IF(present(copy)) THEN
55 icopy = copy
56 ELSE
57 icopy = .false.
58 END IF
59 IF (present(force)) THEN
60 iforce = force
61 ELSE
62 iforce = .false.
63 END IF
64 IF (present(string)) THEN
65 fmta = "Allocation failed inside realloc: "//string
66 fmtd = "Deallocation failed inside realloc: "//string
67 ELSE
68 fmta = "Allocation failed inside realloc: "
69 fmtd = "Deallocation failed inside realloc: "
70 END IF
71 IF (present(errcode)) THEN
72 errtpl(1) = errcode
73 errtpl(2) = minsize
74 ELSE
75 errtpl(1) = -13
76 errtpl(2) = minsize
77 END IF
78 IF(icopy) THEN
79 IF(associated(array)) THEN
80 IF ((size(array) .LT. minsize) .OR.
81 & ((size(array).NE.minsize) .AND. iforce)) THEN
82 allocate(temp(minsize), stat=ierr)
83 IF(ierr .LT. 0) THEN
84 WRITE(lp,fmta)
85 info(1:2) = errtpl
86 RETURN
87 ELSE
88 IF(present(memcnt))memcnt = memcnt+
89 & int(minsize,8)*isize
90 END IF
91 DO i=1, min(size(array), minsize)
92 temp(i) = array(i)
93 END DO
94 IF(present(memcnt))memcnt = memcnt-
95 & int(size(array),8)*isize
96 deallocate(array, stat=ierr)
97 IF(ierr .LT. 0) THEN
98 WRITE(lp,fmtd)
99 info(1:2) = errtpl
100 RETURN
101 END IF
102 NULLIFY(array)
103 array => temp
104 NULLIFY(temp)
105 END IF
106 ELSE
107 WRITE(lp,
108 & '("Input array is not associated. nothing to copy here")')
109 RETURN
110 END IF
111 ELSE
112 IF(associated(array)) THEN
113 IF ((size(array) .LT. minsize) .OR.
114 & ((size(array).NE.minsize) .AND. iforce)) THEN
115 IF(present(memcnt))memcnt = memcnt-
116 & int(size(array),8)*isize
117 deallocate(array, stat=ierr)
118 IF(ierr .LT. 0) THEN
119 WRITE(lp,fmtd)
120 info(1:2) = errtpl
121 RETURN
122 END IF
123 ELSE
124 RETURN
125 END IF
126 END IF
127 allocate(array(minsize), stat=ierr)
128 IF(ierr .LT. 0) THEN
129 WRITE(lp,fmta)
130 info(1:2) = errtpl
131 RETURN
132 ELSE
133 IF(present(memcnt)) memcnt = memcnt+
134 & minsize*isize
135 END IF
136 END IF
137 RETURN

◆ mumps_srealloc()

subroutine mumps_memory_mod::mumps_realloc::mumps_srealloc ( real(kind(1.e0)), dimension(:), pointer array,
integer minsize,
integer, dimension(:) info,
integer lp,
logical, optional force,
logical, optional copy,
character, dimension(*), optional string,
integer(8), optional memcnt,
integer, optional errcode )

Definition at line 438 of file mumps_memory_mod.F.

440 REAL(kind(1.E0)), POINTER :: ARRAY(:)
441 INTEGER :: INFO(:)
442 INTEGER :: MINSIZE, LP
443 LOGICAL, OPTIONAL :: FORCE
444 LOGICAL, OPTIONAL :: COPY
445 CHARACTER, OPTIONAL :: STRING*(*)
446 INTEGER, OPTIONAL :: ERRCODE
447 INTEGER(8), OPTIONAL :: MEMCNT
448 LOGICAL :: ICOPY, IFORCE
449 REAL(kind(1.E0)), POINTER :: TEMP(:)
450 INTEGER :: I, IERR, ERRTPL(2)
451 CHARACTER(len=60) :: FMTA, FMTD
452 IF(present(copy)) THEN
453 icopy = copy
454 ELSE
455 icopy = .false.
456 END IF
457 IF (present(force)) THEN
458 iforce = force
459 ELSE
460 iforce = .false.
461 END IF
462 IF (present(string)) THEN
463 fmta = "Allocation failed inside realloc: "//string
464 fmtd = "Deallocation failed inside realloc: "//string
465 ELSE
466 fmta = "Allocation failed inside realloc: "
467 fmtd = "Deallocation failed inside realloc: "
468 END IF
469 IF (present(errcode)) THEN
470 errtpl(1) = errcode
471 errtpl(2) = minsize
472 ELSE
473 errtpl(1) = -13
474 errtpl(2) = minsize
475 END IF
476 IF(icopy) THEN
477 IF(associated(array)) THEN
478 IF ((size(array) .LT. minsize) .OR.
479 & ((size(array).NE.minsize) .AND. iforce)) THEN
480 allocate(temp(minsize), stat=ierr)
481 IF(ierr .LT. 0) THEN
482 WRITE(lp,fmta)
483 info(1:2) = errtpl
484 RETURN
485 ELSE
486 IF(present(memcnt))memcnt = memcnt+
487 & int(minsize,8)*ssize
488 END IF
489 DO i=1, min(size(array), minsize)
490 temp(i) = array(i)
491 END DO
492 IF(present(memcnt))memcnt = memcnt-
493 & int(size(array),8)*ssize
494 deallocate(array, stat=ierr)
495 IF(ierr .LT. 0) THEN
496 WRITE(lp,fmtd)
497 info(1:2) = errtpl
498 RETURN
499 END IF
500 NULLIFY(array)
501 array => temp
502 NULLIFY(temp)
503 END IF
504 ELSE
505 WRITE(lp,
506 & '("Input array is not associated. nothing to copy here")')
507 RETURN
508 END IF
509 ELSE
510 IF(associated(array)) THEN
511 IF ((size(array) .LT. minsize) .OR.
512 & ((size(array).NE.minsize) .AND. iforce)) THEN
513 IF(present(memcnt))memcnt = memcnt-
514 & int(size(array),8)*ssize
515 deallocate(array, stat=ierr)
516 IF(ierr .LT. 0) THEN
517 WRITE(lp,fmtd)
518 info(1:2) = errtpl
519 RETURN
520 END IF
521 ELSE
522 RETURN
523 END IF
524 END IF
525 allocate(array(minsize), stat=ierr)
526 IF(ierr .LT. 0) THEN
527 WRITE(lp,fmta)
528 info(1:2) = errtpl
529 RETURN
530 ELSE
531 IF(present(memcnt)) memcnt = memcnt+minsize*ssize
532 END IF
533 END IF
534 RETURN

◆ mumps_zrealloc()

subroutine mumps_memory_mod::mumps_realloc::mumps_zrealloc ( complex(kind((1.d0,1.d0))), dimension(:), pointer array,
integer minsize,
integer, dimension(:) info,
integer lp,
logical, optional force,
logical, optional copy,
character, dimension(*), optional string,
integer(8), optional memcnt,
integer, optional errcode )

Definition at line 734 of file mumps_memory_mod.F.

736 COMPLEX(kind((1.D0,1.D0))), POINTER :: ARRAY(:)
737 INTEGER :: INFO(:)
738 INTEGER :: MINSIZE, LP
739 LOGICAL, OPTIONAL :: FORCE
740 LOGICAL, OPTIONAL :: COPY
741 CHARACTER, OPTIONAL :: STRING*(*)
742 INTEGER, OPTIONAL :: ERRCODE
743 INTEGER(8), OPTIONAL :: MEMCNT
744 LOGICAL :: ICOPY, IFORCE
745 COMPLEX(kind((1.D0,1.D0))), POINTER :: TEMP(:)
746 INTEGER :: I, IERR, ERRTPL(2)
747 CHARACTER(len=60) :: FMTA, FMTD
748 IF(present(copy)) THEN
749 icopy = copy
750 ELSE
751 icopy = .false.
752 END IF
753 IF (present(force)) THEN
754 iforce = force
755 ELSE
756 iforce = .false.
757 END IF
758 IF (present(string)) THEN
759 fmta = "Allocation failed inside realloc: "//string
760 fmtd = "Deallocation failed inside realloc: "//string
761 ELSE
762 fmta = "Allocation failed inside realloc: "
763 fmtd = "Deallocation failed inside realloc: "
764 END IF
765 IF (present(errcode)) THEN
766 errtpl(1) = errcode
767 errtpl(2) = minsize
768 ELSE
769 errtpl(1) = -13
770 errtpl(2) = minsize
771 END IF
772 IF(icopy) THEN
773 IF(associated(array)) THEN
774 IF ((size(array) .LT. minsize) .OR.
775 & ((size(array).NE.minsize) .AND. iforce)) THEN
776 allocate(temp(minsize), stat=ierr)
777 IF(ierr .LT. 0) THEN
778 WRITE(lp,fmta)
779 info(1:2) = errtpl
780 RETURN
781 ELSE
782 IF(present(memcnt))memcnt = memcnt+int(minsize,8)*16_8
783 END IF
784 DO i=1, min(size(array), minsize)
785 temp(i) = array(i)
786 END DO
787 IF(present(memcnt))memcnt =memcnt-
788 & int(size(array),8)*zsize
789 deallocate(array, stat=ierr)
790 IF(ierr .LT. 0) THEN
791 WRITE(lp,fmtd)
792 info(1:2) = errtpl
793 RETURN
794 END IF
795 NULLIFY(array)
796 array => temp
797 NULLIFY(temp)
798 END IF
799 ELSE
800 WRITE(lp,
801 & '("Input array is not associated. nothing to copy here")')
802 RETURN
803 END IF
804 ELSE
805 IF(associated(array)) THEN
806 IF ((size(array) .LT. minsize) .OR.
807 & ((size(array).NE.minsize) .AND. iforce)) THEN
808 IF(present(memcnt))memcnt =memcnt-
809 & int(size(array),8)*zsize
810 deallocate(array, stat=ierr)
811 IF(ierr .LT. 0) THEN
812 WRITE(lp,fmtd)
813 info(1:2) = errtpl
814 RETURN
815 END IF
816 ELSE
817 RETURN
818 END IF
819 END IF
820 allocate(array(minsize), stat=ierr)
821 IF(ierr .LT. 0) THEN
822 WRITE(lp,fmta)
823 info(1:2) = errtpl
824 RETURN
825 ELSE
826 IF(present(memcnt)) memcnt = memcnt+
827 & int(minsize,8)*zsize
828 END IF
829 END IF
830 RETURN

The documentation for this interface was generated from the following file: