* ricc_old() removed. Use ricc() instead. 96/9896/2
Sylvestre Ledru [Mon, 3 Dec 2012 13:01:36 +0000 (14:01 +0100)]
Change-Id: I2cd33dcf5a3e1a985d7eedd95cb29d3a3360a0bb

scilab/CHANGES_5.4.X
scilab/modules/cacsd/Makefile.am
scilab/modules/cacsd/Makefile.in
scilab/modules/cacsd/sci_gateway/c/gw_cacsd1.c
scilab/modules/cacsd/sci_gateway/cacsd_gateway.xml
scilab/modules/cacsd/sci_gateway/fortran/sci_f_ricc.f [deleted file]
scilab/modules/cacsd/src/fortran/cacsd_f.vfproj
scilab/modules/cacsd/src/fortran/cacsd_f2c.vcxproj
scilab/modules/cacsd/tests/unit_tests/hinf.dia.ref [new file with mode: 0644]
scilab/modules/cacsd/tests/unit_tests/hinf.tst [new file with mode: 0644]

index cf899bd..56a8390 100644 (file)
@@ -43,6 +43,8 @@ Removed functions
 
 * Function optimsimplex_tostring removed. Use string() instead.
 
+* ricc_old() removed. Use ricc() instead.
+
 
 Xcos
 =====
index fc98d5e..57e4597 100644 (file)
@@ -181,7 +181,6 @@ sci_gateway/fortran/sci_f_sylv.f \
 sci_gateway/fortran/sci_f_ppol.f \
 sci_gateway/fortran/sci_f_freq.f \
 sci_gateway/fortran/sci_f_ldiv.f \
-sci_gateway/fortran/sci_f_ricc.f \
 sci_gateway/fortran/sci_f_sident.f \
 sci_gateway/fortran/sci_f_lyap.f \
 sci_gateway/fortran/sci_f_rtitr.f \
index 8aec9cb..b42275e 100644 (file)
@@ -164,11 +164,11 @@ libscicacsd_algo_la_OBJECTS = $(am_libscicacsd_algo_la_OBJECTS)
 libscicacsd_la_DEPENDENCIES = libscicacsd-algo.la
 am__objects_3 = sci_f_hinf.lo sci_f_zrankqr.lo sci_f_tzer.lo \
        sci_f_residu.lo sci_f_sylv.lo sci_f_ppol.lo sci_f_freq.lo \
-       sci_f_ldiv.lo sci_f_ricc.lo sci_f_sident.lo sci_f_lyap.lo \
-       sci_f_rtitr.lo sci_f_sorder.lo sci_f_mucomp.lo sci_f_ltitr.lo \
-       sci_f_dhinf.lo sci_f_ricc2.lo sci_f_arl2.lo sci_f_gschur.lo \
-       sci_f_ereduc.lo sci_f_findbd.lo sci_f_fstair.lo sci_f_gspec.lo \
-       sci_f_linmeq.lo sci_f_rankqr.lo
+       sci_f_ldiv.lo sci_f_sident.lo sci_f_lyap.lo sci_f_rtitr.lo \
+       sci_f_sorder.lo sci_f_mucomp.lo sci_f_ltitr.lo sci_f_dhinf.lo \
+       sci_f_ricc2.lo sci_f_arl2.lo sci_f_gschur.lo sci_f_ereduc.lo \
+       sci_f_findbd.lo sci_f_fstair.lo sci_f_gspec.lo sci_f_linmeq.lo \
+       sci_f_rankqr.lo
 am__objects_4 = libscicacsd_la-sci_arl2.lo libscicacsd_la-sci_gspec.lo \
        libscicacsd_la-sci_rtitr.lo libscicacsd_la-sci_ereduc.lo \
        libscicacsd_la-sci_ppol.lo libscicacsd_la-sci_tzer.lo \
@@ -647,7 +647,6 @@ sci_gateway/fortran/sci_f_sylv.f \
 sci_gateway/fortran/sci_f_ppol.f \
 sci_gateway/fortran/sci_f_freq.f \
 sci_gateway/fortran/sci_f_ldiv.f \
-sci_gateway/fortran/sci_f_ricc.f \
 sci_gateway/fortran/sci_f_sident.f \
 sci_gateway/fortran/sci_f_lyap.f \
 sci_gateway/fortran/sci_f_rtitr.f \
@@ -1498,9 +1497,6 @@ sci_f_freq.lo: sci_gateway/fortran/sci_f_freq.f
 sci_f_ldiv.lo: sci_gateway/fortran/sci_f_ldiv.f
        $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o sci_f_ldiv.lo `test -f 'sci_gateway/fortran/sci_f_ldiv.f' || echo '$(srcdir)/'`sci_gateway/fortran/sci_f_ldiv.f
 
-sci_f_ricc.lo: sci_gateway/fortran/sci_f_ricc.f
-       $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o sci_f_ricc.lo `test -f 'sci_gateway/fortran/sci_f_ricc.f' || echo '$(srcdir)/'`sci_gateway/fortran/sci_f_ricc.f
-
 sci_f_sident.lo: sci_gateway/fortran/sci_f_sident.f
        $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o sci_f_sident.lo `test -f 'sci_gateway/fortran/sci_f_sident.f' || echo '$(srcdir)/'`sci_gateway/fortran/sci_f_sident.f
 
index e8937a5..64208f6 100644 (file)
@@ -1,11 +1,11 @@
 /*
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) INRIA - Allan CORNET
- * 
+ *
  * This file must be used under the terms of the CeCILL.
  * This source file is licensed as described in the file COPYING, which
  * you should have received as part of this distribution.  The terms
- * are also available at    
+ * are also available at
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  */
 /*--------------------------------------------------------------------------*/
 static gw_generic_table Tab[] =
 {
-       {C2F(scilyap),"lyap"},
-       {C2F(scisylv),"sylv"},
-       {C2F(intricc),"ricc"}
+    {C2F(scilyap), "lyap"},
+    {C2F(scisylv), "sylv"}
 };
 /*--------------------------------------------------------------------------*/
 int gw_cacsd1(void)
-{  
-       if(pvApiCtx == NULL)
-       {
-               pvApiCtx = (StrCtx*)MALLOC(sizeof(StrCtx));
-       }
+{
+    if (pvApiCtx == NULL)
+    {
+        pvApiCtx = (StrCtx*)MALLOC(sizeof(StrCtx));
+    }
 
-       pvApiCtx->pstName = (char*)Tab[Fin-1].name;
-       callFunctionFromGateway(Tab, SIZE_CURRENT_GENERIC_TABLE(Tab));
-       return 0;
+    pvApiCtx->pstName = (char*)Tab[Fin - 1].name;
+    callFunctionFromGateway(Tab, SIZE_CURRENT_GENERIC_TABLE(Tab));
+    return 0;
 }
 /*--------------------------------------------------------------------------*/
index df48f0a..4603f52 100644 (file)
@@ -2,8 +2,8 @@
 
 <!DOCTYPE GATEWAY SYSTEM "../../functions/xml/gateway.dtd">
 <GATEWAY name="cacsd">
-<!-- =================== -->
-<!--
+    <!-- =================== -->
+    <!--
  Scilab
  Interface description. In this file, we define the list of the function which
  will be available into Scilab and the link to the "native" function.
@@ -19,7 +19,7 @@
  ===================
  Don't touch if you do not know what you are doing
 -->
-<!--
+    <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) INRIA - Allan CORNET , Sylvestre LEDRU
  * 
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-
-<!-- =================== -->
-
-<PRIMITIVE gatewayId="8" primitiveId="3" primitiveName="ereduc" />
-<PRIMITIVE gatewayId="8" primitiveId="4" primitiveName="fstair" />
-<PRIMITIVE gatewayId="9" primitiveId="3" primitiveName="ricc_old" />
-<PRIMITIVE gatewayId="10" primitiveId="2" primitiveName="ppol" />
-<PRIMITIVE gatewayId="10" primitiveId="3" primitiveName="tr_zer" />
-<PRIMITIVE gatewayId="10" primitiveId="4" primitiveName="freq" />
-<PRIMITIVE gatewayId="10" primitiveId="5" primitiveName="ltitr" />
-<PRIMITIVE gatewayId="10" primitiveId="6" primitiveName="rtitr" />
-<PRIMITIVE gatewayId="20" primitiveId="1" primitiveName="arl2_ius" />
-<PRIMITIVE gatewayId="20" primitiveId="2" primitiveName="residu" />
-<PRIMITIVE gatewayId="20" primitiveId="3" primitiveName="ldiv" />
-<PRIMITIVE gatewayId="28" primitiveId="1" primitiveName="sident" />
-<PRIMITIVE gatewayId="28" primitiveId="2" primitiveName="sorder" />
-<PRIMITIVE gatewayId="28" primitiveId="3" primitiveName="findBD" />
-<PRIMITIVE gatewayId="28" primitiveId="4" primitiveName="rankqr" />
-<PRIMITIVE gatewayId="28" primitiveId="5" primitiveName="contr" />
-<PRIMITIVE gatewayId="28" primitiveId="6" primitiveName="mucomp" />
-<PRIMITIVE gatewayId="28" primitiveId="7" primitiveName="ricc" />
-<PRIMITIVE gatewayId="28" primitiveId="8" primitiveName="hinf" />
-<PRIMITIVE gatewayId="28" primitiveId="9" primitiveName="dhinf" />
-<PRIMITIVE gatewayId="28" primitiveId="10" primitiveName="linmeq" />
-</GATEWAY>
\ No newline at end of file
+    
+    <!-- =================== -->
+    
+    <PRIMITIVE gatewayId="8" primitiveId="3" primitiveName="ereduc" />
+    <PRIMITIVE gatewayId="8" primitiveId="4" primitiveName="fstair" />
+    <PRIMITIVE gatewayId="10" primitiveId="2" primitiveName="ppol" />
+    <PRIMITIVE gatewayId="10" primitiveId="3" primitiveName="tr_zer" />
+    <PRIMITIVE gatewayId="10" primitiveId="4" primitiveName="freq" />
+    <PRIMITIVE gatewayId="10" primitiveId="5" primitiveName="ltitr" />
+    <PRIMITIVE gatewayId="10" primitiveId="6" primitiveName="rtitr" />
+    <PRIMITIVE gatewayId="20" primitiveId="1" primitiveName="arl2_ius" />
+    <PRIMITIVE gatewayId="20" primitiveId="2" primitiveName="residu" />
+    <PRIMITIVE gatewayId="20" primitiveId="3" primitiveName="ldiv" />
+    <PRIMITIVE gatewayId="28" primitiveId="1" primitiveName="sident" />
+    <PRIMITIVE gatewayId="28" primitiveId="2" primitiveName="sorder" />
+    <PRIMITIVE gatewayId="28" primitiveId="3" primitiveName="findBD" />
+    <PRIMITIVE gatewayId="28" primitiveId="4" primitiveName="rankqr" />
+    <PRIMITIVE gatewayId="28" primitiveId="5" primitiveName="contr" />
+    <PRIMITIVE gatewayId="28" primitiveId="6" primitiveName="mucomp" />
+    <PRIMITIVE gatewayId="28" primitiveId="7" primitiveName="ricc" />
+    <PRIMITIVE gatewayId="28" primitiveId="8" primitiveName="hinf" />
+    <PRIMITIVE gatewayId="28" primitiveId="9" primitiveName="dhinf" />
+    <PRIMITIVE gatewayId="28" primitiveId="10" primitiveName="linmeq" />
+</GATEWAY>
diff --git a/scilab/modules/cacsd/sci_gateway/fortran/sci_f_ricc.f b/scilab/modules/cacsd/sci_gateway/fortran/sci_f_ricc.f
deleted file mode 100644 (file)
index 937ebaf..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-c Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-c Copyright (C) INRIA
-c 
-c This file must be used under the terms of the CeCILL.
-c This source file is licensed as described in the file COPYING, which
-c you should have received as part of this distribution.  The terms
-c are also available at    
-c http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
-
-      subroutine intricc(fname)
-c     equations de  riccati
-
-      include 'stack.h'
-      character*(*) fname
-      integer iadr,sadr
-c
-      double precision eps,rcond
-      integer cont,disc
-      data disc/13/,cont/12/
-c
-      iadr(l)=l+l-1
-      sadr(l)=(l/2)+1
-c
-      eps=stk(leps)
-      lz=lstk(top+1)
-c
-      if(rhs.ne.4) then
-         call error(39)
-         return
-      endif
-      ilcd=iadr(lstk(top))
-      if(istk(ilcd).ne.10) then
-         err=rhs
-         call error(55)
-         return
-      endif
-      icd=abs(istk(ilcd+5+istk(ilcd+1)*istk(ilcd+2)))
-      if(icd.ne.cont .and. icd.ne.disc) then
-         err=rhs
-         call error(36)
-         return
-      endif
-c
-c     second membre
-      top=top-1
-      ic=iadr(lstk(top))
-      if(istk(ic).ne.1) then
-         err=rhs-1
-         call error(53)
-         return
-      endif
-      if(istk(ic+3).ne.0) then
-         err=rhs-1
-         call error(52)
-         return
-      endif
-      mc=istk(ic+1)
-      nc=istk(ic+2)
-      nnc=nc*mc
-      lc=sadr(ic+4)
-      top=top-1
-c
-      err=0
-c
-c    riccati
-c
-  30  continue
-c
-c    a'*x+x*a-x*b*x+c=0
-c
-c         matrice b
-      ib=iadr(lstk(top))
-      if(istk(ib).ne.1) then
-         err=2
-         call error(53)
-         return
-      endif
-      if(istk(ib+3).ne.0) then
-         err=2
-         call error(52)
-         return
-      endif
-      mb=istk(ib+1)
-      nb=istk(ib+2)
-      if(mb.ne.nb) then
-         err=2
-         call error(20)
-         return
-      endif
-      nnb=mb*nb
-      lb=sadr(ib+4)
-c
-      top=top-1
-      ia=iadr(lstk(top))
-      if(istk(ia).ne.1) then
-         err=1
-         call error(53)
-         return
-      endif
-      if(istk(ia+3).ne.0) then
-         err=1
-         call error(52)
-         return
-      endif
-      ma=istk(ia+1)
-      na=istk(ia+2)
-      if(ma.ne.na) then
-         err=1
-         call error(20)
-         return
-      endif
-      nna=na*ma
-      nn=na+na
-      la =sadr(ia+4)
-c
-      if(ma.ne.mb) then
-         call error(42)
-         return
-      endif
-c
-      lw=lz
-      lz=lw+nn*nn
-      lw1=lz+nn*nn
-      lw2=lw1+nn
-      lw3=lw2+nn
-      err=lw3+nn-lstk(bot)
-      if(err.gt.0) then
-         call error(17)
-         return
-      endif
-c
-      if(icd.eq.disc) goto 31
-      call rilac(na,nn,stk(la),na,stk(lc),stk(lb),rcond,stk(la),
-     x           stk(lw),nn,stk(lz),eps,stk(lw3),
-     x           stk(lw1),stk(lw2),err)
-      if(err.ne.0) then
-         call error(24)
-         return
-      endif
-      return
-  31  continue
-      call ricd(na,nn,stk(la),na,stk(lc),stk(lb),rcond,stk(la),
-     x          stk(lw),nn,stk(lz),eps,stk(lw3),
-     x          stk(lw1),stk(lw2),err)
-      if(err.ne.0) then
-         call error(24)
-         return
-      endif
-      return
-      end
index 778d935..bc96d7f 100644 (file)
@@ -191,7 +191,6 @@ lib /DEF:&quot;$(InputDir)core_f_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X6
                <File RelativePath="..\..\sci_gateway\fortran\sci_f_ppol.f"/>
                <File RelativePath="..\..\sci_gateway\fortran\sci_f_rankqr.f"/>
                <File RelativePath="..\..\sci_gateway\fortran\sci_f_residu.f"/>
-               <File RelativePath="..\..\sci_gateway\fortran\sci_f_ricc.f"/>
                <File RelativePath="..\..\sci_gateway\fortran\sci_f_ricc2.f"/>
                <File RelativePath="..\..\sci_gateway\fortran\sci_f_rtitr.f"/>
                <File RelativePath="..\..\sci_gateway\fortran\sci_f_sident.f"/>
index 21d5da5..d1169e9 100644 (file)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
     <ProjectConfiguration Include="Debug|Win32">
@@ -335,7 +335,6 @@ cd ..
     <ClCompile Include="..\..\sci_gateway\fortran\sci_f_ppol.c" />
     <ClCompile Include="..\..\sci_gateway\fortran\sci_f_rankqr.c" />
     <ClCompile Include="..\..\sci_gateway\fortran\sci_f_residu.c" />
-    <ClCompile Include="..\..\sci_gateway\fortran\sci_f_ricc.c" />
     <ClCompile Include="..\..\sci_gateway\fortran\sci_f_ricc2.c" />
     <ClCompile Include="..\..\sci_gateway\fortran\sci_f_rtitr.c" />
     <ClCompile Include="..\..\sci_gateway\fortran\sci_f_sident.c" />
@@ -401,7 +400,6 @@ cd ..
     <f2c_rule Include="..\..\sci_gateway\fortran\sci_f_ppol.f" />
     <f2c_rule Include="..\..\sci_gateway\fortran\sci_f_rankqr.f" />
     <f2c_rule Include="..\..\sci_gateway\fortran\sci_f_residu.f" />
-    <f2c_rule Include="..\..\sci_gateway\fortran\sci_f_ricc.f" />
     <f2c_rule Include="..\..\sci_gateway\fortran\sci_f_ricc2.f" />
     <f2c_rule Include="..\..\sci_gateway\fortran\sci_f_rtitr.f" />
     <f2c_rule Include="..\..\sci_gateway\fortran\sci_f_sident.f" />
@@ -444,4 +442,4 @@ cd ..
   <ImportGroup Label="ExtensionTargets">
     <Import Project="..\..\..\..\Visual-Studio-settings\f2c.targets" />
   </ImportGroup>
-</Project>
\ No newline at end of file
+</Project>
diff --git a/scilab/modules/cacsd/tests/unit_tests/hinf.dia.ref b/scilab/modules/cacsd/tests/unit_tests/hinf.dia.ref
new file mode 100644 (file)
index 0000000..b0f625a
--- /dev/null
@@ -0,0 +1,47 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2012 - SE - Sylvestre Ledru
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+A=[-1  0  4  5 -3 -2
+   -2  4 -7 -2  0  3
+   -6  9 -5  0  2 -1
+   -8  4  7 -1 -3  0
+    2  5  8 -9  1 -4
+    3 -5  8  0  2 -6];
+B=[-3 -4 -2  1  0
+    2  0  1 -5  2
+   -5 -7  0  7 -2
+    4 -6  1  1 -2
+   -3  9 -8  0  5
+    1 -2  3 -6 -2];
+C=[ 1 -1  2 -4  0 -3
+   -3  0  5 -1  1  1
+   -7  5  0 -8  2 -2
+    9 -3  4  0  3  7
+    0  1 -2  1 -6 -2];
+D=[ 1 -2 -3  0  0
+    0  4  0  1  0
+    5 -3 -4  0  1
+    0  1  0  1 -3
+    0  0  1  7  1];
+Gamma=10.18425636157899;
+[AK,BK,CK,DK] = hinf(A,B,C,D,2,2,Gamma);
+assert_checkalmostequal(DK,[0.0551858,0.1333855; -0.3195369,0.0333464], 1.e-6 );
+CK_Ref = [-1694955,9282226.3,7644816,3695418.1,4551537.9,3956434.1;-35560237,1.947D+08,1.604D+08,77530062,95491495,83006200];
+assert_checkalmostequal(CK,CK_Ref, 1.e-3 );
+AK_Ref = [-6.112D+08,3.347D+09,2.757D+09,1.333D+09,1.641D+09,1.427D+09;
+-2.162D+08,1.184D+09,9.749D+08,4.713D+08,5.805D+08,5.046D+08;
+-6.636D+08,3.634D+09,2.993D+09,1.447D+09,1.782D+09,1.549D+09;
+-2.619D+08,1.434D+09,1.181D+09,5.711D+08,7.034D+08,6.114D+08;
+-9.297D+08,5.092D+09,4.193D+09,2.027D+09,2.497D+09,2.170D+09;
+2.313D+08,-1.267D+09,-1.043D+09,-5.043D+08,-6.211D+08,-5.399D+08];
+assert_checkalmostequal(AK,AK_Ref, 1.e-3 );
+BK_Ref=[-0.2224538,-0.1084738;
+-0.8518108,-0.6521262;
+0.8172727,0.5793501;
+0.0843421,0.0100477;
+-0.5631929,-0.2478528;
+0.0067885,-0.7619229];
+assert_checkalmostequal(BK,BK_Ref, 1.e-5 );
diff --git a/scilab/modules/cacsd/tests/unit_tests/hinf.tst b/scilab/modules/cacsd/tests/unit_tests/hinf.tst
new file mode 100644 (file)
index 0000000..af2d485
--- /dev/null
@@ -0,0 +1,56 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2012 - SE - Sylvestre Ledru
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+
+A=[-1  0  4  5 -3 -2
+   -2  4 -7 -2  0  3
+   -6  9 -5  0  2 -1
+   -8  4  7 -1 -3  0
+    2  5  8 -9  1 -4
+    3 -5  8  0  2 -6];
+
+B=[-3 -4 -2  1  0
+    2  0  1 -5  2
+   -5 -7  0  7 -2
+    4 -6  1  1 -2
+   -3  9 -8  0  5
+    1 -2  3 -6 -2];
+
+C=[ 1 -1  2 -4  0 -3
+   -3  0  5 -1  1  1
+   -7  5  0 -8  2 -2
+    9 -3  4  0  3  7
+    0  1 -2  1 -6 -2];
+
+D=[ 1 -2 -3  0  0
+    0  4  0  1  0
+    5 -3 -4  0  1
+    0  1  0  1 -3
+    0  0  1  7  1];
+Gamma=10.18425636157899;
+[AK,BK,CK,DK] = hinf(A,B,C,D,2,2,Gamma);
+
+assert_checkalmostequal(DK,[0.0551858,0.1333855; -0.3195369,0.0333464], 1.e-6 );
+
+CK_Ref = [-1694955,9282226.3,7644816,3695418.1,4551537.9,3956434.1;-35560237,1.947D+08,1.604D+08,77530062,95491495,83006200];
+assert_checkalmostequal(CK,CK_Ref, 1.e-3 );
+
+AK_Ref = [-6.112D+08,3.347D+09,2.757D+09,1.333D+09,1.641D+09,1.427D+09;
+-2.162D+08,1.184D+09,9.749D+08,4.713D+08,5.805D+08,5.046D+08;
+-6.636D+08,3.634D+09,2.993D+09,1.447D+09,1.782D+09,1.549D+09;
+-2.619D+08,1.434D+09,1.181D+09,5.711D+08,7.034D+08,6.114D+08;
+-9.297D+08,5.092D+09,4.193D+09,2.027D+09,2.497D+09,2.170D+09;
+2.313D+08,-1.267D+09,-1.043D+09,-5.043D+08,-6.211D+08,-5.399D+08];
+assert_checkalmostequal(AK,AK_Ref, 1.e-3 );
+
+BK_Ref=[-0.2224538,-0.1084738;
+-0.8518108,-0.6521262;
+0.8172727,0.5793501;
+0.0843421,0.0100477;
+-0.5631929,-0.2478528;
+0.0067885,-0.7619229];
+assert_checkalmostequal(BK,BK_Ref, 1.e-5 );