Skip to content

Commit

Permalink
"expanded the use of multistages.f"
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhondtguido committed Dec 19, 2023
1 parent 2966848 commit 38b8d67
Show file tree
Hide file tree
Showing 11 changed files with 510 additions and 406 deletions.
2 changes: 2 additions & 0 deletions LOGBOOK
Original file line number Diff line number Diff line change
Expand Up @@ -5319,3 +5319,5 @@ Dec 2002 - started to work on single crystal plasticity

13 Dec 2023 - worked on branch elements (type LPBR and REBR)

19 Dec 2023 - expanded the use of multistages.f (difference of
adjacent sector sizes can be arbitrary now)
10 changes: 5 additions & 5 deletions src/CalculiX.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ int main(int argc,char *argv[])
nprop,itpamp,iviewfile,nkold,nevdamp_,npt_,cyclicsymmetry,
nmethodl,iaxial,inext,icontact,nobject,nobject_,iit,
nzsprevstep[3],memmpcref_,mpcfreeref,maxlenmpcref,*nodempcref=NULL,
*ikmpcref=NULL,isens,namtot,nstam,ndamp,nef,inp_size,
*ikmpcref=NULL,isens,namtot,nstam,ndamp,nef,inp_size,maxsectors_,
*ipoinp_sav=NULL,*inp_sav=NULL,irefineloop=0,icoordinate=0,
*nodedesi=NULL,ndesi=0,nobjectstart=0,nfc_,ndc_,nfc,ndc,*ikdc=NULL;

Expand Down Expand Up @@ -158,7 +158,7 @@ int main(int argc,char *argv[])
printf("software, and you are welcome to redistribute it under\n");
printf("certain conditions, see gpl.htm\n\n");
printf("************************************************************\n\n");
printf("You are using an executable made on Wed Dec 13 19:56:42 CET 2023\n");
printf("You are using an executable made on Tue Dec 19 19:23:28 CET 2023\n");
fflush(stdout);

NNEW(ipoinp,ITG,2*nentries);
Expand Down Expand Up @@ -205,7 +205,7 @@ int main(int argc,char *argv[])
&mortar,&ifacecount,&nintpoint,infree,&nheading_,
&nobject_,iuel,&iprestr,&nstam,&ndamp,&nef,&nbounold,
&nforcold,&nloadold,&nbodyold,&mpcend,irobustdesign,
&nfc_,&ndc_));
&nfc_,&ndc_,&maxsectors_));

SFREE(meminset);SFREE(rmeminset);mt=mi[1]+1;
NNEW(heading,char,66*nheading_);
Expand Down Expand Up @@ -451,7 +451,7 @@ int main(int argc,char *argv[])
if(ntie_>0){
NNEW(tieset,char,243*ntie_);
NNEW(tietol,double,4*ntie_);
NNEW(cs,double,17*ntie_);
NNEW(cs,double,17*ntie_*maxsectors_);
}

/* objectives for sensitivity analysis */
Expand Down Expand Up @@ -1701,7 +1701,7 @@ int main(int argc,char *argv[])
&mortar,&ifacecount,&nintpoint,infree,&nheading_,
&nobject_,iuel,&iprestr,&nstam,&ndamp,&nef,
&nbounold,&nforcold,&nloadold,&nbodyold,&mpcend,
irobustdesign,&nfc_,&ndc_));
irobustdesign,&nfc_,&ndc_,&maxsectors_));

SFREE(meminset);SFREE(rmeminset);mt=mi[1]+1;
NNEW(heading,char,66*nheading_);
Expand Down
2 changes: 1 addition & 1 deletion src/CalculiX.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ void FORTRAN(allocation,(ITG *nload_,ITG *nforc_,ITG *nboun_,
ITG *iuel,ITG *iprestr,ITG *nstam,ITG *ndamp,ITG *nef,
ITG *nbounold,ITG *nforcold,ITG *nloadold,
ITG *nbodyold,ITG *mpcend,ITG *irobustdesign,
ITG *nfc_,ITG *ndc_));
ITG *nfc_,ITG *ndc_,ITG *maxsectors_));

void FORTRAN(allocation_rfn,(ITG *nk_,ITG *ne_,ITG *nkon_,ITG *ipoinp,
ITG *ipoinpc,char *inpc,ITG *inp));
Expand Down
10 changes: 5 additions & 5 deletions src/CalculiXstep.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ void CalculiXstep(int argc,char argv[][133],ITG **nelemloadp,double **xloadp,
nprop,itpamp,iviewfile,nkold,nevdamp_,npt_,cyclicsymmetry,
nmethodl,iaxial,inext,icontact,nobject,nobject_,iit,
nzsprevstep[3],memmpcref_,mpcfreeref,maxlenmpcref,*nodempcref=NULL,
*ikmpcref=NULL,isens,namtot,nstam,ndamp,nef,inp_size,
*ikmpcref=NULL,isens,namtot,nstam,ndamp,nef,inp_size,maxsectors_,
*ipoinp_sav=NULL,*inp_sav=NULL,irefineloop=0,icoordinate=0,
*nodedesi=NULL,ndesi=0,nobjectstart=0,nfc_,ndc_,nfc,ndc,*ikdc=NULL;

Expand Down Expand Up @@ -301,7 +301,7 @@ void CalculiXstep(int argc,char argv[][133],ITG **nelemloadp,double **xloadp,
printf("software, and you are welcome to redistribute it under\n");
printf("certain conditions, see gpl.htm\n\n");
printf("************************************************************\n\n");
printf("You are using an executable made on Wed Dec 13 19:56:42 CET 2023\n");
printf("You are using an executable made on Tue Dec 19 19:23:28 CET 2023\n");
fflush(stdout);

NNEW(ipoinp,ITG,2*nentries);
Expand Down Expand Up @@ -348,7 +348,7 @@ void CalculiXstep(int argc,char argv[][133],ITG **nelemloadp,double **xloadp,
&mortar,&ifacecount,&nintpoint,infree,&nheading_,
&nobject_,iuel,&iprestr,&nstam,&ndamp,&nef,&nbounold,
&nforcold,&nloadold,&nbodyold,&mpcend,irobustdesign,
&nfc_,&ndc_));
&nfc_,&ndc_,&maxsectors_));

SFREE(meminset);SFREE(rmeminset);mt=mi[1]+1;
NNEW(heading,char,66*nheading_);
Expand Down Expand Up @@ -603,7 +603,7 @@ void CalculiXstep(int argc,char argv[][133],ITG **nelemloadp,double **xloadp,
if(ntie_>0){
NNEW(tieset,char,243*ntie_);
NNEW(tietol,double,4*ntie_);
NNEW(cs,double,17*ntie_);
NNEW(cs,double,17*ntie_*maxsectors_);
}

/* objectives for sensitivity analysis */
Expand Down Expand Up @@ -1846,7 +1846,7 @@ void CalculiXstep(int argc,char argv[][133],ITG **nelemloadp,double **xloadp,
&mortar,&ifacecount,&nintpoint,infree,&nheading_,
&nobject_,iuel,&iprestr,&nstam,&ndamp,&nef,
&nbounold,&nforcold,&nloadold,&nbodyold,&mpcend,
irobustdesign,&nfc_,&ndc_));
irobustdesign,&nfc_,&ndc_,&maxsectors_));

SFREE(meminset);SFREE(rmeminset);mt=mi[1]+1;
NNEW(heading,char,66*nheading_);
Expand Down
20 changes: 17 additions & 3 deletions src/allocation.f
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ subroutine allocation(nload_,nforc_,nboun_,nk_,ne_,nmpc_,
& ntie_,nbody_,nprop_,ipoinpc,nevdamp_,npt_,nslavs,nkon_,mcs,
& mortar,ifacecount,nintpoint,infree,nheading_,nobject_,
& iuel,iprestr,nstam,ndamp,nef,nbounold,nforcold,nloadold,
& nbodyold,mpcend,irobustdesign,nfc_,ndc_)
& nbodyold,mpcend,irobustdesign,nfc_,ndc_,maxsectors_)
!
! calculates a conservative estimate of the size of the
! fields to be allocated
Expand Down Expand Up @@ -63,12 +63,12 @@ subroutine allocation(nload_,nforc_,nboun_,nk_,ne_,nmpc_,
& iposs,iposm,nslavs,nlayer,nkon_,nopeexp,iremove,mcs,
& ifacecount,nintpoint,mortar,infree(4),nheading_,icfd,
& multslav,multmast,nobject_,numnodes,iorientation,id,
& nuel,iuel(4,*),number,four,
& nuel,iuel(4,*),number,four,maxsectors_,
& iprestr,nstam,ier,ndamp,nef,nbounold,nforcold,nloadold,
& nbodyold,mpcend,irobustdesign(3),iflag,network,
& nsubmodel,nfc_,ndc_
!
real*8 temperature,tempact,xfreq,tpinc,tpmin,tpmax
real*8 temperature,tempact,xfreq,tpinc,tpmin,tpmax,xsectors
!
parameter(nentries=19)
!
Expand All @@ -84,6 +84,7 @@ subroutine allocation(nload_,nforc_,nboun_,nk_,ne_,nmpc_,
icfd=-1
!
ier=0
maxsectors_=1
!
! in the presence of mechanical steps the highest number
! of DOF is at least 3
Expand Down Expand Up @@ -489,6 +490,19 @@ subroutine allocation(nload_,nforc_,nboun_,nk_,ne_,nmpc_,
nmpc_=nmpc_+(mi(2)+1)*ncs_
memmpc_=memmpc_+25*(mi(2)+1)*ncs_
ntrans_=ntrans_+1
do i=2,n
if(textpart(i)(1:2).eq.'N=') then
read(textpart(i)(3:22),'(f20.0)',iostat=istat) xsectors
if(istat.gt.0) then
call inputerror(inpc,ipoinpc,iline,
& "*CYCLIC SYMMETRY MODEL%",ier)
xsectors=0
exit
endif
endif
enddo
maxsectors_=max(maxsectors_,int(xsectors)+1)
!
do
call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
& ipoinp,inp,ipoinpc)
Expand Down
2 changes: 1 addition & 1 deletion src/calinput.f
Original file line number Diff line number Diff line change
Expand Up @@ -1344,7 +1344,7 @@ subroutine calinput(co,nk,kon,ipkon,lakon,nkon,
& dcs(4*ncs_+1),dcs(6*ncs_+1),dcs(8*ncs_+1),dcs(10*ncs_+1),
& ics(3*ncs_+1),ics(5*ncs_+1),ics(7*ncs_+1),ics(8*ncs_+1),
& dcs(12*ncs_+1),ne,ipkon,kon,lakon,ics(14*ncs_+1),
& ics(16*ncs_+1),ics(18*ncs_+1),jobnamec)
& ics(16*ncs_+1),ics(18*ncs_+1),jobnamec,nmethod)
!
infree(1)=ixfree
infree(2)=ikfree
Expand Down
2 changes: 1 addition & 1 deletion src/frd.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ void frd(double *co,ITG *nk,ITG *kon,ITG *ipkon,char *lakon,ITG *ne0,
fprintf(f1,"%5sUHOST \n",p1);
fprintf(f1,"%5sUPGM CalculiX \n",p1);
fprintf(f1,"%5sUVERSION Version DEVELOPMENT \n",p1);
fprintf(f1,"%5sUCOMPILETIME Wed Dec 13 19:56:42 CET 2023 \n",p1);
fprintf(f1,"%5sUCOMPILETIME Tue Dec 19 19:23:28 CET 2023 \n",p1);
fprintf(f1,"%5sUDIR \n",p1);
fprintf(f1,"%5sUDBN \n",p1);

Expand Down
Loading

0 comments on commit 38b8d67

Please sign in to comment.