From efec66466724047c78ca2f1d07f4110df481fe5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Thu, 22 Nov 2018 17:53:39 +0100 Subject: [PATCH] Preprocessor update + corresponding change in parameters derivatives In the *_params_derivs.m files, in the "hp" matrix, the preprocessor now fully outputs the symmetric elements, so getH needs to be adapted. By the way, also clean up code for "rpp" and "gpp", were full symmetric elements were also already present (and therefore do not need to be duplicated in getH). --- matlab/getH.m | 11 ----------- preprocessor | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/matlab/getH.m b/matlab/getH.m index efd53d9d6..895c9dcc4 100644 --- a/matlab/getH.m +++ b/matlab/getH.m @@ -651,7 +651,6 @@ is=is(find(gpp(is,2)==j)); if ~isempty(is) g22(sub2ind([n,n],gpp(is,3),gpp(is,4)))=gpp(is,5)'; - g22(sub2ind([n,n],gpp(is,4),gpp(is,3)))=gpp(is,5)'; end return @@ -675,10 +674,8 @@ for is=1:length(gpp) % indx = find(ic==find(d)); if fsparse g22(sub2ind([m,n],gpp(is,1),gpp(is,2)),sub2ind([npar,npar],gpp(is,3),gpp(is,4)))=gpp(is,5); - g22(sub2ind([m,n],gpp(is,1),gpp(is,2)),sub2ind([npar,npar],gpp(is,4),gpp(is,3)))=gpp(is,5); else g22(gpp(is,1),gpp(is,2),gpp(is,3),gpp(is,4))=gpp(is,5); - g22(gpp(is,1),gpp(is,2),gpp(is,4),gpp(is,3))=gpp(is,5); end end @@ -696,7 +693,6 @@ for is=1:length(rpp) % d(rpp(is,2),rpp(is,3))=1; % indx = find(ic==find(d)); r22(rpp(is,1),rpp(is,2),rpp(is,3))=rpp(is,4); - r22(rpp(is,1),rpp(is,3),rpp(is,2))=rpp(is,4); end return @@ -707,7 +703,6 @@ h2=zeros(r,m,m,npar); for is=1:length(hp) h2(hp(is,1),hp(is,2),hp(is,3),hp(is,4))=hp(is,5); - h2(hp(is,1),hp(is,3),hp(is,2),hp(is,4))=hp(is,5); end return @@ -722,10 +717,4 @@ if ~isempty(is) h2(sub2ind([m,npar],hp(is,3),hp(is,4)))=hp(is,5)'; end -is=is1(find(hp(is1,3)==j)); - -if ~isempty(is) - h2(sub2ind([m,npar],hp(is,2),hp(is,4)))=hp(is,5)'; -end - return \ No newline at end of file diff --git a/preprocessor b/preprocessor index b524e19cd..fc9cc2dc5 160000 --- a/preprocessor +++ b/preprocessor @@ -1 +1 @@ -Subproject commit b524e19cde2e42caa68be41bd573ee76eb6d4cc2 +Subproject commit fc9cc2dc503e2c8b0921b320e041b0d5f49057ab