\hypertarget{interfacedc__test_1_1assertequal}{}\section{dc\+\_\+test\+:\+:assertequal Interface Reference}
\label{interfacedc__test_1_1assertequal}\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_a440a38a31433aa489ef00a8ba290041b}{dctestassertequalchar0} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_a0fff1c443e3cae49ed345ee67c43e3c0}{dctestassertequalchar1} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_a0eb4ed13c092b5447622773b02cfaa23}{dctestassertequalchar2} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_ac9b505e962be8d7f5ef33570835b4516}{dctestassertequalchar3} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_a9dff393855ff4d8c995b93eab0694a49}{dctestassertequalchar4} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_a8bf04c1766cc6f915027c9e186f6f3e9}{dctestassertequalchar5} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_a8cde4891e508cc783476413ee4f846ce}{dctestassertequalchar6} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_ae54f3ee50382291477113a7b8fbc9e2d}{dctestassertequalchar7} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_abc099a22918a4232de8660c25c008f7c}{dctestassertequalint0} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_a8be1048b7ef238e34ae889871693c813}{dctestassertequalint1} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_a8269d5664877e5be07bcf1d372e32b08}{dctestassertequalint2} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_a8a012df3a6b40c90ec7a34f3843ec311}{dctestassertequalint3} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_a81a5b44ef024c203fd9803c6878060f4}{dctestassertequalint4} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_a2e54069365dc35829fe7d2ae234aa75a}{dctestassertequalint5} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_ab407a38f740058e96226b2622699d6af}{dctestassertequalint6} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_a9e8f0ddf2104e7528d0f6020889d0945}{dctestassertequalint7} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_adb2f06420059d2de36d2d7526a4d8095}{dctestassertequalreal0} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_a5664b3f69a9fe5814eab4ac631f06837}{dctestassertequalreal1} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_a5e2637454273da2156335d5a3f6f83aa}{dctestassertequalreal2} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_a3ea06980e5292faa134406881132a20e}{dctestassertequalreal3} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_a87ffae3213da310f5b791aec5e5242e0}{dctestassertequalreal4} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_ac75288761cc2726a608e84c63295cc5e}{dctestassertequalreal5} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_a315b22a1011c9b244020e3022b5ed17b}{dctestassertequalreal6} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_aba698c89c5a00e3ba1f815aeeb25419c}{dctestassertequalreal7} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_a6bfe0c22ea38f2a93f2502221566e24f}{dctestassertequaldouble0} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_a38c16ed46e430c549bfc16e8491c73a5}{dctestassertequaldouble1} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_aea9d1647cc5826c85504cbce33f9e32b}{dctestassertequaldouble2} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_a04044943fe32fcc0a3a405fb9fa171fa}{dctestassertequaldouble3} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_ae734b3449565f5a2737de0446ef7461d}{dctestassertequaldouble4} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_ae05b6389844d3ca73d4911065f67794c}{dctestassertequaldouble5} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_afbe51334fb7bbc3d35e7ba995537a2b6}{dctestassertequaldouble6} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_a53eedbb7f10677ded5313bc7e9dbd7f8}{dctestassertequaldouble7} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_acd80c1259112576cdf2540dbe6505d76}{dctestassertequallogical0} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_a4c47ed56a56621f18c7fc8c63d168f75}{dctestassertequallogical1} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_ac5359a99d841b301a49daa5ba636dd6e}{dctestassertequallogical2} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_acc9cbd56c7c4916d5225a3f3305cd268}{dctestassertequallogical3} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_ade4a62ce838a767f21599dae968ddfe6}{dctestassertequallogical4} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_ac1d0cb16e04d4802ea7c13e523650bb0}{dctestassertequallogical5} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_ad9a87002194b1117d0a40467a8248344}{dctestassertequallogical6} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_a3c266dfbff07c1e9e85cb3284cbd6740}{dctestassertequallogical7} (message, answer, check)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_a84561a1b84ee1111524df6c156bb0e26}{dctestassertequalreal0digits} (message, answer, check, significant\+\_\+digits, ignore\+\_\+digits)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_a46c3eb908bf43ba59a7115326ff7eb07}{dctestassertequalreal1digits} (message, answer, check, significant\+\_\+digits, ignore\+\_\+digits)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_a68d4667f9beae36c50ec148587e38024}{dctestassertequalreal2digits} (message, answer, check, significant\+\_\+digits, ignore\+\_\+digits)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_a8738d84b77a1378b93ceae7e2a7b8301}{dctestassertequalreal3digits} (message, answer, check, significant\+\_\+digits, ignore\+\_\+digits)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_a5c500f920e4e6d11c374f89d4c8f152e}{dctestassertequalreal4digits} (message, answer, check, significant\+\_\+digits, ignore\+\_\+digits)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_a9f012dc079f3ee2e3eb65ecfcf614cb3}{dctestassertequalreal5digits} (message, answer, check, significant\+\_\+digits, ignore\+\_\+digits)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_ac856556b993824990fa2d3fbea61c237}{dctestassertequalreal6digits} (message, answer, check, significant\+\_\+digits, ignore\+\_\+digits)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_a0bcd1212eb821b91d84f0d205b0faacf}{dctestassertequalreal7digits} (message, answer, check, significant\+\_\+digits, ignore\+\_\+digits)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_a12d741c4b91dd9e75daa006123c0383a}{dctestassertequaldouble0digits} (message, answer, check, significant\+\_\+digits, ignore\+\_\+digits)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_a117455f644083945ef0c248ad27c53be}{dctestassertequaldouble1digits} (message, answer, check, significant\+\_\+digits, ignore\+\_\+digits)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_a064d4f9fc18efc4c8d9254da630dbd55}{dctestassertequaldouble2digits} (message, answer, check, significant\+\_\+digits, ignore\+\_\+digits)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_ab6acdec2e5c8d2a625b45256bc41a6ea}{dctestassertequaldouble3digits} (message, answer, check, significant\+\_\+digits, ignore\+\_\+digits)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_a0d0d93d0418a835cb5ff5bca784d94be}{dctestassertequaldouble4digits} (message, answer, check, significant\+\_\+digits, ignore\+\_\+digits)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_a7e3da1a01dba43f696c402a45810b9d2}{dctestassertequaldouble5digits} (message, answer, check, significant\+\_\+digits, ignore\+\_\+digits)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_ad8392aac0d15b9471addb784f1007aea}{dctestassertequaldouble6digits} (message, answer, check, significant\+\_\+digits, ignore\+\_\+digits)
\item 
subroutine \hyperlink{interfacedc__test_1_1assertequal_a15921b0f16828edb1e684e0bc9cf0732}{dctestassertequaldouble7digits} (message, answer, check, significant\+\_\+digits, ignore\+\_\+digits)
\end{DoxyCompactItemize}


\subsection{Detailed Description}


Definition at line 295 of file dc\+\_\+test.\+f90.



\subsection{Member Function/\+Subroutine Documentation}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_a440a38a31433aa489ef00a8ba290041b}\label{interfacedc__test_1_1assertequal_a440a38a31433aa489ef00a8ba290041b}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequalchar0@{dctestassertequalchar0}}
\index{dctestassertequalchar0@{dctestassertequalchar0}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequalchar0()}{dctestassertequalchar0()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequalchar0 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{character($\ast$), intent(in)}]{answer,  }\item[{character($\ast$), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 531 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
531     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
532     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
533     \textcolor{keywordtype}{implicit none}
534     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
535     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: answer
536     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: check
537     \textcolor{keywordtype}{logical}:: err\_flag
538     \textcolor{keywordtype}{character(STRING)}:: pos\_str
539     \textcolor{keywordtype}{character(STRING)}:: wrong, right
540 
541                                         
542 
543                                                                 
544                     
545 
546   \textcolor{keywordflow}{continue}
547     err\_flag = .false.
548 
549                     
550     err\_flag = .not. trim(answer) == trim(check)
551     wrong = check
552     right = answer
553     pos\_str = \textcolor{stringliteral}{''}
554 
555                     
556 
557 
558     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
559       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
560       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
561       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str) // \textcolor{stringliteral}{'  = '}, trim(wrong)
562       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
563       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str) // \textcolor{stringliteral}{' = '}, trim(right)
564 
565       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
566     \textcolor{keywordflow}{else}
567       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
568 \textcolor{keywordflow}{    end if}
569 
570 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_a0fff1c443e3cae49ed345ee67c43e3c0}\label{interfacedc__test_1_1assertequal_a0fff1c443e3cae49ed345ee67c43e3c0}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequalchar1@{dctestassertequalchar1}}
\index{dctestassertequalchar1@{dctestassertequalchar1}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequalchar1()}{dctestassertequalchar1()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequalchar1 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{character($\ast$), dimension(\+:), intent(in)}]{answer,  }\item[{character($\ast$), dimension(\+:), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 575 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
575     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
576     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
577     \textcolor{keywordtype}{implicit none}
578     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
579     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: answer(:)
580     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: check(:)
581     \textcolor{keywordtype}{logical}:: err\_flag
582     \textcolor{keywordtype}{character(STRING)}:: pos\_str
583     \textcolor{keywordtype}{character(STRING)}:: wrong, right
584 
585                         \textcolor{keywordtype}{integer}:: answer\_shape(1), check\_shape(1), pos(1)
586     \textcolor{keywordtype}{logical}:: consist\_shape(1)
587     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(1)
588     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:)
589     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:)
590     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:)
591                     
592 
593                                               \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{allocatable}:: answer\_fixed\_length(:)
594     \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{allocatable}:: check\_fixed\_length(:)
595                       
596                     
597 
598   \textcolor{keywordflow}{continue}
599     err\_flag = .false.
600 
601                     
602     answer\_shape = shape(answer)
603     check\_shape = shape(check)
604 
605     consist\_shape = answer\_shape == check\_shape
606 
607     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
608       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
609       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
610       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
611       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
612       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
613 
614       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
615 \textcolor{keywordflow}{    end if}
616 
617 
618     \textcolor{keyword}{allocate}( mask\_array( &
619                       
620       &    answer\_shape(1)  )  &
621       &  )
622 
623     \textcolor{keyword}{allocate}( judge( &
624                       
625       &    answer\_shape(1)  )  &
626       &  )
627 
628     \textcolor{keyword}{allocate}( judge\_rev( &
629                       
630       &    answer\_shape(1)  )  &
631       &  )
632 
633                       
634     \textcolor{keyword}{allocate}( answer\_fixed\_length( &
635                         
636       &    answer\_shape(1)  )  &
637       &  )
638 
639     \textcolor{keyword}{allocate}( check\_fixed\_length( &
640                         
641       &    check\_shape(1)  )  &
642       &  )
643 
644     answer\_fixed\_length = answer
645     check\_fixed\_length = check
646 
647     judge = answer\_fixed\_length == check\_fixed\_length
648     \textcolor{keyword}{deallocate}(answer\_fixed\_length, check\_fixed\_length)
649 
650                       
651 
652     judge\_rev = .not. judge
653     err\_flag = any(judge\_rev)
654     mask\_array = 1
655     pos = maxloc(mask\_array, judge\_rev)
656 
657     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
658 
659       wrong = check( &
660                       
661         &    pos(1)  )
662 
663       right = answer( &
664                       
665         &    pos(1)  )
666 
667                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
668                       
669 
670       pos\_str = \textcolor{stringliteral}{'('} // &
671                       
672         &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{')'}
673 
674 \textcolor{keywordflow}{    end if}
675     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
676 
677                     
678 
679 
680     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
681       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
682       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
683       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str) // \textcolor{stringliteral}{'  = '}, trim(wrong)
684       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
685       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str) // \textcolor{stringliteral}{' = '}, trim(right)
686 
687       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
688     \textcolor{keywordflow}{else}
689       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
690 \textcolor{keywordflow}{    end if}
691 
692 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_a0eb4ed13c092b5447622773b02cfaa23}\label{interfacedc__test_1_1assertequal_a0eb4ed13c092b5447622773b02cfaa23}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequalchar2@{dctestassertequalchar2}}
\index{dctestassertequalchar2@{dctestassertequalchar2}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequalchar2()}{dctestassertequalchar2()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequalchar2 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{character($\ast$), dimension(\+:,\+:), intent(in)}]{answer,  }\item[{character($\ast$), dimension(\+:,\+:), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 697 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
697     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
698     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
699     \textcolor{keywordtype}{implicit none}
700     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
701     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: answer(:,:)
702     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: check(:,:)
703     \textcolor{keywordtype}{logical}:: err\_flag
704     \textcolor{keywordtype}{character(STRING)}:: pos\_str
705     \textcolor{keywordtype}{character(STRING)}:: wrong, right
706 
707                         \textcolor{keywordtype}{integer}:: answer\_shape(2), check\_shape(2), pos(2)
708     \textcolor{keywordtype}{logical}:: consist\_shape(2)
709     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(2)
710     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:,:)
711     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:,:)
712     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:,:)
713                     
714 
715                                               \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{allocatable}:: answer\_fixed\_length(:,:)
716     \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{allocatable}:: check\_fixed\_length(:,:)
717                       
718                     
719 
720   \textcolor{keywordflow}{continue}
721     err\_flag = .false.
722 
723                     
724     answer\_shape = shape(answer)
725     check\_shape = shape(check)
726 
727     consist\_shape = answer\_shape == check\_shape
728 
729     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
730       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
731       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
732       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
733       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
734       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
735 
736       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
737 \textcolor{keywordflow}{    end if}
738 
739 
740     \textcolor{keyword}{allocate}( mask\_array( &
741                             &    answer\_shape(1), &
742                       
743       &    answer\_shape(2)  )  &
744       &  )
745 
746     \textcolor{keyword}{allocate}( judge( &
747                             &    answer\_shape(1), &
748                       
749       &    answer\_shape(2)  )  &
750       &  )
751 
752     \textcolor{keyword}{allocate}( judge\_rev( &
753                             &    answer\_shape(1), &
754                       
755       &    answer\_shape(2)  )  &
756       &  )
757 
758                       
759     \textcolor{keyword}{allocate}( answer\_fixed\_length( &
760                               &    answer\_shape(1), &
761                         
762       &    answer\_shape(2)  )  &
763       &  )
764 
765     \textcolor{keyword}{allocate}( check\_fixed\_length( &
766                               &    check\_shape(1), &
767                         
768       &    check\_shape(2)  )  &
769       &  )
770 
771     answer\_fixed\_length = answer
772     check\_fixed\_length = check
773 
774     judge = answer\_fixed\_length == check\_fixed\_length
775     \textcolor{keyword}{deallocate}(answer\_fixed\_length, check\_fixed\_length)
776 
777                       
778 
779     judge\_rev = .not. judge
780     err\_flag = any(judge\_rev)
781     mask\_array = 1
782     pos = maxloc(mask\_array, judge\_rev)
783 
784     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
785 
786       wrong = check( &
787                               &    pos(1), &
788                       
789         &    pos(2)  )
790 
791       right = answer( &
792                               &    pos(1), &
793                       
794         &    pos(2)  )
795 
796                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
797                       
798       \textcolor{keyword}{write}(unit=pos\_array(2), fmt=\textcolor{stringliteral}{"(i20)"}) pos(2)
799                       
800 
801       pos\_str = \textcolor{stringliteral}{'('} // &
802                               &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{','} // &
803                       
804         &    trim(adjustl(pos\_array(2))) // \textcolor{stringliteral}{')'}
805 
806 \textcolor{keywordflow}{    end if}
807     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
808 
809                     
810 
811 
812     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
813       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
814       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
815       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str) // \textcolor{stringliteral}{'  = '}, trim(wrong)
816       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
817       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str) // \textcolor{stringliteral}{' = '}, trim(right)
818 
819       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
820     \textcolor{keywordflow}{else}
821       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
822 \textcolor{keywordflow}{    end if}
823 
824 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_ac9b505e962be8d7f5ef33570835b4516}\label{interfacedc__test_1_1assertequal_ac9b505e962be8d7f5ef33570835b4516}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequalchar3@{dctestassertequalchar3}}
\index{dctestassertequalchar3@{dctestassertequalchar3}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequalchar3()}{dctestassertequalchar3()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequalchar3 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{character($\ast$), dimension(\+:,\+:,\+:), intent(in)}]{answer,  }\item[{character($\ast$), dimension(\+:,\+:,\+:), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 829 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
829     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
830     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
831     \textcolor{keywordtype}{implicit none}
832     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
833     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: answer(:,:,:)
834     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: check(:,:,:)
835     \textcolor{keywordtype}{logical}:: err\_flag
836     \textcolor{keywordtype}{character(STRING)}:: pos\_str
837     \textcolor{keywordtype}{character(STRING)}:: wrong, right
838 
839                         \textcolor{keywordtype}{integer}:: answer\_shape(3), check\_shape(3), pos(3)
840     \textcolor{keywordtype}{logical}:: consist\_shape(3)
841     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(3)
842     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:,:,:)
843     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:,:,:)
844     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:,:,:)
845                     
846 
847                                               \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{allocatable}:: answer\_fixed\_length(:,:,:)
848     \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{allocatable}:: check\_fixed\_length(:,:,:)
849                       
850                     
851 
852   \textcolor{keywordflow}{continue}
853     err\_flag = .false.
854 
855                     
856     answer\_shape = shape(answer)
857     check\_shape = shape(check)
858 
859     consist\_shape = answer\_shape == check\_shape
860 
861     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
862       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
863       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
864       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
865       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
866       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
867 
868       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
869 \textcolor{keywordflow}{    end if}
870 
871 
872     \textcolor{keyword}{allocate}( mask\_array( &
873                             &    answer\_shape(1), &
874                       
875       &    answer\_shape(2), &
876                       
877       &    answer\_shape(3)  )  &
878       &  )
879 
880     \textcolor{keyword}{allocate}( judge( &
881                             &    answer\_shape(1), &
882                       
883       &    answer\_shape(2), &
884                       
885       &    answer\_shape(3)  )  &
886       &  )
887 
888     \textcolor{keyword}{allocate}( judge\_rev( &
889                             &    answer\_shape(1), &
890                       
891       &    answer\_shape(2), &
892                       
893       &    answer\_shape(3)  )  &
894       &  )
895 
896                       
897     \textcolor{keyword}{allocate}( answer\_fixed\_length( &
898                               &    answer\_shape(1), &
899                         
900       &    answer\_shape(2), &
901                         
902       &    answer\_shape(3)  )  &
903       &  )
904 
905     \textcolor{keyword}{allocate}( check\_fixed\_length( &
906                               &    check\_shape(1), &
907                         
908       &    check\_shape(2), &
909                         
910       &    check\_shape(3)  )  &
911       &  )
912 
913     answer\_fixed\_length = answer
914     check\_fixed\_length = check
915 
916     judge = answer\_fixed\_length == check\_fixed\_length
917     \textcolor{keyword}{deallocate}(answer\_fixed\_length, check\_fixed\_length)
918 
919                       
920 
921     judge\_rev = .not. judge
922     err\_flag = any(judge\_rev)
923     mask\_array = 1
924     pos = maxloc(mask\_array, judge\_rev)
925 
926     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
927 
928       wrong = check( &
929                               &    pos(1), &
930                       
931         &    pos(2), &
932                       
933         &    pos(3)  )
934 
935       right = answer( &
936                               &    pos(1), &
937                       
938         &    pos(2), &
939                       
940         &    pos(3)  )
941 
942                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
943                       
944       \textcolor{keyword}{write}(unit=pos\_array(2), fmt=\textcolor{stringliteral}{"(i20)"}) pos(2)
945                       
946       \textcolor{keyword}{write}(unit=pos\_array(3), fmt=\textcolor{stringliteral}{"(i20)"}) pos(3)
947                       
948 
949       pos\_str = \textcolor{stringliteral}{'('} // &
950                               &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{','} // &
951                       
952         &    trim(adjustl(pos\_array(2))) // \textcolor{stringliteral}{','} // &
953                       
954         &    trim(adjustl(pos\_array(3))) // \textcolor{stringliteral}{')'}
955 
956 \textcolor{keywordflow}{    end if}
957     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
958 
959                     
960 
961 
962     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
963       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
964       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
965       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str) // \textcolor{stringliteral}{'  = '}, trim(wrong)
966       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
967       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str) // \textcolor{stringliteral}{' = '}, trim(right)
968 
969       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
970     \textcolor{keywordflow}{else}
971       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
972 \textcolor{keywordflow}{    end if}
973 
974 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_a9dff393855ff4d8c995b93eab0694a49}\label{interfacedc__test_1_1assertequal_a9dff393855ff4d8c995b93eab0694a49}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequalchar4@{dctestassertequalchar4}}
\index{dctestassertequalchar4@{dctestassertequalchar4}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequalchar4()}{dctestassertequalchar4()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequalchar4 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{character($\ast$), dimension(\+:,\+:,\+:,\+:), intent(in)}]{answer,  }\item[{character($\ast$), dimension(\+:,\+:,\+:,\+:), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 979 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
979     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
980     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
981     \textcolor{keywordtype}{implicit none}
982     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
983     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: answer(:,:,:,:)
984     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: check(:,:,:,:)
985     \textcolor{keywordtype}{logical}:: err\_flag
986     \textcolor{keywordtype}{character(STRING)}:: pos\_str
987     \textcolor{keywordtype}{character(STRING)}:: wrong, right
988 
989                         \textcolor{keywordtype}{integer}:: answer\_shape(4), check\_shape(4), pos(4)
990     \textcolor{keywordtype}{logical}:: consist\_shape(4)
991     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(4)
992     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:,:,:,:)
993     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:,:,:,:)
994     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:,:,:,:)
995                     
996 
997                                               \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{allocatable}:: answer\_fixed\_length(:,:,:,:)
998     \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{allocatable}:: check\_fixed\_length(:,:,:,:)
999                       
1000                     
1001 
1002   \textcolor{keywordflow}{continue}
1003     err\_flag = .false.
1004 
1005                     
1006     answer\_shape = shape(answer)
1007     check\_shape = shape(check)
1008 
1009     consist\_shape = answer\_shape == check\_shape
1010 
1011     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
1012       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
1013       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
1014       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
1015       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
1016       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
1017 
1018       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
1019 \textcolor{keywordflow}{    end if}
1020 
1021 
1022     \textcolor{keyword}{allocate}( mask\_array( &
1023                             &    answer\_shape(1), &
1024                       
1025       &    answer\_shape(2), &
1026                       
1027       &    answer\_shape(3), &
1028                       
1029       &    answer\_shape(4)  )  &
1030       &  )
1031 
1032     \textcolor{keyword}{allocate}( judge( &
1033                             &    answer\_shape(1), &
1034                       
1035       &    answer\_shape(2), &
1036                       
1037       &    answer\_shape(3), &
1038                       
1039       &    answer\_shape(4)  )  &
1040       &  )
1041 
1042     \textcolor{keyword}{allocate}( judge\_rev( &
1043                             &    answer\_shape(1), &
1044                       
1045       &    answer\_shape(2), &
1046                       
1047       &    answer\_shape(3), &
1048                       
1049       &    answer\_shape(4)  )  &
1050       &  )
1051 
1052                       
1053     \textcolor{keyword}{allocate}( answer\_fixed\_length( &
1054                               &    answer\_shape(1), &
1055                         
1056       &    answer\_shape(2), &
1057                         
1058       &    answer\_shape(3), &
1059                         
1060       &    answer\_shape(4)  )  &
1061       &  )
1062 
1063     \textcolor{keyword}{allocate}( check\_fixed\_length( &
1064                               &    check\_shape(1), &
1065                         
1066       &    check\_shape(2), &
1067                         
1068       &    check\_shape(3), &
1069                         
1070       &    check\_shape(4)  )  &
1071       &  )
1072 
1073     answer\_fixed\_length = answer
1074     check\_fixed\_length = check
1075 
1076     judge = answer\_fixed\_length == check\_fixed\_length
1077     \textcolor{keyword}{deallocate}(answer\_fixed\_length, check\_fixed\_length)
1078 
1079                       
1080 
1081     judge\_rev = .not. judge
1082     err\_flag = any(judge\_rev)
1083     mask\_array = 1
1084     pos = maxloc(mask\_array, judge\_rev)
1085 
1086     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
1087 
1088       wrong = check( &
1089                               &    pos(1), &
1090                       
1091         &    pos(2), &
1092                       
1093         &    pos(3), &
1094                       
1095         &    pos(4)  )
1096 
1097       right = answer( &
1098                               &    pos(1), &
1099                       
1100         &    pos(2), &
1101                       
1102         &    pos(3), &
1103                       
1104         &    pos(4)  )
1105 
1106                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
1107                       
1108       \textcolor{keyword}{write}(unit=pos\_array(2), fmt=\textcolor{stringliteral}{"(i20)"}) pos(2)
1109                       
1110       \textcolor{keyword}{write}(unit=pos\_array(3), fmt=\textcolor{stringliteral}{"(i20)"}) pos(3)
1111                       
1112       \textcolor{keyword}{write}(unit=pos\_array(4), fmt=\textcolor{stringliteral}{"(i20)"}) pos(4)
1113                       
1114 
1115       pos\_str = \textcolor{stringliteral}{'('} // &
1116                               &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{','} // &
1117                       
1118         &    trim(adjustl(pos\_array(2))) // \textcolor{stringliteral}{','} // &
1119                       
1120         &    trim(adjustl(pos\_array(3))) // \textcolor{stringliteral}{','} // &
1121                       
1122         &    trim(adjustl(pos\_array(4))) // \textcolor{stringliteral}{')'}
1123 
1124 \textcolor{keywordflow}{    end if}
1125     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
1126 
1127                     
1128 
1129 
1130     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
1131       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
1132       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
1133       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str) // \textcolor{stringliteral}{'  = '}, trim(wrong)
1134       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
1135       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str) // \textcolor{stringliteral}{' = '}, trim(right)
1136 
1137       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
1138     \textcolor{keywordflow}{else}
1139       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
1140 \textcolor{keywordflow}{    end if}
1141 
1142 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_a8bf04c1766cc6f915027c9e186f6f3e9}\label{interfacedc__test_1_1assertequal_a8bf04c1766cc6f915027c9e186f6f3e9}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequalchar5@{dctestassertequalchar5}}
\index{dctestassertequalchar5@{dctestassertequalchar5}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequalchar5()}{dctestassertequalchar5()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequalchar5 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{character($\ast$), dimension(\+:,\+:,\+:,\+:,\+:), intent(in)}]{answer,  }\item[{character($\ast$), dimension(\+:,\+:,\+:,\+:,\+:), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 1147 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
1147     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
1148     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
1149     \textcolor{keywordtype}{implicit none}
1150     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
1151     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: answer(:,:,:,:,:)
1152     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: check(:,:,:,:,:)
1153     \textcolor{keywordtype}{logical}:: err\_flag
1154     \textcolor{keywordtype}{character(STRING)}:: pos\_str
1155     \textcolor{keywordtype}{character(STRING)}:: wrong, right
1156 
1157                         \textcolor{keywordtype}{integer}:: answer\_shape(5), check\_shape(5), pos(5)
1158     \textcolor{keywordtype}{logical}:: consist\_shape(5)
1159     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(5)
1160     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:,:,:,:,:)
1161     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:,:,:,:,:)
1162     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:,:,:,:,:)
1163                     
1164 
1165                                               \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{allocatable}:: answer\_fixed\_length(:,:,:,:,
      :)
1166     \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{allocatable}:: check\_fixed\_length(:,:,:,:,:)
1167                       
1168                     
1169 
1170   \textcolor{keywordflow}{continue}
1171     err\_flag = .false.
1172 
1173                     
1174     answer\_shape = shape(answer)
1175     check\_shape = shape(check)
1176 
1177     consist\_shape = answer\_shape == check\_shape
1178 
1179     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
1180       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
1181       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
1182       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
1183       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
1184       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
1185 
1186       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
1187 \textcolor{keywordflow}{    end if}
1188 
1189 
1190     \textcolor{keyword}{allocate}( mask\_array( &
1191                             &    answer\_shape(1), &
1192                       
1193       &    answer\_shape(2), &
1194                       
1195       &    answer\_shape(3), &
1196                       
1197       &    answer\_shape(4), &
1198                       
1199       &    answer\_shape(5)  )  &
1200       &  )
1201 
1202     \textcolor{keyword}{allocate}( judge( &
1203                             &    answer\_shape(1), &
1204                       
1205       &    answer\_shape(2), &
1206                       
1207       &    answer\_shape(3), &
1208                       
1209       &    answer\_shape(4), &
1210                       
1211       &    answer\_shape(5)  )  &
1212       &  )
1213 
1214     \textcolor{keyword}{allocate}( judge\_rev( &
1215                             &    answer\_shape(1), &
1216                       
1217       &    answer\_shape(2), &
1218                       
1219       &    answer\_shape(3), &
1220                       
1221       &    answer\_shape(4), &
1222                       
1223       &    answer\_shape(5)  )  &
1224       &  )
1225 
1226                       
1227     \textcolor{keyword}{allocate}( answer\_fixed\_length( &
1228                               &    answer\_shape(1), &
1229                         
1230       &    answer\_shape(2), &
1231                         
1232       &    answer\_shape(3), &
1233                         
1234       &    answer\_shape(4), &
1235                         
1236       &    answer\_shape(5)  )  &
1237       &  )
1238 
1239     \textcolor{keyword}{allocate}( check\_fixed\_length( &
1240                               &    check\_shape(1), &
1241                         
1242       &    check\_shape(2), &
1243                         
1244       &    check\_shape(3), &
1245                         
1246       &    check\_shape(4), &
1247                         
1248       &    check\_shape(5)  )  &
1249       &  )
1250 
1251     answer\_fixed\_length = answer
1252     check\_fixed\_length = check
1253 
1254     judge = answer\_fixed\_length == check\_fixed\_length
1255     \textcolor{keyword}{deallocate}(answer\_fixed\_length, check\_fixed\_length)
1256 
1257                       
1258 
1259     judge\_rev = .not. judge
1260     err\_flag = any(judge\_rev)
1261     mask\_array = 1
1262     pos = maxloc(mask\_array, judge\_rev)
1263 
1264     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
1265 
1266       wrong = check( &
1267                               &    pos(1), &
1268                       
1269         &    pos(2), &
1270                       
1271         &    pos(3), &
1272                       
1273         &    pos(4), &
1274                       
1275         &    pos(5)  )
1276 
1277       right = answer( &
1278                               &    pos(1), &
1279                       
1280         &    pos(2), &
1281                       
1282         &    pos(3), &
1283                       
1284         &    pos(4), &
1285                       
1286         &    pos(5)  )
1287 
1288                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
1289                       
1290       \textcolor{keyword}{write}(unit=pos\_array(2), fmt=\textcolor{stringliteral}{"(i20)"}) pos(2)
1291                       
1292       \textcolor{keyword}{write}(unit=pos\_array(3), fmt=\textcolor{stringliteral}{"(i20)"}) pos(3)
1293                       
1294       \textcolor{keyword}{write}(unit=pos\_array(4), fmt=\textcolor{stringliteral}{"(i20)"}) pos(4)
1295                       
1296       \textcolor{keyword}{write}(unit=pos\_array(5), fmt=\textcolor{stringliteral}{"(i20)"}) pos(5)
1297                       
1298 
1299       pos\_str = \textcolor{stringliteral}{'('} // &
1300                               &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{','} // &
1301                       
1302         &    trim(adjustl(pos\_array(2))) // \textcolor{stringliteral}{','} // &
1303                       
1304         &    trim(adjustl(pos\_array(3))) // \textcolor{stringliteral}{','} // &
1305                       
1306         &    trim(adjustl(pos\_array(4))) // \textcolor{stringliteral}{','} // &
1307                       
1308         &    trim(adjustl(pos\_array(5))) // \textcolor{stringliteral}{')'}
1309 
1310 \textcolor{keywordflow}{    end if}
1311     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
1312 
1313                     
1314 
1315 
1316     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
1317       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
1318       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
1319       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str) // \textcolor{stringliteral}{'  = '}, trim(wrong)
1320       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
1321       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str) // \textcolor{stringliteral}{' = '}, trim(right)
1322 
1323       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
1324     \textcolor{keywordflow}{else}
1325       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
1326 \textcolor{keywordflow}{    end if}
1327 
1328 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_a8cde4891e508cc783476413ee4f846ce}\label{interfacedc__test_1_1assertequal_a8cde4891e508cc783476413ee4f846ce}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequalchar6@{dctestassertequalchar6}}
\index{dctestassertequalchar6@{dctestassertequalchar6}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequalchar6()}{dctestassertequalchar6()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequalchar6 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{character($\ast$), dimension(\+:,\+:,\+:,\+:,\+:,\+:), intent(in)}]{answer,  }\item[{character($\ast$), dimension(\+:,\+:,\+:,\+:,\+:,\+:), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 1333 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
1333     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
1334     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
1335     \textcolor{keywordtype}{implicit none}
1336     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
1337     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: answer(:,:,:,:,:,:)
1338     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: check(:,:,:,:,:,:)
1339     \textcolor{keywordtype}{logical}:: err\_flag
1340     \textcolor{keywordtype}{character(STRING)}:: pos\_str
1341     \textcolor{keywordtype}{character(STRING)}:: wrong, right
1342 
1343                         \textcolor{keywordtype}{integer}:: answer\_shape(6), check\_shape(6), pos(6)
1344     \textcolor{keywordtype}{logical}:: consist\_shape(6)
1345     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(6)
1346     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:,:,:,:,:,:)
1347     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:,:,:,:,:,:)
1348     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:,:,:,:,:,:)
1349                     
1350 
1351                                               \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{allocatable}:: answer\_fixed\_length(:,:,:,:,
      :,:)
1352     \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{allocatable}:: check\_fixed\_length(:,:,:,:,:,:)
1353                       
1354                     
1355 
1356   \textcolor{keywordflow}{continue}
1357     err\_flag = .false.
1358 
1359                     
1360     answer\_shape = shape(answer)
1361     check\_shape = shape(check)
1362 
1363     consist\_shape = answer\_shape == check\_shape
1364 
1365     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
1366       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
1367       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
1368       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
1369       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
1370       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
1371 
1372       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
1373 \textcolor{keywordflow}{    end if}
1374 
1375 
1376     \textcolor{keyword}{allocate}( mask\_array( &
1377                             &    answer\_shape(1), &
1378                       
1379       &    answer\_shape(2), &
1380                       
1381       &    answer\_shape(3), &
1382                       
1383       &    answer\_shape(4), &
1384                       
1385       &    answer\_shape(5), &
1386                       
1387       &    answer\_shape(6)  )  &
1388       &  )
1389 
1390     \textcolor{keyword}{allocate}( judge( &
1391                             &    answer\_shape(1), &
1392                       
1393       &    answer\_shape(2), &
1394                       
1395       &    answer\_shape(3), &
1396                       
1397       &    answer\_shape(4), &
1398                       
1399       &    answer\_shape(5), &
1400                       
1401       &    answer\_shape(6)  )  &
1402       &  )
1403 
1404     \textcolor{keyword}{allocate}( judge\_rev( &
1405                             &    answer\_shape(1), &
1406                       
1407       &    answer\_shape(2), &
1408                       
1409       &    answer\_shape(3), &
1410                       
1411       &    answer\_shape(4), &
1412                       
1413       &    answer\_shape(5), &
1414                       
1415       &    answer\_shape(6)  )  &
1416       &  )
1417 
1418                       
1419     \textcolor{keyword}{allocate}( answer\_fixed\_length( &
1420                               &    answer\_shape(1), &
1421                         
1422       &    answer\_shape(2), &
1423                         
1424       &    answer\_shape(3), &
1425                         
1426       &    answer\_shape(4), &
1427                         
1428       &    answer\_shape(5), &
1429                         
1430       &    answer\_shape(6)  )  &
1431       &  )
1432 
1433     \textcolor{keyword}{allocate}( check\_fixed\_length( &
1434                               &    check\_shape(1), &
1435                         
1436       &    check\_shape(2), &
1437                         
1438       &    check\_shape(3), &
1439                         
1440       &    check\_shape(4), &
1441                         
1442       &    check\_shape(5), &
1443                         
1444       &    check\_shape(6)  )  &
1445       &  )
1446 
1447     answer\_fixed\_length = answer
1448     check\_fixed\_length = check
1449 
1450     judge = answer\_fixed\_length == check\_fixed\_length
1451     \textcolor{keyword}{deallocate}(answer\_fixed\_length, check\_fixed\_length)
1452 
1453                       
1454 
1455     judge\_rev = .not. judge
1456     err\_flag = any(judge\_rev)
1457     mask\_array = 1
1458     pos = maxloc(mask\_array, judge\_rev)
1459 
1460     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
1461 
1462       wrong = check( &
1463                               &    pos(1), &
1464                       
1465         &    pos(2), &
1466                       
1467         &    pos(3), &
1468                       
1469         &    pos(4), &
1470                       
1471         &    pos(5), &
1472                       
1473         &    pos(6)  )
1474 
1475       right = answer( &
1476                               &    pos(1), &
1477                       
1478         &    pos(2), &
1479                       
1480         &    pos(3), &
1481                       
1482         &    pos(4), &
1483                       
1484         &    pos(5), &
1485                       
1486         &    pos(6)  )
1487 
1488                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
1489                       
1490       \textcolor{keyword}{write}(unit=pos\_array(2), fmt=\textcolor{stringliteral}{"(i20)"}) pos(2)
1491                       
1492       \textcolor{keyword}{write}(unit=pos\_array(3), fmt=\textcolor{stringliteral}{"(i20)"}) pos(3)
1493                       
1494       \textcolor{keyword}{write}(unit=pos\_array(4), fmt=\textcolor{stringliteral}{"(i20)"}) pos(4)
1495                       
1496       \textcolor{keyword}{write}(unit=pos\_array(5), fmt=\textcolor{stringliteral}{"(i20)"}) pos(5)
1497                       
1498       \textcolor{keyword}{write}(unit=pos\_array(6), fmt=\textcolor{stringliteral}{"(i20)"}) pos(6)
1499                       
1500 
1501       pos\_str = \textcolor{stringliteral}{'('} // &
1502                               &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{','} // &
1503                       
1504         &    trim(adjustl(pos\_array(2))) // \textcolor{stringliteral}{','} // &
1505                       
1506         &    trim(adjustl(pos\_array(3))) // \textcolor{stringliteral}{','} // &
1507                       
1508         &    trim(adjustl(pos\_array(4))) // \textcolor{stringliteral}{','} // &
1509                       
1510         &    trim(adjustl(pos\_array(5))) // \textcolor{stringliteral}{','} // &
1511                       
1512         &    trim(adjustl(pos\_array(6))) // \textcolor{stringliteral}{')'}
1513 
1514 \textcolor{keywordflow}{    end if}
1515     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
1516 
1517                     
1518 
1519 
1520     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
1521       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
1522       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
1523       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str) // \textcolor{stringliteral}{'  = '}, trim(wrong)
1524       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
1525       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str) // \textcolor{stringliteral}{' = '}, trim(right)
1526 
1527       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
1528     \textcolor{keywordflow}{else}
1529       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
1530 \textcolor{keywordflow}{    end if}
1531 
1532 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_ae54f3ee50382291477113a7b8fbc9e2d}\label{interfacedc__test_1_1assertequal_ae54f3ee50382291477113a7b8fbc9e2d}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequalchar7@{dctestassertequalchar7}}
\index{dctestassertequalchar7@{dctestassertequalchar7}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequalchar7()}{dctestassertequalchar7()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequalchar7 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{character($\ast$), dimension(\+:,\+:,\+:,\+:,\+:,\+:,\+:), intent(in)}]{answer,  }\item[{character($\ast$), dimension(\+:,\+:,\+:,\+:,\+:,\+:,\+:), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 1537 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
1537     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
1538     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
1539     \textcolor{keywordtype}{implicit none}
1540     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
1541     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: answer(:,:,:,:,:,:,:)
1542     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: check(:,:,:,:,:,:,:)
1543     \textcolor{keywordtype}{logical}:: err\_flag
1544     \textcolor{keywordtype}{character(STRING)}:: pos\_str
1545     \textcolor{keywordtype}{character(STRING)}:: wrong, right
1546 
1547                         \textcolor{keywordtype}{integer}:: answer\_shape(7), check\_shape(7), pos(7)
1548     \textcolor{keywordtype}{logical}:: consist\_shape(7)
1549     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(7)
1550     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:,:,:,:,:,:,:)
1551     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:,:,:,:,:,:,:)
1552     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:,:,:,:,:,:,:)
1553                     
1554 
1555                                               \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{allocatable}:: answer\_fixed\_length(:,:,:,:,
      :,:,:)
1556     \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{allocatable}:: check\_fixed\_length(:,:,:,:,:,:,:)
1557                       
1558                     
1559 
1560   \textcolor{keywordflow}{continue}
1561     err\_flag = .false.
1562 
1563                     
1564     answer\_shape = shape(answer)
1565     check\_shape = shape(check)
1566 
1567     consist\_shape = answer\_shape == check\_shape
1568 
1569     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
1570       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
1571       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
1572       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
1573       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
1574       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
1575 
1576       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
1577 \textcolor{keywordflow}{    end if}
1578 
1579 
1580     \textcolor{keyword}{allocate}( mask\_array( &
1581                             &    answer\_shape(1), &
1582                       
1583       &    answer\_shape(2), &
1584                       
1585       &    answer\_shape(3), &
1586                       
1587       &    answer\_shape(4), &
1588                       
1589       &    answer\_shape(5), &
1590                       
1591       &    answer\_shape(6), &
1592                       
1593       &    answer\_shape(7)  )  &
1594       &  )
1595 
1596     \textcolor{keyword}{allocate}( judge( &
1597                             &    answer\_shape(1), &
1598                       
1599       &    answer\_shape(2), &
1600                       
1601       &    answer\_shape(3), &
1602                       
1603       &    answer\_shape(4), &
1604                       
1605       &    answer\_shape(5), &
1606                       
1607       &    answer\_shape(6), &
1608                       
1609       &    answer\_shape(7)  )  &
1610       &  )
1611 
1612     \textcolor{keyword}{allocate}( judge\_rev( &
1613                             &    answer\_shape(1), &
1614                       
1615       &    answer\_shape(2), &
1616                       
1617       &    answer\_shape(3), &
1618                       
1619       &    answer\_shape(4), &
1620                       
1621       &    answer\_shape(5), &
1622                       
1623       &    answer\_shape(6), &
1624                       
1625       &    answer\_shape(7)  )  &
1626       &  )
1627 
1628                       
1629     \textcolor{keyword}{allocate}( answer\_fixed\_length( &
1630                               &    answer\_shape(1), &
1631                         
1632       &    answer\_shape(2), &
1633                         
1634       &    answer\_shape(3), &
1635                         
1636       &    answer\_shape(4), &
1637                         
1638       &    answer\_shape(5), &
1639                         
1640       &    answer\_shape(6), &
1641                         
1642       &    answer\_shape(7)  )  &
1643       &  )
1644 
1645     \textcolor{keyword}{allocate}( check\_fixed\_length( &
1646                               &    check\_shape(1), &
1647                         
1648       &    check\_shape(2), &
1649                         
1650       &    check\_shape(3), &
1651                         
1652       &    check\_shape(4), &
1653                         
1654       &    check\_shape(5), &
1655                         
1656       &    check\_shape(6), &
1657                         
1658       &    check\_shape(7)  )  &
1659       &  )
1660 
1661     answer\_fixed\_length = answer
1662     check\_fixed\_length = check
1663 
1664     judge = answer\_fixed\_length == check\_fixed\_length
1665     \textcolor{keyword}{deallocate}(answer\_fixed\_length, check\_fixed\_length)
1666 
1667                       
1668 
1669     judge\_rev = .not. judge
1670     err\_flag = any(judge\_rev)
1671     mask\_array = 1
1672     pos = maxloc(mask\_array, judge\_rev)
1673 
1674     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
1675 
1676       wrong = check( &
1677                               &    pos(1), &
1678                       
1679         &    pos(2), &
1680                       
1681         &    pos(3), &
1682                       
1683         &    pos(4), &
1684                       
1685         &    pos(5), &
1686                       
1687         &    pos(6), &
1688                       
1689         &    pos(7)  )
1690 
1691       right = answer( &
1692                               &    pos(1), &
1693                       
1694         &    pos(2), &
1695                       
1696         &    pos(3), &
1697                       
1698         &    pos(4), &
1699                       
1700         &    pos(5), &
1701                       
1702         &    pos(6), &
1703                       
1704         &    pos(7)  )
1705 
1706                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
1707                       
1708       \textcolor{keyword}{write}(unit=pos\_array(2), fmt=\textcolor{stringliteral}{"(i20)"}) pos(2)
1709                       
1710       \textcolor{keyword}{write}(unit=pos\_array(3), fmt=\textcolor{stringliteral}{"(i20)"}) pos(3)
1711                       
1712       \textcolor{keyword}{write}(unit=pos\_array(4), fmt=\textcolor{stringliteral}{"(i20)"}) pos(4)
1713                       
1714       \textcolor{keyword}{write}(unit=pos\_array(5), fmt=\textcolor{stringliteral}{"(i20)"}) pos(5)
1715                       
1716       \textcolor{keyword}{write}(unit=pos\_array(6), fmt=\textcolor{stringliteral}{"(i20)"}) pos(6)
1717                       
1718       \textcolor{keyword}{write}(unit=pos\_array(7), fmt=\textcolor{stringliteral}{"(i20)"}) pos(7)
1719                       
1720 
1721       pos\_str = \textcolor{stringliteral}{'('} // &
1722                               &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{','} // &
1723                       
1724         &    trim(adjustl(pos\_array(2))) // \textcolor{stringliteral}{','} // &
1725                       
1726         &    trim(adjustl(pos\_array(3))) // \textcolor{stringliteral}{','} // &
1727                       
1728         &    trim(adjustl(pos\_array(4))) // \textcolor{stringliteral}{','} // &
1729                       
1730         &    trim(adjustl(pos\_array(5))) // \textcolor{stringliteral}{','} // &
1731                       
1732         &    trim(adjustl(pos\_array(6))) // \textcolor{stringliteral}{','} // &
1733                       
1734         &    trim(adjustl(pos\_array(7))) // \textcolor{stringliteral}{')'}
1735 
1736 \textcolor{keywordflow}{    end if}
1737     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
1738 
1739                     
1740 
1741 
1742     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
1743       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
1744       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
1745       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str) // \textcolor{stringliteral}{'  = '}, trim(wrong)
1746       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
1747       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str) // \textcolor{stringliteral}{' = '}, trim(right)
1748 
1749       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
1750     \textcolor{keywordflow}{else}
1751       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
1752 \textcolor{keywordflow}{    end if}
1753 
1754 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_a6bfe0c22ea38f2a93f2502221566e24f}\label{interfacedc__test_1_1assertequal_a6bfe0c22ea38f2a93f2502221566e24f}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequaldouble0@{dctestassertequaldouble0}}
\index{dctestassertequaldouble0@{dctestassertequaldouble0}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequaldouble0()}{dctestassertequaldouble0()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequaldouble0 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{real(dp), intent(in)}]{answer,  }\item[{real(dp), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 3831 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
3831     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
3832     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
3833     \textcolor{keywordtype}{implicit none}
3834     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
3835     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: answer
3836     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: check
3837     \textcolor{keywordtype}{logical}:: err\_flag
3838     \textcolor{keywordtype}{character(STRING)}:: pos\_str
3839     \textcolor{keywordtype}{real(DP)}:: wrong, right
3840 
3841                                         
3842 
3843                     
3844 
3845   \textcolor{keywordflow}{continue}
3846     err\_flag = .false.
3847 
3848                     
3849     err\_flag = .not. answer == check
3850     wrong = check
3851     right = answer
3852     pos\_str = \textcolor{stringliteral}{''}
3853 
3854                     
3855 
3856 
3857     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
3858       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
3859       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
3860       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str) // \textcolor{stringliteral}{'  = '}, wrong
3861       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
3862       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str) // \textcolor{stringliteral}{' = '}, right
3863 
3864       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
3865     \textcolor{keywordflow}{else}
3866       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
3867 \textcolor{keywordflow}{    end if}
3868 
3869 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_a12d741c4b91dd9e75daa006123c0383a}\label{interfacedc__test_1_1assertequal_a12d741c4b91dd9e75daa006123c0383a}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequaldouble0digits@{dctestassertequaldouble0digits}}
\index{dctestassertequaldouble0digits@{dctestassertequaldouble0digits}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequaldouble0digits()}{dctestassertequaldouble0digits()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequaldouble0digits (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{real(dp), intent(in)}]{answer,  }\item[{real(dp), intent(in)}]{check,  }\item[{integer, intent(in)}]{significant\+\_\+digits,  }\item[{integer, intent(in)}]{ignore\+\_\+digits }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 7297 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
7297     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
7298     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
7299     \textcolor{keywordtype}{implicit none}
7300     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
7301     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: answer
7302     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: check
7303     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: significant\_digits
7304     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: ignore\_digits
7305     \textcolor{keywordtype}{logical}:: err\_flag
7306     \textcolor{keywordtype}{character(STRING)}:: pos\_str
7307     \textcolor{keywordtype}{real(DP)}:: wrong, right\_max, right\_min
7308     \textcolor{keywordtype}{character(STRING)}:: pos\_str\_space
7309     \textcolor{keywordtype}{integer}:: pos\_str\_len
7310     \textcolor{keywordtype}{real(DP)}:: right\_tmp
7311 
7312                         \textcolor{keywordtype}{real(DP)}:: answer\_max
7313     \textcolor{keywordtype}{real(DP)}:: answer\_min
7314                     
7315   \textcolor{keywordflow}{continue}
7316     err\_flag = .false.
7317 
7318     \textcolor{keywordflow}{if} ( significant\_digits < 1 ) \textcolor{keywordflow}{then}
7319       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** '}
7320       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Specify a number more than 1 to "significant\_digits"'}
7321       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
7322 \textcolor{keywordflow}{    end if}
7323                     
7324     \textcolor{keywordflow}{if} ( answer < 0.0\_dp .and. check < 0.0\_dp ) \textcolor{keywordflow}{then}
7325       answer\_max = &
7326         &   answer &
7327         &   * (   1.0\_dp &
7328         &       - 0.1\_dp ** significant\_digits ) &
7329         & + 0.1\_dp ** (- ignore\_digits)
7330 
7331       answer\_min = &
7332         &   answer &
7333         &   * (   1.0\_dp &
7334         &       + 0.1\_dp ** significant\_digits ) &
7335         & - 0.1\_dp ** (- ignore\_digits)
7336     \textcolor{keywordflow}{else}
7337 
7338       answer\_max = &
7339         &   answer &
7340         &   * (   1.0\_dp &
7341         &       + 0.1\_dp ** significant\_digits ) &
7342         & + 0.1\_dp ** (- ignore\_digits)
7343 
7344       answer\_min = &
7345         &   answer &
7346         &   * (   1.0\_dp &
7347         &       - 0.1\_dp ** significant\_digits ) &
7348         & - 0.1\_dp ** (- ignore\_digits)
7349 \textcolor{keywordflow}{    end if}
7350 
7351     wrong = check
7352     right\_max = answer\_max
7353     right\_min = answer\_min
7354     \textcolor{keywordflow}{if} ( right\_max < right\_min ) \textcolor{keywordflow}{then}
7355       right\_tmp = right\_max
7356       right\_max = right\_min
7357       right\_min = right\_tmp
7358 \textcolor{keywordflow}{    end if}
7359 
7360     err\_flag = .not. (answer\_max > check .and. check > answer\_min)
7361 
7362     pos\_str = \textcolor{stringliteral}{''}
7363 
7364                     
7365 
7366     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
7367       pos\_str\_space = \textcolor{stringliteral}{''}
7368       pos\_str\_len = len\_trim(pos\_str)
7369 
7370       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
7371       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
7372       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str)  // \textcolor{stringliteral}{'  = '}, wrong
7373       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
7374       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'        '} // pos\_str\_space(1:pos\_str\_len) &
7375         &                                     // \textcolor{stringliteral}{'   '}, right\_min, \textcolor{stringliteral}{' < '}
7376       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str)  // \textcolor{stringliteral}{' < '}, right\_max
7377 
7378       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
7379     \textcolor{keywordflow}{else}
7380       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
7381 \textcolor{keywordflow}{    end if}
7382 
7383 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_a38c16ed46e430c549bfc16e8491c73a5}\label{interfacedc__test_1_1assertequal_a38c16ed46e430c549bfc16e8491c73a5}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequaldouble1@{dctestassertequaldouble1}}
\index{dctestassertequaldouble1@{dctestassertequaldouble1}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequaldouble1()}{dctestassertequaldouble1()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequaldouble1 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{real(dp), dimension(\+:), intent(in)}]{answer,  }\item[{real(dp), dimension(\+:), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 3874 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
3874     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
3875     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
3876     \textcolor{keywordtype}{implicit none}
3877     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
3878     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: answer(:)
3879     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: check(:)
3880     \textcolor{keywordtype}{logical}:: err\_flag
3881     \textcolor{keywordtype}{character(STRING)}:: pos\_str
3882     \textcolor{keywordtype}{real(DP)}:: wrong, right
3883 
3884                         \textcolor{keywordtype}{integer}:: answer\_shape(1), check\_shape(1), pos(1)
3885     \textcolor{keywordtype}{logical}:: consist\_shape(1)
3886     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(1)
3887     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:)
3888     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:)
3889     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:)
3890                     
3891 
3892                     
3893 
3894   \textcolor{keywordflow}{continue}
3895     err\_flag = .false.
3896 
3897                     
3898     answer\_shape = shape(answer)
3899     check\_shape = shape(check)
3900 
3901     consist\_shape = answer\_shape == check\_shape
3902 
3903     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
3904       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
3905       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
3906       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
3907       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
3908       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
3909 
3910       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
3911 \textcolor{keywordflow}{    end if}
3912 
3913 
3914     \textcolor{keyword}{allocate}( mask\_array( &
3915                       
3916       &    answer\_shape(1)  )  &
3917       &  )
3918 
3919     \textcolor{keyword}{allocate}( judge( &
3920                       
3921       &    answer\_shape(1)  )  &
3922       &  )
3923 
3924     \textcolor{keyword}{allocate}( judge\_rev( &
3925                       
3926       &    answer\_shape(1)  )  &
3927       &  )
3928 
3929                       
3930     judge = answer == check
3931 
3932                       
3933 
3934     judge\_rev = .not. judge
3935     err\_flag = any(judge\_rev)
3936     mask\_array = 1
3937     pos = maxloc(mask\_array, judge\_rev)
3938 
3939     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
3940 
3941       wrong = check( &
3942                       
3943         &    pos(1)  )
3944 
3945       right = answer( &
3946                       
3947         &    pos(1)  )
3948 
3949                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
3950                       
3951 
3952       pos\_str = \textcolor{stringliteral}{'('} // &
3953                       
3954         &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{')'}
3955 
3956 \textcolor{keywordflow}{    end if}
3957     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
3958 
3959                     
3960 
3961 
3962     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
3963       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
3964       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
3965       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str) // \textcolor{stringliteral}{'  = '}, wrong
3966       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
3967       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str) // \textcolor{stringliteral}{' = '}, right
3968 
3969       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
3970     \textcolor{keywordflow}{else}
3971       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
3972 \textcolor{keywordflow}{    end if}
3973 
3974 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_a117455f644083945ef0c248ad27c53be}\label{interfacedc__test_1_1assertequal_a117455f644083945ef0c248ad27c53be}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequaldouble1digits@{dctestassertequaldouble1digits}}
\index{dctestassertequaldouble1digits@{dctestassertequaldouble1digits}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequaldouble1digits()}{dctestassertequaldouble1digits()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequaldouble1digits (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{real(dp), dimension(\+:), intent(in)}]{answer,  }\item[{real(dp), dimension(\+:), intent(in)}]{check,  }\item[{integer, intent(in)}]{significant\+\_\+digits,  }\item[{integer, intent(in)}]{ignore\+\_\+digits }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 7389 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
7389     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
7390     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
7391     \textcolor{keywordtype}{implicit none}
7392     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
7393     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: answer(:)
7394     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: check(:)
7395     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: significant\_digits
7396     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: ignore\_digits
7397     \textcolor{keywordtype}{logical}:: err\_flag
7398     \textcolor{keywordtype}{character(STRING)}:: pos\_str
7399     \textcolor{keywordtype}{real(DP)}:: wrong, right\_max, right\_min
7400     \textcolor{keywordtype}{character(STRING)}:: pos\_str\_space
7401     \textcolor{keywordtype}{integer}:: pos\_str\_len
7402     \textcolor{keywordtype}{real(DP)}:: right\_tmp
7403 
7404                         \textcolor{keywordtype}{integer}:: answer\_shape(1), check\_shape(1), pos(1)
7405     \textcolor{keywordtype}{logical}:: consist\_shape(1)
7406     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(1)
7407     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:)
7408     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:)
7409     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:)
7410     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: answer\_negative(:)
7411     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: check\_negative(:)
7412     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: both\_negative(:)
7413     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{allocatable}:: answer\_max(:)
7414     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{allocatable}:: answer\_min(:)
7415                     
7416   \textcolor{keywordflow}{continue}
7417     err\_flag = .false.
7418 
7419     \textcolor{keywordflow}{if} ( significant\_digits < 1 ) \textcolor{keywordflow}{then}
7420       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** '}
7421       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Specify a number more than 1 to "significant\_digits"'}
7422       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
7423 \textcolor{keywordflow}{    end if}
7424                     
7425     answer\_shape = shape(answer)
7426     check\_shape = shape(check)
7427 
7428     consist\_shape = answer\_shape == check\_shape
7429 
7430     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
7431       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
7432       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
7433       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
7434       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
7435       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
7436 
7437       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
7438 \textcolor{keywordflow}{    end if}
7439 
7440 
7441     \textcolor{keyword}{allocate}( mask\_array( &
7442                       
7443       &    answer\_shape(1)  )  &
7444       &  )
7445 
7446     \textcolor{keyword}{allocate}( judge( &
7447                       
7448       &    answer\_shape(1)  )  &
7449       &  )
7450 
7451     \textcolor{keyword}{allocate}( judge\_rev( &
7452                       
7453       &    answer\_shape(1)  )  &
7454       &  )
7455 
7456     \textcolor{keyword}{allocate}( answer\_negative( &
7457                       
7458       &    answer\_shape(1)  )  &
7459       &  )
7460 
7461     \textcolor{keyword}{allocate}( check\_negative( &
7462                       
7463       &    answer\_shape(1)  )  &
7464       &  )
7465 
7466     \textcolor{keyword}{allocate}( both\_negative( &
7467                       
7468       &    answer\_shape(1)  )  &
7469       &  )
7470 
7471     \textcolor{keyword}{allocate}( answer\_max( &
7472                       
7473       &    answer\_shape(1)  )  &
7474       &  )
7475 
7476     \textcolor{keyword}{allocate}( answer\_min( &
7477                       
7478       &    answer\_shape(1)  )  &
7479       &  )
7480 
7481     answer\_negative = answer < 0.0\_dp
7482     check\_negative = check < 0.0\_dp
7483     both\_negative = answer\_negative .and. check\_negative
7484 
7485     \textcolor{keywordflow}{where} (both\_negative)
7486       answer\_max = &
7487         &   answer &
7488         &   * (   1.0\_dp &
7489         &       - 0.1\_dp ** significant\_digits ) &
7490         & + 0.1\_dp ** (- ignore\_digits)
7491 
7492       answer\_min = &
7493         &   answer &
7494         &   * (   1.0\_dp &
7495         &       + 0.1\_dp ** significant\_digits ) &
7496         & - 0.1\_dp ** (- ignore\_digits)
7497     \textcolor{keywordflow}{elsewhere}
7498       answer\_max = &
7499         &   answer &
7500         &   * (   1.0\_dp &
7501         &       + 0.1\_dp ** significant\_digits ) &
7502         & + 0.1\_dp ** (- ignore\_digits)
7503 
7504       answer\_min = &
7505         &   answer &
7506         &   * (   1.0\_dp &
7507         &       - 0.1\_dp ** significant\_digits ) &
7508         & - 0.1\_dp ** (- ignore\_digits)
7509 \textcolor{keywordflow}{    end where}
7510 
7511     judge = answer\_max > check .and. check > answer\_min
7512     judge\_rev = .not. judge
7513     err\_flag = any(judge\_rev)
7514     mask\_array = 1
7515     pos = maxloc(mask\_array, judge\_rev)
7516 
7517     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
7518 
7519       wrong = check( &
7520                       
7521         &    pos(1)  )
7522 
7523       right\_max = answer\_max( &
7524                       
7525         &    pos(1)  )
7526 
7527       right\_min = answer\_min( &
7528                       
7529         &    pos(1)  )
7530 
7531       \textcolor{keywordflow}{if} ( right\_max < right\_min ) \textcolor{keywordflow}{then}
7532         right\_tmp = right\_max
7533         right\_max = right\_min
7534         right\_min = right\_tmp
7535 \textcolor{keywordflow}{      end if}
7536 
7537                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
7538                       
7539 
7540       pos\_str = \textcolor{stringliteral}{'('} // &
7541                       
7542         &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{')'}
7543 
7544 \textcolor{keywordflow}{    end if}
7545     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
7546     \textcolor{keyword}{deallocate}(answer\_negative, check\_negative, both\_negative)
7547     \textcolor{keyword}{deallocate}(answer\_max, answer\_min)
7548 
7549                     
7550 
7551     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
7552       pos\_str\_space = \textcolor{stringliteral}{''}
7553       pos\_str\_len = len\_trim(pos\_str)
7554 
7555       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
7556       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
7557       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str)  // \textcolor{stringliteral}{'  = '}, wrong
7558       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
7559       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'        '} // pos\_str\_space(1:pos\_str\_len) &
7560         &                                     // \textcolor{stringliteral}{'   '}, right\_min, \textcolor{stringliteral}{' < '}
7561       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str)  // \textcolor{stringliteral}{' < '}, right\_max
7562 
7563       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
7564     \textcolor{keywordflow}{else}
7565       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
7566 \textcolor{keywordflow}{    end if}
7567 
7568 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_aea9d1647cc5826c85504cbce33f9e32b}\label{interfacedc__test_1_1assertequal_aea9d1647cc5826c85504cbce33f9e32b}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequaldouble2@{dctestassertequaldouble2}}
\index{dctestassertequaldouble2@{dctestassertequaldouble2}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequaldouble2()}{dctestassertequaldouble2()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequaldouble2 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{real(dp), dimension(\+:,\+:), intent(in)}]{answer,  }\item[{real(dp), dimension(\+:,\+:), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 3979 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
3979     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
3980     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
3981     \textcolor{keywordtype}{implicit none}
3982     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
3983     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: answer(:,:)
3984     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: check(:,:)
3985     \textcolor{keywordtype}{logical}:: err\_flag
3986     \textcolor{keywordtype}{character(STRING)}:: pos\_str
3987     \textcolor{keywordtype}{real(DP)}:: wrong, right
3988 
3989                         \textcolor{keywordtype}{integer}:: answer\_shape(2), check\_shape(2), pos(2)
3990     \textcolor{keywordtype}{logical}:: consist\_shape(2)
3991     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(2)
3992     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:,:)
3993     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:,:)
3994     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:,:)
3995                     
3996 
3997                     
3998 
3999   \textcolor{keywordflow}{continue}
4000     err\_flag = .false.
4001 
4002                     
4003     answer\_shape = shape(answer)
4004     check\_shape = shape(check)
4005 
4006     consist\_shape = answer\_shape == check\_shape
4007 
4008     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
4009       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
4010       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
4011       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
4012       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
4013       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
4014 
4015       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
4016 \textcolor{keywordflow}{    end if}
4017 
4018 
4019     \textcolor{keyword}{allocate}( mask\_array( &
4020                             &    answer\_shape(1), &
4021                       
4022       &    answer\_shape(2)  )  &
4023       &  )
4024 
4025     \textcolor{keyword}{allocate}( judge( &
4026                             &    answer\_shape(1), &
4027                       
4028       &    answer\_shape(2)  )  &
4029       &  )
4030 
4031     \textcolor{keyword}{allocate}( judge\_rev( &
4032                             &    answer\_shape(1), &
4033                       
4034       &    answer\_shape(2)  )  &
4035       &  )
4036 
4037                       
4038     judge = answer == check
4039 
4040                       
4041 
4042     judge\_rev = .not. judge
4043     err\_flag = any(judge\_rev)
4044     mask\_array = 1
4045     pos = maxloc(mask\_array, judge\_rev)
4046 
4047     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
4048 
4049       wrong = check( &
4050                               &    pos(1), &
4051                       
4052         &    pos(2)  )
4053 
4054       right = answer( &
4055                               &    pos(1), &
4056                       
4057         &    pos(2)  )
4058 
4059                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
4060                       
4061       \textcolor{keyword}{write}(unit=pos\_array(2), fmt=\textcolor{stringliteral}{"(i20)"}) pos(2)
4062                       
4063 
4064       pos\_str = \textcolor{stringliteral}{'('} // &
4065                               &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{','} // &
4066                       
4067         &    trim(adjustl(pos\_array(2))) // \textcolor{stringliteral}{')'}
4068 
4069 \textcolor{keywordflow}{    end if}
4070     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
4071 
4072                     
4073 
4074 
4075     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
4076       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
4077       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
4078       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str) // \textcolor{stringliteral}{'  = '}, wrong
4079       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
4080       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str) // \textcolor{stringliteral}{' = '}, right
4081 
4082       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
4083     \textcolor{keywordflow}{else}
4084       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
4085 \textcolor{keywordflow}{    end if}
4086 
4087 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_a064d4f9fc18efc4c8d9254da630dbd55}\label{interfacedc__test_1_1assertequal_a064d4f9fc18efc4c8d9254da630dbd55}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequaldouble2digits@{dctestassertequaldouble2digits}}
\index{dctestassertequaldouble2digits@{dctestassertequaldouble2digits}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequaldouble2digits()}{dctestassertequaldouble2digits()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequaldouble2digits (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{real(dp), dimension(\+:,\+:), intent(in)}]{answer,  }\item[{real(dp), dimension(\+:,\+:), intent(in)}]{check,  }\item[{integer, intent(in)}]{significant\+\_\+digits,  }\item[{integer, intent(in)}]{ignore\+\_\+digits }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 7574 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
7574     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
7575     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
7576     \textcolor{keywordtype}{implicit none}
7577     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
7578     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: answer(:,:)
7579     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: check(:,:)
7580     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: significant\_digits
7581     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: ignore\_digits
7582     \textcolor{keywordtype}{logical}:: err\_flag
7583     \textcolor{keywordtype}{character(STRING)}:: pos\_str
7584     \textcolor{keywordtype}{real(DP)}:: wrong, right\_max, right\_min
7585     \textcolor{keywordtype}{character(STRING)}:: pos\_str\_space
7586     \textcolor{keywordtype}{integer}:: pos\_str\_len
7587     \textcolor{keywordtype}{real(DP)}:: right\_tmp
7588 
7589                         \textcolor{keywordtype}{integer}:: answer\_shape(2), check\_shape(2), pos(2)
7590     \textcolor{keywordtype}{logical}:: consist\_shape(2)
7591     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(2)
7592     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:,:)
7593     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:,:)
7594     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:,:)
7595     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: answer\_negative(:,:)
7596     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: check\_negative(:,:)
7597     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: both\_negative(:,:)
7598     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{allocatable}:: answer\_max(:,:)
7599     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{allocatable}:: answer\_min(:,:)
7600                     
7601   \textcolor{keywordflow}{continue}
7602     err\_flag = .false.
7603 
7604     \textcolor{keywordflow}{if} ( significant\_digits < 1 ) \textcolor{keywordflow}{then}
7605       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** '}
7606       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Specify a number more than 1 to "significant\_digits"'}
7607       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
7608 \textcolor{keywordflow}{    end if}
7609                     
7610     answer\_shape = shape(answer)
7611     check\_shape = shape(check)
7612 
7613     consist\_shape = answer\_shape == check\_shape
7614 
7615     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
7616       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
7617       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
7618       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
7619       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
7620       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
7621 
7622       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
7623 \textcolor{keywordflow}{    end if}
7624 
7625 
7626     \textcolor{keyword}{allocate}( mask\_array( &
7627                             &    answer\_shape(1), &
7628                       
7629       &    answer\_shape(2)  )  &
7630       &  )
7631 
7632     \textcolor{keyword}{allocate}( judge( &
7633                             &    answer\_shape(1), &
7634                       
7635       &    answer\_shape(2)  )  &
7636       &  )
7637 
7638     \textcolor{keyword}{allocate}( judge\_rev( &
7639                             &    answer\_shape(1), &
7640                       
7641       &    answer\_shape(2)  )  &
7642       &  )
7643 
7644     \textcolor{keyword}{allocate}( answer\_negative( &
7645                             &    answer\_shape(1), &
7646                       
7647       &    answer\_shape(2)  )  &
7648       &  )
7649 
7650     \textcolor{keyword}{allocate}( check\_negative( &
7651                             &    answer\_shape(1), &
7652                       
7653       &    answer\_shape(2)  )  &
7654       &  )
7655 
7656     \textcolor{keyword}{allocate}( both\_negative( &
7657                             &    answer\_shape(1), &
7658                       
7659       &    answer\_shape(2)  )  &
7660       &  )
7661 
7662     \textcolor{keyword}{allocate}( answer\_max( &
7663                             &    answer\_shape(1), &
7664                       
7665       &    answer\_shape(2)  )  &
7666       &  )
7667 
7668     \textcolor{keyword}{allocate}( answer\_min( &
7669                             &    answer\_shape(1), &
7670                       
7671       &    answer\_shape(2)  )  &
7672       &  )
7673 
7674     answer\_negative = answer < 0.0\_dp
7675     check\_negative = check < 0.0\_dp
7676     both\_negative = answer\_negative .and. check\_negative
7677 
7678     \textcolor{keywordflow}{where} (both\_negative)
7679       answer\_max = &
7680         &   answer &
7681         &   * (   1.0\_dp &
7682         &       - 0.1\_dp ** significant\_digits ) &
7683         & + 0.1\_dp ** (- ignore\_digits)
7684 
7685       answer\_min = &
7686         &   answer &
7687         &   * (   1.0\_dp &
7688         &       + 0.1\_dp ** significant\_digits ) &
7689         & - 0.1\_dp ** (- ignore\_digits)
7690     \textcolor{keywordflow}{elsewhere}
7691       answer\_max = &
7692         &   answer &
7693         &   * (   1.0\_dp &
7694         &       + 0.1\_dp ** significant\_digits ) &
7695         & + 0.1\_dp ** (- ignore\_digits)
7696 
7697       answer\_min = &
7698         &   answer &
7699         &   * (   1.0\_dp &
7700         &       - 0.1\_dp ** significant\_digits ) &
7701         & - 0.1\_dp ** (- ignore\_digits)
7702 \textcolor{keywordflow}{    end where}
7703 
7704     judge = answer\_max > check .and. check > answer\_min
7705     judge\_rev = .not. judge
7706     err\_flag = any(judge\_rev)
7707     mask\_array = 1
7708     pos = maxloc(mask\_array, judge\_rev)
7709 
7710     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
7711 
7712       wrong = check( &
7713                               &    pos(1), &
7714                       
7715         &    pos(2)  )
7716 
7717       right\_max = answer\_max( &
7718                               &    pos(1), &
7719                       
7720         &    pos(2)  )
7721 
7722       right\_min = answer\_min( &
7723                               &    pos(1), &
7724                       
7725         &    pos(2)  )
7726 
7727       \textcolor{keywordflow}{if} ( right\_max < right\_min ) \textcolor{keywordflow}{then}
7728         right\_tmp = right\_max
7729         right\_max = right\_min
7730         right\_min = right\_tmp
7731 \textcolor{keywordflow}{      end if}
7732 
7733                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
7734                       
7735       \textcolor{keyword}{write}(unit=pos\_array(2), fmt=\textcolor{stringliteral}{"(i20)"}) pos(2)
7736                       
7737 
7738       pos\_str = \textcolor{stringliteral}{'('} // &
7739                               &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{','} // &
7740                       
7741         &    trim(adjustl(pos\_array(2))) // \textcolor{stringliteral}{')'}
7742 
7743 \textcolor{keywordflow}{    end if}
7744     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
7745     \textcolor{keyword}{deallocate}(answer\_negative, check\_negative, both\_negative)
7746     \textcolor{keyword}{deallocate}(answer\_max, answer\_min)
7747 
7748                     
7749 
7750     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
7751       pos\_str\_space = \textcolor{stringliteral}{''}
7752       pos\_str\_len = len\_trim(pos\_str)
7753 
7754       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
7755       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
7756       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str)  // \textcolor{stringliteral}{'  = '}, wrong
7757       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
7758       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'        '} // pos\_str\_space(1:pos\_str\_len) &
7759         &                                     // \textcolor{stringliteral}{'   '}, right\_min, \textcolor{stringliteral}{' < '}
7760       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str)  // \textcolor{stringliteral}{' < '}, right\_max
7761 
7762       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
7763     \textcolor{keywordflow}{else}
7764       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
7765 \textcolor{keywordflow}{    end if}
7766 
7767 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_a04044943fe32fcc0a3a405fb9fa171fa}\label{interfacedc__test_1_1assertequal_a04044943fe32fcc0a3a405fb9fa171fa}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequaldouble3@{dctestassertequaldouble3}}
\index{dctestassertequaldouble3@{dctestassertequaldouble3}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequaldouble3()}{dctestassertequaldouble3()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequaldouble3 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{real(dp), dimension(\+:,\+:,\+:), intent(in)}]{answer,  }\item[{real(dp), dimension(\+:,\+:,\+:), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 4092 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
4092     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
4093     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
4094     \textcolor{keywordtype}{implicit none}
4095     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
4096     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: answer(:,:,:)
4097     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: check(:,:,:)
4098     \textcolor{keywordtype}{logical}:: err\_flag
4099     \textcolor{keywordtype}{character(STRING)}:: pos\_str
4100     \textcolor{keywordtype}{real(DP)}:: wrong, right
4101 
4102                         \textcolor{keywordtype}{integer}:: answer\_shape(3), check\_shape(3), pos(3)
4103     \textcolor{keywordtype}{logical}:: consist\_shape(3)
4104     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(3)
4105     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:,:,:)
4106     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:,:,:)
4107     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:,:,:)
4108                     
4109 
4110                     
4111 
4112   \textcolor{keywordflow}{continue}
4113     err\_flag = .false.
4114 
4115                     
4116     answer\_shape = shape(answer)
4117     check\_shape = shape(check)
4118 
4119     consist\_shape = answer\_shape == check\_shape
4120 
4121     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
4122       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
4123       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
4124       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
4125       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
4126       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
4127 
4128       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
4129 \textcolor{keywordflow}{    end if}
4130 
4131 
4132     \textcolor{keyword}{allocate}( mask\_array( &
4133                             &    answer\_shape(1), &
4134                       
4135       &    answer\_shape(2), &
4136                       
4137       &    answer\_shape(3)  )  &
4138       &  )
4139 
4140     \textcolor{keyword}{allocate}( judge( &
4141                             &    answer\_shape(1), &
4142                       
4143       &    answer\_shape(2), &
4144                       
4145       &    answer\_shape(3)  )  &
4146       &  )
4147 
4148     \textcolor{keyword}{allocate}( judge\_rev( &
4149                             &    answer\_shape(1), &
4150                       
4151       &    answer\_shape(2), &
4152                       
4153       &    answer\_shape(3)  )  &
4154       &  )
4155 
4156                       
4157     judge = answer == check
4158 
4159                       
4160 
4161     judge\_rev = .not. judge
4162     err\_flag = any(judge\_rev)
4163     mask\_array = 1
4164     pos = maxloc(mask\_array, judge\_rev)
4165 
4166     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
4167 
4168       wrong = check( &
4169                               &    pos(1), &
4170                       
4171         &    pos(2), &
4172                       
4173         &    pos(3)  )
4174 
4175       right = answer( &
4176                               &    pos(1), &
4177                       
4178         &    pos(2), &
4179                       
4180         &    pos(3)  )
4181 
4182                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
4183                       
4184       \textcolor{keyword}{write}(unit=pos\_array(2), fmt=\textcolor{stringliteral}{"(i20)"}) pos(2)
4185                       
4186       \textcolor{keyword}{write}(unit=pos\_array(3), fmt=\textcolor{stringliteral}{"(i20)"}) pos(3)
4187                       
4188 
4189       pos\_str = \textcolor{stringliteral}{'('} // &
4190                               &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{','} // &
4191                       
4192         &    trim(adjustl(pos\_array(2))) // \textcolor{stringliteral}{','} // &
4193                       
4194         &    trim(adjustl(pos\_array(3))) // \textcolor{stringliteral}{')'}
4195 
4196 \textcolor{keywordflow}{    end if}
4197     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
4198 
4199                     
4200 
4201 
4202     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
4203       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
4204       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
4205       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str) // \textcolor{stringliteral}{'  = '}, wrong
4206       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
4207       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str) // \textcolor{stringliteral}{' = '}, right
4208 
4209       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
4210     \textcolor{keywordflow}{else}
4211       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
4212 \textcolor{keywordflow}{    end if}
4213 
4214 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_ab6acdec2e5c8d2a625b45256bc41a6ea}\label{interfacedc__test_1_1assertequal_ab6acdec2e5c8d2a625b45256bc41a6ea}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequaldouble3digits@{dctestassertequaldouble3digits}}
\index{dctestassertequaldouble3digits@{dctestassertequaldouble3digits}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequaldouble3digits()}{dctestassertequaldouble3digits()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequaldouble3digits (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{real(dp), dimension(\+:,\+:,\+:), intent(in)}]{answer,  }\item[{real(dp), dimension(\+:,\+:,\+:), intent(in)}]{check,  }\item[{integer, intent(in)}]{significant\+\_\+digits,  }\item[{integer, intent(in)}]{ignore\+\_\+digits }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 7773 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
7773     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
7774     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
7775     \textcolor{keywordtype}{implicit none}
7776     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
7777     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: answer(:,:,:)
7778     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: check(:,:,:)
7779     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: significant\_digits
7780     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: ignore\_digits
7781     \textcolor{keywordtype}{logical}:: err\_flag
7782     \textcolor{keywordtype}{character(STRING)}:: pos\_str
7783     \textcolor{keywordtype}{real(DP)}:: wrong, right\_max, right\_min
7784     \textcolor{keywordtype}{character(STRING)}:: pos\_str\_space
7785     \textcolor{keywordtype}{integer}:: pos\_str\_len
7786     \textcolor{keywordtype}{real(DP)}:: right\_tmp
7787 
7788                         \textcolor{keywordtype}{integer}:: answer\_shape(3), check\_shape(3), pos(3)
7789     \textcolor{keywordtype}{logical}:: consist\_shape(3)
7790     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(3)
7791     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:,:,:)
7792     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:,:,:)
7793     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:,:,:)
7794     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: answer\_negative(:,:,:)
7795     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: check\_negative(:,:,:)
7796     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: both\_negative(:,:,:)
7797     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{allocatable}:: answer\_max(:,:,:)
7798     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{allocatable}:: answer\_min(:,:,:)
7799                     
7800   \textcolor{keywordflow}{continue}
7801     err\_flag = .false.
7802 
7803     \textcolor{keywordflow}{if} ( significant\_digits < 1 ) \textcolor{keywordflow}{then}
7804       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** '}
7805       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Specify a number more than 1 to "significant\_digits"'}
7806       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
7807 \textcolor{keywordflow}{    end if}
7808                     
7809     answer\_shape = shape(answer)
7810     check\_shape = shape(check)
7811 
7812     consist\_shape = answer\_shape == check\_shape
7813 
7814     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
7815       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
7816       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
7817       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
7818       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
7819       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
7820 
7821       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
7822 \textcolor{keywordflow}{    end if}
7823 
7824 
7825     \textcolor{keyword}{allocate}( mask\_array( &
7826                             &    answer\_shape(1), &
7827                       
7828       &    answer\_shape(2), &
7829                       
7830       &    answer\_shape(3)  )  &
7831       &  )
7832 
7833     \textcolor{keyword}{allocate}( judge( &
7834                             &    answer\_shape(1), &
7835                       
7836       &    answer\_shape(2), &
7837                       
7838       &    answer\_shape(3)  )  &
7839       &  )
7840 
7841     \textcolor{keyword}{allocate}( judge\_rev( &
7842                             &    answer\_shape(1), &
7843                       
7844       &    answer\_shape(2), &
7845                       
7846       &    answer\_shape(3)  )  &
7847       &  )
7848 
7849     \textcolor{keyword}{allocate}( answer\_negative( &
7850                             &    answer\_shape(1), &
7851                       
7852       &    answer\_shape(2), &
7853                       
7854       &    answer\_shape(3)  )  &
7855       &  )
7856 
7857     \textcolor{keyword}{allocate}( check\_negative( &
7858                             &    answer\_shape(1), &
7859                       
7860       &    answer\_shape(2), &
7861                       
7862       &    answer\_shape(3)  )  &
7863       &  )
7864 
7865     \textcolor{keyword}{allocate}( both\_negative( &
7866                             &    answer\_shape(1), &
7867                       
7868       &    answer\_shape(2), &
7869                       
7870       &    answer\_shape(3)  )  &
7871       &  )
7872 
7873     \textcolor{keyword}{allocate}( answer\_max( &
7874                             &    answer\_shape(1), &
7875                       
7876       &    answer\_shape(2), &
7877                       
7878       &    answer\_shape(3)  )  &
7879       &  )
7880 
7881     \textcolor{keyword}{allocate}( answer\_min( &
7882                             &    answer\_shape(1), &
7883                       
7884       &    answer\_shape(2), &
7885                       
7886       &    answer\_shape(3)  )  &
7887       &  )
7888 
7889     answer\_negative = answer < 0.0\_dp
7890     check\_negative = check < 0.0\_dp
7891     both\_negative = answer\_negative .and. check\_negative
7892 
7893     \textcolor{keywordflow}{where} (both\_negative)
7894       answer\_max = &
7895         &   answer &
7896         &   * (   1.0\_dp &
7897         &       - 0.1\_dp ** significant\_digits ) &
7898         & + 0.1\_dp ** (- ignore\_digits)
7899 
7900       answer\_min = &
7901         &   answer &
7902         &   * (   1.0\_dp &
7903         &       + 0.1\_dp ** significant\_digits ) &
7904         & - 0.1\_dp ** (- ignore\_digits)
7905     \textcolor{keywordflow}{elsewhere}
7906       answer\_max = &
7907         &   answer &
7908         &   * (   1.0\_dp &
7909         &       + 0.1\_dp ** significant\_digits ) &
7910         & + 0.1\_dp ** (- ignore\_digits)
7911 
7912       answer\_min = &
7913         &   answer &
7914         &   * (   1.0\_dp &
7915         &       - 0.1\_dp ** significant\_digits ) &
7916         & - 0.1\_dp ** (- ignore\_digits)
7917 \textcolor{keywordflow}{    end where}
7918 
7919     judge = answer\_max > check .and. check > answer\_min
7920     judge\_rev = .not. judge
7921     err\_flag = any(judge\_rev)
7922     mask\_array = 1
7923     pos = maxloc(mask\_array, judge\_rev)
7924 
7925     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
7926 
7927       wrong = check( &
7928                               &    pos(1), &
7929                       
7930         &    pos(2), &
7931                       
7932         &    pos(3)  )
7933 
7934       right\_max = answer\_max( &
7935                               &    pos(1), &
7936                       
7937         &    pos(2), &
7938                       
7939         &    pos(3)  )
7940 
7941       right\_min = answer\_min( &
7942                               &    pos(1), &
7943                       
7944         &    pos(2), &
7945                       
7946         &    pos(3)  )
7947 
7948       \textcolor{keywordflow}{if} ( right\_max < right\_min ) \textcolor{keywordflow}{then}
7949         right\_tmp = right\_max
7950         right\_max = right\_min
7951         right\_min = right\_tmp
7952 \textcolor{keywordflow}{      end if}
7953 
7954                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
7955                       
7956       \textcolor{keyword}{write}(unit=pos\_array(2), fmt=\textcolor{stringliteral}{"(i20)"}) pos(2)
7957                       
7958       \textcolor{keyword}{write}(unit=pos\_array(3), fmt=\textcolor{stringliteral}{"(i20)"}) pos(3)
7959                       
7960 
7961       pos\_str = \textcolor{stringliteral}{'('} // &
7962                               &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{','} // &
7963                       
7964         &    trim(adjustl(pos\_array(2))) // \textcolor{stringliteral}{','} // &
7965                       
7966         &    trim(adjustl(pos\_array(3))) // \textcolor{stringliteral}{')'}
7967 
7968 \textcolor{keywordflow}{    end if}
7969     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
7970     \textcolor{keyword}{deallocate}(answer\_negative, check\_negative, both\_negative)
7971     \textcolor{keyword}{deallocate}(answer\_max, answer\_min)
7972 
7973                     
7974 
7975     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
7976       pos\_str\_space = \textcolor{stringliteral}{''}
7977       pos\_str\_len = len\_trim(pos\_str)
7978 
7979       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
7980       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
7981       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str)  // \textcolor{stringliteral}{'  = '}, wrong
7982       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
7983       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'        '} // pos\_str\_space(1:pos\_str\_len) &
7984         &                                     // \textcolor{stringliteral}{'   '}, right\_min, \textcolor{stringliteral}{' < '}
7985       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str)  // \textcolor{stringliteral}{' < '}, right\_max
7986 
7987       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
7988     \textcolor{keywordflow}{else}
7989       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
7990 \textcolor{keywordflow}{    end if}
7991 
7992 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_ae734b3449565f5a2737de0446ef7461d}\label{interfacedc__test_1_1assertequal_ae734b3449565f5a2737de0446ef7461d}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequaldouble4@{dctestassertequaldouble4}}
\index{dctestassertequaldouble4@{dctestassertequaldouble4}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequaldouble4()}{dctestassertequaldouble4()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequaldouble4 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{real(dp), dimension(\+:,\+:,\+:,\+:), intent(in)}]{answer,  }\item[{real(dp), dimension(\+:,\+:,\+:,\+:), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 4219 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
4219     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
4220     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
4221     \textcolor{keywordtype}{implicit none}
4222     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
4223     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: answer(:,:,:,:)
4224     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: check(:,:,:,:)
4225     \textcolor{keywordtype}{logical}:: err\_flag
4226     \textcolor{keywordtype}{character(STRING)}:: pos\_str
4227     \textcolor{keywordtype}{real(DP)}:: wrong, right
4228 
4229                         \textcolor{keywordtype}{integer}:: answer\_shape(4), check\_shape(4), pos(4)
4230     \textcolor{keywordtype}{logical}:: consist\_shape(4)
4231     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(4)
4232     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:,:,:,:)
4233     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:,:,:,:)
4234     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:,:,:,:)
4235                     
4236 
4237                     
4238 
4239   \textcolor{keywordflow}{continue}
4240     err\_flag = .false.
4241 
4242                     
4243     answer\_shape = shape(answer)
4244     check\_shape = shape(check)
4245 
4246     consist\_shape = answer\_shape == check\_shape
4247 
4248     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
4249       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
4250       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
4251       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
4252       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
4253       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
4254 
4255       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
4256 \textcolor{keywordflow}{    end if}
4257 
4258 
4259     \textcolor{keyword}{allocate}( mask\_array( &
4260                             &    answer\_shape(1), &
4261                       
4262       &    answer\_shape(2), &
4263                       
4264       &    answer\_shape(3), &
4265                       
4266       &    answer\_shape(4)  )  &
4267       &  )
4268 
4269     \textcolor{keyword}{allocate}( judge( &
4270                             &    answer\_shape(1), &
4271                       
4272       &    answer\_shape(2), &
4273                       
4274       &    answer\_shape(3), &
4275                       
4276       &    answer\_shape(4)  )  &
4277       &  )
4278 
4279     \textcolor{keyword}{allocate}( judge\_rev( &
4280                             &    answer\_shape(1), &
4281                       
4282       &    answer\_shape(2), &
4283                       
4284       &    answer\_shape(3), &
4285                       
4286       &    answer\_shape(4)  )  &
4287       &  )
4288 
4289                       
4290     judge = answer == check
4291 
4292                       
4293 
4294     judge\_rev = .not. judge
4295     err\_flag = any(judge\_rev)
4296     mask\_array = 1
4297     pos = maxloc(mask\_array, judge\_rev)
4298 
4299     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
4300 
4301       wrong = check( &
4302                               &    pos(1), &
4303                       
4304         &    pos(2), &
4305                       
4306         &    pos(3), &
4307                       
4308         &    pos(4)  )
4309 
4310       right = answer( &
4311                               &    pos(1), &
4312                       
4313         &    pos(2), &
4314                       
4315         &    pos(3), &
4316                       
4317         &    pos(4)  )
4318 
4319                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
4320                       
4321       \textcolor{keyword}{write}(unit=pos\_array(2), fmt=\textcolor{stringliteral}{"(i20)"}) pos(2)
4322                       
4323       \textcolor{keyword}{write}(unit=pos\_array(3), fmt=\textcolor{stringliteral}{"(i20)"}) pos(3)
4324                       
4325       \textcolor{keyword}{write}(unit=pos\_array(4), fmt=\textcolor{stringliteral}{"(i20)"}) pos(4)
4326                       
4327 
4328       pos\_str = \textcolor{stringliteral}{'('} // &
4329                               &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{','} // &
4330                       
4331         &    trim(adjustl(pos\_array(2))) // \textcolor{stringliteral}{','} // &
4332                       
4333         &    trim(adjustl(pos\_array(3))) // \textcolor{stringliteral}{','} // &
4334                       
4335         &    trim(adjustl(pos\_array(4))) // \textcolor{stringliteral}{')'}
4336 
4337 \textcolor{keywordflow}{    end if}
4338     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
4339 
4340                     
4341 
4342 
4343     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
4344       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
4345       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
4346       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str) // \textcolor{stringliteral}{'  = '}, wrong
4347       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
4348       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str) // \textcolor{stringliteral}{' = '}, right
4349 
4350       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
4351     \textcolor{keywordflow}{else}
4352       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
4353 \textcolor{keywordflow}{    end if}
4354 
4355 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_a0d0d93d0418a835cb5ff5bca784d94be}\label{interfacedc__test_1_1assertequal_a0d0d93d0418a835cb5ff5bca784d94be}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequaldouble4digits@{dctestassertequaldouble4digits}}
\index{dctestassertequaldouble4digits@{dctestassertequaldouble4digits}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequaldouble4digits()}{dctestassertequaldouble4digits()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequaldouble4digits (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{real(dp), dimension(\+:,\+:,\+:,\+:), intent(in)}]{answer,  }\item[{real(dp), dimension(\+:,\+:,\+:,\+:), intent(in)}]{check,  }\item[{integer, intent(in)}]{significant\+\_\+digits,  }\item[{integer, intent(in)}]{ignore\+\_\+digits }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 7998 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
7998     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
7999     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
8000     \textcolor{keywordtype}{implicit none}
8001     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
8002     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: answer(:,:,:,:)
8003     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: check(:,:,:,:)
8004     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: significant\_digits
8005     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: ignore\_digits
8006     \textcolor{keywordtype}{logical}:: err\_flag
8007     \textcolor{keywordtype}{character(STRING)}:: pos\_str
8008     \textcolor{keywordtype}{real(DP)}:: wrong, right\_max, right\_min
8009     \textcolor{keywordtype}{character(STRING)}:: pos\_str\_space
8010     \textcolor{keywordtype}{integer}:: pos\_str\_len
8011     \textcolor{keywordtype}{real(DP)}:: right\_tmp
8012 
8013                         \textcolor{keywordtype}{integer}:: answer\_shape(4), check\_shape(4), pos(4)
8014     \textcolor{keywordtype}{logical}:: consist\_shape(4)
8015     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(4)
8016     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:,:,:,:)
8017     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:,:,:,:)
8018     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:,:,:,:)
8019     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: answer\_negative(:,:,:,:)
8020     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: check\_negative(:,:,:,:)
8021     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: both\_negative(:,:,:,:)
8022     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{allocatable}:: answer\_max(:,:,:,:)
8023     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{allocatable}:: answer\_min(:,:,:,:)
8024                     
8025   \textcolor{keywordflow}{continue}
8026     err\_flag = .false.
8027 
8028     \textcolor{keywordflow}{if} ( significant\_digits < 1 ) \textcolor{keywordflow}{then}
8029       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** '}
8030       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Specify a number more than 1 to "significant\_digits"'}
8031       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
8032 \textcolor{keywordflow}{    end if}
8033                     
8034     answer\_shape = shape(answer)
8035     check\_shape = shape(check)
8036 
8037     consist\_shape = answer\_shape == check\_shape
8038 
8039     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
8040       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
8041       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
8042       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
8043       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
8044       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
8045 
8046       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
8047 \textcolor{keywordflow}{    end if}
8048 
8049 
8050     \textcolor{keyword}{allocate}( mask\_array( &
8051                             &    answer\_shape(1), &
8052                       
8053       &    answer\_shape(2), &
8054                       
8055       &    answer\_shape(3), &
8056                       
8057       &    answer\_shape(4)  )  &
8058       &  )
8059 
8060     \textcolor{keyword}{allocate}( judge( &
8061                             &    answer\_shape(1), &
8062                       
8063       &    answer\_shape(2), &
8064                       
8065       &    answer\_shape(3), &
8066                       
8067       &    answer\_shape(4)  )  &
8068       &  )
8069 
8070     \textcolor{keyword}{allocate}( judge\_rev( &
8071                             &    answer\_shape(1), &
8072                       
8073       &    answer\_shape(2), &
8074                       
8075       &    answer\_shape(3), &
8076                       
8077       &    answer\_shape(4)  )  &
8078       &  )
8079 
8080     \textcolor{keyword}{allocate}( answer\_negative( &
8081                             &    answer\_shape(1), &
8082                       
8083       &    answer\_shape(2), &
8084                       
8085       &    answer\_shape(3), &
8086                       
8087       &    answer\_shape(4)  )  &
8088       &  )
8089 
8090     \textcolor{keyword}{allocate}( check\_negative( &
8091                             &    answer\_shape(1), &
8092                       
8093       &    answer\_shape(2), &
8094                       
8095       &    answer\_shape(3), &
8096                       
8097       &    answer\_shape(4)  )  &
8098       &  )
8099 
8100     \textcolor{keyword}{allocate}( both\_negative( &
8101                             &    answer\_shape(1), &
8102                       
8103       &    answer\_shape(2), &
8104                       
8105       &    answer\_shape(3), &
8106                       
8107       &    answer\_shape(4)  )  &
8108       &  )
8109 
8110     \textcolor{keyword}{allocate}( answer\_max( &
8111                             &    answer\_shape(1), &
8112                       
8113       &    answer\_shape(2), &
8114                       
8115       &    answer\_shape(3), &
8116                       
8117       &    answer\_shape(4)  )  &
8118       &  )
8119 
8120     \textcolor{keyword}{allocate}( answer\_min( &
8121                             &    answer\_shape(1), &
8122                       
8123       &    answer\_shape(2), &
8124                       
8125       &    answer\_shape(3), &
8126                       
8127       &    answer\_shape(4)  )  &
8128       &  )
8129 
8130     answer\_negative = answer < 0.0\_dp
8131     check\_negative = check < 0.0\_dp
8132     both\_negative = answer\_negative .and. check\_negative
8133 
8134     \textcolor{keywordflow}{where} (both\_negative)
8135       answer\_max = &
8136         &   answer &
8137         &   * (   1.0\_dp &
8138         &       - 0.1\_dp ** significant\_digits ) &
8139         & + 0.1\_dp ** (- ignore\_digits)
8140 
8141       answer\_min = &
8142         &   answer &
8143         &   * (   1.0\_dp &
8144         &       + 0.1\_dp ** significant\_digits ) &
8145         & - 0.1\_dp ** (- ignore\_digits)
8146     \textcolor{keywordflow}{elsewhere}
8147       answer\_max = &
8148         &   answer &
8149         &   * (   1.0\_dp &
8150         &       + 0.1\_dp ** significant\_digits ) &
8151         & + 0.1\_dp ** (- ignore\_digits)
8152 
8153       answer\_min = &
8154         &   answer &
8155         &   * (   1.0\_dp &
8156         &       - 0.1\_dp ** significant\_digits ) &
8157         & - 0.1\_dp ** (- ignore\_digits)
8158 \textcolor{keywordflow}{    end where}
8159 
8160     judge = answer\_max > check .and. check > answer\_min
8161     judge\_rev = .not. judge
8162     err\_flag = any(judge\_rev)
8163     mask\_array = 1
8164     pos = maxloc(mask\_array, judge\_rev)
8165 
8166     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
8167 
8168       wrong = check( &
8169                               &    pos(1), &
8170                       
8171         &    pos(2), &
8172                       
8173         &    pos(3), &
8174                       
8175         &    pos(4)  )
8176 
8177       right\_max = answer\_max( &
8178                               &    pos(1), &
8179                       
8180         &    pos(2), &
8181                       
8182         &    pos(3), &
8183                       
8184         &    pos(4)  )
8185 
8186       right\_min = answer\_min( &
8187                               &    pos(1), &
8188                       
8189         &    pos(2), &
8190                       
8191         &    pos(3), &
8192                       
8193         &    pos(4)  )
8194 
8195       \textcolor{keywordflow}{if} ( right\_max < right\_min ) \textcolor{keywordflow}{then}
8196         right\_tmp = right\_max
8197         right\_max = right\_min
8198         right\_min = right\_tmp
8199 \textcolor{keywordflow}{      end if}
8200 
8201                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
8202                       
8203       \textcolor{keyword}{write}(unit=pos\_array(2), fmt=\textcolor{stringliteral}{"(i20)"}) pos(2)
8204                       
8205       \textcolor{keyword}{write}(unit=pos\_array(3), fmt=\textcolor{stringliteral}{"(i20)"}) pos(3)
8206                       
8207       \textcolor{keyword}{write}(unit=pos\_array(4), fmt=\textcolor{stringliteral}{"(i20)"}) pos(4)
8208                       
8209 
8210       pos\_str = \textcolor{stringliteral}{'('} // &
8211                               &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{','} // &
8212                       
8213         &    trim(adjustl(pos\_array(2))) // \textcolor{stringliteral}{','} // &
8214                       
8215         &    trim(adjustl(pos\_array(3))) // \textcolor{stringliteral}{','} // &
8216                       
8217         &    trim(adjustl(pos\_array(4))) // \textcolor{stringliteral}{')'}
8218 
8219 \textcolor{keywordflow}{    end if}
8220     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
8221     \textcolor{keyword}{deallocate}(answer\_negative, check\_negative, both\_negative)
8222     \textcolor{keyword}{deallocate}(answer\_max, answer\_min)
8223 
8224                     
8225 
8226     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
8227       pos\_str\_space = \textcolor{stringliteral}{''}
8228       pos\_str\_len = len\_trim(pos\_str)
8229 
8230       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
8231       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
8232       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str)  // \textcolor{stringliteral}{'  = '}, wrong
8233       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
8234       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'        '} // pos\_str\_space(1:pos\_str\_len) &
8235         &                                     // \textcolor{stringliteral}{'   '}, right\_min, \textcolor{stringliteral}{' < '}
8236       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str)  // \textcolor{stringliteral}{' < '}, right\_max
8237 
8238       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
8239     \textcolor{keywordflow}{else}
8240       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
8241 \textcolor{keywordflow}{    end if}
8242 
8243 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_ae05b6389844d3ca73d4911065f67794c}\label{interfacedc__test_1_1assertequal_ae05b6389844d3ca73d4911065f67794c}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequaldouble5@{dctestassertequaldouble5}}
\index{dctestassertequaldouble5@{dctestassertequaldouble5}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequaldouble5()}{dctestassertequaldouble5()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequaldouble5 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{real(dp), dimension(\+:,\+:,\+:,\+:,\+:), intent(in)}]{answer,  }\item[{real(dp), dimension(\+:,\+:,\+:,\+:,\+:), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 4360 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
4360     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
4361     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
4362     \textcolor{keywordtype}{implicit none}
4363     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
4364     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: answer(:,:,:,:,:)
4365     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: check(:,:,:,:,:)
4366     \textcolor{keywordtype}{logical}:: err\_flag
4367     \textcolor{keywordtype}{character(STRING)}:: pos\_str
4368     \textcolor{keywordtype}{real(DP)}:: wrong, right
4369 
4370                         \textcolor{keywordtype}{integer}:: answer\_shape(5), check\_shape(5), pos(5)
4371     \textcolor{keywordtype}{logical}:: consist\_shape(5)
4372     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(5)
4373     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:,:,:,:,:)
4374     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:,:,:,:,:)
4375     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:,:,:,:,:)
4376                     
4377 
4378                     
4379 
4380   \textcolor{keywordflow}{continue}
4381     err\_flag = .false.
4382 
4383                     
4384     answer\_shape = shape(answer)
4385     check\_shape = shape(check)
4386 
4387     consist\_shape = answer\_shape == check\_shape
4388 
4389     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
4390       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
4391       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
4392       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
4393       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
4394       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
4395 
4396       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
4397 \textcolor{keywordflow}{    end if}
4398 
4399 
4400     \textcolor{keyword}{allocate}( mask\_array( &
4401                             &    answer\_shape(1), &
4402                       
4403       &    answer\_shape(2), &
4404                       
4405       &    answer\_shape(3), &
4406                       
4407       &    answer\_shape(4), &
4408                       
4409       &    answer\_shape(5)  )  &
4410       &  )
4411 
4412     \textcolor{keyword}{allocate}( judge( &
4413                             &    answer\_shape(1), &
4414                       
4415       &    answer\_shape(2), &
4416                       
4417       &    answer\_shape(3), &
4418                       
4419       &    answer\_shape(4), &
4420                       
4421       &    answer\_shape(5)  )  &
4422       &  )
4423 
4424     \textcolor{keyword}{allocate}( judge\_rev( &
4425                             &    answer\_shape(1), &
4426                       
4427       &    answer\_shape(2), &
4428                       
4429       &    answer\_shape(3), &
4430                       
4431       &    answer\_shape(4), &
4432                       
4433       &    answer\_shape(5)  )  &
4434       &  )
4435 
4436                       
4437     judge = answer == check
4438 
4439                       
4440 
4441     judge\_rev = .not. judge
4442     err\_flag = any(judge\_rev)
4443     mask\_array = 1
4444     pos = maxloc(mask\_array, judge\_rev)
4445 
4446     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
4447 
4448       wrong = check( &
4449                               &    pos(1), &
4450                       
4451         &    pos(2), &
4452                       
4453         &    pos(3), &
4454                       
4455         &    pos(4), &
4456                       
4457         &    pos(5)  )
4458 
4459       right = answer( &
4460                               &    pos(1), &
4461                       
4462         &    pos(2), &
4463                       
4464         &    pos(3), &
4465                       
4466         &    pos(4), &
4467                       
4468         &    pos(5)  )
4469 
4470                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
4471                       
4472       \textcolor{keyword}{write}(unit=pos\_array(2), fmt=\textcolor{stringliteral}{"(i20)"}) pos(2)
4473                       
4474       \textcolor{keyword}{write}(unit=pos\_array(3), fmt=\textcolor{stringliteral}{"(i20)"}) pos(3)
4475                       
4476       \textcolor{keyword}{write}(unit=pos\_array(4), fmt=\textcolor{stringliteral}{"(i20)"}) pos(4)
4477                       
4478       \textcolor{keyword}{write}(unit=pos\_array(5), fmt=\textcolor{stringliteral}{"(i20)"}) pos(5)
4479                       
4480 
4481       pos\_str = \textcolor{stringliteral}{'('} // &
4482                               &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{','} // &
4483                       
4484         &    trim(adjustl(pos\_array(2))) // \textcolor{stringliteral}{','} // &
4485                       
4486         &    trim(adjustl(pos\_array(3))) // \textcolor{stringliteral}{','} // &
4487                       
4488         &    trim(adjustl(pos\_array(4))) // \textcolor{stringliteral}{','} // &
4489                       
4490         &    trim(adjustl(pos\_array(5))) // \textcolor{stringliteral}{')'}
4491 
4492 \textcolor{keywordflow}{    end if}
4493     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
4494 
4495                     
4496 
4497 
4498     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
4499       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
4500       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
4501       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str) // \textcolor{stringliteral}{'  = '}, wrong
4502       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
4503       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str) // \textcolor{stringliteral}{' = '}, right
4504 
4505       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
4506     \textcolor{keywordflow}{else}
4507       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
4508 \textcolor{keywordflow}{    end if}
4509 
4510 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_a7e3da1a01dba43f696c402a45810b9d2}\label{interfacedc__test_1_1assertequal_a7e3da1a01dba43f696c402a45810b9d2}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequaldouble5digits@{dctestassertequaldouble5digits}}
\index{dctestassertequaldouble5digits@{dctestassertequaldouble5digits}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequaldouble5digits()}{dctestassertequaldouble5digits()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequaldouble5digits (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{real(dp), dimension(\+:,\+:,\+:,\+:,\+:), intent(in)}]{answer,  }\item[{real(dp), dimension(\+:,\+:,\+:,\+:,\+:), intent(in)}]{check,  }\item[{integer, intent(in)}]{significant\+\_\+digits,  }\item[{integer, intent(in)}]{ignore\+\_\+digits }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 8249 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
8249     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
8250     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
8251     \textcolor{keywordtype}{implicit none}
8252     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
8253     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: answer(:,:,:,:,:)
8254     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: check(:,:,:,:,:)
8255     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: significant\_digits
8256     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: ignore\_digits
8257     \textcolor{keywordtype}{logical}:: err\_flag
8258     \textcolor{keywordtype}{character(STRING)}:: pos\_str
8259     \textcolor{keywordtype}{real(DP)}:: wrong, right\_max, right\_min
8260     \textcolor{keywordtype}{character(STRING)}:: pos\_str\_space
8261     \textcolor{keywordtype}{integer}:: pos\_str\_len
8262     \textcolor{keywordtype}{real(DP)}:: right\_tmp
8263 
8264                         \textcolor{keywordtype}{integer}:: answer\_shape(5), check\_shape(5), pos(5)
8265     \textcolor{keywordtype}{logical}:: consist\_shape(5)
8266     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(5)
8267     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:,:,:,:,:)
8268     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:,:,:,:,:)
8269     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:,:,:,:,:)
8270     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: answer\_negative(:,:,:,:,:)
8271     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: check\_negative(:,:,:,:,:)
8272     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: both\_negative(:,:,:,:,:)
8273     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{allocatable}:: answer\_max(:,:,:,:,:)
8274     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{allocatable}:: answer\_min(:,:,:,:,:)
8275                     
8276   \textcolor{keywordflow}{continue}
8277     err\_flag = .false.
8278 
8279     \textcolor{keywordflow}{if} ( significant\_digits < 1 ) \textcolor{keywordflow}{then}
8280       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** '}
8281       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Specify a number more than 1 to "significant\_digits"'}
8282       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
8283 \textcolor{keywordflow}{    end if}
8284                     
8285     answer\_shape = shape(answer)
8286     check\_shape = shape(check)
8287 
8288     consist\_shape = answer\_shape == check\_shape
8289 
8290     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
8291       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
8292       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
8293       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
8294       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
8295       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
8296 
8297       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
8298 \textcolor{keywordflow}{    end if}
8299 
8300 
8301     \textcolor{keyword}{allocate}( mask\_array( &
8302                             &    answer\_shape(1), &
8303                       
8304       &    answer\_shape(2), &
8305                       
8306       &    answer\_shape(3), &
8307                       
8308       &    answer\_shape(4), &
8309                       
8310       &    answer\_shape(5)  )  &
8311       &  )
8312 
8313     \textcolor{keyword}{allocate}( judge( &
8314                             &    answer\_shape(1), &
8315                       
8316       &    answer\_shape(2), &
8317                       
8318       &    answer\_shape(3), &
8319                       
8320       &    answer\_shape(4), &
8321                       
8322       &    answer\_shape(5)  )  &
8323       &  )
8324 
8325     \textcolor{keyword}{allocate}( judge\_rev( &
8326                             &    answer\_shape(1), &
8327                       
8328       &    answer\_shape(2), &
8329                       
8330       &    answer\_shape(3), &
8331                       
8332       &    answer\_shape(4), &
8333                       
8334       &    answer\_shape(5)  )  &
8335       &  )
8336 
8337     \textcolor{keyword}{allocate}( answer\_negative( &
8338                             &    answer\_shape(1), &
8339                       
8340       &    answer\_shape(2), &
8341                       
8342       &    answer\_shape(3), &
8343                       
8344       &    answer\_shape(4), &
8345                       
8346       &    answer\_shape(5)  )  &
8347       &  )
8348 
8349     \textcolor{keyword}{allocate}( check\_negative( &
8350                             &    answer\_shape(1), &
8351                       
8352       &    answer\_shape(2), &
8353                       
8354       &    answer\_shape(3), &
8355                       
8356       &    answer\_shape(4), &
8357                       
8358       &    answer\_shape(5)  )  &
8359       &  )
8360 
8361     \textcolor{keyword}{allocate}( both\_negative( &
8362                             &    answer\_shape(1), &
8363                       
8364       &    answer\_shape(2), &
8365                       
8366       &    answer\_shape(3), &
8367                       
8368       &    answer\_shape(4), &
8369                       
8370       &    answer\_shape(5)  )  &
8371       &  )
8372 
8373     \textcolor{keyword}{allocate}( answer\_max( &
8374                             &    answer\_shape(1), &
8375                       
8376       &    answer\_shape(2), &
8377                       
8378       &    answer\_shape(3), &
8379                       
8380       &    answer\_shape(4), &
8381                       
8382       &    answer\_shape(5)  )  &
8383       &  )
8384 
8385     \textcolor{keyword}{allocate}( answer\_min( &
8386                             &    answer\_shape(1), &
8387                       
8388       &    answer\_shape(2), &
8389                       
8390       &    answer\_shape(3), &
8391                       
8392       &    answer\_shape(4), &
8393                       
8394       &    answer\_shape(5)  )  &
8395       &  )
8396 
8397     answer\_negative = answer < 0.0\_dp
8398     check\_negative = check < 0.0\_dp
8399     both\_negative = answer\_negative .and. check\_negative
8400 
8401     \textcolor{keywordflow}{where} (both\_negative)
8402       answer\_max = &
8403         &   answer &
8404         &   * (   1.0\_dp &
8405         &       - 0.1\_dp ** significant\_digits ) &
8406         & + 0.1\_dp ** (- ignore\_digits)
8407 
8408       answer\_min = &
8409         &   answer &
8410         &   * (   1.0\_dp &
8411         &       + 0.1\_dp ** significant\_digits ) &
8412         & - 0.1\_dp ** (- ignore\_digits)
8413     \textcolor{keywordflow}{elsewhere}
8414       answer\_max = &
8415         &   answer &
8416         &   * (   1.0\_dp &
8417         &       + 0.1\_dp ** significant\_digits ) &
8418         & + 0.1\_dp ** (- ignore\_digits)
8419 
8420       answer\_min = &
8421         &   answer &
8422         &   * (   1.0\_dp &
8423         &       - 0.1\_dp ** significant\_digits ) &
8424         & - 0.1\_dp ** (- ignore\_digits)
8425 \textcolor{keywordflow}{    end where}
8426 
8427     judge = answer\_max > check .and. check > answer\_min
8428     judge\_rev = .not. judge
8429     err\_flag = any(judge\_rev)
8430     mask\_array = 1
8431     pos = maxloc(mask\_array, judge\_rev)
8432 
8433     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
8434 
8435       wrong = check( &
8436                               &    pos(1), &
8437                       
8438         &    pos(2), &
8439                       
8440         &    pos(3), &
8441                       
8442         &    pos(4), &
8443                       
8444         &    pos(5)  )
8445 
8446       right\_max = answer\_max( &
8447                               &    pos(1), &
8448                       
8449         &    pos(2), &
8450                       
8451         &    pos(3), &
8452                       
8453         &    pos(4), &
8454                       
8455         &    pos(5)  )
8456 
8457       right\_min = answer\_min( &
8458                               &    pos(1), &
8459                       
8460         &    pos(2), &
8461                       
8462         &    pos(3), &
8463                       
8464         &    pos(4), &
8465                       
8466         &    pos(5)  )
8467 
8468       \textcolor{keywordflow}{if} ( right\_max < right\_min ) \textcolor{keywordflow}{then}
8469         right\_tmp = right\_max
8470         right\_max = right\_min
8471         right\_min = right\_tmp
8472 \textcolor{keywordflow}{      end if}
8473 
8474                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
8475                       
8476       \textcolor{keyword}{write}(unit=pos\_array(2), fmt=\textcolor{stringliteral}{"(i20)"}) pos(2)
8477                       
8478       \textcolor{keyword}{write}(unit=pos\_array(3), fmt=\textcolor{stringliteral}{"(i20)"}) pos(3)
8479                       
8480       \textcolor{keyword}{write}(unit=pos\_array(4), fmt=\textcolor{stringliteral}{"(i20)"}) pos(4)
8481                       
8482       \textcolor{keyword}{write}(unit=pos\_array(5), fmt=\textcolor{stringliteral}{"(i20)"}) pos(5)
8483                       
8484 
8485       pos\_str = \textcolor{stringliteral}{'('} // &
8486                               &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{','} // &
8487                       
8488         &    trim(adjustl(pos\_array(2))) // \textcolor{stringliteral}{','} // &
8489                       
8490         &    trim(adjustl(pos\_array(3))) // \textcolor{stringliteral}{','} // &
8491                       
8492         &    trim(adjustl(pos\_array(4))) // \textcolor{stringliteral}{','} // &
8493                       
8494         &    trim(adjustl(pos\_array(5))) // \textcolor{stringliteral}{')'}
8495 
8496 \textcolor{keywordflow}{    end if}
8497     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
8498     \textcolor{keyword}{deallocate}(answer\_negative, check\_negative, both\_negative)
8499     \textcolor{keyword}{deallocate}(answer\_max, answer\_min)
8500 
8501                     
8502 
8503     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
8504       pos\_str\_space = \textcolor{stringliteral}{''}
8505       pos\_str\_len = len\_trim(pos\_str)
8506 
8507       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
8508       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
8509       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str)  // \textcolor{stringliteral}{'  = '}, wrong
8510       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
8511       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'        '} // pos\_str\_space(1:pos\_str\_len) &
8512         &                                     // \textcolor{stringliteral}{'   '}, right\_min, \textcolor{stringliteral}{' < '}
8513       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str)  // \textcolor{stringliteral}{' < '}, right\_max
8514 
8515       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
8516     \textcolor{keywordflow}{else}
8517       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
8518 \textcolor{keywordflow}{    end if}
8519 
8520 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_afbe51334fb7bbc3d35e7ba995537a2b6}\label{interfacedc__test_1_1assertequal_afbe51334fb7bbc3d35e7ba995537a2b6}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequaldouble6@{dctestassertequaldouble6}}
\index{dctestassertequaldouble6@{dctestassertequaldouble6}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequaldouble6()}{dctestassertequaldouble6()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequaldouble6 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{real(dp), dimension(\+:,\+:,\+:,\+:,\+:,\+:), intent(in)}]{answer,  }\item[{real(dp), dimension(\+:,\+:,\+:,\+:,\+:,\+:), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 4515 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
4515     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
4516     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
4517     \textcolor{keywordtype}{implicit none}
4518     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
4519     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: answer(:,:,:,:,:,:)
4520     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: check(:,:,:,:,:,:)
4521     \textcolor{keywordtype}{logical}:: err\_flag
4522     \textcolor{keywordtype}{character(STRING)}:: pos\_str
4523     \textcolor{keywordtype}{real(DP)}:: wrong, right
4524 
4525                         \textcolor{keywordtype}{integer}:: answer\_shape(6), check\_shape(6), pos(6)
4526     \textcolor{keywordtype}{logical}:: consist\_shape(6)
4527     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(6)
4528     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:,:,:,:,:,:)
4529     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:,:,:,:,:,:)
4530     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:,:,:,:,:,:)
4531                     
4532 
4533                     
4534 
4535   \textcolor{keywordflow}{continue}
4536     err\_flag = .false.
4537 
4538                     
4539     answer\_shape = shape(answer)
4540     check\_shape = shape(check)
4541 
4542     consist\_shape = answer\_shape == check\_shape
4543 
4544     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
4545       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
4546       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
4547       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
4548       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
4549       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
4550 
4551       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
4552 \textcolor{keywordflow}{    end if}
4553 
4554 
4555     \textcolor{keyword}{allocate}( mask\_array( &
4556                             &    answer\_shape(1), &
4557                       
4558       &    answer\_shape(2), &
4559                       
4560       &    answer\_shape(3), &
4561                       
4562       &    answer\_shape(4), &
4563                       
4564       &    answer\_shape(5), &
4565                       
4566       &    answer\_shape(6)  )  &
4567       &  )
4568 
4569     \textcolor{keyword}{allocate}( judge( &
4570                             &    answer\_shape(1), &
4571                       
4572       &    answer\_shape(2), &
4573                       
4574       &    answer\_shape(3), &
4575                       
4576       &    answer\_shape(4), &
4577                       
4578       &    answer\_shape(5), &
4579                       
4580       &    answer\_shape(6)  )  &
4581       &  )
4582 
4583     \textcolor{keyword}{allocate}( judge\_rev( &
4584                             &    answer\_shape(1), &
4585                       
4586       &    answer\_shape(2), &
4587                       
4588       &    answer\_shape(3), &
4589                       
4590       &    answer\_shape(4), &
4591                       
4592       &    answer\_shape(5), &
4593                       
4594       &    answer\_shape(6)  )  &
4595       &  )
4596 
4597                       
4598     judge = answer == check
4599 
4600                       
4601 
4602     judge\_rev = .not. judge
4603     err\_flag = any(judge\_rev)
4604     mask\_array = 1
4605     pos = maxloc(mask\_array, judge\_rev)
4606 
4607     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
4608 
4609       wrong = check( &
4610                               &    pos(1), &
4611                       
4612         &    pos(2), &
4613                       
4614         &    pos(3), &
4615                       
4616         &    pos(4), &
4617                       
4618         &    pos(5), &
4619                       
4620         &    pos(6)  )
4621 
4622       right = answer( &
4623                               &    pos(1), &
4624                       
4625         &    pos(2), &
4626                       
4627         &    pos(3), &
4628                       
4629         &    pos(4), &
4630                       
4631         &    pos(5), &
4632                       
4633         &    pos(6)  )
4634 
4635                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
4636                       
4637       \textcolor{keyword}{write}(unit=pos\_array(2), fmt=\textcolor{stringliteral}{"(i20)"}) pos(2)
4638                       
4639       \textcolor{keyword}{write}(unit=pos\_array(3), fmt=\textcolor{stringliteral}{"(i20)"}) pos(3)
4640                       
4641       \textcolor{keyword}{write}(unit=pos\_array(4), fmt=\textcolor{stringliteral}{"(i20)"}) pos(4)
4642                       
4643       \textcolor{keyword}{write}(unit=pos\_array(5), fmt=\textcolor{stringliteral}{"(i20)"}) pos(5)
4644                       
4645       \textcolor{keyword}{write}(unit=pos\_array(6), fmt=\textcolor{stringliteral}{"(i20)"}) pos(6)
4646                       
4647 
4648       pos\_str = \textcolor{stringliteral}{'('} // &
4649                               &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{','} // &
4650                       
4651         &    trim(adjustl(pos\_array(2))) // \textcolor{stringliteral}{','} // &
4652                       
4653         &    trim(adjustl(pos\_array(3))) // \textcolor{stringliteral}{','} // &
4654                       
4655         &    trim(adjustl(pos\_array(4))) // \textcolor{stringliteral}{','} // &
4656                       
4657         &    trim(adjustl(pos\_array(5))) // \textcolor{stringliteral}{','} // &
4658                       
4659         &    trim(adjustl(pos\_array(6))) // \textcolor{stringliteral}{')'}
4660 
4661 \textcolor{keywordflow}{    end if}
4662     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
4663 
4664                     
4665 
4666 
4667     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
4668       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
4669       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
4670       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str) // \textcolor{stringliteral}{'  = '}, wrong
4671       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
4672       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str) // \textcolor{stringliteral}{' = '}, right
4673 
4674       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
4675     \textcolor{keywordflow}{else}
4676       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
4677 \textcolor{keywordflow}{    end if}
4678 
4679 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_ad8392aac0d15b9471addb784f1007aea}\label{interfacedc__test_1_1assertequal_ad8392aac0d15b9471addb784f1007aea}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequaldouble6digits@{dctestassertequaldouble6digits}}
\index{dctestassertequaldouble6digits@{dctestassertequaldouble6digits}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequaldouble6digits()}{dctestassertequaldouble6digits()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequaldouble6digits (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{real(dp), dimension(\+:,\+:,\+:,\+:,\+:,\+:), intent(in)}]{answer,  }\item[{real(dp), dimension(\+:,\+:,\+:,\+:,\+:,\+:), intent(in)}]{check,  }\item[{integer, intent(in)}]{significant\+\_\+digits,  }\item[{integer, intent(in)}]{ignore\+\_\+digits }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 8526 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
8526     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
8527     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
8528     \textcolor{keywordtype}{implicit none}
8529     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
8530     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: answer(:,:,:,:,:,:)
8531     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: check(:,:,:,:,:,:)
8532     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: significant\_digits
8533     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: ignore\_digits
8534     \textcolor{keywordtype}{logical}:: err\_flag
8535     \textcolor{keywordtype}{character(STRING)}:: pos\_str
8536     \textcolor{keywordtype}{real(DP)}:: wrong, right\_max, right\_min
8537     \textcolor{keywordtype}{character(STRING)}:: pos\_str\_space
8538     \textcolor{keywordtype}{integer}:: pos\_str\_len
8539     \textcolor{keywordtype}{real(DP)}:: right\_tmp
8540 
8541                         \textcolor{keywordtype}{integer}:: answer\_shape(6), check\_shape(6), pos(6)
8542     \textcolor{keywordtype}{logical}:: consist\_shape(6)
8543     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(6)
8544     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:,:,:,:,:,:)
8545     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:,:,:,:,:,:)
8546     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:,:,:,:,:,:)
8547     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: answer\_negative(:,:,:,:,:,:)
8548     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: check\_negative(:,:,:,:,:,:)
8549     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: both\_negative(:,:,:,:,:,:)
8550     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{allocatable}:: answer\_max(:,:,:,:,:,:)
8551     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{allocatable}:: answer\_min(:,:,:,:,:,:)
8552                     
8553   \textcolor{keywordflow}{continue}
8554     err\_flag = .false.
8555 
8556     \textcolor{keywordflow}{if} ( significant\_digits < 1 ) \textcolor{keywordflow}{then}
8557       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** '}
8558       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Specify a number more than 1 to "significant\_digits"'}
8559       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
8560 \textcolor{keywordflow}{    end if}
8561                     
8562     answer\_shape = shape(answer)
8563     check\_shape = shape(check)
8564 
8565     consist\_shape = answer\_shape == check\_shape
8566 
8567     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
8568       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
8569       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
8570       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
8571       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
8572       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
8573 
8574       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
8575 \textcolor{keywordflow}{    end if}
8576 
8577 
8578     \textcolor{keyword}{allocate}( mask\_array( &
8579                             &    answer\_shape(1), &
8580                       
8581       &    answer\_shape(2), &
8582                       
8583       &    answer\_shape(3), &
8584                       
8585       &    answer\_shape(4), &
8586                       
8587       &    answer\_shape(5), &
8588                       
8589       &    answer\_shape(6)  )  &
8590       &  )
8591 
8592     \textcolor{keyword}{allocate}( judge( &
8593                             &    answer\_shape(1), &
8594                       
8595       &    answer\_shape(2), &
8596                       
8597       &    answer\_shape(3), &
8598                       
8599       &    answer\_shape(4), &
8600                       
8601       &    answer\_shape(5), &
8602                       
8603       &    answer\_shape(6)  )  &
8604       &  )
8605 
8606     \textcolor{keyword}{allocate}( judge\_rev( &
8607                             &    answer\_shape(1), &
8608                       
8609       &    answer\_shape(2), &
8610                       
8611       &    answer\_shape(3), &
8612                       
8613       &    answer\_shape(4), &
8614                       
8615       &    answer\_shape(5), &
8616                       
8617       &    answer\_shape(6)  )  &
8618       &  )
8619 
8620     \textcolor{keyword}{allocate}( answer\_negative( &
8621                             &    answer\_shape(1), &
8622                       
8623       &    answer\_shape(2), &
8624                       
8625       &    answer\_shape(3), &
8626                       
8627       &    answer\_shape(4), &
8628                       
8629       &    answer\_shape(5), &
8630                       
8631       &    answer\_shape(6)  )  &
8632       &  )
8633 
8634     \textcolor{keyword}{allocate}( check\_negative( &
8635                             &    answer\_shape(1), &
8636                       
8637       &    answer\_shape(2), &
8638                       
8639       &    answer\_shape(3), &
8640                       
8641       &    answer\_shape(4), &
8642                       
8643       &    answer\_shape(5), &
8644                       
8645       &    answer\_shape(6)  )  &
8646       &  )
8647 
8648     \textcolor{keyword}{allocate}( both\_negative( &
8649                             &    answer\_shape(1), &
8650                       
8651       &    answer\_shape(2), &
8652                       
8653       &    answer\_shape(3), &
8654                       
8655       &    answer\_shape(4), &
8656                       
8657       &    answer\_shape(5), &
8658                       
8659       &    answer\_shape(6)  )  &
8660       &  )
8661 
8662     \textcolor{keyword}{allocate}( answer\_max( &
8663                             &    answer\_shape(1), &
8664                       
8665       &    answer\_shape(2), &
8666                       
8667       &    answer\_shape(3), &
8668                       
8669       &    answer\_shape(4), &
8670                       
8671       &    answer\_shape(5), &
8672                       
8673       &    answer\_shape(6)  )  &
8674       &  )
8675 
8676     \textcolor{keyword}{allocate}( answer\_min( &
8677                             &    answer\_shape(1), &
8678                       
8679       &    answer\_shape(2), &
8680                       
8681       &    answer\_shape(3), &
8682                       
8683       &    answer\_shape(4), &
8684                       
8685       &    answer\_shape(5), &
8686                       
8687       &    answer\_shape(6)  )  &
8688       &  )
8689 
8690     answer\_negative = answer < 0.0\_dp
8691     check\_negative = check < 0.0\_dp
8692     both\_negative = answer\_negative .and. check\_negative
8693 
8694     \textcolor{keywordflow}{where} (both\_negative)
8695       answer\_max = &
8696         &   answer &
8697         &   * (   1.0\_dp &
8698         &       - 0.1\_dp ** significant\_digits ) &
8699         & + 0.1\_dp ** (- ignore\_digits)
8700 
8701       answer\_min = &
8702         &   answer &
8703         &   * (   1.0\_dp &
8704         &       + 0.1\_dp ** significant\_digits ) &
8705         & - 0.1\_dp ** (- ignore\_digits)
8706     \textcolor{keywordflow}{elsewhere}
8707       answer\_max = &
8708         &   answer &
8709         &   * (   1.0\_dp &
8710         &       + 0.1\_dp ** significant\_digits ) &
8711         & + 0.1\_dp ** (- ignore\_digits)
8712 
8713       answer\_min = &
8714         &   answer &
8715         &   * (   1.0\_dp &
8716         &       - 0.1\_dp ** significant\_digits ) &
8717         & - 0.1\_dp ** (- ignore\_digits)
8718 \textcolor{keywordflow}{    end where}
8719 
8720     judge = answer\_max > check .and. check > answer\_min
8721     judge\_rev = .not. judge
8722     err\_flag = any(judge\_rev)
8723     mask\_array = 1
8724     pos = maxloc(mask\_array, judge\_rev)
8725 
8726     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
8727 
8728       wrong = check( &
8729                               &    pos(1), &
8730                       
8731         &    pos(2), &
8732                       
8733         &    pos(3), &
8734                       
8735         &    pos(4), &
8736                       
8737         &    pos(5), &
8738                       
8739         &    pos(6)  )
8740 
8741       right\_max = answer\_max( &
8742                               &    pos(1), &
8743                       
8744         &    pos(2), &
8745                       
8746         &    pos(3), &
8747                       
8748         &    pos(4), &
8749                       
8750         &    pos(5), &
8751                       
8752         &    pos(6)  )
8753 
8754       right\_min = answer\_min( &
8755                               &    pos(1), &
8756                       
8757         &    pos(2), &
8758                       
8759         &    pos(3), &
8760                       
8761         &    pos(4), &
8762                       
8763         &    pos(5), &
8764                       
8765         &    pos(6)  )
8766 
8767       \textcolor{keywordflow}{if} ( right\_max < right\_min ) \textcolor{keywordflow}{then}
8768         right\_tmp = right\_max
8769         right\_max = right\_min
8770         right\_min = right\_tmp
8771 \textcolor{keywordflow}{      end if}
8772 
8773                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
8774                       
8775       \textcolor{keyword}{write}(unit=pos\_array(2), fmt=\textcolor{stringliteral}{"(i20)"}) pos(2)
8776                       
8777       \textcolor{keyword}{write}(unit=pos\_array(3), fmt=\textcolor{stringliteral}{"(i20)"}) pos(3)
8778                       
8779       \textcolor{keyword}{write}(unit=pos\_array(4), fmt=\textcolor{stringliteral}{"(i20)"}) pos(4)
8780                       
8781       \textcolor{keyword}{write}(unit=pos\_array(5), fmt=\textcolor{stringliteral}{"(i20)"}) pos(5)
8782                       
8783       \textcolor{keyword}{write}(unit=pos\_array(6), fmt=\textcolor{stringliteral}{"(i20)"}) pos(6)
8784                       
8785 
8786       pos\_str = \textcolor{stringliteral}{'('} // &
8787                               &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{','} // &
8788                       
8789         &    trim(adjustl(pos\_array(2))) // \textcolor{stringliteral}{','} // &
8790                       
8791         &    trim(adjustl(pos\_array(3))) // \textcolor{stringliteral}{','} // &
8792                       
8793         &    trim(adjustl(pos\_array(4))) // \textcolor{stringliteral}{','} // &
8794                       
8795         &    trim(adjustl(pos\_array(5))) // \textcolor{stringliteral}{','} // &
8796                       
8797         &    trim(adjustl(pos\_array(6))) // \textcolor{stringliteral}{')'}
8798 
8799 \textcolor{keywordflow}{    end if}
8800     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
8801     \textcolor{keyword}{deallocate}(answer\_negative, check\_negative, both\_negative)
8802     \textcolor{keyword}{deallocate}(answer\_max, answer\_min)
8803 
8804                     
8805 
8806     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
8807       pos\_str\_space = \textcolor{stringliteral}{''}
8808       pos\_str\_len = len\_trim(pos\_str)
8809 
8810       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
8811       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
8812       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str)  // \textcolor{stringliteral}{'  = '}, wrong
8813       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
8814       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'        '} // pos\_str\_space(1:pos\_str\_len) &
8815         &                                     // \textcolor{stringliteral}{'   '}, right\_min, \textcolor{stringliteral}{' < '}
8816       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str)  // \textcolor{stringliteral}{' < '}, right\_max
8817 
8818       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
8819     \textcolor{keywordflow}{else}
8820       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
8821 \textcolor{keywordflow}{    end if}
8822 
8823 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_a53eedbb7f10677ded5313bc7e9dbd7f8}\label{interfacedc__test_1_1assertequal_a53eedbb7f10677ded5313bc7e9dbd7f8}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequaldouble7@{dctestassertequaldouble7}}
\index{dctestassertequaldouble7@{dctestassertequaldouble7}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequaldouble7()}{dctestassertequaldouble7()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequaldouble7 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{real(dp), dimension(\+:,\+:,\+:,\+:,\+:,\+:,\+:), intent(in)}]{answer,  }\item[{real(dp), dimension(\+:,\+:,\+:,\+:,\+:,\+:,\+:), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 4684 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
4684     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
4685     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
4686     \textcolor{keywordtype}{implicit none}
4687     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
4688     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: answer(:,:,:,:,:,:,:)
4689     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: check(:,:,:,:,:,:,:)
4690     \textcolor{keywordtype}{logical}:: err\_flag
4691     \textcolor{keywordtype}{character(STRING)}:: pos\_str
4692     \textcolor{keywordtype}{real(DP)}:: wrong, right
4693 
4694                         \textcolor{keywordtype}{integer}:: answer\_shape(7), check\_shape(7), pos(7)
4695     \textcolor{keywordtype}{logical}:: consist\_shape(7)
4696     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(7)
4697     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:,:,:,:,:,:,:)
4698     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:,:,:,:,:,:,:)
4699     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:,:,:,:,:,:,:)
4700                     
4701 
4702                     
4703 
4704   \textcolor{keywordflow}{continue}
4705     err\_flag = .false.
4706 
4707                     
4708     answer\_shape = shape(answer)
4709     check\_shape = shape(check)
4710 
4711     consist\_shape = answer\_shape == check\_shape
4712 
4713     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
4714       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
4715       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
4716       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
4717       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
4718       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
4719 
4720       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
4721 \textcolor{keywordflow}{    end if}
4722 
4723 
4724     \textcolor{keyword}{allocate}( mask\_array( &
4725                             &    answer\_shape(1), &
4726                       
4727       &    answer\_shape(2), &
4728                       
4729       &    answer\_shape(3), &
4730                       
4731       &    answer\_shape(4), &
4732                       
4733       &    answer\_shape(5), &
4734                       
4735       &    answer\_shape(6), &
4736                       
4737       &    answer\_shape(7)  )  &
4738       &  )
4739 
4740     \textcolor{keyword}{allocate}( judge( &
4741                             &    answer\_shape(1), &
4742                       
4743       &    answer\_shape(2), &
4744                       
4745       &    answer\_shape(3), &
4746                       
4747       &    answer\_shape(4), &
4748                       
4749       &    answer\_shape(5), &
4750                       
4751       &    answer\_shape(6), &
4752                       
4753       &    answer\_shape(7)  )  &
4754       &  )
4755 
4756     \textcolor{keyword}{allocate}( judge\_rev( &
4757                             &    answer\_shape(1), &
4758                       
4759       &    answer\_shape(2), &
4760                       
4761       &    answer\_shape(3), &
4762                       
4763       &    answer\_shape(4), &
4764                       
4765       &    answer\_shape(5), &
4766                       
4767       &    answer\_shape(6), &
4768                       
4769       &    answer\_shape(7)  )  &
4770       &  )
4771 
4772                       
4773     judge = answer == check
4774 
4775                       
4776 
4777     judge\_rev = .not. judge
4778     err\_flag = any(judge\_rev)
4779     mask\_array = 1
4780     pos = maxloc(mask\_array, judge\_rev)
4781 
4782     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
4783 
4784       wrong = check( &
4785                               &    pos(1), &
4786                       
4787         &    pos(2), &
4788                       
4789         &    pos(3), &
4790                       
4791         &    pos(4), &
4792                       
4793         &    pos(5), &
4794                       
4795         &    pos(6), &
4796                       
4797         &    pos(7)  )
4798 
4799       right = answer( &
4800                               &    pos(1), &
4801                       
4802         &    pos(2), &
4803                       
4804         &    pos(3), &
4805                       
4806         &    pos(4), &
4807                       
4808         &    pos(5), &
4809                       
4810         &    pos(6), &
4811                       
4812         &    pos(7)  )
4813 
4814                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
4815                       
4816       \textcolor{keyword}{write}(unit=pos\_array(2), fmt=\textcolor{stringliteral}{"(i20)"}) pos(2)
4817                       
4818       \textcolor{keyword}{write}(unit=pos\_array(3), fmt=\textcolor{stringliteral}{"(i20)"}) pos(3)
4819                       
4820       \textcolor{keyword}{write}(unit=pos\_array(4), fmt=\textcolor{stringliteral}{"(i20)"}) pos(4)
4821                       
4822       \textcolor{keyword}{write}(unit=pos\_array(5), fmt=\textcolor{stringliteral}{"(i20)"}) pos(5)
4823                       
4824       \textcolor{keyword}{write}(unit=pos\_array(6), fmt=\textcolor{stringliteral}{"(i20)"}) pos(6)
4825                       
4826       \textcolor{keyword}{write}(unit=pos\_array(7), fmt=\textcolor{stringliteral}{"(i20)"}) pos(7)
4827                       
4828 
4829       pos\_str = \textcolor{stringliteral}{'('} // &
4830                               &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{','} // &
4831                       
4832         &    trim(adjustl(pos\_array(2))) // \textcolor{stringliteral}{','} // &
4833                       
4834         &    trim(adjustl(pos\_array(3))) // \textcolor{stringliteral}{','} // &
4835                       
4836         &    trim(adjustl(pos\_array(4))) // \textcolor{stringliteral}{','} // &
4837                       
4838         &    trim(adjustl(pos\_array(5))) // \textcolor{stringliteral}{','} // &
4839                       
4840         &    trim(adjustl(pos\_array(6))) // \textcolor{stringliteral}{','} // &
4841                       
4842         &    trim(adjustl(pos\_array(7))) // \textcolor{stringliteral}{')'}
4843 
4844 \textcolor{keywordflow}{    end if}
4845     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
4846 
4847                     
4848 
4849 
4850     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
4851       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
4852       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
4853       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str) // \textcolor{stringliteral}{'  = '}, wrong
4854       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
4855       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str) // \textcolor{stringliteral}{' = '}, right
4856 
4857       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
4858     \textcolor{keywordflow}{else}
4859       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
4860 \textcolor{keywordflow}{    end if}
4861 
4862 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_a15921b0f16828edb1e684e0bc9cf0732}\label{interfacedc__test_1_1assertequal_a15921b0f16828edb1e684e0bc9cf0732}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequaldouble7digits@{dctestassertequaldouble7digits}}
\index{dctestassertequaldouble7digits@{dctestassertequaldouble7digits}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequaldouble7digits()}{dctestassertequaldouble7digits()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequaldouble7digits (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{real(dp), dimension(\+:,\+:,\+:,\+:,\+:,\+:,\+:), intent(in)}]{answer,  }\item[{real(dp), dimension(\+:,\+:,\+:,\+:,\+:,\+:,\+:), intent(in)}]{check,  }\item[{integer, intent(in)}]{significant\+\_\+digits,  }\item[{integer, intent(in)}]{ignore\+\_\+digits }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 8829 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
8829     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
8830     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
8831     \textcolor{keywordtype}{implicit none}
8832     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
8833     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: answer(:,:,:,:,:,:,:)
8834     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: check(:,:,:,:,:,:,:)
8835     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: significant\_digits
8836     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: ignore\_digits
8837     \textcolor{keywordtype}{logical}:: err\_flag
8838     \textcolor{keywordtype}{character(STRING)}:: pos\_str
8839     \textcolor{keywordtype}{real(DP)}:: wrong, right\_max, right\_min
8840     \textcolor{keywordtype}{character(STRING)}:: pos\_str\_space
8841     \textcolor{keywordtype}{integer}:: pos\_str\_len
8842     \textcolor{keywordtype}{real(DP)}:: right\_tmp
8843 
8844                         \textcolor{keywordtype}{integer}:: answer\_shape(7), check\_shape(7), pos(7)
8845     \textcolor{keywordtype}{logical}:: consist\_shape(7)
8846     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(7)
8847     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:,:,:,:,:,:,:)
8848     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:,:,:,:,:,:,:)
8849     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:,:,:,:,:,:,:)
8850     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: answer\_negative(:,:,:,:,:,:,:)
8851     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: check\_negative(:,:,:,:,:,:,:)
8852     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: both\_negative(:,:,:,:,:,:,:)
8853     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{allocatable}:: answer\_max(:,:,:,:,:,:,:)
8854     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{allocatable}:: answer\_min(:,:,:,:,:,:,:)
8855                     
8856   \textcolor{keywordflow}{continue}
8857     err\_flag = .false.
8858 
8859     \textcolor{keywordflow}{if} ( significant\_digits < 1 ) \textcolor{keywordflow}{then}
8860       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** '}
8861       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Specify a number more than 1 to "significant\_digits"'}
8862       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
8863 \textcolor{keywordflow}{    end if}
8864                     
8865     answer\_shape = shape(answer)
8866     check\_shape = shape(check)
8867 
8868     consist\_shape = answer\_shape == check\_shape
8869 
8870     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
8871       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
8872       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
8873       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
8874       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
8875       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
8876 
8877       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
8878 \textcolor{keywordflow}{    end if}
8879 
8880 
8881     \textcolor{keyword}{allocate}( mask\_array( &
8882                             &    answer\_shape(1), &
8883                       
8884       &    answer\_shape(2), &
8885                       
8886       &    answer\_shape(3), &
8887                       
8888       &    answer\_shape(4), &
8889                       
8890       &    answer\_shape(5), &
8891                       
8892       &    answer\_shape(6), &
8893                       
8894       &    answer\_shape(7)  )  &
8895       &  )
8896 
8897     \textcolor{keyword}{allocate}( judge( &
8898                             &    answer\_shape(1), &
8899                       
8900       &    answer\_shape(2), &
8901                       
8902       &    answer\_shape(3), &
8903                       
8904       &    answer\_shape(4), &
8905                       
8906       &    answer\_shape(5), &
8907                       
8908       &    answer\_shape(6), &
8909                       
8910       &    answer\_shape(7)  )  &
8911       &  )
8912 
8913     \textcolor{keyword}{allocate}( judge\_rev( &
8914                             &    answer\_shape(1), &
8915                       
8916       &    answer\_shape(2), &
8917                       
8918       &    answer\_shape(3), &
8919                       
8920       &    answer\_shape(4), &
8921                       
8922       &    answer\_shape(5), &
8923                       
8924       &    answer\_shape(6), &
8925                       
8926       &    answer\_shape(7)  )  &
8927       &  )
8928 
8929     \textcolor{keyword}{allocate}( answer\_negative( &
8930                             &    answer\_shape(1), &
8931                       
8932       &    answer\_shape(2), &
8933                       
8934       &    answer\_shape(3), &
8935                       
8936       &    answer\_shape(4), &
8937                       
8938       &    answer\_shape(5), &
8939                       
8940       &    answer\_shape(6), &
8941                       
8942       &    answer\_shape(7)  )  &
8943       &  )
8944 
8945     \textcolor{keyword}{allocate}( check\_negative( &
8946                             &    answer\_shape(1), &
8947                       
8948       &    answer\_shape(2), &
8949                       
8950       &    answer\_shape(3), &
8951                       
8952       &    answer\_shape(4), &
8953                       
8954       &    answer\_shape(5), &
8955                       
8956       &    answer\_shape(6), &
8957                       
8958       &    answer\_shape(7)  )  &
8959       &  )
8960 
8961     \textcolor{keyword}{allocate}( both\_negative( &
8962                             &    answer\_shape(1), &
8963                       
8964       &    answer\_shape(2), &
8965                       
8966       &    answer\_shape(3), &
8967                       
8968       &    answer\_shape(4), &
8969                       
8970       &    answer\_shape(5), &
8971                       
8972       &    answer\_shape(6), &
8973                       
8974       &    answer\_shape(7)  )  &
8975       &  )
8976 
8977     \textcolor{keyword}{allocate}( answer\_max( &
8978                             &    answer\_shape(1), &
8979                       
8980       &    answer\_shape(2), &
8981                       
8982       &    answer\_shape(3), &
8983                       
8984       &    answer\_shape(4), &
8985                       
8986       &    answer\_shape(5), &
8987                       
8988       &    answer\_shape(6), &
8989                       
8990       &    answer\_shape(7)  )  &
8991       &  )
8992 
8993     \textcolor{keyword}{allocate}( answer\_min( &
8994                             &    answer\_shape(1), &
8995                       
8996       &    answer\_shape(2), &
8997                       
8998       &    answer\_shape(3), &
8999                       
9000       &    answer\_shape(4), &
9001                       
9002       &    answer\_shape(5), &
9003                       
9004       &    answer\_shape(6), &
9005                       
9006       &    answer\_shape(7)  )  &
9007       &  )
9008 
9009     answer\_negative = answer < 0.0\_dp
9010     check\_negative = check < 0.0\_dp
9011     both\_negative = answer\_negative .and. check\_negative
9012 
9013     \textcolor{keywordflow}{where} (both\_negative)
9014       answer\_max = &
9015         &   answer &
9016         &   * (   1.0\_dp &
9017         &       - 0.1\_dp ** significant\_digits ) &
9018         & + 0.1\_dp ** (- ignore\_digits)
9019 
9020       answer\_min = &
9021         &   answer &
9022         &   * (   1.0\_dp &
9023         &       + 0.1\_dp ** significant\_digits ) &
9024         & - 0.1\_dp ** (- ignore\_digits)
9025     \textcolor{keywordflow}{elsewhere}
9026       answer\_max = &
9027         &   answer &
9028         &   * (   1.0\_dp &
9029         &       + 0.1\_dp ** significant\_digits ) &
9030         & + 0.1\_dp ** (- ignore\_digits)
9031 
9032       answer\_min = &
9033         &   answer &
9034         &   * (   1.0\_dp &
9035         &       - 0.1\_dp ** significant\_digits ) &
9036         & - 0.1\_dp ** (- ignore\_digits)
9037 \textcolor{keywordflow}{    end where}
9038 
9039     judge = answer\_max > check .and. check > answer\_min
9040     judge\_rev = .not. judge
9041     err\_flag = any(judge\_rev)
9042     mask\_array = 1
9043     pos = maxloc(mask\_array, judge\_rev)
9044 
9045     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
9046 
9047       wrong = check( &
9048                               &    pos(1), &
9049                       
9050         &    pos(2), &
9051                       
9052         &    pos(3), &
9053                       
9054         &    pos(4), &
9055                       
9056         &    pos(5), &
9057                       
9058         &    pos(6), &
9059                       
9060         &    pos(7)  )
9061 
9062       right\_max = answer\_max( &
9063                               &    pos(1), &
9064                       
9065         &    pos(2), &
9066                       
9067         &    pos(3), &
9068                       
9069         &    pos(4), &
9070                       
9071         &    pos(5), &
9072                       
9073         &    pos(6), &
9074                       
9075         &    pos(7)  )
9076 
9077       right\_min = answer\_min( &
9078                               &    pos(1), &
9079                       
9080         &    pos(2), &
9081                       
9082         &    pos(3), &
9083                       
9084         &    pos(4), &
9085                       
9086         &    pos(5), &
9087                       
9088         &    pos(6), &
9089                       
9090         &    pos(7)  )
9091 
9092       \textcolor{keywordflow}{if} ( right\_max < right\_min ) \textcolor{keywordflow}{then}
9093         right\_tmp = right\_max
9094         right\_max = right\_min
9095         right\_min = right\_tmp
9096 \textcolor{keywordflow}{      end if}
9097 
9098                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
9099                       
9100       \textcolor{keyword}{write}(unit=pos\_array(2), fmt=\textcolor{stringliteral}{"(i20)"}) pos(2)
9101                       
9102       \textcolor{keyword}{write}(unit=pos\_array(3), fmt=\textcolor{stringliteral}{"(i20)"}) pos(3)
9103                       
9104       \textcolor{keyword}{write}(unit=pos\_array(4), fmt=\textcolor{stringliteral}{"(i20)"}) pos(4)
9105                       
9106       \textcolor{keyword}{write}(unit=pos\_array(5), fmt=\textcolor{stringliteral}{"(i20)"}) pos(5)
9107                       
9108       \textcolor{keyword}{write}(unit=pos\_array(6), fmt=\textcolor{stringliteral}{"(i20)"}) pos(6)
9109                       
9110       \textcolor{keyword}{write}(unit=pos\_array(7), fmt=\textcolor{stringliteral}{"(i20)"}) pos(7)
9111                       
9112 
9113       pos\_str = \textcolor{stringliteral}{'('} // &
9114                               &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{','} // &
9115                       
9116         &    trim(adjustl(pos\_array(2))) // \textcolor{stringliteral}{','} // &
9117                       
9118         &    trim(adjustl(pos\_array(3))) // \textcolor{stringliteral}{','} // &
9119                       
9120         &    trim(adjustl(pos\_array(4))) // \textcolor{stringliteral}{','} // &
9121                       
9122         &    trim(adjustl(pos\_array(5))) // \textcolor{stringliteral}{','} // &
9123                       
9124         &    trim(adjustl(pos\_array(6))) // \textcolor{stringliteral}{','} // &
9125                       
9126         &    trim(adjustl(pos\_array(7))) // \textcolor{stringliteral}{')'}
9127 
9128 \textcolor{keywordflow}{    end if}
9129     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
9130     \textcolor{keyword}{deallocate}(answer\_negative, check\_negative, both\_negative)
9131     \textcolor{keyword}{deallocate}(answer\_max, answer\_min)
9132 
9133                     
9134 
9135     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
9136       pos\_str\_space = \textcolor{stringliteral}{''}
9137       pos\_str\_len = len\_trim(pos\_str)
9138 
9139       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
9140       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
9141       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str)  // \textcolor{stringliteral}{'  = '}, wrong
9142       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
9143       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'        '} // pos\_str\_space(1:pos\_str\_len) &
9144         &                                     // \textcolor{stringliteral}{'   '}, right\_min, \textcolor{stringliteral}{' < '}
9145       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str)  // \textcolor{stringliteral}{' < '}, right\_max
9146 
9147       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
9148     \textcolor{keywordflow}{else}
9149       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
9150 \textcolor{keywordflow}{    end if}
9151 
9152 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_abc099a22918a4232de8660c25c008f7c}\label{interfacedc__test_1_1assertequal_abc099a22918a4232de8660c25c008f7c}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequalint0@{dctestassertequalint0}}
\index{dctestassertequalint0@{dctestassertequalint0}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequalint0()}{dctestassertequalint0()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequalint0 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{integer, intent(in)}]{answer,  }\item[{integer, intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 1759 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
1759     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
1760     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
1761     \textcolor{keywordtype}{implicit none}
1762     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
1763     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: answer
1764     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: check
1765     \textcolor{keywordtype}{logical}:: err\_flag
1766     \textcolor{keywordtype}{character(STRING)}:: pos\_str
1767     \textcolor{keywordtype}{integer}:: wrong, right
1768 
1769                                         
1770 
1771                     
1772 
1773   \textcolor{keywordflow}{continue}
1774     err\_flag = .false.
1775 
1776                     
1777     err\_flag = .not. answer == check
1778     wrong = check
1779     right = answer
1780     pos\_str = \textcolor{stringliteral}{''}
1781 
1782                     
1783 
1784 
1785     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
1786       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
1787       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
1788       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str) // \textcolor{stringliteral}{'  = '}, wrong
1789       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
1790       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str) // \textcolor{stringliteral}{' = '}, right
1791 
1792       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
1793     \textcolor{keywordflow}{else}
1794       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
1795 \textcolor{keywordflow}{    end if}
1796 
1797 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_a8be1048b7ef238e34ae889871693c813}\label{interfacedc__test_1_1assertequal_a8be1048b7ef238e34ae889871693c813}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequalint1@{dctestassertequalint1}}
\index{dctestassertequalint1@{dctestassertequalint1}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequalint1()}{dctestassertequalint1()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequalint1 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{integer, dimension(\+:), intent(in)}]{answer,  }\item[{integer, dimension(\+:), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 1802 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
1802     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
1803     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
1804     \textcolor{keywordtype}{implicit none}
1805     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
1806     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: answer(:)
1807     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: check(:)
1808     \textcolor{keywordtype}{logical}:: err\_flag
1809     \textcolor{keywordtype}{character(STRING)}:: pos\_str
1810     \textcolor{keywordtype}{integer}:: wrong, right
1811 
1812                         \textcolor{keywordtype}{integer}:: answer\_shape(1), check\_shape(1), pos(1)
1813     \textcolor{keywordtype}{logical}:: consist\_shape(1)
1814     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(1)
1815     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:)
1816     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:)
1817     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:)
1818                     
1819 
1820                     
1821 
1822   \textcolor{keywordflow}{continue}
1823     err\_flag = .false.
1824 
1825                     
1826     answer\_shape = shape(answer)
1827     check\_shape = shape(check)
1828 
1829     consist\_shape = answer\_shape == check\_shape
1830 
1831     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
1832       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
1833       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
1834       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
1835       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
1836       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
1837 
1838       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
1839 \textcolor{keywordflow}{    end if}
1840 
1841 
1842     \textcolor{keyword}{allocate}( mask\_array( &
1843                       
1844       &    answer\_shape(1)  )  &
1845       &  )
1846 
1847     \textcolor{keyword}{allocate}( judge( &
1848                       
1849       &    answer\_shape(1)  )  &
1850       &  )
1851 
1852     \textcolor{keyword}{allocate}( judge\_rev( &
1853                       
1854       &    answer\_shape(1)  )  &
1855       &  )
1856 
1857                       
1858     judge = answer == check
1859 
1860                       
1861 
1862     judge\_rev = .not. judge
1863     err\_flag = any(judge\_rev)
1864     mask\_array = 1
1865     pos = maxloc(mask\_array, judge\_rev)
1866 
1867     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
1868 
1869       wrong = check( &
1870                       
1871         &    pos(1)  )
1872 
1873       right = answer( &
1874                       
1875         &    pos(1)  )
1876 
1877                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
1878                       
1879 
1880       pos\_str = \textcolor{stringliteral}{'('} // &
1881                       
1882         &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{')'}
1883 
1884 \textcolor{keywordflow}{    end if}
1885     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
1886 
1887                     
1888 
1889 
1890     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
1891       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
1892       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
1893       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str) // \textcolor{stringliteral}{'  = '}, wrong
1894       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
1895       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str) // \textcolor{stringliteral}{' = '}, right
1896 
1897       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
1898     \textcolor{keywordflow}{else}
1899       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
1900 \textcolor{keywordflow}{    end if}
1901 
1902 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_a8269d5664877e5be07bcf1d372e32b08}\label{interfacedc__test_1_1assertequal_a8269d5664877e5be07bcf1d372e32b08}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequalint2@{dctestassertequalint2}}
\index{dctestassertequalint2@{dctestassertequalint2}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequalint2()}{dctestassertequalint2()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequalint2 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{integer, dimension(\+:,\+:), intent(in)}]{answer,  }\item[{integer, dimension(\+:,\+:), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 1907 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
1907     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
1908     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
1909     \textcolor{keywordtype}{implicit none}
1910     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
1911     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: answer(:,:)
1912     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: check(:,:)
1913     \textcolor{keywordtype}{logical}:: err\_flag
1914     \textcolor{keywordtype}{character(STRING)}:: pos\_str
1915     \textcolor{keywordtype}{integer}:: wrong, right
1916 
1917                         \textcolor{keywordtype}{integer}:: answer\_shape(2), check\_shape(2), pos(2)
1918     \textcolor{keywordtype}{logical}:: consist\_shape(2)
1919     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(2)
1920     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:,:)
1921     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:,:)
1922     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:,:)
1923                     
1924 
1925                     
1926 
1927   \textcolor{keywordflow}{continue}
1928     err\_flag = .false.
1929 
1930                     
1931     answer\_shape = shape(answer)
1932     check\_shape = shape(check)
1933 
1934     consist\_shape = answer\_shape == check\_shape
1935 
1936     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
1937       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
1938       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
1939       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
1940       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
1941       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
1942 
1943       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
1944 \textcolor{keywordflow}{    end if}
1945 
1946 
1947     \textcolor{keyword}{allocate}( mask\_array( &
1948                             &    answer\_shape(1), &
1949                       
1950       &    answer\_shape(2)  )  &
1951       &  )
1952 
1953     \textcolor{keyword}{allocate}( judge( &
1954                             &    answer\_shape(1), &
1955                       
1956       &    answer\_shape(2)  )  &
1957       &  )
1958 
1959     \textcolor{keyword}{allocate}( judge\_rev( &
1960                             &    answer\_shape(1), &
1961                       
1962       &    answer\_shape(2)  )  &
1963       &  )
1964 
1965                       
1966     judge = answer == check
1967 
1968                       
1969 
1970     judge\_rev = .not. judge
1971     err\_flag = any(judge\_rev)
1972     mask\_array = 1
1973     pos = maxloc(mask\_array, judge\_rev)
1974 
1975     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
1976 
1977       wrong = check( &
1978                               &    pos(1), &
1979                       
1980         &    pos(2)  )
1981 
1982       right = answer( &
1983                               &    pos(1), &
1984                       
1985         &    pos(2)  )
1986 
1987                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
1988                       
1989       \textcolor{keyword}{write}(unit=pos\_array(2), fmt=\textcolor{stringliteral}{"(i20)"}) pos(2)
1990                       
1991 
1992       pos\_str = \textcolor{stringliteral}{'('} // &
1993                               &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{','} // &
1994                       
1995         &    trim(adjustl(pos\_array(2))) // \textcolor{stringliteral}{')'}
1996 
1997 \textcolor{keywordflow}{    end if}
1998     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
1999 
2000                     
2001 
2002 
2003     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
2004       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
2005       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
2006       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str) // \textcolor{stringliteral}{'  = '}, wrong
2007       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
2008       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str) // \textcolor{stringliteral}{' = '}, right
2009 
2010       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
2011     \textcolor{keywordflow}{else}
2012       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
2013 \textcolor{keywordflow}{    end if}
2014 
2015 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_a8a012df3a6b40c90ec7a34f3843ec311}\label{interfacedc__test_1_1assertequal_a8a012df3a6b40c90ec7a34f3843ec311}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequalint3@{dctestassertequalint3}}
\index{dctestassertequalint3@{dctestassertequalint3}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequalint3()}{dctestassertequalint3()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequalint3 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{integer, dimension(\+:,\+:,\+:), intent(in)}]{answer,  }\item[{integer, dimension(\+:,\+:,\+:), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 2020 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
2020     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
2021     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
2022     \textcolor{keywordtype}{implicit none}
2023     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
2024     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: answer(:,:,:)
2025     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: check(:,:,:)
2026     \textcolor{keywordtype}{logical}:: err\_flag
2027     \textcolor{keywordtype}{character(STRING)}:: pos\_str
2028     \textcolor{keywordtype}{integer}:: wrong, right
2029 
2030                         \textcolor{keywordtype}{integer}:: answer\_shape(3), check\_shape(3), pos(3)
2031     \textcolor{keywordtype}{logical}:: consist\_shape(3)
2032     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(3)
2033     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:,:,:)
2034     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:,:,:)
2035     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:,:,:)
2036                     
2037 
2038                     
2039 
2040   \textcolor{keywordflow}{continue}
2041     err\_flag = .false.
2042 
2043                     
2044     answer\_shape = shape(answer)
2045     check\_shape = shape(check)
2046 
2047     consist\_shape = answer\_shape == check\_shape
2048 
2049     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
2050       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
2051       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
2052       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
2053       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
2054       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
2055 
2056       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
2057 \textcolor{keywordflow}{    end if}
2058 
2059 
2060     \textcolor{keyword}{allocate}( mask\_array( &
2061                             &    answer\_shape(1), &
2062                       
2063       &    answer\_shape(2), &
2064                       
2065       &    answer\_shape(3)  )  &
2066       &  )
2067 
2068     \textcolor{keyword}{allocate}( judge( &
2069                             &    answer\_shape(1), &
2070                       
2071       &    answer\_shape(2), &
2072                       
2073       &    answer\_shape(3)  )  &
2074       &  )
2075 
2076     \textcolor{keyword}{allocate}( judge\_rev( &
2077                             &    answer\_shape(1), &
2078                       
2079       &    answer\_shape(2), &
2080                       
2081       &    answer\_shape(3)  )  &
2082       &  )
2083 
2084                       
2085     judge = answer == check
2086 
2087                       
2088 
2089     judge\_rev = .not. judge
2090     err\_flag = any(judge\_rev)
2091     mask\_array = 1
2092     pos = maxloc(mask\_array, judge\_rev)
2093 
2094     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
2095 
2096       wrong = check( &
2097                               &    pos(1), &
2098                       
2099         &    pos(2), &
2100                       
2101         &    pos(3)  )
2102 
2103       right = answer( &
2104                               &    pos(1), &
2105                       
2106         &    pos(2), &
2107                       
2108         &    pos(3)  )
2109 
2110                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
2111                       
2112       \textcolor{keyword}{write}(unit=pos\_array(2), fmt=\textcolor{stringliteral}{"(i20)"}) pos(2)
2113                       
2114       \textcolor{keyword}{write}(unit=pos\_array(3), fmt=\textcolor{stringliteral}{"(i20)"}) pos(3)
2115                       
2116 
2117       pos\_str = \textcolor{stringliteral}{'('} // &
2118                               &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{','} // &
2119                       
2120         &    trim(adjustl(pos\_array(2))) // \textcolor{stringliteral}{','} // &
2121                       
2122         &    trim(adjustl(pos\_array(3))) // \textcolor{stringliteral}{')'}
2123 
2124 \textcolor{keywordflow}{    end if}
2125     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
2126 
2127                     
2128 
2129 
2130     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
2131       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
2132       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
2133       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str) // \textcolor{stringliteral}{'  = '}, wrong
2134       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
2135       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str) // \textcolor{stringliteral}{' = '}, right
2136 
2137       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
2138     \textcolor{keywordflow}{else}
2139       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
2140 \textcolor{keywordflow}{    end if}
2141 
2142 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_a81a5b44ef024c203fd9803c6878060f4}\label{interfacedc__test_1_1assertequal_a81a5b44ef024c203fd9803c6878060f4}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequalint4@{dctestassertequalint4}}
\index{dctestassertequalint4@{dctestassertequalint4}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequalint4()}{dctestassertequalint4()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequalint4 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{integer, dimension(\+:,\+:,\+:,\+:), intent(in)}]{answer,  }\item[{integer, dimension(\+:,\+:,\+:,\+:), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 2147 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
2147     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
2148     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
2149     \textcolor{keywordtype}{implicit none}
2150     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
2151     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: answer(:,:,:,:)
2152     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: check(:,:,:,:)
2153     \textcolor{keywordtype}{logical}:: err\_flag
2154     \textcolor{keywordtype}{character(STRING)}:: pos\_str
2155     \textcolor{keywordtype}{integer}:: wrong, right
2156 
2157                         \textcolor{keywordtype}{integer}:: answer\_shape(4), check\_shape(4), pos(4)
2158     \textcolor{keywordtype}{logical}:: consist\_shape(4)
2159     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(4)
2160     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:,:,:,:)
2161     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:,:,:,:)
2162     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:,:,:,:)
2163                     
2164 
2165                     
2166 
2167   \textcolor{keywordflow}{continue}
2168     err\_flag = .false.
2169 
2170                     
2171     answer\_shape = shape(answer)
2172     check\_shape = shape(check)
2173 
2174     consist\_shape = answer\_shape == check\_shape
2175 
2176     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
2177       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
2178       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
2179       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
2180       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
2181       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
2182 
2183       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
2184 \textcolor{keywordflow}{    end if}
2185 
2186 
2187     \textcolor{keyword}{allocate}( mask\_array( &
2188                             &    answer\_shape(1), &
2189                       
2190       &    answer\_shape(2), &
2191                       
2192       &    answer\_shape(3), &
2193                       
2194       &    answer\_shape(4)  )  &
2195       &  )
2196 
2197     \textcolor{keyword}{allocate}( judge( &
2198                             &    answer\_shape(1), &
2199                       
2200       &    answer\_shape(2), &
2201                       
2202       &    answer\_shape(3), &
2203                       
2204       &    answer\_shape(4)  )  &
2205       &  )
2206 
2207     \textcolor{keyword}{allocate}( judge\_rev( &
2208                             &    answer\_shape(1), &
2209                       
2210       &    answer\_shape(2), &
2211                       
2212       &    answer\_shape(3), &
2213                       
2214       &    answer\_shape(4)  )  &
2215       &  )
2216 
2217                       
2218     judge = answer == check
2219 
2220                       
2221 
2222     judge\_rev = .not. judge
2223     err\_flag = any(judge\_rev)
2224     mask\_array = 1
2225     pos = maxloc(mask\_array, judge\_rev)
2226 
2227     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
2228 
2229       wrong = check( &
2230                               &    pos(1), &
2231                       
2232         &    pos(2), &
2233                       
2234         &    pos(3), &
2235                       
2236         &    pos(4)  )
2237 
2238       right = answer( &
2239                               &    pos(1), &
2240                       
2241         &    pos(2), &
2242                       
2243         &    pos(3), &
2244                       
2245         &    pos(4)  )
2246 
2247                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
2248                       
2249       \textcolor{keyword}{write}(unit=pos\_array(2), fmt=\textcolor{stringliteral}{"(i20)"}) pos(2)
2250                       
2251       \textcolor{keyword}{write}(unit=pos\_array(3), fmt=\textcolor{stringliteral}{"(i20)"}) pos(3)
2252                       
2253       \textcolor{keyword}{write}(unit=pos\_array(4), fmt=\textcolor{stringliteral}{"(i20)"}) pos(4)
2254                       
2255 
2256       pos\_str = \textcolor{stringliteral}{'('} // &
2257                               &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{','} // &
2258                       
2259         &    trim(adjustl(pos\_array(2))) // \textcolor{stringliteral}{','} // &
2260                       
2261         &    trim(adjustl(pos\_array(3))) // \textcolor{stringliteral}{','} // &
2262                       
2263         &    trim(adjustl(pos\_array(4))) // \textcolor{stringliteral}{')'}
2264 
2265 \textcolor{keywordflow}{    end if}
2266     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
2267 
2268                     
2269 
2270 
2271     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
2272       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
2273       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
2274       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str) // \textcolor{stringliteral}{'  = '}, wrong
2275       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
2276       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str) // \textcolor{stringliteral}{' = '}, right
2277 
2278       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
2279     \textcolor{keywordflow}{else}
2280       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
2281 \textcolor{keywordflow}{    end if}
2282 
2283 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_a2e54069365dc35829fe7d2ae234aa75a}\label{interfacedc__test_1_1assertequal_a2e54069365dc35829fe7d2ae234aa75a}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequalint5@{dctestassertequalint5}}
\index{dctestassertequalint5@{dctestassertequalint5}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequalint5()}{dctestassertequalint5()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequalint5 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{integer, dimension(\+:,\+:,\+:,\+:,\+:), intent(in)}]{answer,  }\item[{integer, dimension(\+:,\+:,\+:,\+:,\+:), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 2288 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
2288     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
2289     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
2290     \textcolor{keywordtype}{implicit none}
2291     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
2292     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: answer(:,:,:,:,:)
2293     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: check(:,:,:,:,:)
2294     \textcolor{keywordtype}{logical}:: err\_flag
2295     \textcolor{keywordtype}{character(STRING)}:: pos\_str
2296     \textcolor{keywordtype}{integer}:: wrong, right
2297 
2298                         \textcolor{keywordtype}{integer}:: answer\_shape(5), check\_shape(5), pos(5)
2299     \textcolor{keywordtype}{logical}:: consist\_shape(5)
2300     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(5)
2301     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:,:,:,:,:)
2302     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:,:,:,:,:)
2303     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:,:,:,:,:)
2304                     
2305 
2306                     
2307 
2308   \textcolor{keywordflow}{continue}
2309     err\_flag = .false.
2310 
2311                     
2312     answer\_shape = shape(answer)
2313     check\_shape = shape(check)
2314 
2315     consist\_shape = answer\_shape == check\_shape
2316 
2317     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
2318       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
2319       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
2320       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
2321       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
2322       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
2323 
2324       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
2325 \textcolor{keywordflow}{    end if}
2326 
2327 
2328     \textcolor{keyword}{allocate}( mask\_array( &
2329                             &    answer\_shape(1), &
2330                       
2331       &    answer\_shape(2), &
2332                       
2333       &    answer\_shape(3), &
2334                       
2335       &    answer\_shape(4), &
2336                       
2337       &    answer\_shape(5)  )  &
2338       &  )
2339 
2340     \textcolor{keyword}{allocate}( judge( &
2341                             &    answer\_shape(1), &
2342                       
2343       &    answer\_shape(2), &
2344                       
2345       &    answer\_shape(3), &
2346                       
2347       &    answer\_shape(4), &
2348                       
2349       &    answer\_shape(5)  )  &
2350       &  )
2351 
2352     \textcolor{keyword}{allocate}( judge\_rev( &
2353                             &    answer\_shape(1), &
2354                       
2355       &    answer\_shape(2), &
2356                       
2357       &    answer\_shape(3), &
2358                       
2359       &    answer\_shape(4), &
2360                       
2361       &    answer\_shape(5)  )  &
2362       &  )
2363 
2364                       
2365     judge = answer == check
2366 
2367                       
2368 
2369     judge\_rev = .not. judge
2370     err\_flag = any(judge\_rev)
2371     mask\_array = 1
2372     pos = maxloc(mask\_array, judge\_rev)
2373 
2374     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
2375 
2376       wrong = check( &
2377                               &    pos(1), &
2378                       
2379         &    pos(2), &
2380                       
2381         &    pos(3), &
2382                       
2383         &    pos(4), &
2384                       
2385         &    pos(5)  )
2386 
2387       right = answer( &
2388                               &    pos(1), &
2389                       
2390         &    pos(2), &
2391                       
2392         &    pos(3), &
2393                       
2394         &    pos(4), &
2395                       
2396         &    pos(5)  )
2397 
2398                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
2399                       
2400       \textcolor{keyword}{write}(unit=pos\_array(2), fmt=\textcolor{stringliteral}{"(i20)"}) pos(2)
2401                       
2402       \textcolor{keyword}{write}(unit=pos\_array(3), fmt=\textcolor{stringliteral}{"(i20)"}) pos(3)
2403                       
2404       \textcolor{keyword}{write}(unit=pos\_array(4), fmt=\textcolor{stringliteral}{"(i20)"}) pos(4)
2405                       
2406       \textcolor{keyword}{write}(unit=pos\_array(5), fmt=\textcolor{stringliteral}{"(i20)"}) pos(5)
2407                       
2408 
2409       pos\_str = \textcolor{stringliteral}{'('} // &
2410                               &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{','} // &
2411                       
2412         &    trim(adjustl(pos\_array(2))) // \textcolor{stringliteral}{','} // &
2413                       
2414         &    trim(adjustl(pos\_array(3))) // \textcolor{stringliteral}{','} // &
2415                       
2416         &    trim(adjustl(pos\_array(4))) // \textcolor{stringliteral}{','} // &
2417                       
2418         &    trim(adjustl(pos\_array(5))) // \textcolor{stringliteral}{')'}
2419 
2420 \textcolor{keywordflow}{    end if}
2421     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
2422 
2423                     
2424 
2425 
2426     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
2427       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
2428       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
2429       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str) // \textcolor{stringliteral}{'  = '}, wrong
2430       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
2431       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str) // \textcolor{stringliteral}{' = '}, right
2432 
2433       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
2434     \textcolor{keywordflow}{else}
2435       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
2436 \textcolor{keywordflow}{    end if}
2437 
2438 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_ab407a38f740058e96226b2622699d6af}\label{interfacedc__test_1_1assertequal_ab407a38f740058e96226b2622699d6af}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequalint6@{dctestassertequalint6}}
\index{dctestassertequalint6@{dctestassertequalint6}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequalint6()}{dctestassertequalint6()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequalint6 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{integer, dimension(\+:,\+:,\+:,\+:,\+:,\+:), intent(in)}]{answer,  }\item[{integer, dimension(\+:,\+:,\+:,\+:,\+:,\+:), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 2443 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
2443     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
2444     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
2445     \textcolor{keywordtype}{implicit none}
2446     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
2447     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: answer(:,:,:,:,:,:)
2448     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: check(:,:,:,:,:,:)
2449     \textcolor{keywordtype}{logical}:: err\_flag
2450     \textcolor{keywordtype}{character(STRING)}:: pos\_str
2451     \textcolor{keywordtype}{integer}:: wrong, right
2452 
2453                         \textcolor{keywordtype}{integer}:: answer\_shape(6), check\_shape(6), pos(6)
2454     \textcolor{keywordtype}{logical}:: consist\_shape(6)
2455     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(6)
2456     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:,:,:,:,:,:)
2457     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:,:,:,:,:,:)
2458     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:,:,:,:,:,:)
2459                     
2460 
2461                     
2462 
2463   \textcolor{keywordflow}{continue}
2464     err\_flag = .false.
2465 
2466                     
2467     answer\_shape = shape(answer)
2468     check\_shape = shape(check)
2469 
2470     consist\_shape = answer\_shape == check\_shape
2471 
2472     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
2473       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
2474       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
2475       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
2476       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
2477       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
2478 
2479       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
2480 \textcolor{keywordflow}{    end if}
2481 
2482 
2483     \textcolor{keyword}{allocate}( mask\_array( &
2484                             &    answer\_shape(1), &
2485                       
2486       &    answer\_shape(2), &
2487                       
2488       &    answer\_shape(3), &
2489                       
2490       &    answer\_shape(4), &
2491                       
2492       &    answer\_shape(5), &
2493                       
2494       &    answer\_shape(6)  )  &
2495       &  )
2496 
2497     \textcolor{keyword}{allocate}( judge( &
2498                             &    answer\_shape(1), &
2499                       
2500       &    answer\_shape(2), &
2501                       
2502       &    answer\_shape(3), &
2503                       
2504       &    answer\_shape(4), &
2505                       
2506       &    answer\_shape(5), &
2507                       
2508       &    answer\_shape(6)  )  &
2509       &  )
2510 
2511     \textcolor{keyword}{allocate}( judge\_rev( &
2512                             &    answer\_shape(1), &
2513                       
2514       &    answer\_shape(2), &
2515                       
2516       &    answer\_shape(3), &
2517                       
2518       &    answer\_shape(4), &
2519                       
2520       &    answer\_shape(5), &
2521                       
2522       &    answer\_shape(6)  )  &
2523       &  )
2524 
2525                       
2526     judge = answer == check
2527 
2528                       
2529 
2530     judge\_rev = .not. judge
2531     err\_flag = any(judge\_rev)
2532     mask\_array = 1
2533     pos = maxloc(mask\_array, judge\_rev)
2534 
2535     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
2536 
2537       wrong = check( &
2538                               &    pos(1), &
2539                       
2540         &    pos(2), &
2541                       
2542         &    pos(3), &
2543                       
2544         &    pos(4), &
2545                       
2546         &    pos(5), &
2547                       
2548         &    pos(6)  )
2549 
2550       right = answer( &
2551                               &    pos(1), &
2552                       
2553         &    pos(2), &
2554                       
2555         &    pos(3), &
2556                       
2557         &    pos(4), &
2558                       
2559         &    pos(5), &
2560                       
2561         &    pos(6)  )
2562 
2563                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
2564                       
2565       \textcolor{keyword}{write}(unit=pos\_array(2), fmt=\textcolor{stringliteral}{"(i20)"}) pos(2)
2566                       
2567       \textcolor{keyword}{write}(unit=pos\_array(3), fmt=\textcolor{stringliteral}{"(i20)"}) pos(3)
2568                       
2569       \textcolor{keyword}{write}(unit=pos\_array(4), fmt=\textcolor{stringliteral}{"(i20)"}) pos(4)
2570                       
2571       \textcolor{keyword}{write}(unit=pos\_array(5), fmt=\textcolor{stringliteral}{"(i20)"}) pos(5)
2572                       
2573       \textcolor{keyword}{write}(unit=pos\_array(6), fmt=\textcolor{stringliteral}{"(i20)"}) pos(6)
2574                       
2575 
2576       pos\_str = \textcolor{stringliteral}{'('} // &
2577                               &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{','} // &
2578                       
2579         &    trim(adjustl(pos\_array(2))) // \textcolor{stringliteral}{','} // &
2580                       
2581         &    trim(adjustl(pos\_array(3))) // \textcolor{stringliteral}{','} // &
2582                       
2583         &    trim(adjustl(pos\_array(4))) // \textcolor{stringliteral}{','} // &
2584                       
2585         &    trim(adjustl(pos\_array(5))) // \textcolor{stringliteral}{','} // &
2586                       
2587         &    trim(adjustl(pos\_array(6))) // \textcolor{stringliteral}{')'}
2588 
2589 \textcolor{keywordflow}{    end if}
2590     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
2591 
2592                     
2593 
2594 
2595     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
2596       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
2597       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
2598       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str) // \textcolor{stringliteral}{'  = '}, wrong
2599       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
2600       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str) // \textcolor{stringliteral}{' = '}, right
2601 
2602       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
2603     \textcolor{keywordflow}{else}
2604       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
2605 \textcolor{keywordflow}{    end if}
2606 
2607 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_a9e8f0ddf2104e7528d0f6020889d0945}\label{interfacedc__test_1_1assertequal_a9e8f0ddf2104e7528d0f6020889d0945}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequalint7@{dctestassertequalint7}}
\index{dctestassertequalint7@{dctestassertequalint7}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequalint7()}{dctestassertequalint7()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequalint7 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{integer, dimension(\+:,\+:,\+:,\+:,\+:,\+:,\+:), intent(in)}]{answer,  }\item[{integer, dimension(\+:,\+:,\+:,\+:,\+:,\+:,\+:), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 2612 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
2612     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
2613     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
2614     \textcolor{keywordtype}{implicit none}
2615     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
2616     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: answer(:,:,:,:,:,:,:)
2617     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: check(:,:,:,:,:,:,:)
2618     \textcolor{keywordtype}{logical}:: err\_flag
2619     \textcolor{keywordtype}{character(STRING)}:: pos\_str
2620     \textcolor{keywordtype}{integer}:: wrong, right
2621 
2622                         \textcolor{keywordtype}{integer}:: answer\_shape(7), check\_shape(7), pos(7)
2623     \textcolor{keywordtype}{logical}:: consist\_shape(7)
2624     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(7)
2625     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:,:,:,:,:,:,:)
2626     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:,:,:,:,:,:,:)
2627     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:,:,:,:,:,:,:)
2628                     
2629 
2630                     
2631 
2632   \textcolor{keywordflow}{continue}
2633     err\_flag = .false.
2634 
2635                     
2636     answer\_shape = shape(answer)
2637     check\_shape = shape(check)
2638 
2639     consist\_shape = answer\_shape == check\_shape
2640 
2641     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
2642       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
2643       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
2644       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
2645       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
2646       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
2647 
2648       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
2649 \textcolor{keywordflow}{    end if}
2650 
2651 
2652     \textcolor{keyword}{allocate}( mask\_array( &
2653                             &    answer\_shape(1), &
2654                       
2655       &    answer\_shape(2), &
2656                       
2657       &    answer\_shape(3), &
2658                       
2659       &    answer\_shape(4), &
2660                       
2661       &    answer\_shape(5), &
2662                       
2663       &    answer\_shape(6), &
2664                       
2665       &    answer\_shape(7)  )  &
2666       &  )
2667 
2668     \textcolor{keyword}{allocate}( judge( &
2669                             &    answer\_shape(1), &
2670                       
2671       &    answer\_shape(2), &
2672                       
2673       &    answer\_shape(3), &
2674                       
2675       &    answer\_shape(4), &
2676                       
2677       &    answer\_shape(5), &
2678                       
2679       &    answer\_shape(6), &
2680                       
2681       &    answer\_shape(7)  )  &
2682       &  )
2683 
2684     \textcolor{keyword}{allocate}( judge\_rev( &
2685                             &    answer\_shape(1), &
2686                       
2687       &    answer\_shape(2), &
2688                       
2689       &    answer\_shape(3), &
2690                       
2691       &    answer\_shape(4), &
2692                       
2693       &    answer\_shape(5), &
2694                       
2695       &    answer\_shape(6), &
2696                       
2697       &    answer\_shape(7)  )  &
2698       &  )
2699 
2700                       
2701     judge = answer == check
2702 
2703                       
2704 
2705     judge\_rev = .not. judge
2706     err\_flag = any(judge\_rev)
2707     mask\_array = 1
2708     pos = maxloc(mask\_array, judge\_rev)
2709 
2710     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
2711 
2712       wrong = check( &
2713                               &    pos(1), &
2714                       
2715         &    pos(2), &
2716                       
2717         &    pos(3), &
2718                       
2719         &    pos(4), &
2720                       
2721         &    pos(5), &
2722                       
2723         &    pos(6), &
2724                       
2725         &    pos(7)  )
2726 
2727       right = answer( &
2728                               &    pos(1), &
2729                       
2730         &    pos(2), &
2731                       
2732         &    pos(3), &
2733                       
2734         &    pos(4), &
2735                       
2736         &    pos(5), &
2737                       
2738         &    pos(6), &
2739                       
2740         &    pos(7)  )
2741 
2742                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
2743                       
2744       \textcolor{keyword}{write}(unit=pos\_array(2), fmt=\textcolor{stringliteral}{"(i20)"}) pos(2)
2745                       
2746       \textcolor{keyword}{write}(unit=pos\_array(3), fmt=\textcolor{stringliteral}{"(i20)"}) pos(3)
2747                       
2748       \textcolor{keyword}{write}(unit=pos\_array(4), fmt=\textcolor{stringliteral}{"(i20)"}) pos(4)
2749                       
2750       \textcolor{keyword}{write}(unit=pos\_array(5), fmt=\textcolor{stringliteral}{"(i20)"}) pos(5)
2751                       
2752       \textcolor{keyword}{write}(unit=pos\_array(6), fmt=\textcolor{stringliteral}{"(i20)"}) pos(6)
2753                       
2754       \textcolor{keyword}{write}(unit=pos\_array(7), fmt=\textcolor{stringliteral}{"(i20)"}) pos(7)
2755                       
2756 
2757       pos\_str = \textcolor{stringliteral}{'('} // &
2758                               &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{','} // &
2759                       
2760         &    trim(adjustl(pos\_array(2))) // \textcolor{stringliteral}{','} // &
2761                       
2762         &    trim(adjustl(pos\_array(3))) // \textcolor{stringliteral}{','} // &
2763                       
2764         &    trim(adjustl(pos\_array(4))) // \textcolor{stringliteral}{','} // &
2765                       
2766         &    trim(adjustl(pos\_array(5))) // \textcolor{stringliteral}{','} // &
2767                       
2768         &    trim(adjustl(pos\_array(6))) // \textcolor{stringliteral}{','} // &
2769                       
2770         &    trim(adjustl(pos\_array(7))) // \textcolor{stringliteral}{')'}
2771 
2772 \textcolor{keywordflow}{    end if}
2773     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
2774 
2775                     
2776 
2777 
2778     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
2779       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
2780       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
2781       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str) // \textcolor{stringliteral}{'  = '}, wrong
2782       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
2783       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str) // \textcolor{stringliteral}{' = '}, right
2784 
2785       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
2786     \textcolor{keywordflow}{else}
2787       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
2788 \textcolor{keywordflow}{    end if}
2789 
2790 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_acd80c1259112576cdf2540dbe6505d76}\label{interfacedc__test_1_1assertequal_acd80c1259112576cdf2540dbe6505d76}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequallogical0@{dctestassertequallogical0}}
\index{dctestassertequallogical0@{dctestassertequallogical0}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequallogical0()}{dctestassertequallogical0()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequallogical0 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{logical, intent(in)}]{answer,  }\item[{logical, intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 4866 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
4866     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}
4867     \textcolor{keywordtype}{implicit none}
4868     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
4869     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(in)}:: answer
4870     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(in)}:: check
4871 
4872                         \textcolor{keywordtype}{character(STRING)}:: answer\_str
4873     \textcolor{keywordtype}{character(STRING)}:: check\_str
4874                     
4875 
4876 
4877   \textcolor{keywordflow}{continue}
4878 
4879                     
4880     \textcolor{keywordflow}{if} (answer) \textcolor{keywordflow}{then}
4881       answer\_str = \textcolor{stringliteral}{".true."}
4882     \textcolor{keywordflow}{else}
4883       answer\_str = \textcolor{stringliteral}{".false."}
4884 \textcolor{keywordflow}{    end if}
4885 
4886     \textcolor{keywordflow}{if} (check) \textcolor{keywordflow}{then}
4887       check\_str = \textcolor{stringliteral}{".true."}
4888     \textcolor{keywordflow}{else}
4889       check\_str = \textcolor{stringliteral}{".false."}
4890 \textcolor{keywordflow}{    end if}
4891 
4892                     
4893 
4894     \textcolor{keyword}{call }dctestassertequalchar0(message, answer\_str, check\_str)
4895 
4896                                         
4897 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_a4c47ed56a56621f18c7fc8c63d168f75}\label{interfacedc__test_1_1assertequal_a4c47ed56a56621f18c7fc8c63d168f75}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequallogical1@{dctestassertequallogical1}}
\index{dctestassertequallogical1@{dctestassertequallogical1}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequallogical1()}{dctestassertequallogical1()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequallogical1 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{logical, dimension(\+:), intent(in)}]{answer,  }\item[{logical, dimension(\+:), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 4900 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
4900     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}
4901     \textcolor{keywordtype}{implicit none}
4902     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
4903     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(in)}:: answer(:)
4904     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(in)}:: check(:)
4905 
4906                         \textcolor{keywordtype}{integer}:: answer\_shape(1), check\_shape(1), i
4907     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: answer\_tmp(:), check\_tmp(:)
4908     \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{allocatable}:: answer\_str\_tmp(:), check\_str\_tmp(:)
4909     \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{allocatable}:: answer\_str(:)
4910     \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{allocatable}:: check\_str(:)
4911                     
4912 
4913 
4914   \textcolor{keywordflow}{continue}
4915 
4916                     
4917     \textcolor{keyword}{allocate}(answer\_tmp(\textcolor{keyword}{size}(answer)))
4918     \textcolor{keyword}{allocate}(check\_tmp(\textcolor{keyword}{size}(check)))
4919     \textcolor{keyword}{allocate}(answer\_str\_tmp(\textcolor{keyword}{size}(answer)))
4920     \textcolor{keyword}{allocate}(check\_str\_tmp(\textcolor{keyword}{size}(check)))
4921     answer\_tmp = pack(answer, .true.)
4922     check\_tmp = pack(check, .true.)
4923 
4924     \textcolor{keywordflow}{do} i = 1, \textcolor{keyword}{size}(answer\_tmp)
4925       \textcolor{keywordflow}{if} (answer\_tmp(i)) \textcolor{keywordflow}{then}
4926         answer\_str\_tmp(i) = \textcolor{stringliteral}{'.true.'}
4927       \textcolor{keywordflow}{else}
4928         answer\_str\_tmp(i) = \textcolor{stringliteral}{'.false.'}
4929 \textcolor{keywordflow}{      end if}
4930 \textcolor{keywordflow}{    end do}
4931 
4932     \textcolor{keywordflow}{do} i = 1, \textcolor{keyword}{size}(check\_tmp)
4933       \textcolor{keywordflow}{if} (check\_tmp(i)) \textcolor{keywordflow}{then}
4934         check\_str\_tmp(i) = \textcolor{stringliteral}{'.true.'}
4935       \textcolor{keywordflow}{else}
4936         check\_str\_tmp(i) = \textcolor{stringliteral}{'.false.'}
4937 \textcolor{keywordflow}{      end if}
4938 \textcolor{keywordflow}{    end do}
4939 
4940     answer\_shape = shape(answer)
4941     check\_shape = shape(check)
4942 
4943     \textcolor{keyword}{allocate}( answer\_str( &
4944                       
4945       &    answer\_shape(1)  )  &
4946       &  )
4947 
4948     \textcolor{keyword}{allocate}( check\_str( &
4949                       
4950       &    check\_shape(1)  )  &
4951       &  )
4952 
4953     answer\_str = reshape(answer\_str\_tmp, answer\_shape)
4954     check\_str = reshape(check\_str\_tmp, check\_shape)
4955 
4956                     
4957 
4958     \textcolor{keyword}{call }dctestassertequalchar1(message, answer\_str, check\_str)
4959 
4960                         \textcolor{keyword}{deallocate}(answer\_str, answer\_tmp, answer\_str\_tmp)
4961     \textcolor{keyword}{deallocate}(check\_str, check\_tmp, check\_str\_tmp)
4962                     
4963 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_ac5359a99d841b301a49daa5ba636dd6e}\label{interfacedc__test_1_1assertequal_ac5359a99d841b301a49daa5ba636dd6e}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequallogical2@{dctestassertequallogical2}}
\index{dctestassertequallogical2@{dctestassertequallogical2}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequallogical2()}{dctestassertequallogical2()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequallogical2 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{logical, dimension(\+:,\+:), intent(in)}]{answer,  }\item[{logical, dimension(\+:,\+:), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 4966 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
4966     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}
4967     \textcolor{keywordtype}{implicit none}
4968     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
4969     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(in)}:: answer(:,:)
4970     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(in)}:: check(:,:)
4971 
4972                         \textcolor{keywordtype}{integer}:: answer\_shape(2), check\_shape(2), i
4973     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: answer\_tmp(:), check\_tmp(:)
4974     \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{allocatable}:: answer\_str\_tmp(:), check\_str\_tmp(:)
4975     \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{allocatable}:: answer\_str(:,:)
4976     \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{allocatable}:: check\_str(:,:)
4977                     
4978 
4979 
4980   \textcolor{keywordflow}{continue}
4981 
4982                     
4983     \textcolor{keyword}{allocate}(answer\_tmp(\textcolor{keyword}{size}(answer)))
4984     \textcolor{keyword}{allocate}(check\_tmp(\textcolor{keyword}{size}(check)))
4985     \textcolor{keyword}{allocate}(answer\_str\_tmp(\textcolor{keyword}{size}(answer)))
4986     \textcolor{keyword}{allocate}(check\_str\_tmp(\textcolor{keyword}{size}(check)))
4987     answer\_tmp = pack(answer, .true.)
4988     check\_tmp = pack(check, .true.)
4989 
4990     \textcolor{keywordflow}{do} i = 1, \textcolor{keyword}{size}(answer\_tmp)
4991       \textcolor{keywordflow}{if} (answer\_tmp(i)) \textcolor{keywordflow}{then}
4992         answer\_str\_tmp(i) = \textcolor{stringliteral}{'.true.'}
4993       \textcolor{keywordflow}{else}
4994         answer\_str\_tmp(i) = \textcolor{stringliteral}{'.false.'}
4995 \textcolor{keywordflow}{      end if}
4996 \textcolor{keywordflow}{    end do}
4997 
4998     \textcolor{keywordflow}{do} i = 1, \textcolor{keyword}{size}(check\_tmp)
4999       \textcolor{keywordflow}{if} (check\_tmp(i)) \textcolor{keywordflow}{then}
5000         check\_str\_tmp(i) = \textcolor{stringliteral}{'.true.'}
5001       \textcolor{keywordflow}{else}
5002         check\_str\_tmp(i) = \textcolor{stringliteral}{'.false.'}
5003 \textcolor{keywordflow}{      end if}
5004 \textcolor{keywordflow}{    end do}
5005 
5006     answer\_shape = shape(answer)
5007     check\_shape = shape(check)
5008 
5009     \textcolor{keyword}{allocate}( answer\_str( &
5010                             &    answer\_shape(1), &
5011                       
5012       &    answer\_shape(2)  )  &
5013       &  )
5014 
5015     \textcolor{keyword}{allocate}( check\_str( &
5016                             &    check\_shape(1), &
5017                       
5018       &    check\_shape(2)  )  &
5019       &  )
5020 
5021     answer\_str = reshape(answer\_str\_tmp, answer\_shape)
5022     check\_str = reshape(check\_str\_tmp, check\_shape)
5023 
5024                     
5025 
5026     \textcolor{keyword}{call }dctestassertequalchar2(message, answer\_str, check\_str)
5027 
5028                         \textcolor{keyword}{deallocate}(answer\_str, answer\_tmp, answer\_str\_tmp)
5029     \textcolor{keyword}{deallocate}(check\_str, check\_tmp, check\_str\_tmp)
5030                     
5031 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_acc9cbd56c7c4916d5225a3f3305cd268}\label{interfacedc__test_1_1assertequal_acc9cbd56c7c4916d5225a3f3305cd268}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequallogical3@{dctestassertequallogical3}}
\index{dctestassertequallogical3@{dctestassertequallogical3}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequallogical3()}{dctestassertequallogical3()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequallogical3 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{logical, dimension(\+:,\+:,\+:), intent(in)}]{answer,  }\item[{logical, dimension(\+:,\+:,\+:), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 5034 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
5034     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}
5035     \textcolor{keywordtype}{implicit none}
5036     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
5037     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(in)}:: answer(:,:,:)
5038     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(in)}:: check(:,:,:)
5039 
5040                         \textcolor{keywordtype}{integer}:: answer\_shape(3), check\_shape(3), i
5041     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: answer\_tmp(:), check\_tmp(:)
5042     \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{allocatable}:: answer\_str\_tmp(:), check\_str\_tmp(:)
5043     \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{allocatable}:: answer\_str(:,:,:)
5044     \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{allocatable}:: check\_str(:,:,:)
5045                     
5046 
5047 
5048   \textcolor{keywordflow}{continue}
5049 
5050                     
5051     \textcolor{keyword}{allocate}(answer\_tmp(\textcolor{keyword}{size}(answer)))
5052     \textcolor{keyword}{allocate}(check\_tmp(\textcolor{keyword}{size}(check)))
5053     \textcolor{keyword}{allocate}(answer\_str\_tmp(\textcolor{keyword}{size}(answer)))
5054     \textcolor{keyword}{allocate}(check\_str\_tmp(\textcolor{keyword}{size}(check)))
5055     answer\_tmp = pack(answer, .true.)
5056     check\_tmp = pack(check, .true.)
5057 
5058     \textcolor{keywordflow}{do} i = 1, \textcolor{keyword}{size}(answer\_tmp)
5059       \textcolor{keywordflow}{if} (answer\_tmp(i)) \textcolor{keywordflow}{then}
5060         answer\_str\_tmp(i) = \textcolor{stringliteral}{'.true.'}
5061       \textcolor{keywordflow}{else}
5062         answer\_str\_tmp(i) = \textcolor{stringliteral}{'.false.'}
5063 \textcolor{keywordflow}{      end if}
5064 \textcolor{keywordflow}{    end do}
5065 
5066     \textcolor{keywordflow}{do} i = 1, \textcolor{keyword}{size}(check\_tmp)
5067       \textcolor{keywordflow}{if} (check\_tmp(i)) \textcolor{keywordflow}{then}
5068         check\_str\_tmp(i) = \textcolor{stringliteral}{'.true.'}
5069       \textcolor{keywordflow}{else}
5070         check\_str\_tmp(i) = \textcolor{stringliteral}{'.false.'}
5071 \textcolor{keywordflow}{      end if}
5072 \textcolor{keywordflow}{    end do}
5073 
5074     answer\_shape = shape(answer)
5075     check\_shape = shape(check)
5076 
5077     \textcolor{keyword}{allocate}( answer\_str( &
5078                             &    answer\_shape(1), &
5079                       
5080       &    answer\_shape(2), &
5081                       
5082       &    answer\_shape(3)  )  &
5083       &  )
5084 
5085     \textcolor{keyword}{allocate}( check\_str( &
5086                             &    check\_shape(1), &
5087                       
5088       &    check\_shape(2), &
5089                       
5090       &    check\_shape(3)  )  &
5091       &  )
5092 
5093     answer\_str = reshape(answer\_str\_tmp, answer\_shape)
5094     check\_str = reshape(check\_str\_tmp, check\_shape)
5095 
5096                     
5097 
5098     \textcolor{keyword}{call }dctestassertequalchar3(message, answer\_str, check\_str)
5099 
5100                         \textcolor{keyword}{deallocate}(answer\_str, answer\_tmp, answer\_str\_tmp)
5101     \textcolor{keyword}{deallocate}(check\_str, check\_tmp, check\_str\_tmp)
5102                     
5103 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_ade4a62ce838a767f21599dae968ddfe6}\label{interfacedc__test_1_1assertequal_ade4a62ce838a767f21599dae968ddfe6}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequallogical4@{dctestassertequallogical4}}
\index{dctestassertequallogical4@{dctestassertequallogical4}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequallogical4()}{dctestassertequallogical4()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequallogical4 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{logical, dimension(\+:,\+:,\+:,\+:), intent(in)}]{answer,  }\item[{logical, dimension(\+:,\+:,\+:,\+:), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 5106 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
5106     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}
5107     \textcolor{keywordtype}{implicit none}
5108     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
5109     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(in)}:: answer(:,:,:,:)
5110     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(in)}:: check(:,:,:,:)
5111 
5112                         \textcolor{keywordtype}{integer}:: answer\_shape(4), check\_shape(4), i
5113     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: answer\_tmp(:), check\_tmp(:)
5114     \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{allocatable}:: answer\_str\_tmp(:), check\_str\_tmp(:)
5115     \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{allocatable}:: answer\_str(:,:,:,:)
5116     \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{allocatable}:: check\_str(:,:,:,:)
5117                     
5118 
5119 
5120   \textcolor{keywordflow}{continue}
5121 
5122                     
5123     \textcolor{keyword}{allocate}(answer\_tmp(\textcolor{keyword}{size}(answer)))
5124     \textcolor{keyword}{allocate}(check\_tmp(\textcolor{keyword}{size}(check)))
5125     \textcolor{keyword}{allocate}(answer\_str\_tmp(\textcolor{keyword}{size}(answer)))
5126     \textcolor{keyword}{allocate}(check\_str\_tmp(\textcolor{keyword}{size}(check)))
5127     answer\_tmp = pack(answer, .true.)
5128     check\_tmp = pack(check, .true.)
5129 
5130     \textcolor{keywordflow}{do} i = 1, \textcolor{keyword}{size}(answer\_tmp)
5131       \textcolor{keywordflow}{if} (answer\_tmp(i)) \textcolor{keywordflow}{then}
5132         answer\_str\_tmp(i) = \textcolor{stringliteral}{'.true.'}
5133       \textcolor{keywordflow}{else}
5134         answer\_str\_tmp(i) = \textcolor{stringliteral}{'.false.'}
5135 \textcolor{keywordflow}{      end if}
5136 \textcolor{keywordflow}{    end do}
5137 
5138     \textcolor{keywordflow}{do} i = 1, \textcolor{keyword}{size}(check\_tmp)
5139       \textcolor{keywordflow}{if} (check\_tmp(i)) \textcolor{keywordflow}{then}
5140         check\_str\_tmp(i) = \textcolor{stringliteral}{'.true.'}
5141       \textcolor{keywordflow}{else}
5142         check\_str\_tmp(i) = \textcolor{stringliteral}{'.false.'}
5143 \textcolor{keywordflow}{      end if}
5144 \textcolor{keywordflow}{    end do}
5145 
5146     answer\_shape = shape(answer)
5147     check\_shape = shape(check)
5148 
5149     \textcolor{keyword}{allocate}( answer\_str( &
5150                             &    answer\_shape(1), &
5151                       
5152       &    answer\_shape(2), &
5153                       
5154       &    answer\_shape(3), &
5155                       
5156       &    answer\_shape(4)  )  &
5157       &  )
5158 
5159     \textcolor{keyword}{allocate}( check\_str( &
5160                             &    check\_shape(1), &
5161                       
5162       &    check\_shape(2), &
5163                       
5164       &    check\_shape(3), &
5165                       
5166       &    check\_shape(4)  )  &
5167       &  )
5168 
5169     answer\_str = reshape(answer\_str\_tmp, answer\_shape)
5170     check\_str = reshape(check\_str\_tmp, check\_shape)
5171 
5172                     
5173 
5174     \textcolor{keyword}{call }dctestassertequalchar4(message, answer\_str, check\_str)
5175 
5176                         \textcolor{keyword}{deallocate}(answer\_str, answer\_tmp, answer\_str\_tmp)
5177     \textcolor{keyword}{deallocate}(check\_str, check\_tmp, check\_str\_tmp)
5178                     
5179 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_ac1d0cb16e04d4802ea7c13e523650bb0}\label{interfacedc__test_1_1assertequal_ac1d0cb16e04d4802ea7c13e523650bb0}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequallogical5@{dctestassertequallogical5}}
\index{dctestassertequallogical5@{dctestassertequallogical5}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequallogical5()}{dctestassertequallogical5()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequallogical5 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{logical, dimension(\+:,\+:,\+:,\+:,\+:), intent(in)}]{answer,  }\item[{logical, dimension(\+:,\+:,\+:,\+:,\+:), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 5182 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
5182     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}
5183     \textcolor{keywordtype}{implicit none}
5184     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
5185     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(in)}:: answer(:,:,:,:,:)
5186     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(in)}:: check(:,:,:,:,:)
5187 
5188                         \textcolor{keywordtype}{integer}:: answer\_shape(5), check\_shape(5), i
5189     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: answer\_tmp(:), check\_tmp(:)
5190     \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{allocatable}:: answer\_str\_tmp(:), check\_str\_tmp(:)
5191     \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{allocatable}:: answer\_str(:,:,:,:,:)
5192     \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{allocatable}:: check\_str(:,:,:,:,:)
5193                     
5194 
5195 
5196   \textcolor{keywordflow}{continue}
5197 
5198                     
5199     \textcolor{keyword}{allocate}(answer\_tmp(\textcolor{keyword}{size}(answer)))
5200     \textcolor{keyword}{allocate}(check\_tmp(\textcolor{keyword}{size}(check)))
5201     \textcolor{keyword}{allocate}(answer\_str\_tmp(\textcolor{keyword}{size}(answer)))
5202     \textcolor{keyword}{allocate}(check\_str\_tmp(\textcolor{keyword}{size}(check)))
5203     answer\_tmp = pack(answer, .true.)
5204     check\_tmp = pack(check, .true.)
5205 
5206     \textcolor{keywordflow}{do} i = 1, \textcolor{keyword}{size}(answer\_tmp)
5207       \textcolor{keywordflow}{if} (answer\_tmp(i)) \textcolor{keywordflow}{then}
5208         answer\_str\_tmp(i) = \textcolor{stringliteral}{'.true.'}
5209       \textcolor{keywordflow}{else}
5210         answer\_str\_tmp(i) = \textcolor{stringliteral}{'.false.'}
5211 \textcolor{keywordflow}{      end if}
5212 \textcolor{keywordflow}{    end do}
5213 
5214     \textcolor{keywordflow}{do} i = 1, \textcolor{keyword}{size}(check\_tmp)
5215       \textcolor{keywordflow}{if} (check\_tmp(i)) \textcolor{keywordflow}{then}
5216         check\_str\_tmp(i) = \textcolor{stringliteral}{'.true.'}
5217       \textcolor{keywordflow}{else}
5218         check\_str\_tmp(i) = \textcolor{stringliteral}{'.false.'}
5219 \textcolor{keywordflow}{      end if}
5220 \textcolor{keywordflow}{    end do}
5221 
5222     answer\_shape = shape(answer)
5223     check\_shape = shape(check)
5224 
5225     \textcolor{keyword}{allocate}( answer\_str( &
5226                             &    answer\_shape(1), &
5227                       
5228       &    answer\_shape(2), &
5229                       
5230       &    answer\_shape(3), &
5231                       
5232       &    answer\_shape(4), &
5233                       
5234       &    answer\_shape(5)  )  &
5235       &  )
5236 
5237     \textcolor{keyword}{allocate}( check\_str( &
5238                             &    check\_shape(1), &
5239                       
5240       &    check\_shape(2), &
5241                       
5242       &    check\_shape(3), &
5243                       
5244       &    check\_shape(4), &
5245                       
5246       &    check\_shape(5)  )  &
5247       &  )
5248 
5249     answer\_str = reshape(answer\_str\_tmp, answer\_shape)
5250     check\_str = reshape(check\_str\_tmp, check\_shape)
5251 
5252                     
5253 
5254     \textcolor{keyword}{call }dctestassertequalchar5(message, answer\_str, check\_str)
5255 
5256                         \textcolor{keyword}{deallocate}(answer\_str, answer\_tmp, answer\_str\_tmp)
5257     \textcolor{keyword}{deallocate}(check\_str, check\_tmp, check\_str\_tmp)
5258                     
5259 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_ad9a87002194b1117d0a40467a8248344}\label{interfacedc__test_1_1assertequal_ad9a87002194b1117d0a40467a8248344}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequallogical6@{dctestassertequallogical6}}
\index{dctestassertequallogical6@{dctestassertequallogical6}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequallogical6()}{dctestassertequallogical6()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequallogical6 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{logical, dimension(\+:,\+:,\+:,\+:,\+:,\+:), intent(in)}]{answer,  }\item[{logical, dimension(\+:,\+:,\+:,\+:,\+:,\+:), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 5262 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
5262     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}
5263     \textcolor{keywordtype}{implicit none}
5264     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
5265     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(in)}:: answer(:,:,:,:,:,:)
5266     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(in)}:: check(:,:,:,:,:,:)
5267 
5268                         \textcolor{keywordtype}{integer}:: answer\_shape(6), check\_shape(6), i
5269     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: answer\_tmp(:), check\_tmp(:)
5270     \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{allocatable}:: answer\_str\_tmp(:), check\_str\_tmp(:)
5271     \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{allocatable}:: answer\_str(:,:,:,:,:,:)
5272     \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{allocatable}:: check\_str(:,:,:,:,:,:)
5273                     
5274 
5275 
5276   \textcolor{keywordflow}{continue}
5277 
5278                     
5279     \textcolor{keyword}{allocate}(answer\_tmp(\textcolor{keyword}{size}(answer)))
5280     \textcolor{keyword}{allocate}(check\_tmp(\textcolor{keyword}{size}(check)))
5281     \textcolor{keyword}{allocate}(answer\_str\_tmp(\textcolor{keyword}{size}(answer)))
5282     \textcolor{keyword}{allocate}(check\_str\_tmp(\textcolor{keyword}{size}(check)))
5283     answer\_tmp = pack(answer, .true.)
5284     check\_tmp = pack(check, .true.)
5285 
5286     \textcolor{keywordflow}{do} i = 1, \textcolor{keyword}{size}(answer\_tmp)
5287       \textcolor{keywordflow}{if} (answer\_tmp(i)) \textcolor{keywordflow}{then}
5288         answer\_str\_tmp(i) = \textcolor{stringliteral}{'.true.'}
5289       \textcolor{keywordflow}{else}
5290         answer\_str\_tmp(i) = \textcolor{stringliteral}{'.false.'}
5291 \textcolor{keywordflow}{      end if}
5292 \textcolor{keywordflow}{    end do}
5293 
5294     \textcolor{keywordflow}{do} i = 1, \textcolor{keyword}{size}(check\_tmp)
5295       \textcolor{keywordflow}{if} (check\_tmp(i)) \textcolor{keywordflow}{then}
5296         check\_str\_tmp(i) = \textcolor{stringliteral}{'.true.'}
5297       \textcolor{keywordflow}{else}
5298         check\_str\_tmp(i) = \textcolor{stringliteral}{'.false.'}
5299 \textcolor{keywordflow}{      end if}
5300 \textcolor{keywordflow}{    end do}
5301 
5302     answer\_shape = shape(answer)
5303     check\_shape = shape(check)
5304 
5305     \textcolor{keyword}{allocate}( answer\_str( &
5306                             &    answer\_shape(1), &
5307                       
5308       &    answer\_shape(2), &
5309                       
5310       &    answer\_shape(3), &
5311                       
5312       &    answer\_shape(4), &
5313                       
5314       &    answer\_shape(5), &
5315                       
5316       &    answer\_shape(6)  )  &
5317       &  )
5318 
5319     \textcolor{keyword}{allocate}( check\_str( &
5320                             &    check\_shape(1), &
5321                       
5322       &    check\_shape(2), &
5323                       
5324       &    check\_shape(3), &
5325                       
5326       &    check\_shape(4), &
5327                       
5328       &    check\_shape(5), &
5329                       
5330       &    check\_shape(6)  )  &
5331       &  )
5332 
5333     answer\_str = reshape(answer\_str\_tmp, answer\_shape)
5334     check\_str = reshape(check\_str\_tmp, check\_shape)
5335 
5336                     
5337 
5338     \textcolor{keyword}{call }dctestassertequalchar6(message, answer\_str, check\_str)
5339 
5340                         \textcolor{keyword}{deallocate}(answer\_str, answer\_tmp, answer\_str\_tmp)
5341     \textcolor{keyword}{deallocate}(check\_str, check\_tmp, check\_str\_tmp)
5342                     
5343 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_a3c266dfbff07c1e9e85cb3284cbd6740}\label{interfacedc__test_1_1assertequal_a3c266dfbff07c1e9e85cb3284cbd6740}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequallogical7@{dctestassertequallogical7}}
\index{dctestassertequallogical7@{dctestassertequallogical7}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequallogical7()}{dctestassertequallogical7()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequallogical7 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{logical, dimension(\+:,\+:,\+:,\+:,\+:,\+:,\+:), intent(in)}]{answer,  }\item[{logical, dimension(\+:,\+:,\+:,\+:,\+:,\+:,\+:), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 5346 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
5346     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}
5347     \textcolor{keywordtype}{implicit none}
5348     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
5349     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(in)}:: answer(:,:,:,:,:,:,:)
5350     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(in)}:: check(:,:,:,:,:,:,:)
5351 
5352                         \textcolor{keywordtype}{integer}:: answer\_shape(7), check\_shape(7), i
5353     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: answer\_tmp(:), check\_tmp(:)
5354     \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{allocatable}:: answer\_str\_tmp(:), check\_str\_tmp(:)
5355     \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{allocatable}:: answer\_str(:,:,:,:,:,:,:)
5356     \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{allocatable}:: check\_str(:,:,:,:,:,:,:)
5357                     
5358 
5359 
5360   \textcolor{keywordflow}{continue}
5361 
5362                     
5363     \textcolor{keyword}{allocate}(answer\_tmp(\textcolor{keyword}{size}(answer)))
5364     \textcolor{keyword}{allocate}(check\_tmp(\textcolor{keyword}{size}(check)))
5365     \textcolor{keyword}{allocate}(answer\_str\_tmp(\textcolor{keyword}{size}(answer)))
5366     \textcolor{keyword}{allocate}(check\_str\_tmp(\textcolor{keyword}{size}(check)))
5367     answer\_tmp = pack(answer, .true.)
5368     check\_tmp = pack(check, .true.)
5369 
5370     \textcolor{keywordflow}{do} i = 1, \textcolor{keyword}{size}(answer\_tmp)
5371       \textcolor{keywordflow}{if} (answer\_tmp(i)) \textcolor{keywordflow}{then}
5372         answer\_str\_tmp(i) = \textcolor{stringliteral}{'.true.'}
5373       \textcolor{keywordflow}{else}
5374         answer\_str\_tmp(i) = \textcolor{stringliteral}{'.false.'}
5375 \textcolor{keywordflow}{      end if}
5376 \textcolor{keywordflow}{    end do}
5377 
5378     \textcolor{keywordflow}{do} i = 1, \textcolor{keyword}{size}(check\_tmp)
5379       \textcolor{keywordflow}{if} (check\_tmp(i)) \textcolor{keywordflow}{then}
5380         check\_str\_tmp(i) = \textcolor{stringliteral}{'.true.'}
5381       \textcolor{keywordflow}{else}
5382         check\_str\_tmp(i) = \textcolor{stringliteral}{'.false.'}
5383 \textcolor{keywordflow}{      end if}
5384 \textcolor{keywordflow}{    end do}
5385 
5386     answer\_shape = shape(answer)
5387     check\_shape = shape(check)
5388 
5389     \textcolor{keyword}{allocate}( answer\_str( &
5390                             &    answer\_shape(1), &
5391                       
5392       &    answer\_shape(2), &
5393                       
5394       &    answer\_shape(3), &
5395                       
5396       &    answer\_shape(4), &
5397                       
5398       &    answer\_shape(5), &
5399                       
5400       &    answer\_shape(6), &
5401                       
5402       &    answer\_shape(7)  )  &
5403       &  )
5404 
5405     \textcolor{keyword}{allocate}( check\_str( &
5406                             &    check\_shape(1), &
5407                       
5408       &    check\_shape(2), &
5409                       
5410       &    check\_shape(3), &
5411                       
5412       &    check\_shape(4), &
5413                       
5414       &    check\_shape(5), &
5415                       
5416       &    check\_shape(6), &
5417                       
5418       &    check\_shape(7)  )  &
5419       &  )
5420 
5421     answer\_str = reshape(answer\_str\_tmp, answer\_shape)
5422     check\_str = reshape(check\_str\_tmp, check\_shape)
5423 
5424                     
5425 
5426     \textcolor{keyword}{call }dctestassertequalchar7(message, answer\_str, check\_str)
5427 
5428                         \textcolor{keyword}{deallocate}(answer\_str, answer\_tmp, answer\_str\_tmp)
5429     \textcolor{keyword}{deallocate}(check\_str, check\_tmp, check\_str\_tmp)
5430                     
5431 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_adb2f06420059d2de36d2d7526a4d8095}\label{interfacedc__test_1_1assertequal_adb2f06420059d2de36d2d7526a4d8095}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequalreal0@{dctestassertequalreal0}}
\index{dctestassertequalreal0@{dctestassertequalreal0}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequalreal0()}{dctestassertequalreal0()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequalreal0 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{real, intent(in)}]{answer,  }\item[{real, intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 2795 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
2795     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
2796     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
2797     \textcolor{keywordtype}{implicit none}
2798     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
2799     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: answer
2800     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: check
2801     \textcolor{keywordtype}{logical}:: err\_flag
2802     \textcolor{keywordtype}{character(STRING)}:: pos\_str
2803     \textcolor{keywordtype}{real}:: wrong, right
2804 
2805                                         
2806 
2807                     
2808 
2809   \textcolor{keywordflow}{continue}
2810     err\_flag = .false.
2811 
2812                     
2813     err\_flag = .not. answer == check
2814     wrong = check
2815     right = answer
2816     pos\_str = \textcolor{stringliteral}{''}
2817 
2818                     
2819 
2820 
2821     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
2822       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
2823       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
2824       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str) // \textcolor{stringliteral}{'  = '}, wrong
2825       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
2826       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str) // \textcolor{stringliteral}{' = '}, right
2827 
2828       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
2829     \textcolor{keywordflow}{else}
2830       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
2831 \textcolor{keywordflow}{    end if}
2832 
2833 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_a84561a1b84ee1111524df6c156bb0e26}\label{interfacedc__test_1_1assertequal_a84561a1b84ee1111524df6c156bb0e26}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequalreal0digits@{dctestassertequalreal0digits}}
\index{dctestassertequalreal0digits@{dctestassertequalreal0digits}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequalreal0digits()}{dctestassertequalreal0digits()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequalreal0digits (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{real, intent(in)}]{answer,  }\item[{real, intent(in)}]{check,  }\item[{integer, intent(in)}]{significant\+\_\+digits,  }\item[{integer, intent(in)}]{ignore\+\_\+digits }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 5436 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
5436     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
5437     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
5438     \textcolor{keywordtype}{implicit none}
5439     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
5440     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: answer
5441     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: check
5442     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: significant\_digits
5443     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: ignore\_digits
5444     \textcolor{keywordtype}{logical}:: err\_flag
5445     \textcolor{keywordtype}{character(STRING)}:: pos\_str
5446     \textcolor{keywordtype}{real}:: wrong, right\_max, right\_min
5447     \textcolor{keywordtype}{character(STRING)}:: pos\_str\_space
5448     \textcolor{keywordtype}{integer}:: pos\_str\_len
5449     \textcolor{keywordtype}{real}:: right\_tmp
5450 
5451                         \textcolor{keywordtype}{real}:: answer\_max
5452     \textcolor{keywordtype}{real}:: answer\_min
5453                     
5454   \textcolor{keywordflow}{continue}
5455     err\_flag = .false.
5456 
5457     \textcolor{keywordflow}{if} ( significant\_digits < 1 ) \textcolor{keywordflow}{then}
5458       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** '}
5459       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Specify a number more than 1 to "significant\_digits"'}
5460       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
5461 \textcolor{keywordflow}{    end if}
5462                     
5463     \textcolor{keywordflow}{if} ( answer < 0.0 .and. check < 0.0 ) \textcolor{keywordflow}{then}
5464       answer\_max = &
5465         &   answer &
5466         &   * (   1.0 &
5467         &       - 0.1 ** significant\_digits ) &
5468         & + 0.1 ** (- ignore\_digits)
5469 
5470       answer\_min = &
5471         &   answer &
5472         &   * (   1.0 &
5473         &       + 0.1 ** significant\_digits ) &
5474         & - 0.1 ** (- ignore\_digits)
5475     \textcolor{keywordflow}{else}
5476 
5477       answer\_max = &
5478         &   answer &
5479         &   * (   1.0 &
5480         &       + 0.1 ** significant\_digits ) &
5481         & + 0.1 ** (- ignore\_digits)
5482 
5483       answer\_min = &
5484         &   answer &
5485         &   * (   1.0 &
5486         &       - 0.1 ** significant\_digits ) &
5487         & - 0.1 ** (- ignore\_digits)
5488 \textcolor{keywordflow}{    end if}
5489 
5490     wrong = check
5491     right\_max = answer\_max
5492     right\_min = answer\_min
5493     \textcolor{keywordflow}{if} ( right\_max < right\_min ) \textcolor{keywordflow}{then}
5494       right\_tmp = right\_max
5495       right\_max = right\_min
5496       right\_min = right\_tmp
5497 \textcolor{keywordflow}{    end if}
5498 
5499     err\_flag = .not. (answer\_max > check .and. check > answer\_min)
5500 
5501     pos\_str = \textcolor{stringliteral}{''}
5502 
5503                     
5504 
5505     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
5506       pos\_str\_space = \textcolor{stringliteral}{''}
5507       pos\_str\_len = len\_trim(pos\_str)
5508 
5509       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
5510       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
5511       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str)  // \textcolor{stringliteral}{'  = '}, wrong
5512       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
5513       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'        '} // pos\_str\_space(1:pos\_str\_len) &
5514         &                                     // \textcolor{stringliteral}{'   '}, right\_min, \textcolor{stringliteral}{' < '}
5515       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str)  // \textcolor{stringliteral}{' < '}, right\_max
5516 
5517       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
5518     \textcolor{keywordflow}{else}
5519       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
5520 \textcolor{keywordflow}{    end if}
5521 
5522 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_a5664b3f69a9fe5814eab4ac631f06837}\label{interfacedc__test_1_1assertequal_a5664b3f69a9fe5814eab4ac631f06837}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequalreal1@{dctestassertequalreal1}}
\index{dctestassertequalreal1@{dctestassertequalreal1}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequalreal1()}{dctestassertequalreal1()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequalreal1 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{real, dimension(\+:), intent(in)}]{answer,  }\item[{real, dimension(\+:), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 2838 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
2838     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
2839     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
2840     \textcolor{keywordtype}{implicit none}
2841     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
2842     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: answer(:)
2843     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: check(:)
2844     \textcolor{keywordtype}{logical}:: err\_flag
2845     \textcolor{keywordtype}{character(STRING)}:: pos\_str
2846     \textcolor{keywordtype}{real}:: wrong, right
2847 
2848                         \textcolor{keywordtype}{integer}:: answer\_shape(1), check\_shape(1), pos(1)
2849     \textcolor{keywordtype}{logical}:: consist\_shape(1)
2850     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(1)
2851     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:)
2852     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:)
2853     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:)
2854                     
2855 
2856                     
2857 
2858   \textcolor{keywordflow}{continue}
2859     err\_flag = .false.
2860 
2861                     
2862     answer\_shape = shape(answer)
2863     check\_shape = shape(check)
2864 
2865     consist\_shape = answer\_shape == check\_shape
2866 
2867     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
2868       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
2869       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
2870       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
2871       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
2872       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
2873 
2874       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
2875 \textcolor{keywordflow}{    end if}
2876 
2877 
2878     \textcolor{keyword}{allocate}( mask\_array( &
2879                       
2880       &    answer\_shape(1)  )  &
2881       &  )
2882 
2883     \textcolor{keyword}{allocate}( judge( &
2884                       
2885       &    answer\_shape(1)  )  &
2886       &  )
2887 
2888     \textcolor{keyword}{allocate}( judge\_rev( &
2889                       
2890       &    answer\_shape(1)  )  &
2891       &  )
2892 
2893                       
2894     judge = answer == check
2895 
2896                       
2897 
2898     judge\_rev = .not. judge
2899     err\_flag = any(judge\_rev)
2900     mask\_array = 1
2901     pos = maxloc(mask\_array, judge\_rev)
2902 
2903     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
2904 
2905       wrong = check( &
2906                       
2907         &    pos(1)  )
2908 
2909       right = answer( &
2910                       
2911         &    pos(1)  )
2912 
2913                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
2914                       
2915 
2916       pos\_str = \textcolor{stringliteral}{'('} // &
2917                       
2918         &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{')'}
2919 
2920 \textcolor{keywordflow}{    end if}
2921     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
2922 
2923                     
2924 
2925 
2926     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
2927       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
2928       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
2929       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str) // \textcolor{stringliteral}{'  = '}, wrong
2930       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
2931       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str) // \textcolor{stringliteral}{' = '}, right
2932 
2933       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
2934     \textcolor{keywordflow}{else}
2935       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
2936 \textcolor{keywordflow}{    end if}
2937 
2938 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_a46c3eb908bf43ba59a7115326ff7eb07}\label{interfacedc__test_1_1assertequal_a46c3eb908bf43ba59a7115326ff7eb07}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequalreal1digits@{dctestassertequalreal1digits}}
\index{dctestassertequalreal1digits@{dctestassertequalreal1digits}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequalreal1digits()}{dctestassertequalreal1digits()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequalreal1digits (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{real, dimension(\+:), intent(in)}]{answer,  }\item[{real, dimension(\+:), intent(in)}]{check,  }\item[{integer, intent(in)}]{significant\+\_\+digits,  }\item[{integer, intent(in)}]{ignore\+\_\+digits }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 5528 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
5528     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
5529     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
5530     \textcolor{keywordtype}{implicit none}
5531     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
5532     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: answer(:)
5533     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: check(:)
5534     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: significant\_digits
5535     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: ignore\_digits
5536     \textcolor{keywordtype}{logical}:: err\_flag
5537     \textcolor{keywordtype}{character(STRING)}:: pos\_str
5538     \textcolor{keywordtype}{real}:: wrong, right\_max, right\_min
5539     \textcolor{keywordtype}{character(STRING)}:: pos\_str\_space
5540     \textcolor{keywordtype}{integer}:: pos\_str\_len
5541     \textcolor{keywordtype}{real}:: right\_tmp
5542 
5543                         \textcolor{keywordtype}{integer}:: answer\_shape(1), check\_shape(1), pos(1)
5544     \textcolor{keywordtype}{logical}:: consist\_shape(1)
5545     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(1)
5546     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:)
5547     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:)
5548     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:)
5549     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: answer\_negative(:)
5550     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: check\_negative(:)
5551     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: both\_negative(:)
5552     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{allocatable}:: answer\_max(:)
5553     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{allocatable}:: answer\_min(:)
5554                     
5555   \textcolor{keywordflow}{continue}
5556     err\_flag = .false.
5557 
5558     \textcolor{keywordflow}{if} ( significant\_digits < 1 ) \textcolor{keywordflow}{then}
5559       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** '}
5560       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Specify a number more than 1 to "significant\_digits"'}
5561       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
5562 \textcolor{keywordflow}{    end if}
5563                     
5564     answer\_shape = shape(answer)
5565     check\_shape = shape(check)
5566 
5567     consist\_shape = answer\_shape == check\_shape
5568 
5569     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
5570       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
5571       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
5572       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
5573       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
5574       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
5575 
5576       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
5577 \textcolor{keywordflow}{    end if}
5578 
5579 
5580     \textcolor{keyword}{allocate}( mask\_array( &
5581                       
5582       &    answer\_shape(1)  )  &
5583       &  )
5584 
5585     \textcolor{keyword}{allocate}( judge( &
5586                       
5587       &    answer\_shape(1)  )  &
5588       &  )
5589 
5590     \textcolor{keyword}{allocate}( judge\_rev( &
5591                       
5592       &    answer\_shape(1)  )  &
5593       &  )
5594 
5595     \textcolor{keyword}{allocate}( answer\_negative( &
5596                       
5597       &    answer\_shape(1)  )  &
5598       &  )
5599 
5600     \textcolor{keyword}{allocate}( check\_negative( &
5601                       
5602       &    answer\_shape(1)  )  &
5603       &  )
5604 
5605     \textcolor{keyword}{allocate}( both\_negative( &
5606                       
5607       &    answer\_shape(1)  )  &
5608       &  )
5609 
5610     \textcolor{keyword}{allocate}( answer\_max( &
5611                       
5612       &    answer\_shape(1)  )  &
5613       &  )
5614 
5615     \textcolor{keyword}{allocate}( answer\_min( &
5616                       
5617       &    answer\_shape(1)  )  &
5618       &  )
5619 
5620     answer\_negative = answer < 0.0
5621     check\_negative = check < 0.0
5622     both\_negative = answer\_negative .and. check\_negative
5623 
5624     \textcolor{keywordflow}{where} (both\_negative)
5625       answer\_max = &
5626         &   answer &
5627         &   * (   1.0 &
5628         &       - 0.1 ** significant\_digits ) &
5629         & + 0.1 ** (- ignore\_digits)
5630 
5631       answer\_min = &
5632         &   answer &
5633         &   * (   1.0 &
5634         &       + 0.1 ** significant\_digits ) &
5635         & - 0.1 ** (- ignore\_digits)
5636     \textcolor{keywordflow}{elsewhere}
5637       answer\_max = &
5638         &   answer &
5639         &   * (   1.0 &
5640         &       + 0.1 ** significant\_digits ) &
5641         & + 0.1 ** (- ignore\_digits)
5642 
5643       answer\_min = &
5644         &   answer &
5645         &   * (   1.0 &
5646         &       - 0.1 ** significant\_digits ) &
5647         & - 0.1 ** (- ignore\_digits)
5648 \textcolor{keywordflow}{    end where}
5649 
5650     judge = answer\_max > check .and. check > answer\_min
5651     judge\_rev = .not. judge
5652     err\_flag = any(judge\_rev)
5653     mask\_array = 1
5654     pos = maxloc(mask\_array, judge\_rev)
5655 
5656     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
5657 
5658       wrong = check( &
5659                       
5660         &    pos(1)  )
5661 
5662       right\_max = answer\_max( &
5663                       
5664         &    pos(1)  )
5665 
5666       right\_min = answer\_min( &
5667                       
5668         &    pos(1)  )
5669 
5670       \textcolor{keywordflow}{if} ( right\_max < right\_min ) \textcolor{keywordflow}{then}
5671         right\_tmp = right\_max
5672         right\_max = right\_min
5673         right\_min = right\_tmp
5674 \textcolor{keywordflow}{      end if}
5675 
5676                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
5677                       
5678 
5679       pos\_str = \textcolor{stringliteral}{'('} // &
5680                       
5681         &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{')'}
5682 
5683 \textcolor{keywordflow}{    end if}
5684     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
5685     \textcolor{keyword}{deallocate}(answer\_negative, check\_negative, both\_negative)
5686     \textcolor{keyword}{deallocate}(answer\_max, answer\_min)
5687 
5688                     
5689 
5690     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
5691       pos\_str\_space = \textcolor{stringliteral}{''}
5692       pos\_str\_len = len\_trim(pos\_str)
5693 
5694       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
5695       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
5696       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str)  // \textcolor{stringliteral}{'  = '}, wrong
5697       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
5698       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'        '} // pos\_str\_space(1:pos\_str\_len) &
5699         &                                     // \textcolor{stringliteral}{'   '}, right\_min, \textcolor{stringliteral}{' < '}
5700       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str)  // \textcolor{stringliteral}{' < '}, right\_max
5701 
5702       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
5703     \textcolor{keywordflow}{else}
5704       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
5705 \textcolor{keywordflow}{    end if}
5706 
5707 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_a5e2637454273da2156335d5a3f6f83aa}\label{interfacedc__test_1_1assertequal_a5e2637454273da2156335d5a3f6f83aa}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequalreal2@{dctestassertequalreal2}}
\index{dctestassertequalreal2@{dctestassertequalreal2}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequalreal2()}{dctestassertequalreal2()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequalreal2 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{real, dimension(\+:,\+:), intent(in)}]{answer,  }\item[{real, dimension(\+:,\+:), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 2943 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
2943     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
2944     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
2945     \textcolor{keywordtype}{implicit none}
2946     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
2947     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: answer(:,:)
2948     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: check(:,:)
2949     \textcolor{keywordtype}{logical}:: err\_flag
2950     \textcolor{keywordtype}{character(STRING)}:: pos\_str
2951     \textcolor{keywordtype}{real}:: wrong, right
2952 
2953                         \textcolor{keywordtype}{integer}:: answer\_shape(2), check\_shape(2), pos(2)
2954     \textcolor{keywordtype}{logical}:: consist\_shape(2)
2955     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(2)
2956     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:,:)
2957     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:,:)
2958     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:,:)
2959                     
2960 
2961                     
2962 
2963   \textcolor{keywordflow}{continue}
2964     err\_flag = .false.
2965 
2966                     
2967     answer\_shape = shape(answer)
2968     check\_shape = shape(check)
2969 
2970     consist\_shape = answer\_shape == check\_shape
2971 
2972     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
2973       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
2974       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
2975       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
2976       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
2977       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
2978 
2979       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
2980 \textcolor{keywordflow}{    end if}
2981 
2982 
2983     \textcolor{keyword}{allocate}( mask\_array( &
2984                             &    answer\_shape(1), &
2985                       
2986       &    answer\_shape(2)  )  &
2987       &  )
2988 
2989     \textcolor{keyword}{allocate}( judge( &
2990                             &    answer\_shape(1), &
2991                       
2992       &    answer\_shape(2)  )  &
2993       &  )
2994 
2995     \textcolor{keyword}{allocate}( judge\_rev( &
2996                             &    answer\_shape(1), &
2997                       
2998       &    answer\_shape(2)  )  &
2999       &  )
3000 
3001                       
3002     judge = answer == check
3003 
3004                       
3005 
3006     judge\_rev = .not. judge
3007     err\_flag = any(judge\_rev)
3008     mask\_array = 1
3009     pos = maxloc(mask\_array, judge\_rev)
3010 
3011     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
3012 
3013       wrong = check( &
3014                               &    pos(1), &
3015                       
3016         &    pos(2)  )
3017 
3018       right = answer( &
3019                               &    pos(1), &
3020                       
3021         &    pos(2)  )
3022 
3023                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
3024                       
3025       \textcolor{keyword}{write}(unit=pos\_array(2), fmt=\textcolor{stringliteral}{"(i20)"}) pos(2)
3026                       
3027 
3028       pos\_str = \textcolor{stringliteral}{'('} // &
3029                               &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{','} // &
3030                       
3031         &    trim(adjustl(pos\_array(2))) // \textcolor{stringliteral}{')'}
3032 
3033 \textcolor{keywordflow}{    end if}
3034     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
3035 
3036                     
3037 
3038 
3039     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
3040       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
3041       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
3042       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str) // \textcolor{stringliteral}{'  = '}, wrong
3043       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
3044       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str) // \textcolor{stringliteral}{' = '}, right
3045 
3046       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
3047     \textcolor{keywordflow}{else}
3048       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
3049 \textcolor{keywordflow}{    end if}
3050 
3051 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_a68d4667f9beae36c50ec148587e38024}\label{interfacedc__test_1_1assertequal_a68d4667f9beae36c50ec148587e38024}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequalreal2digits@{dctestassertequalreal2digits}}
\index{dctestassertequalreal2digits@{dctestassertequalreal2digits}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequalreal2digits()}{dctestassertequalreal2digits()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequalreal2digits (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{real, dimension(\+:,\+:), intent(in)}]{answer,  }\item[{real, dimension(\+:,\+:), intent(in)}]{check,  }\item[{integer, intent(in)}]{significant\+\_\+digits,  }\item[{integer, intent(in)}]{ignore\+\_\+digits }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 5713 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
5713     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
5714     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
5715     \textcolor{keywordtype}{implicit none}
5716     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
5717     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: answer(:,:)
5718     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: check(:,:)
5719     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: significant\_digits
5720     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: ignore\_digits
5721     \textcolor{keywordtype}{logical}:: err\_flag
5722     \textcolor{keywordtype}{character(STRING)}:: pos\_str
5723     \textcolor{keywordtype}{real}:: wrong, right\_max, right\_min
5724     \textcolor{keywordtype}{character(STRING)}:: pos\_str\_space
5725     \textcolor{keywordtype}{integer}:: pos\_str\_len
5726     \textcolor{keywordtype}{real}:: right\_tmp
5727 
5728                         \textcolor{keywordtype}{integer}:: answer\_shape(2), check\_shape(2), pos(2)
5729     \textcolor{keywordtype}{logical}:: consist\_shape(2)
5730     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(2)
5731     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:,:)
5732     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:,:)
5733     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:,:)
5734     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: answer\_negative(:,:)
5735     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: check\_negative(:,:)
5736     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: both\_negative(:,:)
5737     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{allocatable}:: answer\_max(:,:)
5738     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{allocatable}:: answer\_min(:,:)
5739                     
5740   \textcolor{keywordflow}{continue}
5741     err\_flag = .false.
5742 
5743     \textcolor{keywordflow}{if} ( significant\_digits < 1 ) \textcolor{keywordflow}{then}
5744       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** '}
5745       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Specify a number more than 1 to "significant\_digits"'}
5746       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
5747 \textcolor{keywordflow}{    end if}
5748                     
5749     answer\_shape = shape(answer)
5750     check\_shape = shape(check)
5751 
5752     consist\_shape = answer\_shape == check\_shape
5753 
5754     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
5755       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
5756       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
5757       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
5758       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
5759       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
5760 
5761       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
5762 \textcolor{keywordflow}{    end if}
5763 
5764 
5765     \textcolor{keyword}{allocate}( mask\_array( &
5766                             &    answer\_shape(1), &
5767                       
5768       &    answer\_shape(2)  )  &
5769       &  )
5770 
5771     \textcolor{keyword}{allocate}( judge( &
5772                             &    answer\_shape(1), &
5773                       
5774       &    answer\_shape(2)  )  &
5775       &  )
5776 
5777     \textcolor{keyword}{allocate}( judge\_rev( &
5778                             &    answer\_shape(1), &
5779                       
5780       &    answer\_shape(2)  )  &
5781       &  )
5782 
5783     \textcolor{keyword}{allocate}( answer\_negative( &
5784                             &    answer\_shape(1), &
5785                       
5786       &    answer\_shape(2)  )  &
5787       &  )
5788 
5789     \textcolor{keyword}{allocate}( check\_negative( &
5790                             &    answer\_shape(1), &
5791                       
5792       &    answer\_shape(2)  )  &
5793       &  )
5794 
5795     \textcolor{keyword}{allocate}( both\_negative( &
5796                             &    answer\_shape(1), &
5797                       
5798       &    answer\_shape(2)  )  &
5799       &  )
5800 
5801     \textcolor{keyword}{allocate}( answer\_max( &
5802                             &    answer\_shape(1), &
5803                       
5804       &    answer\_shape(2)  )  &
5805       &  )
5806 
5807     \textcolor{keyword}{allocate}( answer\_min( &
5808                             &    answer\_shape(1), &
5809                       
5810       &    answer\_shape(2)  )  &
5811       &  )
5812 
5813     answer\_negative = answer < 0.0
5814     check\_negative = check < 0.0
5815     both\_negative = answer\_negative .and. check\_negative
5816 
5817     \textcolor{keywordflow}{where} (both\_negative)
5818       answer\_max = &
5819         &   answer &
5820         &   * (   1.0 &
5821         &       - 0.1 ** significant\_digits ) &
5822         & + 0.1 ** (- ignore\_digits)
5823 
5824       answer\_min = &
5825         &   answer &
5826         &   * (   1.0 &
5827         &       + 0.1 ** significant\_digits ) &
5828         & - 0.1 ** (- ignore\_digits)
5829     \textcolor{keywordflow}{elsewhere}
5830       answer\_max = &
5831         &   answer &
5832         &   * (   1.0 &
5833         &       + 0.1 ** significant\_digits ) &
5834         & + 0.1 ** (- ignore\_digits)
5835 
5836       answer\_min = &
5837         &   answer &
5838         &   * (   1.0 &
5839         &       - 0.1 ** significant\_digits ) &
5840         & - 0.1 ** (- ignore\_digits)
5841 \textcolor{keywordflow}{    end where}
5842 
5843     judge = answer\_max > check .and. check > answer\_min
5844     judge\_rev = .not. judge
5845     err\_flag = any(judge\_rev)
5846     mask\_array = 1
5847     pos = maxloc(mask\_array, judge\_rev)
5848 
5849     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
5850 
5851       wrong = check( &
5852                               &    pos(1), &
5853                       
5854         &    pos(2)  )
5855 
5856       right\_max = answer\_max( &
5857                               &    pos(1), &
5858                       
5859         &    pos(2)  )
5860 
5861       right\_min = answer\_min( &
5862                               &    pos(1), &
5863                       
5864         &    pos(2)  )
5865 
5866       \textcolor{keywordflow}{if} ( right\_max < right\_min ) \textcolor{keywordflow}{then}
5867         right\_tmp = right\_max
5868         right\_max = right\_min
5869         right\_min = right\_tmp
5870 \textcolor{keywordflow}{      end if}
5871 
5872                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
5873                       
5874       \textcolor{keyword}{write}(unit=pos\_array(2), fmt=\textcolor{stringliteral}{"(i20)"}) pos(2)
5875                       
5876 
5877       pos\_str = \textcolor{stringliteral}{'('} // &
5878                               &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{','} // &
5879                       
5880         &    trim(adjustl(pos\_array(2))) // \textcolor{stringliteral}{')'}
5881 
5882 \textcolor{keywordflow}{    end if}
5883     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
5884     \textcolor{keyword}{deallocate}(answer\_negative, check\_negative, both\_negative)
5885     \textcolor{keyword}{deallocate}(answer\_max, answer\_min)
5886 
5887                     
5888 
5889     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
5890       pos\_str\_space = \textcolor{stringliteral}{''}
5891       pos\_str\_len = len\_trim(pos\_str)
5892 
5893       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
5894       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
5895       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str)  // \textcolor{stringliteral}{'  = '}, wrong
5896       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
5897       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'        '} // pos\_str\_space(1:pos\_str\_len) &
5898         &                                     // \textcolor{stringliteral}{'   '}, right\_min, \textcolor{stringliteral}{' < '}
5899       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str)  // \textcolor{stringliteral}{' < '}, right\_max
5900 
5901       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
5902     \textcolor{keywordflow}{else}
5903       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
5904 \textcolor{keywordflow}{    end if}
5905 
5906 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_a3ea06980e5292faa134406881132a20e}\label{interfacedc__test_1_1assertequal_a3ea06980e5292faa134406881132a20e}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequalreal3@{dctestassertequalreal3}}
\index{dctestassertequalreal3@{dctestassertequalreal3}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequalreal3()}{dctestassertequalreal3()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequalreal3 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{real, dimension(\+:,\+:,\+:), intent(in)}]{answer,  }\item[{real, dimension(\+:,\+:,\+:), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 3056 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
3056     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
3057     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
3058     \textcolor{keywordtype}{implicit none}
3059     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
3060     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: answer(:,:,:)
3061     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: check(:,:,:)
3062     \textcolor{keywordtype}{logical}:: err\_flag
3063     \textcolor{keywordtype}{character(STRING)}:: pos\_str
3064     \textcolor{keywordtype}{real}:: wrong, right
3065 
3066                         \textcolor{keywordtype}{integer}:: answer\_shape(3), check\_shape(3), pos(3)
3067     \textcolor{keywordtype}{logical}:: consist\_shape(3)
3068     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(3)
3069     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:,:,:)
3070     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:,:,:)
3071     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:,:,:)
3072                     
3073 
3074                     
3075 
3076   \textcolor{keywordflow}{continue}
3077     err\_flag = .false.
3078 
3079                     
3080     answer\_shape = shape(answer)
3081     check\_shape = shape(check)
3082 
3083     consist\_shape = answer\_shape == check\_shape
3084 
3085     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
3086       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
3087       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
3088       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
3089       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
3090       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
3091 
3092       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
3093 \textcolor{keywordflow}{    end if}
3094 
3095 
3096     \textcolor{keyword}{allocate}( mask\_array( &
3097                             &    answer\_shape(1), &
3098                       
3099       &    answer\_shape(2), &
3100                       
3101       &    answer\_shape(3)  )  &
3102       &  )
3103 
3104     \textcolor{keyword}{allocate}( judge( &
3105                             &    answer\_shape(1), &
3106                       
3107       &    answer\_shape(2), &
3108                       
3109       &    answer\_shape(3)  )  &
3110       &  )
3111 
3112     \textcolor{keyword}{allocate}( judge\_rev( &
3113                             &    answer\_shape(1), &
3114                       
3115       &    answer\_shape(2), &
3116                       
3117       &    answer\_shape(3)  )  &
3118       &  )
3119 
3120                       
3121     judge = answer == check
3122 
3123                       
3124 
3125     judge\_rev = .not. judge
3126     err\_flag = any(judge\_rev)
3127     mask\_array = 1
3128     pos = maxloc(mask\_array, judge\_rev)
3129 
3130     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
3131 
3132       wrong = check( &
3133                               &    pos(1), &
3134                       
3135         &    pos(2), &
3136                       
3137         &    pos(3)  )
3138 
3139       right = answer( &
3140                               &    pos(1), &
3141                       
3142         &    pos(2), &
3143                       
3144         &    pos(3)  )
3145 
3146                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
3147                       
3148       \textcolor{keyword}{write}(unit=pos\_array(2), fmt=\textcolor{stringliteral}{"(i20)"}) pos(2)
3149                       
3150       \textcolor{keyword}{write}(unit=pos\_array(3), fmt=\textcolor{stringliteral}{"(i20)"}) pos(3)
3151                       
3152 
3153       pos\_str = \textcolor{stringliteral}{'('} // &
3154                               &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{','} // &
3155                       
3156         &    trim(adjustl(pos\_array(2))) // \textcolor{stringliteral}{','} // &
3157                       
3158         &    trim(adjustl(pos\_array(3))) // \textcolor{stringliteral}{')'}
3159 
3160 \textcolor{keywordflow}{    end if}
3161     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
3162 
3163                     
3164 
3165 
3166     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
3167       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
3168       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
3169       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str) // \textcolor{stringliteral}{'  = '}, wrong
3170       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
3171       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str) // \textcolor{stringliteral}{' = '}, right
3172 
3173       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
3174     \textcolor{keywordflow}{else}
3175       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
3176 \textcolor{keywordflow}{    end if}
3177 
3178 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_a8738d84b77a1378b93ceae7e2a7b8301}\label{interfacedc__test_1_1assertequal_a8738d84b77a1378b93ceae7e2a7b8301}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequalreal3digits@{dctestassertequalreal3digits}}
\index{dctestassertequalreal3digits@{dctestassertequalreal3digits}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequalreal3digits()}{dctestassertequalreal3digits()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequalreal3digits (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{real, dimension(\+:,\+:,\+:), intent(in)}]{answer,  }\item[{real, dimension(\+:,\+:,\+:), intent(in)}]{check,  }\item[{integer, intent(in)}]{significant\+\_\+digits,  }\item[{integer, intent(in)}]{ignore\+\_\+digits }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 5912 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
5912     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
5913     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
5914     \textcolor{keywordtype}{implicit none}
5915     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
5916     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: answer(:,:,:)
5917     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: check(:,:,:)
5918     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: significant\_digits
5919     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: ignore\_digits
5920     \textcolor{keywordtype}{logical}:: err\_flag
5921     \textcolor{keywordtype}{character(STRING)}:: pos\_str
5922     \textcolor{keywordtype}{real}:: wrong, right\_max, right\_min
5923     \textcolor{keywordtype}{character(STRING)}:: pos\_str\_space
5924     \textcolor{keywordtype}{integer}:: pos\_str\_len
5925     \textcolor{keywordtype}{real}:: right\_tmp
5926 
5927                         \textcolor{keywordtype}{integer}:: answer\_shape(3), check\_shape(3), pos(3)
5928     \textcolor{keywordtype}{logical}:: consist\_shape(3)
5929     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(3)
5930     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:,:,:)
5931     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:,:,:)
5932     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:,:,:)
5933     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: answer\_negative(:,:,:)
5934     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: check\_negative(:,:,:)
5935     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: both\_negative(:,:,:)
5936     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{allocatable}:: answer\_max(:,:,:)
5937     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{allocatable}:: answer\_min(:,:,:)
5938                     
5939   \textcolor{keywordflow}{continue}
5940     err\_flag = .false.
5941 
5942     \textcolor{keywordflow}{if} ( significant\_digits < 1 ) \textcolor{keywordflow}{then}
5943       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** '}
5944       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Specify a number more than 1 to "significant\_digits"'}
5945       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
5946 \textcolor{keywordflow}{    end if}
5947                     
5948     answer\_shape = shape(answer)
5949     check\_shape = shape(check)
5950 
5951     consist\_shape = answer\_shape == check\_shape
5952 
5953     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
5954       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
5955       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
5956       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
5957       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
5958       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
5959 
5960       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
5961 \textcolor{keywordflow}{    end if}
5962 
5963 
5964     \textcolor{keyword}{allocate}( mask\_array( &
5965                             &    answer\_shape(1), &
5966                       
5967       &    answer\_shape(2), &
5968                       
5969       &    answer\_shape(3)  )  &
5970       &  )
5971 
5972     \textcolor{keyword}{allocate}( judge( &
5973                             &    answer\_shape(1), &
5974                       
5975       &    answer\_shape(2), &
5976                       
5977       &    answer\_shape(3)  )  &
5978       &  )
5979 
5980     \textcolor{keyword}{allocate}( judge\_rev( &
5981                             &    answer\_shape(1), &
5982                       
5983       &    answer\_shape(2), &
5984                       
5985       &    answer\_shape(3)  )  &
5986       &  )
5987 
5988     \textcolor{keyword}{allocate}( answer\_negative( &
5989                             &    answer\_shape(1), &
5990                       
5991       &    answer\_shape(2), &
5992                       
5993       &    answer\_shape(3)  )  &
5994       &  )
5995 
5996     \textcolor{keyword}{allocate}( check\_negative( &
5997                             &    answer\_shape(1), &
5998                       
5999       &    answer\_shape(2), &
6000                       
6001       &    answer\_shape(3)  )  &
6002       &  )
6003 
6004     \textcolor{keyword}{allocate}( both\_negative( &
6005                             &    answer\_shape(1), &
6006                       
6007       &    answer\_shape(2), &
6008                       
6009       &    answer\_shape(3)  )  &
6010       &  )
6011 
6012     \textcolor{keyword}{allocate}( answer\_max( &
6013                             &    answer\_shape(1), &
6014                       
6015       &    answer\_shape(2), &
6016                       
6017       &    answer\_shape(3)  )  &
6018       &  )
6019 
6020     \textcolor{keyword}{allocate}( answer\_min( &
6021                             &    answer\_shape(1), &
6022                       
6023       &    answer\_shape(2), &
6024                       
6025       &    answer\_shape(3)  )  &
6026       &  )
6027 
6028     answer\_negative = answer < 0.0
6029     check\_negative = check < 0.0
6030     both\_negative = answer\_negative .and. check\_negative
6031 
6032     \textcolor{keywordflow}{where} (both\_negative)
6033       answer\_max = &
6034         &   answer &
6035         &   * (   1.0 &
6036         &       - 0.1 ** significant\_digits ) &
6037         & + 0.1 ** (- ignore\_digits)
6038 
6039       answer\_min = &
6040         &   answer &
6041         &   * (   1.0 &
6042         &       + 0.1 ** significant\_digits ) &
6043         & - 0.1 ** (- ignore\_digits)
6044     \textcolor{keywordflow}{elsewhere}
6045       answer\_max = &
6046         &   answer &
6047         &   * (   1.0 &
6048         &       + 0.1 ** significant\_digits ) &
6049         & + 0.1 ** (- ignore\_digits)
6050 
6051       answer\_min = &
6052         &   answer &
6053         &   * (   1.0 &
6054         &       - 0.1 ** significant\_digits ) &
6055         & - 0.1 ** (- ignore\_digits)
6056 \textcolor{keywordflow}{    end where}
6057 
6058     judge = answer\_max > check .and. check > answer\_min
6059     judge\_rev = .not. judge
6060     err\_flag = any(judge\_rev)
6061     mask\_array = 1
6062     pos = maxloc(mask\_array, judge\_rev)
6063 
6064     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
6065 
6066       wrong = check( &
6067                               &    pos(1), &
6068                       
6069         &    pos(2), &
6070                       
6071         &    pos(3)  )
6072 
6073       right\_max = answer\_max( &
6074                               &    pos(1), &
6075                       
6076         &    pos(2), &
6077                       
6078         &    pos(3)  )
6079 
6080       right\_min = answer\_min( &
6081                               &    pos(1), &
6082                       
6083         &    pos(2), &
6084                       
6085         &    pos(3)  )
6086 
6087       \textcolor{keywordflow}{if} ( right\_max < right\_min ) \textcolor{keywordflow}{then}
6088         right\_tmp = right\_max
6089         right\_max = right\_min
6090         right\_min = right\_tmp
6091 \textcolor{keywordflow}{      end if}
6092 
6093                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
6094                       
6095       \textcolor{keyword}{write}(unit=pos\_array(2), fmt=\textcolor{stringliteral}{"(i20)"}) pos(2)
6096                       
6097       \textcolor{keyword}{write}(unit=pos\_array(3), fmt=\textcolor{stringliteral}{"(i20)"}) pos(3)
6098                       
6099 
6100       pos\_str = \textcolor{stringliteral}{'('} // &
6101                               &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{','} // &
6102                       
6103         &    trim(adjustl(pos\_array(2))) // \textcolor{stringliteral}{','} // &
6104                       
6105         &    trim(adjustl(pos\_array(3))) // \textcolor{stringliteral}{')'}
6106 
6107 \textcolor{keywordflow}{    end if}
6108     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
6109     \textcolor{keyword}{deallocate}(answer\_negative, check\_negative, both\_negative)
6110     \textcolor{keyword}{deallocate}(answer\_max, answer\_min)
6111 
6112                     
6113 
6114     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
6115       pos\_str\_space = \textcolor{stringliteral}{''}
6116       pos\_str\_len = len\_trim(pos\_str)
6117 
6118       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
6119       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
6120       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str)  // \textcolor{stringliteral}{'  = '}, wrong
6121       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
6122       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'        '} // pos\_str\_space(1:pos\_str\_len) &
6123         &                                     // \textcolor{stringliteral}{'   '}, right\_min, \textcolor{stringliteral}{' < '}
6124       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str)  // \textcolor{stringliteral}{' < '}, right\_max
6125 
6126       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
6127     \textcolor{keywordflow}{else}
6128       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
6129 \textcolor{keywordflow}{    end if}
6130 
6131 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_a87ffae3213da310f5b791aec5e5242e0}\label{interfacedc__test_1_1assertequal_a87ffae3213da310f5b791aec5e5242e0}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequalreal4@{dctestassertequalreal4}}
\index{dctestassertequalreal4@{dctestassertequalreal4}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequalreal4()}{dctestassertequalreal4()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequalreal4 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{real, dimension(\+:,\+:,\+:,\+:), intent(in)}]{answer,  }\item[{real, dimension(\+:,\+:,\+:,\+:), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 3183 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
3183     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
3184     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
3185     \textcolor{keywordtype}{implicit none}
3186     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
3187     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: answer(:,:,:,:)
3188     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: check(:,:,:,:)
3189     \textcolor{keywordtype}{logical}:: err\_flag
3190     \textcolor{keywordtype}{character(STRING)}:: pos\_str
3191     \textcolor{keywordtype}{real}:: wrong, right
3192 
3193                         \textcolor{keywordtype}{integer}:: answer\_shape(4), check\_shape(4), pos(4)
3194     \textcolor{keywordtype}{logical}:: consist\_shape(4)
3195     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(4)
3196     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:,:,:,:)
3197     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:,:,:,:)
3198     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:,:,:,:)
3199                     
3200 
3201                     
3202 
3203   \textcolor{keywordflow}{continue}
3204     err\_flag = .false.
3205 
3206                     
3207     answer\_shape = shape(answer)
3208     check\_shape = shape(check)
3209 
3210     consist\_shape = answer\_shape == check\_shape
3211 
3212     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
3213       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
3214       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
3215       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
3216       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
3217       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
3218 
3219       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
3220 \textcolor{keywordflow}{    end if}
3221 
3222 
3223     \textcolor{keyword}{allocate}( mask\_array( &
3224                             &    answer\_shape(1), &
3225                       
3226       &    answer\_shape(2), &
3227                       
3228       &    answer\_shape(3), &
3229                       
3230       &    answer\_shape(4)  )  &
3231       &  )
3232 
3233     \textcolor{keyword}{allocate}( judge( &
3234                             &    answer\_shape(1), &
3235                       
3236       &    answer\_shape(2), &
3237                       
3238       &    answer\_shape(3), &
3239                       
3240       &    answer\_shape(4)  )  &
3241       &  )
3242 
3243     \textcolor{keyword}{allocate}( judge\_rev( &
3244                             &    answer\_shape(1), &
3245                       
3246       &    answer\_shape(2), &
3247                       
3248       &    answer\_shape(3), &
3249                       
3250       &    answer\_shape(4)  )  &
3251       &  )
3252 
3253                       
3254     judge = answer == check
3255 
3256                       
3257 
3258     judge\_rev = .not. judge
3259     err\_flag = any(judge\_rev)
3260     mask\_array = 1
3261     pos = maxloc(mask\_array, judge\_rev)
3262 
3263     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
3264 
3265       wrong = check( &
3266                               &    pos(1), &
3267                       
3268         &    pos(2), &
3269                       
3270         &    pos(3), &
3271                       
3272         &    pos(4)  )
3273 
3274       right = answer( &
3275                               &    pos(1), &
3276                       
3277         &    pos(2), &
3278                       
3279         &    pos(3), &
3280                       
3281         &    pos(4)  )
3282 
3283                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
3284                       
3285       \textcolor{keyword}{write}(unit=pos\_array(2), fmt=\textcolor{stringliteral}{"(i20)"}) pos(2)
3286                       
3287       \textcolor{keyword}{write}(unit=pos\_array(3), fmt=\textcolor{stringliteral}{"(i20)"}) pos(3)
3288                       
3289       \textcolor{keyword}{write}(unit=pos\_array(4), fmt=\textcolor{stringliteral}{"(i20)"}) pos(4)
3290                       
3291 
3292       pos\_str = \textcolor{stringliteral}{'('} // &
3293                               &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{','} // &
3294                       
3295         &    trim(adjustl(pos\_array(2))) // \textcolor{stringliteral}{','} // &
3296                       
3297         &    trim(adjustl(pos\_array(3))) // \textcolor{stringliteral}{','} // &
3298                       
3299         &    trim(adjustl(pos\_array(4))) // \textcolor{stringliteral}{')'}
3300 
3301 \textcolor{keywordflow}{    end if}
3302     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
3303 
3304                     
3305 
3306 
3307     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
3308       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
3309       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
3310       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str) // \textcolor{stringliteral}{'  = '}, wrong
3311       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
3312       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str) // \textcolor{stringliteral}{' = '}, right
3313 
3314       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
3315     \textcolor{keywordflow}{else}
3316       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
3317 \textcolor{keywordflow}{    end if}
3318 
3319 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_a5c500f920e4e6d11c374f89d4c8f152e}\label{interfacedc__test_1_1assertequal_a5c500f920e4e6d11c374f89d4c8f152e}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequalreal4digits@{dctestassertequalreal4digits}}
\index{dctestassertequalreal4digits@{dctestassertequalreal4digits}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequalreal4digits()}{dctestassertequalreal4digits()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequalreal4digits (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{real, dimension(\+:,\+:,\+:,\+:), intent(in)}]{answer,  }\item[{real, dimension(\+:,\+:,\+:,\+:), intent(in)}]{check,  }\item[{integer, intent(in)}]{significant\+\_\+digits,  }\item[{integer, intent(in)}]{ignore\+\_\+digits }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 6137 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
6137     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
6138     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
6139     \textcolor{keywordtype}{implicit none}
6140     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
6141     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: answer(:,:,:,:)
6142     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: check(:,:,:,:)
6143     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: significant\_digits
6144     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: ignore\_digits
6145     \textcolor{keywordtype}{logical}:: err\_flag
6146     \textcolor{keywordtype}{character(STRING)}:: pos\_str
6147     \textcolor{keywordtype}{real}:: wrong, right\_max, right\_min
6148     \textcolor{keywordtype}{character(STRING)}:: pos\_str\_space
6149     \textcolor{keywordtype}{integer}:: pos\_str\_len
6150     \textcolor{keywordtype}{real}:: right\_tmp
6151 
6152                         \textcolor{keywordtype}{integer}:: answer\_shape(4), check\_shape(4), pos(4)
6153     \textcolor{keywordtype}{logical}:: consist\_shape(4)
6154     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(4)
6155     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:,:,:,:)
6156     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:,:,:,:)
6157     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:,:,:,:)
6158     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: answer\_negative(:,:,:,:)
6159     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: check\_negative(:,:,:,:)
6160     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: both\_negative(:,:,:,:)
6161     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{allocatable}:: answer\_max(:,:,:,:)
6162     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{allocatable}:: answer\_min(:,:,:,:)
6163                     
6164   \textcolor{keywordflow}{continue}
6165     err\_flag = .false.
6166 
6167     \textcolor{keywordflow}{if} ( significant\_digits < 1 ) \textcolor{keywordflow}{then}
6168       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** '}
6169       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Specify a number more than 1 to "significant\_digits"'}
6170       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
6171 \textcolor{keywordflow}{    end if}
6172                     
6173     answer\_shape = shape(answer)
6174     check\_shape = shape(check)
6175 
6176     consist\_shape = answer\_shape == check\_shape
6177 
6178     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
6179       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
6180       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
6181       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
6182       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
6183       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
6184 
6185       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
6186 \textcolor{keywordflow}{    end if}
6187 
6188 
6189     \textcolor{keyword}{allocate}( mask\_array( &
6190                             &    answer\_shape(1), &
6191                       
6192       &    answer\_shape(2), &
6193                       
6194       &    answer\_shape(3), &
6195                       
6196       &    answer\_shape(4)  )  &
6197       &  )
6198 
6199     \textcolor{keyword}{allocate}( judge( &
6200                             &    answer\_shape(1), &
6201                       
6202       &    answer\_shape(2), &
6203                       
6204       &    answer\_shape(3), &
6205                       
6206       &    answer\_shape(4)  )  &
6207       &  )
6208 
6209     \textcolor{keyword}{allocate}( judge\_rev( &
6210                             &    answer\_shape(1), &
6211                       
6212       &    answer\_shape(2), &
6213                       
6214       &    answer\_shape(3), &
6215                       
6216       &    answer\_shape(4)  )  &
6217       &  )
6218 
6219     \textcolor{keyword}{allocate}( answer\_negative( &
6220                             &    answer\_shape(1), &
6221                       
6222       &    answer\_shape(2), &
6223                       
6224       &    answer\_shape(3), &
6225                       
6226       &    answer\_shape(4)  )  &
6227       &  )
6228 
6229     \textcolor{keyword}{allocate}( check\_negative( &
6230                             &    answer\_shape(1), &
6231                       
6232       &    answer\_shape(2), &
6233                       
6234       &    answer\_shape(3), &
6235                       
6236       &    answer\_shape(4)  )  &
6237       &  )
6238 
6239     \textcolor{keyword}{allocate}( both\_negative( &
6240                             &    answer\_shape(1), &
6241                       
6242       &    answer\_shape(2), &
6243                       
6244       &    answer\_shape(3), &
6245                       
6246       &    answer\_shape(4)  )  &
6247       &  )
6248 
6249     \textcolor{keyword}{allocate}( answer\_max( &
6250                             &    answer\_shape(1), &
6251                       
6252       &    answer\_shape(2), &
6253                       
6254       &    answer\_shape(3), &
6255                       
6256       &    answer\_shape(4)  )  &
6257       &  )
6258 
6259     \textcolor{keyword}{allocate}( answer\_min( &
6260                             &    answer\_shape(1), &
6261                       
6262       &    answer\_shape(2), &
6263                       
6264       &    answer\_shape(3), &
6265                       
6266       &    answer\_shape(4)  )  &
6267       &  )
6268 
6269     answer\_negative = answer < 0.0
6270     check\_negative = check < 0.0
6271     both\_negative = answer\_negative .and. check\_negative
6272 
6273     \textcolor{keywordflow}{where} (both\_negative)
6274       answer\_max = &
6275         &   answer &
6276         &   * (   1.0 &
6277         &       - 0.1 ** significant\_digits ) &
6278         & + 0.1 ** (- ignore\_digits)
6279 
6280       answer\_min = &
6281         &   answer &
6282         &   * (   1.0 &
6283         &       + 0.1 ** significant\_digits ) &
6284         & - 0.1 ** (- ignore\_digits)
6285     \textcolor{keywordflow}{elsewhere}
6286       answer\_max = &
6287         &   answer &
6288         &   * (   1.0 &
6289         &       + 0.1 ** significant\_digits ) &
6290         & + 0.1 ** (- ignore\_digits)
6291 
6292       answer\_min = &
6293         &   answer &
6294         &   * (   1.0 &
6295         &       - 0.1 ** significant\_digits ) &
6296         & - 0.1 ** (- ignore\_digits)
6297 \textcolor{keywordflow}{    end where}
6298 
6299     judge = answer\_max > check .and. check > answer\_min
6300     judge\_rev = .not. judge
6301     err\_flag = any(judge\_rev)
6302     mask\_array = 1
6303     pos = maxloc(mask\_array, judge\_rev)
6304 
6305     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
6306 
6307       wrong = check( &
6308                               &    pos(1), &
6309                       
6310         &    pos(2), &
6311                       
6312         &    pos(3), &
6313                       
6314         &    pos(4)  )
6315 
6316       right\_max = answer\_max( &
6317                               &    pos(1), &
6318                       
6319         &    pos(2), &
6320                       
6321         &    pos(3), &
6322                       
6323         &    pos(4)  )
6324 
6325       right\_min = answer\_min( &
6326                               &    pos(1), &
6327                       
6328         &    pos(2), &
6329                       
6330         &    pos(3), &
6331                       
6332         &    pos(4)  )
6333 
6334       \textcolor{keywordflow}{if} ( right\_max < right\_min ) \textcolor{keywordflow}{then}
6335         right\_tmp = right\_max
6336         right\_max = right\_min
6337         right\_min = right\_tmp
6338 \textcolor{keywordflow}{      end if}
6339 
6340                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
6341                       
6342       \textcolor{keyword}{write}(unit=pos\_array(2), fmt=\textcolor{stringliteral}{"(i20)"}) pos(2)
6343                       
6344       \textcolor{keyword}{write}(unit=pos\_array(3), fmt=\textcolor{stringliteral}{"(i20)"}) pos(3)
6345                       
6346       \textcolor{keyword}{write}(unit=pos\_array(4), fmt=\textcolor{stringliteral}{"(i20)"}) pos(4)
6347                       
6348 
6349       pos\_str = \textcolor{stringliteral}{'('} // &
6350                               &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{','} // &
6351                       
6352         &    trim(adjustl(pos\_array(2))) // \textcolor{stringliteral}{','} // &
6353                       
6354         &    trim(adjustl(pos\_array(3))) // \textcolor{stringliteral}{','} // &
6355                       
6356         &    trim(adjustl(pos\_array(4))) // \textcolor{stringliteral}{')'}
6357 
6358 \textcolor{keywordflow}{    end if}
6359     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
6360     \textcolor{keyword}{deallocate}(answer\_negative, check\_negative, both\_negative)
6361     \textcolor{keyword}{deallocate}(answer\_max, answer\_min)
6362 
6363                     
6364 
6365     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
6366       pos\_str\_space = \textcolor{stringliteral}{''}
6367       pos\_str\_len = len\_trim(pos\_str)
6368 
6369       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
6370       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
6371       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str)  // \textcolor{stringliteral}{'  = '}, wrong
6372       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
6373       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'        '} // pos\_str\_space(1:pos\_str\_len) &
6374         &                                     // \textcolor{stringliteral}{'   '}, right\_min, \textcolor{stringliteral}{' < '}
6375       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str)  // \textcolor{stringliteral}{' < '}, right\_max
6376 
6377       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
6378     \textcolor{keywordflow}{else}
6379       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
6380 \textcolor{keywordflow}{    end if}
6381 
6382 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_ac75288761cc2726a608e84c63295cc5e}\label{interfacedc__test_1_1assertequal_ac75288761cc2726a608e84c63295cc5e}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequalreal5@{dctestassertequalreal5}}
\index{dctestassertequalreal5@{dctestassertequalreal5}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequalreal5()}{dctestassertequalreal5()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequalreal5 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{real, dimension(\+:,\+:,\+:,\+:,\+:), intent(in)}]{answer,  }\item[{real, dimension(\+:,\+:,\+:,\+:,\+:), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 3324 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
3324     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
3325     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
3326     \textcolor{keywordtype}{implicit none}
3327     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
3328     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: answer(:,:,:,:,:)
3329     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: check(:,:,:,:,:)
3330     \textcolor{keywordtype}{logical}:: err\_flag
3331     \textcolor{keywordtype}{character(STRING)}:: pos\_str
3332     \textcolor{keywordtype}{real}:: wrong, right
3333 
3334                         \textcolor{keywordtype}{integer}:: answer\_shape(5), check\_shape(5), pos(5)
3335     \textcolor{keywordtype}{logical}:: consist\_shape(5)
3336     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(5)
3337     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:,:,:,:,:)
3338     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:,:,:,:,:)
3339     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:,:,:,:,:)
3340                     
3341 
3342                     
3343 
3344   \textcolor{keywordflow}{continue}
3345     err\_flag = .false.
3346 
3347                     
3348     answer\_shape = shape(answer)
3349     check\_shape = shape(check)
3350 
3351     consist\_shape = answer\_shape == check\_shape
3352 
3353     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
3354       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
3355       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
3356       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
3357       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
3358       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
3359 
3360       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
3361 \textcolor{keywordflow}{    end if}
3362 
3363 
3364     \textcolor{keyword}{allocate}( mask\_array( &
3365                             &    answer\_shape(1), &
3366                       
3367       &    answer\_shape(2), &
3368                       
3369       &    answer\_shape(3), &
3370                       
3371       &    answer\_shape(4), &
3372                       
3373       &    answer\_shape(5)  )  &
3374       &  )
3375 
3376     \textcolor{keyword}{allocate}( judge( &
3377                             &    answer\_shape(1), &
3378                       
3379       &    answer\_shape(2), &
3380                       
3381       &    answer\_shape(3), &
3382                       
3383       &    answer\_shape(4), &
3384                       
3385       &    answer\_shape(5)  )  &
3386       &  )
3387 
3388     \textcolor{keyword}{allocate}( judge\_rev( &
3389                             &    answer\_shape(1), &
3390                       
3391       &    answer\_shape(2), &
3392                       
3393       &    answer\_shape(3), &
3394                       
3395       &    answer\_shape(4), &
3396                       
3397       &    answer\_shape(5)  )  &
3398       &  )
3399 
3400                       
3401     judge = answer == check
3402 
3403                       
3404 
3405     judge\_rev = .not. judge
3406     err\_flag = any(judge\_rev)
3407     mask\_array = 1
3408     pos = maxloc(mask\_array, judge\_rev)
3409 
3410     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
3411 
3412       wrong = check( &
3413                               &    pos(1), &
3414                       
3415         &    pos(2), &
3416                       
3417         &    pos(3), &
3418                       
3419         &    pos(4), &
3420                       
3421         &    pos(5)  )
3422 
3423       right = answer( &
3424                               &    pos(1), &
3425                       
3426         &    pos(2), &
3427                       
3428         &    pos(3), &
3429                       
3430         &    pos(4), &
3431                       
3432         &    pos(5)  )
3433 
3434                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
3435                       
3436       \textcolor{keyword}{write}(unit=pos\_array(2), fmt=\textcolor{stringliteral}{"(i20)"}) pos(2)
3437                       
3438       \textcolor{keyword}{write}(unit=pos\_array(3), fmt=\textcolor{stringliteral}{"(i20)"}) pos(3)
3439                       
3440       \textcolor{keyword}{write}(unit=pos\_array(4), fmt=\textcolor{stringliteral}{"(i20)"}) pos(4)
3441                       
3442       \textcolor{keyword}{write}(unit=pos\_array(5), fmt=\textcolor{stringliteral}{"(i20)"}) pos(5)
3443                       
3444 
3445       pos\_str = \textcolor{stringliteral}{'('} // &
3446                               &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{','} // &
3447                       
3448         &    trim(adjustl(pos\_array(2))) // \textcolor{stringliteral}{','} // &
3449                       
3450         &    trim(adjustl(pos\_array(3))) // \textcolor{stringliteral}{','} // &
3451                       
3452         &    trim(adjustl(pos\_array(4))) // \textcolor{stringliteral}{','} // &
3453                       
3454         &    trim(adjustl(pos\_array(5))) // \textcolor{stringliteral}{')'}
3455 
3456 \textcolor{keywordflow}{    end if}
3457     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
3458 
3459                     
3460 
3461 
3462     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
3463       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
3464       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
3465       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str) // \textcolor{stringliteral}{'  = '}, wrong
3466       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
3467       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str) // \textcolor{stringliteral}{' = '}, right
3468 
3469       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
3470     \textcolor{keywordflow}{else}
3471       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
3472 \textcolor{keywordflow}{    end if}
3473 
3474 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_a9f012dc079f3ee2e3eb65ecfcf614cb3}\label{interfacedc__test_1_1assertequal_a9f012dc079f3ee2e3eb65ecfcf614cb3}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequalreal5digits@{dctestassertequalreal5digits}}
\index{dctestassertequalreal5digits@{dctestassertequalreal5digits}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequalreal5digits()}{dctestassertequalreal5digits()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequalreal5digits (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{real, dimension(\+:,\+:,\+:,\+:,\+:), intent(in)}]{answer,  }\item[{real, dimension(\+:,\+:,\+:,\+:,\+:), intent(in)}]{check,  }\item[{integer, intent(in)}]{significant\+\_\+digits,  }\item[{integer, intent(in)}]{ignore\+\_\+digits }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 6388 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
6388     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
6389     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
6390     \textcolor{keywordtype}{implicit none}
6391     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
6392     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: answer(:,:,:,:,:)
6393     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: check(:,:,:,:,:)
6394     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: significant\_digits
6395     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: ignore\_digits
6396     \textcolor{keywordtype}{logical}:: err\_flag
6397     \textcolor{keywordtype}{character(STRING)}:: pos\_str
6398     \textcolor{keywordtype}{real}:: wrong, right\_max, right\_min
6399     \textcolor{keywordtype}{character(STRING)}:: pos\_str\_space
6400     \textcolor{keywordtype}{integer}:: pos\_str\_len
6401     \textcolor{keywordtype}{real}:: right\_tmp
6402 
6403                         \textcolor{keywordtype}{integer}:: answer\_shape(5), check\_shape(5), pos(5)
6404     \textcolor{keywordtype}{logical}:: consist\_shape(5)
6405     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(5)
6406     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:,:,:,:,:)
6407     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:,:,:,:,:)
6408     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:,:,:,:,:)
6409     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: answer\_negative(:,:,:,:,:)
6410     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: check\_negative(:,:,:,:,:)
6411     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: both\_negative(:,:,:,:,:)
6412     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{allocatable}:: answer\_max(:,:,:,:,:)
6413     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{allocatable}:: answer\_min(:,:,:,:,:)
6414                     
6415   \textcolor{keywordflow}{continue}
6416     err\_flag = .false.
6417 
6418     \textcolor{keywordflow}{if} ( significant\_digits < 1 ) \textcolor{keywordflow}{then}
6419       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** '}
6420       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Specify a number more than 1 to "significant\_digits"'}
6421       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
6422 \textcolor{keywordflow}{    end if}
6423                     
6424     answer\_shape = shape(answer)
6425     check\_shape = shape(check)
6426 
6427     consist\_shape = answer\_shape == check\_shape
6428 
6429     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
6430       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
6431       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
6432       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
6433       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
6434       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
6435 
6436       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
6437 \textcolor{keywordflow}{    end if}
6438 
6439 
6440     \textcolor{keyword}{allocate}( mask\_array( &
6441                             &    answer\_shape(1), &
6442                       
6443       &    answer\_shape(2), &
6444                       
6445       &    answer\_shape(3), &
6446                       
6447       &    answer\_shape(4), &
6448                       
6449       &    answer\_shape(5)  )  &
6450       &  )
6451 
6452     \textcolor{keyword}{allocate}( judge( &
6453                             &    answer\_shape(1), &
6454                       
6455       &    answer\_shape(2), &
6456                       
6457       &    answer\_shape(3), &
6458                       
6459       &    answer\_shape(4), &
6460                       
6461       &    answer\_shape(5)  )  &
6462       &  )
6463 
6464     \textcolor{keyword}{allocate}( judge\_rev( &
6465                             &    answer\_shape(1), &
6466                       
6467       &    answer\_shape(2), &
6468                       
6469       &    answer\_shape(3), &
6470                       
6471       &    answer\_shape(4), &
6472                       
6473       &    answer\_shape(5)  )  &
6474       &  )
6475 
6476     \textcolor{keyword}{allocate}( answer\_negative( &
6477                             &    answer\_shape(1), &
6478                       
6479       &    answer\_shape(2), &
6480                       
6481       &    answer\_shape(3), &
6482                       
6483       &    answer\_shape(4), &
6484                       
6485       &    answer\_shape(5)  )  &
6486       &  )
6487 
6488     \textcolor{keyword}{allocate}( check\_negative( &
6489                             &    answer\_shape(1), &
6490                       
6491       &    answer\_shape(2), &
6492                       
6493       &    answer\_shape(3), &
6494                       
6495       &    answer\_shape(4), &
6496                       
6497       &    answer\_shape(5)  )  &
6498       &  )
6499 
6500     \textcolor{keyword}{allocate}( both\_negative( &
6501                             &    answer\_shape(1), &
6502                       
6503       &    answer\_shape(2), &
6504                       
6505       &    answer\_shape(3), &
6506                       
6507       &    answer\_shape(4), &
6508                       
6509       &    answer\_shape(5)  )  &
6510       &  )
6511 
6512     \textcolor{keyword}{allocate}( answer\_max( &
6513                             &    answer\_shape(1), &
6514                       
6515       &    answer\_shape(2), &
6516                       
6517       &    answer\_shape(3), &
6518                       
6519       &    answer\_shape(4), &
6520                       
6521       &    answer\_shape(5)  )  &
6522       &  )
6523 
6524     \textcolor{keyword}{allocate}( answer\_min( &
6525                             &    answer\_shape(1), &
6526                       
6527       &    answer\_shape(2), &
6528                       
6529       &    answer\_shape(3), &
6530                       
6531       &    answer\_shape(4), &
6532                       
6533       &    answer\_shape(5)  )  &
6534       &  )
6535 
6536     answer\_negative = answer < 0.0
6537     check\_negative = check < 0.0
6538     both\_negative = answer\_negative .and. check\_negative
6539 
6540     \textcolor{keywordflow}{where} (both\_negative)
6541       answer\_max = &
6542         &   answer &
6543         &   * (   1.0 &
6544         &       - 0.1 ** significant\_digits ) &
6545         & + 0.1 ** (- ignore\_digits)
6546 
6547       answer\_min = &
6548         &   answer &
6549         &   * (   1.0 &
6550         &       + 0.1 ** significant\_digits ) &
6551         & - 0.1 ** (- ignore\_digits)
6552     \textcolor{keywordflow}{elsewhere}
6553       answer\_max = &
6554         &   answer &
6555         &   * (   1.0 &
6556         &       + 0.1 ** significant\_digits ) &
6557         & + 0.1 ** (- ignore\_digits)
6558 
6559       answer\_min = &
6560         &   answer &
6561         &   * (   1.0 &
6562         &       - 0.1 ** significant\_digits ) &
6563         & - 0.1 ** (- ignore\_digits)
6564 \textcolor{keywordflow}{    end where}
6565 
6566     judge = answer\_max > check .and. check > answer\_min
6567     judge\_rev = .not. judge
6568     err\_flag = any(judge\_rev)
6569     mask\_array = 1
6570     pos = maxloc(mask\_array, judge\_rev)
6571 
6572     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
6573 
6574       wrong = check( &
6575                               &    pos(1), &
6576                       
6577         &    pos(2), &
6578                       
6579         &    pos(3), &
6580                       
6581         &    pos(4), &
6582                       
6583         &    pos(5)  )
6584 
6585       right\_max = answer\_max( &
6586                               &    pos(1), &
6587                       
6588         &    pos(2), &
6589                       
6590         &    pos(3), &
6591                       
6592         &    pos(4), &
6593                       
6594         &    pos(5)  )
6595 
6596       right\_min = answer\_min( &
6597                               &    pos(1), &
6598                       
6599         &    pos(2), &
6600                       
6601         &    pos(3), &
6602                       
6603         &    pos(4), &
6604                       
6605         &    pos(5)  )
6606 
6607       \textcolor{keywordflow}{if} ( right\_max < right\_min ) \textcolor{keywordflow}{then}
6608         right\_tmp = right\_max
6609         right\_max = right\_min
6610         right\_min = right\_tmp
6611 \textcolor{keywordflow}{      end if}
6612 
6613                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
6614                       
6615       \textcolor{keyword}{write}(unit=pos\_array(2), fmt=\textcolor{stringliteral}{"(i20)"}) pos(2)
6616                       
6617       \textcolor{keyword}{write}(unit=pos\_array(3), fmt=\textcolor{stringliteral}{"(i20)"}) pos(3)
6618                       
6619       \textcolor{keyword}{write}(unit=pos\_array(4), fmt=\textcolor{stringliteral}{"(i20)"}) pos(4)
6620                       
6621       \textcolor{keyword}{write}(unit=pos\_array(5), fmt=\textcolor{stringliteral}{"(i20)"}) pos(5)
6622                       
6623 
6624       pos\_str = \textcolor{stringliteral}{'('} // &
6625                               &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{','} // &
6626                       
6627         &    trim(adjustl(pos\_array(2))) // \textcolor{stringliteral}{','} // &
6628                       
6629         &    trim(adjustl(pos\_array(3))) // \textcolor{stringliteral}{','} // &
6630                       
6631         &    trim(adjustl(pos\_array(4))) // \textcolor{stringliteral}{','} // &
6632                       
6633         &    trim(adjustl(pos\_array(5))) // \textcolor{stringliteral}{')'}
6634 
6635 \textcolor{keywordflow}{    end if}
6636     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
6637     \textcolor{keyword}{deallocate}(answer\_negative, check\_negative, both\_negative)
6638     \textcolor{keyword}{deallocate}(answer\_max, answer\_min)
6639 
6640                     
6641 
6642     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
6643       pos\_str\_space = \textcolor{stringliteral}{''}
6644       pos\_str\_len = len\_trim(pos\_str)
6645 
6646       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
6647       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
6648       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str)  // \textcolor{stringliteral}{'  = '}, wrong
6649       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
6650       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'        '} // pos\_str\_space(1:pos\_str\_len) &
6651         &                                     // \textcolor{stringliteral}{'   '}, right\_min, \textcolor{stringliteral}{' < '}
6652       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str)  // \textcolor{stringliteral}{' < '}, right\_max
6653 
6654       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
6655     \textcolor{keywordflow}{else}
6656       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
6657 \textcolor{keywordflow}{    end if}
6658 
6659 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_a315b22a1011c9b244020e3022b5ed17b}\label{interfacedc__test_1_1assertequal_a315b22a1011c9b244020e3022b5ed17b}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequalreal6@{dctestassertequalreal6}}
\index{dctestassertequalreal6@{dctestassertequalreal6}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequalreal6()}{dctestassertequalreal6()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequalreal6 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{real, dimension(\+:,\+:,\+:,\+:,\+:,\+:), intent(in)}]{answer,  }\item[{real, dimension(\+:,\+:,\+:,\+:,\+:,\+:), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 3479 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
3479     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
3480     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
3481     \textcolor{keywordtype}{implicit none}
3482     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
3483     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: answer(:,:,:,:,:,:)
3484     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: check(:,:,:,:,:,:)
3485     \textcolor{keywordtype}{logical}:: err\_flag
3486     \textcolor{keywordtype}{character(STRING)}:: pos\_str
3487     \textcolor{keywordtype}{real}:: wrong, right
3488 
3489                         \textcolor{keywordtype}{integer}:: answer\_shape(6), check\_shape(6), pos(6)
3490     \textcolor{keywordtype}{logical}:: consist\_shape(6)
3491     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(6)
3492     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:,:,:,:,:,:)
3493     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:,:,:,:,:,:)
3494     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:,:,:,:,:,:)
3495                     
3496 
3497                     
3498 
3499   \textcolor{keywordflow}{continue}
3500     err\_flag = .false.
3501 
3502                     
3503     answer\_shape = shape(answer)
3504     check\_shape = shape(check)
3505 
3506     consist\_shape = answer\_shape == check\_shape
3507 
3508     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
3509       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
3510       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
3511       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
3512       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
3513       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
3514 
3515       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
3516 \textcolor{keywordflow}{    end if}
3517 
3518 
3519     \textcolor{keyword}{allocate}( mask\_array( &
3520                             &    answer\_shape(1), &
3521                       
3522       &    answer\_shape(2), &
3523                       
3524       &    answer\_shape(3), &
3525                       
3526       &    answer\_shape(4), &
3527                       
3528       &    answer\_shape(5), &
3529                       
3530       &    answer\_shape(6)  )  &
3531       &  )
3532 
3533     \textcolor{keyword}{allocate}( judge( &
3534                             &    answer\_shape(1), &
3535                       
3536       &    answer\_shape(2), &
3537                       
3538       &    answer\_shape(3), &
3539                       
3540       &    answer\_shape(4), &
3541                       
3542       &    answer\_shape(5), &
3543                       
3544       &    answer\_shape(6)  )  &
3545       &  )
3546 
3547     \textcolor{keyword}{allocate}( judge\_rev( &
3548                             &    answer\_shape(1), &
3549                       
3550       &    answer\_shape(2), &
3551                       
3552       &    answer\_shape(3), &
3553                       
3554       &    answer\_shape(4), &
3555                       
3556       &    answer\_shape(5), &
3557                       
3558       &    answer\_shape(6)  )  &
3559       &  )
3560 
3561                       
3562     judge = answer == check
3563 
3564                       
3565 
3566     judge\_rev = .not. judge
3567     err\_flag = any(judge\_rev)
3568     mask\_array = 1
3569     pos = maxloc(mask\_array, judge\_rev)
3570 
3571     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
3572 
3573       wrong = check( &
3574                               &    pos(1), &
3575                       
3576         &    pos(2), &
3577                       
3578         &    pos(3), &
3579                       
3580         &    pos(4), &
3581                       
3582         &    pos(5), &
3583                       
3584         &    pos(6)  )
3585 
3586       right = answer( &
3587                               &    pos(1), &
3588                       
3589         &    pos(2), &
3590                       
3591         &    pos(3), &
3592                       
3593         &    pos(4), &
3594                       
3595         &    pos(5), &
3596                       
3597         &    pos(6)  )
3598 
3599                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
3600                       
3601       \textcolor{keyword}{write}(unit=pos\_array(2), fmt=\textcolor{stringliteral}{"(i20)"}) pos(2)
3602                       
3603       \textcolor{keyword}{write}(unit=pos\_array(3), fmt=\textcolor{stringliteral}{"(i20)"}) pos(3)
3604                       
3605       \textcolor{keyword}{write}(unit=pos\_array(4), fmt=\textcolor{stringliteral}{"(i20)"}) pos(4)
3606                       
3607       \textcolor{keyword}{write}(unit=pos\_array(5), fmt=\textcolor{stringliteral}{"(i20)"}) pos(5)
3608                       
3609       \textcolor{keyword}{write}(unit=pos\_array(6), fmt=\textcolor{stringliteral}{"(i20)"}) pos(6)
3610                       
3611 
3612       pos\_str = \textcolor{stringliteral}{'('} // &
3613                               &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{','} // &
3614                       
3615         &    trim(adjustl(pos\_array(2))) // \textcolor{stringliteral}{','} // &
3616                       
3617         &    trim(adjustl(pos\_array(3))) // \textcolor{stringliteral}{','} // &
3618                       
3619         &    trim(adjustl(pos\_array(4))) // \textcolor{stringliteral}{','} // &
3620                       
3621         &    trim(adjustl(pos\_array(5))) // \textcolor{stringliteral}{','} // &
3622                       
3623         &    trim(adjustl(pos\_array(6))) // \textcolor{stringliteral}{')'}
3624 
3625 \textcolor{keywordflow}{    end if}
3626     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
3627 
3628                     
3629 
3630 
3631     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
3632       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
3633       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
3634       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str) // \textcolor{stringliteral}{'  = '}, wrong
3635       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
3636       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str) // \textcolor{stringliteral}{' = '}, right
3637 
3638       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
3639     \textcolor{keywordflow}{else}
3640       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
3641 \textcolor{keywordflow}{    end if}
3642 
3643 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_ac856556b993824990fa2d3fbea61c237}\label{interfacedc__test_1_1assertequal_ac856556b993824990fa2d3fbea61c237}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequalreal6digits@{dctestassertequalreal6digits}}
\index{dctestassertequalreal6digits@{dctestassertequalreal6digits}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequalreal6digits()}{dctestassertequalreal6digits()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequalreal6digits (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{real, dimension(\+:,\+:,\+:,\+:,\+:,\+:), intent(in)}]{answer,  }\item[{real, dimension(\+:,\+:,\+:,\+:,\+:,\+:), intent(in)}]{check,  }\item[{integer, intent(in)}]{significant\+\_\+digits,  }\item[{integer, intent(in)}]{ignore\+\_\+digits }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 6665 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
6665     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
6666     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
6667     \textcolor{keywordtype}{implicit none}
6668     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
6669     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: answer(:,:,:,:,:,:)
6670     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: check(:,:,:,:,:,:)
6671     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: significant\_digits
6672     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: ignore\_digits
6673     \textcolor{keywordtype}{logical}:: err\_flag
6674     \textcolor{keywordtype}{character(STRING)}:: pos\_str
6675     \textcolor{keywordtype}{real}:: wrong, right\_max, right\_min
6676     \textcolor{keywordtype}{character(STRING)}:: pos\_str\_space
6677     \textcolor{keywordtype}{integer}:: pos\_str\_len
6678     \textcolor{keywordtype}{real}:: right\_tmp
6679 
6680                         \textcolor{keywordtype}{integer}:: answer\_shape(6), check\_shape(6), pos(6)
6681     \textcolor{keywordtype}{logical}:: consist\_shape(6)
6682     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(6)
6683     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:,:,:,:,:,:)
6684     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:,:,:,:,:,:)
6685     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:,:,:,:,:,:)
6686     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: answer\_negative(:,:,:,:,:,:)
6687     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: check\_negative(:,:,:,:,:,:)
6688     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: both\_negative(:,:,:,:,:,:)
6689     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{allocatable}:: answer\_max(:,:,:,:,:,:)
6690     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{allocatable}:: answer\_min(:,:,:,:,:,:)
6691                     
6692   \textcolor{keywordflow}{continue}
6693     err\_flag = .false.
6694 
6695     \textcolor{keywordflow}{if} ( significant\_digits < 1 ) \textcolor{keywordflow}{then}
6696       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** '}
6697       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Specify a number more than 1 to "significant\_digits"'}
6698       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
6699 \textcolor{keywordflow}{    end if}
6700                     
6701     answer\_shape = shape(answer)
6702     check\_shape = shape(check)
6703 
6704     consist\_shape = answer\_shape == check\_shape
6705 
6706     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
6707       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
6708       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
6709       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
6710       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
6711       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
6712 
6713       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
6714 \textcolor{keywordflow}{    end if}
6715 
6716 
6717     \textcolor{keyword}{allocate}( mask\_array( &
6718                             &    answer\_shape(1), &
6719                       
6720       &    answer\_shape(2), &
6721                       
6722       &    answer\_shape(3), &
6723                       
6724       &    answer\_shape(4), &
6725                       
6726       &    answer\_shape(5), &
6727                       
6728       &    answer\_shape(6)  )  &
6729       &  )
6730 
6731     \textcolor{keyword}{allocate}( judge( &
6732                             &    answer\_shape(1), &
6733                       
6734       &    answer\_shape(2), &
6735                       
6736       &    answer\_shape(3), &
6737                       
6738       &    answer\_shape(4), &
6739                       
6740       &    answer\_shape(5), &
6741                       
6742       &    answer\_shape(6)  )  &
6743       &  )
6744 
6745     \textcolor{keyword}{allocate}( judge\_rev( &
6746                             &    answer\_shape(1), &
6747                       
6748       &    answer\_shape(2), &
6749                       
6750       &    answer\_shape(3), &
6751                       
6752       &    answer\_shape(4), &
6753                       
6754       &    answer\_shape(5), &
6755                       
6756       &    answer\_shape(6)  )  &
6757       &  )
6758 
6759     \textcolor{keyword}{allocate}( answer\_negative( &
6760                             &    answer\_shape(1), &
6761                       
6762       &    answer\_shape(2), &
6763                       
6764       &    answer\_shape(3), &
6765                       
6766       &    answer\_shape(4), &
6767                       
6768       &    answer\_shape(5), &
6769                       
6770       &    answer\_shape(6)  )  &
6771       &  )
6772 
6773     \textcolor{keyword}{allocate}( check\_negative( &
6774                             &    answer\_shape(1), &
6775                       
6776       &    answer\_shape(2), &
6777                       
6778       &    answer\_shape(3), &
6779                       
6780       &    answer\_shape(4), &
6781                       
6782       &    answer\_shape(5), &
6783                       
6784       &    answer\_shape(6)  )  &
6785       &  )
6786 
6787     \textcolor{keyword}{allocate}( both\_negative( &
6788                             &    answer\_shape(1), &
6789                       
6790       &    answer\_shape(2), &
6791                       
6792       &    answer\_shape(3), &
6793                       
6794       &    answer\_shape(4), &
6795                       
6796       &    answer\_shape(5), &
6797                       
6798       &    answer\_shape(6)  )  &
6799       &  )
6800 
6801     \textcolor{keyword}{allocate}( answer\_max( &
6802                             &    answer\_shape(1), &
6803                       
6804       &    answer\_shape(2), &
6805                       
6806       &    answer\_shape(3), &
6807                       
6808       &    answer\_shape(4), &
6809                       
6810       &    answer\_shape(5), &
6811                       
6812       &    answer\_shape(6)  )  &
6813       &  )
6814 
6815     \textcolor{keyword}{allocate}( answer\_min( &
6816                             &    answer\_shape(1), &
6817                       
6818       &    answer\_shape(2), &
6819                       
6820       &    answer\_shape(3), &
6821                       
6822       &    answer\_shape(4), &
6823                       
6824       &    answer\_shape(5), &
6825                       
6826       &    answer\_shape(6)  )  &
6827       &  )
6828 
6829     answer\_negative = answer < 0.0
6830     check\_negative = check < 0.0
6831     both\_negative = answer\_negative .and. check\_negative
6832 
6833     \textcolor{keywordflow}{where} (both\_negative)
6834       answer\_max = &
6835         &   answer &
6836         &   * (   1.0 &
6837         &       - 0.1 ** significant\_digits ) &
6838         & + 0.1 ** (- ignore\_digits)
6839 
6840       answer\_min = &
6841         &   answer &
6842         &   * (   1.0 &
6843         &       + 0.1 ** significant\_digits ) &
6844         & - 0.1 ** (- ignore\_digits)
6845     \textcolor{keywordflow}{elsewhere}
6846       answer\_max = &
6847         &   answer &
6848         &   * (   1.0 &
6849         &       + 0.1 ** significant\_digits ) &
6850         & + 0.1 ** (- ignore\_digits)
6851 
6852       answer\_min = &
6853         &   answer &
6854         &   * (   1.0 &
6855         &       - 0.1 ** significant\_digits ) &
6856         & - 0.1 ** (- ignore\_digits)
6857 \textcolor{keywordflow}{    end where}
6858 
6859     judge = answer\_max > check .and. check > answer\_min
6860     judge\_rev = .not. judge
6861     err\_flag = any(judge\_rev)
6862     mask\_array = 1
6863     pos = maxloc(mask\_array, judge\_rev)
6864 
6865     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
6866 
6867       wrong = check( &
6868                               &    pos(1), &
6869                       
6870         &    pos(2), &
6871                       
6872         &    pos(3), &
6873                       
6874         &    pos(4), &
6875                       
6876         &    pos(5), &
6877                       
6878         &    pos(6)  )
6879 
6880       right\_max = answer\_max( &
6881                               &    pos(1), &
6882                       
6883         &    pos(2), &
6884                       
6885         &    pos(3), &
6886                       
6887         &    pos(4), &
6888                       
6889         &    pos(5), &
6890                       
6891         &    pos(6)  )
6892 
6893       right\_min = answer\_min( &
6894                               &    pos(1), &
6895                       
6896         &    pos(2), &
6897                       
6898         &    pos(3), &
6899                       
6900         &    pos(4), &
6901                       
6902         &    pos(5), &
6903                       
6904         &    pos(6)  )
6905 
6906       \textcolor{keywordflow}{if} ( right\_max < right\_min ) \textcolor{keywordflow}{then}
6907         right\_tmp = right\_max
6908         right\_max = right\_min
6909         right\_min = right\_tmp
6910 \textcolor{keywordflow}{      end if}
6911 
6912                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
6913                       
6914       \textcolor{keyword}{write}(unit=pos\_array(2), fmt=\textcolor{stringliteral}{"(i20)"}) pos(2)
6915                       
6916       \textcolor{keyword}{write}(unit=pos\_array(3), fmt=\textcolor{stringliteral}{"(i20)"}) pos(3)
6917                       
6918       \textcolor{keyword}{write}(unit=pos\_array(4), fmt=\textcolor{stringliteral}{"(i20)"}) pos(4)
6919                       
6920       \textcolor{keyword}{write}(unit=pos\_array(5), fmt=\textcolor{stringliteral}{"(i20)"}) pos(5)
6921                       
6922       \textcolor{keyword}{write}(unit=pos\_array(6), fmt=\textcolor{stringliteral}{"(i20)"}) pos(6)
6923                       
6924 
6925       pos\_str = \textcolor{stringliteral}{'('} // &
6926                               &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{','} // &
6927                       
6928         &    trim(adjustl(pos\_array(2))) // \textcolor{stringliteral}{','} // &
6929                       
6930         &    trim(adjustl(pos\_array(3))) // \textcolor{stringliteral}{','} // &
6931                       
6932         &    trim(adjustl(pos\_array(4))) // \textcolor{stringliteral}{','} // &
6933                       
6934         &    trim(adjustl(pos\_array(5))) // \textcolor{stringliteral}{','} // &
6935                       
6936         &    trim(adjustl(pos\_array(6))) // \textcolor{stringliteral}{')'}
6937 
6938 \textcolor{keywordflow}{    end if}
6939     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
6940     \textcolor{keyword}{deallocate}(answer\_negative, check\_negative, both\_negative)
6941     \textcolor{keyword}{deallocate}(answer\_max, answer\_min)
6942 
6943                     
6944 
6945     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
6946       pos\_str\_space = \textcolor{stringliteral}{''}
6947       pos\_str\_len = len\_trim(pos\_str)
6948 
6949       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
6950       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
6951       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str)  // \textcolor{stringliteral}{'  = '}, wrong
6952       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
6953       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'        '} // pos\_str\_space(1:pos\_str\_len) &
6954         &                                     // \textcolor{stringliteral}{'   '}, right\_min, \textcolor{stringliteral}{' < '}
6955       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str)  // \textcolor{stringliteral}{' < '}, right\_max
6956 
6957       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
6958     \textcolor{keywordflow}{else}
6959       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
6960 \textcolor{keywordflow}{    end if}
6961 
6962 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_aba698c89c5a00e3ba1f815aeeb25419c}\label{interfacedc__test_1_1assertequal_aba698c89c5a00e3ba1f815aeeb25419c}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequalreal7@{dctestassertequalreal7}}
\index{dctestassertequalreal7@{dctestassertequalreal7}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequalreal7()}{dctestassertequalreal7()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequalreal7 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{real, dimension(\+:,\+:,\+:,\+:,\+:,\+:,\+:), intent(in)}]{answer,  }\item[{real, dimension(\+:,\+:,\+:,\+:,\+:,\+:,\+:), intent(in)}]{check }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 3648 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
3648     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
3649     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
3650     \textcolor{keywordtype}{implicit none}
3651     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
3652     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: answer(:,:,:,:,:,:,:)
3653     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: check(:,:,:,:,:,:,:)
3654     \textcolor{keywordtype}{logical}:: err\_flag
3655     \textcolor{keywordtype}{character(STRING)}:: pos\_str
3656     \textcolor{keywordtype}{real}:: wrong, right
3657 
3658                         \textcolor{keywordtype}{integer}:: answer\_shape(7), check\_shape(7), pos(7)
3659     \textcolor{keywordtype}{logical}:: consist\_shape(7)
3660     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(7)
3661     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:,:,:,:,:,:,:)
3662     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:,:,:,:,:,:,:)
3663     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:,:,:,:,:,:,:)
3664                     
3665 
3666                     
3667 
3668   \textcolor{keywordflow}{continue}
3669     err\_flag = .false.
3670 
3671                     
3672     answer\_shape = shape(answer)
3673     check\_shape = shape(check)
3674 
3675     consist\_shape = answer\_shape == check\_shape
3676 
3677     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
3678       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
3679       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
3680       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
3681       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
3682       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
3683 
3684       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
3685 \textcolor{keywordflow}{    end if}
3686 
3687 
3688     \textcolor{keyword}{allocate}( mask\_array( &
3689                             &    answer\_shape(1), &
3690                       
3691       &    answer\_shape(2), &
3692                       
3693       &    answer\_shape(3), &
3694                       
3695       &    answer\_shape(4), &
3696                       
3697       &    answer\_shape(5), &
3698                       
3699       &    answer\_shape(6), &
3700                       
3701       &    answer\_shape(7)  )  &
3702       &  )
3703 
3704     \textcolor{keyword}{allocate}( judge( &
3705                             &    answer\_shape(1), &
3706                       
3707       &    answer\_shape(2), &
3708                       
3709       &    answer\_shape(3), &
3710                       
3711       &    answer\_shape(4), &
3712                       
3713       &    answer\_shape(5), &
3714                       
3715       &    answer\_shape(6), &
3716                       
3717       &    answer\_shape(7)  )  &
3718       &  )
3719 
3720     \textcolor{keyword}{allocate}( judge\_rev( &
3721                             &    answer\_shape(1), &
3722                       
3723       &    answer\_shape(2), &
3724                       
3725       &    answer\_shape(3), &
3726                       
3727       &    answer\_shape(4), &
3728                       
3729       &    answer\_shape(5), &
3730                       
3731       &    answer\_shape(6), &
3732                       
3733       &    answer\_shape(7)  )  &
3734       &  )
3735 
3736                       
3737     judge = answer == check
3738 
3739                       
3740 
3741     judge\_rev = .not. judge
3742     err\_flag = any(judge\_rev)
3743     mask\_array = 1
3744     pos = maxloc(mask\_array, judge\_rev)
3745 
3746     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
3747 
3748       wrong = check( &
3749                               &    pos(1), &
3750                       
3751         &    pos(2), &
3752                       
3753         &    pos(3), &
3754                       
3755         &    pos(4), &
3756                       
3757         &    pos(5), &
3758                       
3759         &    pos(6), &
3760                       
3761         &    pos(7)  )
3762 
3763       right = answer( &
3764                               &    pos(1), &
3765                       
3766         &    pos(2), &
3767                       
3768         &    pos(3), &
3769                       
3770         &    pos(4), &
3771                       
3772         &    pos(5), &
3773                       
3774         &    pos(6), &
3775                       
3776         &    pos(7)  )
3777 
3778                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
3779                       
3780       \textcolor{keyword}{write}(unit=pos\_array(2), fmt=\textcolor{stringliteral}{"(i20)"}) pos(2)
3781                       
3782       \textcolor{keyword}{write}(unit=pos\_array(3), fmt=\textcolor{stringliteral}{"(i20)"}) pos(3)
3783                       
3784       \textcolor{keyword}{write}(unit=pos\_array(4), fmt=\textcolor{stringliteral}{"(i20)"}) pos(4)
3785                       
3786       \textcolor{keyword}{write}(unit=pos\_array(5), fmt=\textcolor{stringliteral}{"(i20)"}) pos(5)
3787                       
3788       \textcolor{keyword}{write}(unit=pos\_array(6), fmt=\textcolor{stringliteral}{"(i20)"}) pos(6)
3789                       
3790       \textcolor{keyword}{write}(unit=pos\_array(7), fmt=\textcolor{stringliteral}{"(i20)"}) pos(7)
3791                       
3792 
3793       pos\_str = \textcolor{stringliteral}{'('} // &
3794                               &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{','} // &
3795                       
3796         &    trim(adjustl(pos\_array(2))) // \textcolor{stringliteral}{','} // &
3797                       
3798         &    trim(adjustl(pos\_array(3))) // \textcolor{stringliteral}{','} // &
3799                       
3800         &    trim(adjustl(pos\_array(4))) // \textcolor{stringliteral}{','} // &
3801                       
3802         &    trim(adjustl(pos\_array(5))) // \textcolor{stringliteral}{','} // &
3803                       
3804         &    trim(adjustl(pos\_array(6))) // \textcolor{stringliteral}{','} // &
3805                       
3806         &    trim(adjustl(pos\_array(7))) // \textcolor{stringliteral}{')'}
3807 
3808 \textcolor{keywordflow}{    end if}
3809     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
3810 
3811                     
3812 
3813 
3814     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
3815       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
3816       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
3817       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str) // \textcolor{stringliteral}{'  = '}, wrong
3818       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
3819       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str) // \textcolor{stringliteral}{' = '}, right
3820 
3821       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
3822     \textcolor{keywordflow}{else}
3823       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
3824 \textcolor{keywordflow}{    end if}
3825 
3826 
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__test_1_1assertequal_a0bcd1212eb821b91d84f0d205b0faacf}\label{interfacedc__test_1_1assertequal_a0bcd1212eb821b91d84f0d205b0faacf}} 
\index{dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}!dctestassertequalreal7digits@{dctestassertequalreal7digits}}
\index{dctestassertequalreal7digits@{dctestassertequalreal7digits}!dc\+\_\+test\+::assertequal@{dc\+\_\+test\+::assertequal}}
\subsubsection{\texorpdfstring{dctestassertequalreal7digits()}{dctestassertequalreal7digits()}}
{\footnotesize\ttfamily subroutine dc\+\_\+test\+::assertequal\+::dctestassertequalreal7digits (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{message,  }\item[{real, dimension(\+:,\+:,\+:,\+:,\+:,\+:,\+:), intent(in)}]{answer,  }\item[{real, dimension(\+:,\+:,\+:,\+:,\+:,\+:,\+:), intent(in)}]{check,  }\item[{integer, intent(in)}]{significant\+\_\+digits,  }\item[{integer, intent(in)}]{ignore\+\_\+digits }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 6968 of file dc\+\_\+test.\+f90.


\begin{DoxyCode}
6968     \textcolor{keywordtype}{use }\hyperlink{namespacesysdep}{sysdep}\textcolor{keywordtype}{, only}: \hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}
6969     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}
6970     \textcolor{keywordtype}{implicit none}
6971     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: message
6972     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: answer(:,:,:,:,:,:,:)
6973     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: check(:,:,:,:,:,:,:)
6974     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: significant\_digits
6975     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: ignore\_digits
6976     \textcolor{keywordtype}{logical}:: err\_flag
6977     \textcolor{keywordtype}{character(STRING)}:: pos\_str
6978     \textcolor{keywordtype}{real}:: wrong, right\_max, right\_min
6979     \textcolor{keywordtype}{character(STRING)}:: pos\_str\_space
6980     \textcolor{keywordtype}{integer}:: pos\_str\_len
6981     \textcolor{keywordtype}{real}:: right\_tmp
6982 
6983                         \textcolor{keywordtype}{integer}:: answer\_shape(7), check\_shape(7), pos(7)
6984     \textcolor{keywordtype}{logical}:: consist\_shape(7)
6985     \textcolor{keywordtype}{character(TOKEN)}:: pos\_array(7)
6986     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{allocatable}:: mask\_array(:,:,:,:,:,:,:)
6987     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge(:,:,:,:,:,:,:)
6988     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: judge\_rev(:,:,:,:,:,:,:)
6989     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: answer\_negative(:,:,:,:,:,:,:)
6990     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: check\_negative(:,:,:,:,:,:,:)
6991     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{allocatable}:: both\_negative(:,:,:,:,:,:,:)
6992     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{allocatable}:: answer\_max(:,:,:,:,:,:,:)
6993     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{allocatable}:: answer\_min(:,:,:,:,:,:,:)
6994                     
6995   \textcolor{keywordflow}{continue}
6996     err\_flag = .false.
6997 
6998     \textcolor{keywordflow}{if} ( significant\_digits < 1 ) \textcolor{keywordflow}{then}
6999       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** '}
7000       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Specify a number more than 1 to "significant\_digits"'}
7001       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
7002 \textcolor{keywordflow}{    end if}
7003                     
7004     answer\_shape = shape(answer)
7005     check\_shape = shape(check)
7006 
7007     consist\_shape = answer\_shape == check\_shape
7008 
7009     \textcolor{keywordflow}{if} (.not. all(consist\_shape)) \textcolor{keywordflow}{then}
7010       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
7011       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
7012       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  shape of check is ('}, check\_shape, \textcolor{stringliteral}{')'}
7013       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is INCORRECT'}
7014       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  Correct shape of answer is ('}, answer\_shape, \textcolor{stringliteral}{')'}
7015 
7016       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
7017 \textcolor{keywordflow}{    end if}
7018 
7019 
7020     \textcolor{keyword}{allocate}( mask\_array( &
7021                             &    answer\_shape(1), &
7022                       
7023       &    answer\_shape(2), &
7024                       
7025       &    answer\_shape(3), &
7026                       
7027       &    answer\_shape(4), &
7028                       
7029       &    answer\_shape(5), &
7030                       
7031       &    answer\_shape(6), &
7032                       
7033       &    answer\_shape(7)  )  &
7034       &  )
7035 
7036     \textcolor{keyword}{allocate}( judge( &
7037                             &    answer\_shape(1), &
7038                       
7039       &    answer\_shape(2), &
7040                       
7041       &    answer\_shape(3), &
7042                       
7043       &    answer\_shape(4), &
7044                       
7045       &    answer\_shape(5), &
7046                       
7047       &    answer\_shape(6), &
7048                       
7049       &    answer\_shape(7)  )  &
7050       &  )
7051 
7052     \textcolor{keyword}{allocate}( judge\_rev( &
7053                             &    answer\_shape(1), &
7054                       
7055       &    answer\_shape(2), &
7056                       
7057       &    answer\_shape(3), &
7058                       
7059       &    answer\_shape(4), &
7060                       
7061       &    answer\_shape(5), &
7062                       
7063       &    answer\_shape(6), &
7064                       
7065       &    answer\_shape(7)  )  &
7066       &  )
7067 
7068     \textcolor{keyword}{allocate}( answer\_negative( &
7069                             &    answer\_shape(1), &
7070                       
7071       &    answer\_shape(2), &
7072                       
7073       &    answer\_shape(3), &
7074                       
7075       &    answer\_shape(4), &
7076                       
7077       &    answer\_shape(5), &
7078                       
7079       &    answer\_shape(6), &
7080                       
7081       &    answer\_shape(7)  )  &
7082       &  )
7083 
7084     \textcolor{keyword}{allocate}( check\_negative( &
7085                             &    answer\_shape(1), &
7086                       
7087       &    answer\_shape(2), &
7088                       
7089       &    answer\_shape(3), &
7090                       
7091       &    answer\_shape(4), &
7092                       
7093       &    answer\_shape(5), &
7094                       
7095       &    answer\_shape(6), &
7096                       
7097       &    answer\_shape(7)  )  &
7098       &  )
7099 
7100     \textcolor{keyword}{allocate}( both\_negative( &
7101                             &    answer\_shape(1), &
7102                       
7103       &    answer\_shape(2), &
7104                       
7105       &    answer\_shape(3), &
7106                       
7107       &    answer\_shape(4), &
7108                       
7109       &    answer\_shape(5), &
7110                       
7111       &    answer\_shape(6), &
7112                       
7113       &    answer\_shape(7)  )  &
7114       &  )
7115 
7116     \textcolor{keyword}{allocate}( answer\_max( &
7117                             &    answer\_shape(1), &
7118                       
7119       &    answer\_shape(2), &
7120                       
7121       &    answer\_shape(3), &
7122                       
7123       &    answer\_shape(4), &
7124                       
7125       &    answer\_shape(5), &
7126                       
7127       &    answer\_shape(6), &
7128                       
7129       &    answer\_shape(7)  )  &
7130       &  )
7131 
7132     \textcolor{keyword}{allocate}( answer\_min( &
7133                             &    answer\_shape(1), &
7134                       
7135       &    answer\_shape(2), &
7136                       
7137       &    answer\_shape(3), &
7138                       
7139       &    answer\_shape(4), &
7140                       
7141       &    answer\_shape(5), &
7142                       
7143       &    answer\_shape(6), &
7144                       
7145       &    answer\_shape(7)  )  &
7146       &  )
7147 
7148     answer\_negative = answer < 0.0
7149     check\_negative = check < 0.0
7150     both\_negative = answer\_negative .and. check\_negative
7151 
7152     \textcolor{keywordflow}{where} (both\_negative)
7153       answer\_max = &
7154         &   answer &
7155         &   * (   1.0 &
7156         &       - 0.1 ** significant\_digits ) &
7157         & + 0.1 ** (- ignore\_digits)
7158 
7159       answer\_min = &
7160         &   answer &
7161         &   * (   1.0 &
7162         &       + 0.1 ** significant\_digits ) &
7163         & - 0.1 ** (- ignore\_digits)
7164     \textcolor{keywordflow}{elsewhere}
7165       answer\_max = &
7166         &   answer &
7167         &   * (   1.0 &
7168         &       + 0.1 ** significant\_digits ) &
7169         & + 0.1 ** (- ignore\_digits)
7170 
7171       answer\_min = &
7172         &   answer &
7173         &   * (   1.0 &
7174         &       - 0.1 ** significant\_digits ) &
7175         & - 0.1 ** (- ignore\_digits)
7176 \textcolor{keywordflow}{    end where}
7177 
7178     judge = answer\_max > check .and. check > answer\_min
7179     judge\_rev = .not. judge
7180     err\_flag = any(judge\_rev)
7181     mask\_array = 1
7182     pos = maxloc(mask\_array, judge\_rev)
7183 
7184     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
7185 
7186       wrong = check( &
7187                               &    pos(1), &
7188                       
7189         &    pos(2), &
7190                       
7191         &    pos(3), &
7192                       
7193         &    pos(4), &
7194                       
7195         &    pos(5), &
7196                       
7197         &    pos(6), &
7198                       
7199         &    pos(7)  )
7200 
7201       right\_max = answer\_max( &
7202                               &    pos(1), &
7203                       
7204         &    pos(2), &
7205                       
7206         &    pos(3), &
7207                       
7208         &    pos(4), &
7209                       
7210         &    pos(5), &
7211                       
7212         &    pos(6), &
7213                       
7214         &    pos(7)  )
7215 
7216       right\_min = answer\_min( &
7217                               &    pos(1), &
7218                       
7219         &    pos(2), &
7220                       
7221         &    pos(3), &
7222                       
7223         &    pos(4), &
7224                       
7225         &    pos(5), &
7226                       
7227         &    pos(6), &
7228                       
7229         &    pos(7)  )
7230 
7231       \textcolor{keywordflow}{if} ( right\_max < right\_min ) \textcolor{keywordflow}{then}
7232         right\_tmp = right\_max
7233         right\_max = right\_min
7234         right\_min = right\_tmp
7235 \textcolor{keywordflow}{      end if}
7236 
7237                             \textcolor{keyword}{write}(unit=pos\_array(1), fmt=\textcolor{stringliteral}{"(i20)"}) pos(1)
7238                       
7239       \textcolor{keyword}{write}(unit=pos\_array(2), fmt=\textcolor{stringliteral}{"(i20)"}) pos(2)
7240                       
7241       \textcolor{keyword}{write}(unit=pos\_array(3), fmt=\textcolor{stringliteral}{"(i20)"}) pos(3)
7242                       
7243       \textcolor{keyword}{write}(unit=pos\_array(4), fmt=\textcolor{stringliteral}{"(i20)"}) pos(4)
7244                       
7245       \textcolor{keyword}{write}(unit=pos\_array(5), fmt=\textcolor{stringliteral}{"(i20)"}) pos(5)
7246                       
7247       \textcolor{keyword}{write}(unit=pos\_array(6), fmt=\textcolor{stringliteral}{"(i20)"}) pos(6)
7248                       
7249       \textcolor{keyword}{write}(unit=pos\_array(7), fmt=\textcolor{stringliteral}{"(i20)"}) pos(7)
7250                       
7251 
7252       pos\_str = \textcolor{stringliteral}{'('} // &
7253                               &    trim(adjustl(pos\_array(1))) // \textcolor{stringliteral}{','} // &
7254                       
7255         &    trim(adjustl(pos\_array(2))) // \textcolor{stringliteral}{','} // &
7256                       
7257         &    trim(adjustl(pos\_array(3))) // \textcolor{stringliteral}{','} // &
7258                       
7259         &    trim(adjustl(pos\_array(4))) // \textcolor{stringliteral}{','} // &
7260                       
7261         &    trim(adjustl(pos\_array(5))) // \textcolor{stringliteral}{','} // &
7262                       
7263         &    trim(adjustl(pos\_array(6))) // \textcolor{stringliteral}{','} // &
7264                       
7265         &    trim(adjustl(pos\_array(7))) // \textcolor{stringliteral}{')'}
7266 
7267 \textcolor{keywordflow}{    end if}
7268     \textcolor{keyword}{deallocate}(mask\_array, judge, judge\_rev)
7269     \textcolor{keyword}{deallocate}(answer\_negative, check\_negative, both\_negative)
7270     \textcolor{keyword}{deallocate}(answer\_max, answer\_min)
7271 
7272                     
7273 
7274     \textcolor{keywordflow}{if} (err\_flag) \textcolor{keywordflow}{then}
7275       pos\_str\_space = \textcolor{stringliteral}{''}
7276       pos\_str\_len = len\_trim(pos\_str)
7277 
7278       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** Error [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' FAILURE'}
7279       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{''}
7280       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  check'} // trim(pos\_str)  // \textcolor{stringliteral}{'  = '}, wrong
7281       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'    is NOT EQUAL to'}
7282       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'        '} // pos\_str\_space(1:pos\_str\_len) &
7283         &                                     // \textcolor{stringliteral}{'   '}, right\_min, \textcolor{stringliteral}{' < '}
7284       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{'  answer'} // trim(pos\_str)  // \textcolor{stringliteral}{' < '}, right\_max
7285 
7286       \textcolor{keyword}{call }\hyperlink{interfacesysdep_1_1abortprogram}{abortprogram}(\textcolor{stringliteral}{''})
7287     \textcolor{keywordflow}{else}
7288       \textcolor{keyword}{write}(*,*) \textcolor{stringliteral}{' *** MESSAGE [AssertEQ] *** Checking '} // trim(message) // \textcolor{stringliteral}{' OK'}
7289 \textcolor{keywordflow}{    end if}
7290 
7291 
\end{DoxyCode}


The documentation for this interface was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
dc\+\_\+utils/\hyperlink{dc__test_8f90}{dc\+\_\+test.\+f90}\end{DoxyCompactItemize}
