From 6eeaf17aacff47e7e8ea3b8b1c629e5d6f9e11b2 Mon Sep 17 00:00:00 2001 From: Kyle Davis Date: Wed, 16 Nov 2022 17:27:43 +0100 Subject: [PATCH] Update for CalculiX v2.20 (#109) --- .github/workflows/ubuntu_build.yml | 14 +- CalculiX.h | 299 ++++++++----- Makefile | 2 +- Makefile_i8_PaStiX | 14 +- README.md | 2 +- ccx_2.19.c => ccx_2.20.c | 244 +++++------ dyna_precice.c | 102 ++--- nonlingeo_precice.c | 396 ++++++++++-------- .../DEBIAN/control | 2 +- .../usr/share/doc/calculix-precice2/copyright | 0 packaging/changelog.Debian | 1 - packaging/make_deb.sh | 2 +- pastix_pre_build.sh | 4 +- 13 files changed, 599 insertions(+), 483 deletions(-) rename ccx_2.19.c => ccx_2.20.c (90%) rename packaging/{calculix-precice2_2.19.0-1_amd64 => calculix-precice2_2.20.0-1_amd64}/DEBIAN/control (97%) rename packaging/{calculix-precice2_2.19.0-1_amd64 => calculix-precice2_2.20.0-1_amd64}/usr/share/doc/calculix-precice2/copyright (100%) diff --git a/.github/workflows/ubuntu_build.yml b/.github/workflows/ubuntu_build.yml index a44f231..e31ad65 100644 --- a/.github/workflows/ubuntu_build.yml +++ b/.github/workflows/ubuntu_build.yml @@ -1,4 +1,4 @@ -name: Calculix 2.19 with preCICE adapter test build +name: Calculix 2.20 with preCICE adapter test build on: [push, pull_request] @@ -18,7 +18,7 @@ jobs: runs-on: ${{matrix.os}} continue-on-error: true env: # Versioning is "calculix-preciceX_2.YY-Z[...]" with X the major preCICE version, YY the minor CCX version and Z the package version - PACKAGE_NAME: "calculix-precice2_2.19.0-1_amd64" + PACKAGE_NAME: "calculix-precice2_2.20.0-1_amd64" steps: - name: Update system @@ -32,19 +32,19 @@ jobs: - name: install dependencies run: sudo apt install libarpack2-dev libspooles-dev libyaml-cpp-dev -y - name: Download CalculiX - run: wget http://www.dhondt.de/ccx_2.19.src.tar.bz2 + run: wget http://www.dhondt.de/ccx_2.20.src.tar.bz2 - name: Unpack Calculix - run: tar -xjf ccx_2.19.src.tar.bz2 + run: tar -xjf ccx_2.20.src.tar.bz2 - name: make - run: make -j 4 CCX="./CalculiX/ccx_2.19/src" ADDITIONAL_FFLAGS="${{matrix.flags}}" + run: make -j 4 CCX="./CalculiX/ccx_2.20/src" ADDITIONAL_FFLAGS="${{matrix.flags}}" - name: Test run run: ./bin/ccx_preCICE -h - name: Download tools for packaging run: sudo apt install lintian pandoc -y - name: Create Debian Package run: | - mkdir -p "packaging/calculix-precice2_2.19.0-1_amd64/usr/bin" && - cp ./bin/ccx_preCICE ./packaging/calculix-precice2_2.19.0-1_amd64/usr/bin/ccx_preCICE && + mkdir -p "packaging/calculix-precice2_2.20.0-1_amd64/usr/bin" && + cp ./bin/ccx_preCICE ./packaging/calculix-precice2_2.20.0-1_amd64/usr/bin/ccx_preCICE && cd packaging && pwd && bash ./make_deb.sh ${{matrix.name}} - name: Store Debian package artifact uses: actions/upload-artifact@v2 diff --git a/CalculiX.h b/CalculiX.h index 3bd3d3c..e069de0 100644 --- a/CalculiX.h +++ b/CalculiX.h @@ -1,5 +1,5 @@ /* CALCULIX - A 3-dimensional finite element program */ -/* Copyright (C) 1998-2021 Guido Dhondt */ +/* Copyright (C) 1998-2022 Guido Dhondt */ /* This program is free software; you can redistribute it and/or */ /* modify it under the terms of the GNU General Public License as */ @@ -140,6 +140,8 @@ void FORTRAN(adjustcontactnodes, (char *tieset, ITG *ntie, ITG *itietri, double double *clearslavnode, ITG *itiefac, ITG *ipkon, ITG *kon, char *lakon, ITG *islavsurf)); +void *addmt(ITG *i); + void FORTRAN(addshell, (ITG * nactdof, ITG *node, double *b, ITG *mi, ITG *iperturb, ITG *nmethod, double *cam, double *v)); @@ -170,17 +172,20 @@ void FORTRAN(allocont, (ITG * ncont, ITG *ntie, char *tieset, ITG *nset, char *lakon, ITG *ncone, double *tietol, ITG *ismallsliding, char *kind1, char *kind2, ITG *mortar, ITG *istep)); -void FORTRAN(applybounfem, (ITG * nodeboun, ITG *ndirboun, ITG *nboun, - double *xbounact, ITG *ithermal, ITG *nk, - double *vold, ITG *isolidsurf, - ITG *nsolidsurf, double *xsolidsurf, ITG *nfreestream, ITG *ifreestream, - ITG *turbulent, double *vcon, double *shcon, ITG *nshcon, - double *rhcon, ITG *nrhcon, ITG *ntmat_, double *physcon, - double *v, ITG *compressible, ITG *nmpc, ITG *nodempc, - ITG *ipompc, double *coefmpc, ITG *inomat, ITG *mi, - ITG *ilboun, ITG *ilmpc, char *labmpc, - double *coefmodmpc, ITG *ifreesurface, ITG *ierr, double *dgravity, - double *depth, ITG *iexplicit)); +void FORTRAN(applybounfem, (ITG * nodeboun, ITG *ndirboun, + double *xbounact, ITG *nk, double *vold, + ITG *isolidsurf, double *xsolidsurf, + ITG *ifreestream, ITG *turbulent, + double *vcon, double *shcon, ITG *nshcon, ITG *ntmat_, + double *physcon, double *v, ITG *compressible, + ITG *nodempc, ITG *ipompc, double *coefmpc, + ITG *inomat, ITG *mi, ITG *ilboun, ITG *ilmpc, + char *labmpc, double *coefmodmpc, ITG *iexplicit, + ITG *nbouna, ITG *nbounb, ITG *nmpca, ITG *nmmpb, + ITG *nfreestreama, ITG *nfreestreamb, + ITG *nsolidsurfa, ITG *nsolidsurfb)); + +void *applybounfemmt(ITG *i); void FORTRAN(applybounp, (ITG * nodeboun, ITG *ndirboun, ITG *nboun, double *xbounact, ITG *nk, double *vold, double *v, @@ -316,11 +321,11 @@ void FORTRAN(assigndomtonodes, (ITG * ne, char *lakon, ITG *ipkon, ITG *kon, ITG *mi, ITG *ne2)); void FORTRAN(auglag_inclusion, (double *gcontfull, double *cvec, ITG *nacti, - ITG *iacti, ITG *ncdim, double *mufric, double *atol, - double *rtol, double *pkglob, ITG *kitermax, + ITG *iacti, double *mufric, double *atol, + double *rtol, double *alglob, ITG *kitermax, double *auw, ITG *jqw, ITG *iroww, - ITG *nslavs, double *pkvec, double *pkvecnew, - double *eps_al)); + ITG *nslavs, double *al, double *alnew, + double *eps_al, double *omega)); void FORTRAN(autocovmatrix, (double *co, double *ad, double *au, ITG *jqs, ITG *irows, ITG *ndesi, ITG *nodedesi, double *corrlen, @@ -359,6 +364,12 @@ void FORTRAN(calcdatarget, (ITG * ifront, double *co, ITG *nnfront, double *tinc, double *datarget, double *acrack, ITG *nstep)); +void FORTRAN(calcdev, (double *vold, double *vcon, double *v, ITG *nk, + ITG *iturbulent, ITG *mi, double *vconmax, + double *vmax, ITG *iexplicit, ITG *nka, ITG *nkb)); + +void *calcdevmt(ITG *i); + void FORTRAN(calcenergy, (ITG * ipkon, char *lakon, ITG *kon, double *co, double *ener, ITG *mi, ITG *ne, double *thicke, ITG * ielmat, @@ -419,20 +430,27 @@ void calcshapef(ITG *nvar_, ITG *ipvar, double **var, ITG *ne, ITG *iturbulent, double *yy); void FORTRAN(calcstabletimeinccont, (ITG * ne, char *lakon, ITG *kon, ITG *ipkon, - ITG *mi, ITG *ielmat, double *elcon, ITG *mortar, double *adb, - double *alpha, ITG *nactdof, double *springarea, ITG *ne0, - ITG *ntmat_, ITG *ncmat_, double *dtcont, double *smscale, - double *dtset, ITG *mscalmethod)); + ITG *mi, ITG *ielmat, double *elcon, + ITG *mortar, double *adb, double *alpha, + ITG *nactdof, double *springarea, ITG *ne0, + ITG *ntmat_, ITG *ncmat_, double *dtcont, + double *smscale, double *dtset, + ITG *mscalmethod)); void FORTRAN(calcstabletimeincvol, (ITG * ne0, double *elcon, ITG *nelcon, - double *rhcon, ITG *nrhcon, double *alcon, ITG *nalcon, double *orab, - ITG *ntmat_, ITG *ithermal, double *alzero, double *plicon, - ITG *nplicon, double *plkcon, ITG *nplkcon, ITG *npmat_, ITG *mi, - double *dtime, double *xstiff, ITG *ncmat_, double *vold, ITG *ielmat, - double *t0, double *t1, char *matname, char *lakon, - double *xmatwavespeed, ITG *nmat, ITG *ipkon, double *co, ITG *kon, - double *dtvol, double *alpha, double *smscale, double *dtset, - ITG *mscalmethod)); + double *rhcon, ITG *nrhcon, double *alcon, + ITG *nalcon, double *orab, ITG *ntmat_, + ITG *ithermal, double *alzero, double *plicon, + ITG *nplicon, double *plkcon, ITG *nplkcon, + ITG *npmat_, ITG *mi, double *dtime, + double *xstiff, ITG *ncmat_, double *vold, + ITG *ielmat, double *t0, double *t1, + char *matname, char *lakon, + double *xmatwavespeed, ITG *nmat, ITG *ipkon, + double *co, ITG *kon, double *dtvol, + double *alpha, double *smscale, double *dtset, + ITG *mscalmethod, ITG *mortar, + char *jobnamef)); void FORTRAN(calcstressheatfluxfem, (ITG * kon, char *lakon, ITG *ipkon, ITG *ielmat, ITG *ntmat_, double *vold, char *matname, ITG *mi, double *shcon, @@ -627,10 +645,9 @@ void FORTRAN(cavityext_refine, (ITG * kontet, ITG *ifatet, ITG *ifreetet, double double *cotetorig, ITG *iedge, ITG *iexternnode, double *cg, double *height, ITG *iparentel)); -void FORTRAN(cfdconv, (double *vold, double *vcon, double *v, ITG *nk, - ITG *nmethod, ITG *iconvergence, ITG *ithermal, ITG *iit, - ITG *turbulent, ITG *mi, double *dtimef, double *vconmax, - ITG *iexplicit)); +void FORTRAN(cfdconv, (ITG * nmethod, ITG *iconvergence, ITG *ithermal, ITG *iit, + ITG *turbulent, double *dtimef, double *vconmax, + double *vmax)); ITG cgsolver(double *A, double *x, double *b, ITG neq, ITG len, ITG *ia, ITG *iz, double *eps, ITG *niter, ITG precFlg); @@ -674,7 +691,7 @@ void checkconvnet(ITG *icutb, ITG *iin, double *cam1a, double *cam2a, double *cama, double *vamt, double *vamf, double *vamp, double *vama, double *qa, double *qamt, double *qamf, double *ramt, - double *ramf, double *ramp, ITG *iplausi, ITG *ichannel, + double *ramf, double *ramp, ITG *iplausi, ITG *iaxial); void FORTRAN(checkconstraint, (ITG * nobject, char *objectset, double *g0, @@ -713,14 +730,19 @@ void checkdivergence(double *co, ITG *nk, ITG *kon, ITG *ipkon, char *lakon, void FORTRAN(checkexiedge, (ITG * n1newnodes, ITG *n2newnodes, ITG *ipoed, ITG *iedg, ITG *node)); +void FORTRAN(checkforhomnet, (ITG * ieg, ITG *nflow, char *lakon, ITG *ipkon, + ITG *kon, ITG *itg, ITG *ntg, ITG *iponoel, + ITG *inoel)); + void checkinclength(double *time, double *ttime, double *theta, double *dtheta, - ITG *idrct, double *tper, double *tmax, double *tmin, double *ctrl, - double *amta, ITG *namta, ITG *itpamp, ITG *inext, double *dthetaref, - ITG *itp, ITG *jprint, ITG *jout); + ITG *idrct, double *tper, double *tmax, double *tmin, + double *ctrl, double *amta, ITG *namta, ITG *itpamp, + ITG *inext, double *dthetaref, ITG *itp, ITG *jprint, + ITG *jout); void FORTRAN(checkimpacts, (ITG * ne, ITG *neini, double *temax, double *sizemaxinc, double *energyref, double *tmin, - double *tper, + double *tmax, double *tper, ITG *idivergence, ITG *idirinctime, ITG *istab, double *dtheta, double *enres, double *energy, double *energyini, double *allwk, double *allwkini, @@ -758,6 +780,8 @@ void FORTRAN(cmatrix, (double *ad, double *au, ITG *jqs, ITG *irows, ITG *icols, ITG *ndesi, ITG *nodedesi, double *auc, ITG *jqc, ITG *irowc, ITG *nodedesibou)); +void *collectingmt(ITG *i); + void FORTRAN(combilcfhcf, (double *tempf, double *stressf, double *stress, double *hcfstress, double *temp, ITG *nbounnod, ITG *mei, ITG *nstep)); @@ -857,12 +881,11 @@ void complexfreq(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **lakonp, void FORTRAN(con2phys, (double *vold, double *voldaux, ITG *nk, ITG *ntmat_, double *shcon, ITG *nshcon, double *rhcon, - ITG * nrhcon, - double *physcon, ITG *ithermal, - ITG *compressible, - ITG *turbulent, ITG *inomat, ITG *mi, - ITG *ierr, ITG *ifreesurface, - double *dgravity, double *depth)); + ITG *nrhcon, double *physcon, ITG *ithermal, ITG *compressible, + ITG *turbulent, ITG *inomat, ITG *mi, ITG *ierr, ITG *ifreesurface, + double *dgravity, double *depth, ITG *nka, ITG *nkb)); + +void *con2physmt(ITG *i); void FORTRAN(condrandomfield, (double *ad, double *au, ITG *jqs, ITG *irows, ITG *ndesi, double *rhs, double *vector, @@ -874,8 +897,7 @@ void contact(ITG *ncont, ITG *ntie, char *tieset, ITG *nset, char *set, double *cg, double *straight, ITG *ifree, double *co, double *vold, ITG *ielmat, double *cs, double *elcon, ITG *istep, ITG *iinc, ITG *iit, ITG *ncmat_, ITG *ntmat_, - ITG *ne0, double *vini, - ITG *nmethod, + ITG *ne0, ITG *nmethod, ITG *iperturb, ITG *ikboun, ITG *nboun, ITG *mi, ITG *imastop, ITG *nslavnode, ITG *islavnode, ITG *islavsurf, ITG *itiefac, double *areaslav, ITG *iponoels, ITG *inoels, double *springarea, @@ -887,6 +909,17 @@ void contact(ITG *ncont, ITG *ntie, char *tieset, ITG *nset, char *set, ITG *icutb, ITG *ialeatoric, char *jobnamef, double *alea, double *auw, ITG *jqw, ITG *iroww, ITG *nzsw); +void FORTRAN(contingentsurf, (ITG * ncrack, double *xplanecrack, + ITG *istartcrackbou, ITG *iendcrackbou, + double *costruc, double *cg, double *coproj, + double *crackarea, ITG *nnfront, ITG *isubsurffront, + ITG *istartcrackfro, ITG *iendcrackfro, + ITG *istartfront, ITG *iendfront, double *acrack, + double *xa, ITG *ifrontrel, ITG *integerglob, + double *doubleglob, ITG *nstep, double *surfnor, + double *surfco, double *resarea, double *alambdapj, + double *shape)); + void convert2rowbyrow(double *ad, double *au, ITG *icol, ITG *irow, ITG *jq, ITG *neq, ITG *nzs, double **aupardisop, ITG **pointersp, ITG **icolpardisop); @@ -942,18 +975,26 @@ void FORTRAN(crackprop, (ITG * ifrontrel, ITG *ibounnod, double *dadn, ITG *ncyc, ITG *ifrontprop, ITG *nstep, double *acrack, double *acrackglob, double *datarget, ITG *ieqspace, ITG *iincglob, - ITG *iinc)); + ITG *iinc, double *dnglob, ITG *ncyctot)); void crackpropagation(ITG **ipkonp, ITG **konp, char **lakonp, ITG *ne, ITG *nk, char *jobnamec, ITG *nboun, ITG *iamboun, double *xboun, ITG *nload, char *sideload, ITG *iamload, ITG *nforc, - ITG *iamforc, double *xforc, ITG *ithermal, double *t1, - ITG *iamt1, double **cop, ITG *nkon, ITG *mi, ITG **ielmatp, + ITG *iamforc, double *xforc, ITG *ithermal, double **t1p, + ITG **iamt1p, double **cop, ITG *nkon, ITG *mi, ITG **ielmatp, char *matname, char *output, ITG *nmat, char *set, ITG *nset, ITG *istartset, ITG *iendset, ITG *ialset, ITG *jmax, double *timepar, ITG *nelcon, double *elcon, ITG *ncmat_, ITG *ntmat_, ITG *istep, char *filab, ITG *nmethod, - ITG *mei); + ITG *mei, ITG *ntrans, ITG **inotrp, double **t0p, + ITG *ne1d, ITG *ne2d, double **t0gp, double **t1gp, + ITG *nam, double **t1oldp, double **voldp, ITG *iperturb, + ITG *iprestr, double **prestrp, ITG *norien, + ITG **ielorienp, ITG *nprop, ITG **ielpropp, + double **offsetp, double **stip, double **emep, + ITG *nener, double **enerp, ITG *nstate_, ITG *mortar, + ITG *nslavs, ITG *nintpoint, double **xstatep, + ITG **iponorp, double **thickep); void crackpropdata(char *jobnamec, ITG *nelcon, double *elcon, double **crconp, ITG *ncrconst, ITG *ncrtem, ITG *imat, char *matname, @@ -978,7 +1019,10 @@ void FORTRAN(crackshape, (ITG * nnfront, ITG *ifront, ITG *istartfront, void FORTRAN(create_contactdofs, (ITG * kslav, ITG *lslav, ITG *ktot, ITG *ltot, ITG *nslavs, ITG *islavnode, ITG *nmasts, ITG *imastnode, ITG *nactdof, ITG *mi, - ITG *neqslav, ITG *neqtot)); + ITG *neqtot, ITG *nslavnode, + double *fric, char *tieset, double *tietol, + ITG *ntie, double *elcon, ITG *ncmat_, + ITG *ntmat_)); void FORTRAN(createblock_struct, (ITG * neq, ITG *ipointers, ITG *icolpardiso, double *aupardiso, ITG *nestart, ITG *num_cpus, @@ -1476,19 +1520,20 @@ void expand(double *co, ITG *nk, ITG *kon, ITG *ipkon, char *lakon, void FORTRAN(expand_auw, (double *auw, ITG *jqw, ITG *iroww, ITG *nslavs, double *auwnew, ITG *jqwnew, ITG *irowwnew, - ITG *neqslav, ITG *nactdof, + ITG *nactdof, ITG *mi, ITG *ktot, ITG *neqtot, ITG *islavnode, ITG *imastnode)); void FORTRAN(extendmesh, (ITG * nnfront, ITG *istartfront, ITG *iendfront, - ITG *ifront, ITG *nkold, ITG *ne, ITG *nkon, char *lakon, + ITG *ifront, ITG *ne, ITG *nkon, char *lakon, ITG *ipkon, ITG *kon, ITG *isubsurffront, double *co, ITG *ifronteq, ITG *istartfronteq, ITG *iendfronteq, ITG *nfront, ITG *nfronteq)); void FORTRAN(extern_crackprop, (ITG * ieled, ITG *nedg, ITG *iexternedg, ITG *nexternedg, ITG *iexternnod, - ITG *nexternnod, ITG *iedg, ITG *iedno)); + ITG *nexternnod, ITG *iedg, ITG *iedno, + ITG *ier)); void FORTRAN(extfacepernode, (ITG * iponoelfa, ITG *inoelfa, char *lakonfa, ITG *ipkonfa, ITG *konfa, ITG *nsurfs, ITG *inoelsize)); @@ -1590,13 +1635,15 @@ void FORTRAN(flowoutput, (ITG * itg, ITG *ieg, ITG *ntg, ITG *nteq, double *rhcon, ITG *nrhcon, double *vold, char *jobnamef, char *set, ITG *istartset, ITG *iendset, ITG *ialset, ITG *nset, ITG *mi, - ITG *iaxial, ITG *istep, ITG *iit)); + ITG *iaxial, ITG *istep, ITG *iit, ITG *ipobody, + ITG *ibody, double *xbodyact, ITG *nbody, ITG *ndata, + double *sfr, double *sba, ITG *jumpup, ITG *jumpdo)); -void FORTRAN(flowresult, (ITG * ntg, ITG *itg, double *cam, double *vold, - double *v, - ITG *nload, char *sideload, ITG *nelemload, - double *xloadact, ITG *nactdog, ITG *network, ITG *mi, - ITG *ne, ITG *ipkon, char *lakon, ITG *kon)); +void FORTRAN(flowbc, (ITG * ntg, ITG *itg, double *cam, double *vold, + double *v, + ITG *nload, char *sideload, ITG *nelemload, + double *xloadact, ITG *nactdog, ITG *network, ITG *mi, + ITG *ne, ITG *ipkon, char *lakon, ITG *kon)); void FORTRAN(fluidnodes, (ITG * nef, ITG *ipkonf, char *lakonf, ITG *konf, ITG *ikf, ITG *nk, ITG *nkf)); @@ -1809,16 +1856,18 @@ void FORTRAN(genratio, (double *co, double *doubleglob, ITG *integerglob, ITG *nkold, ITG *nk, ITG *iprfn, ITG *konrfn, double *ratiorfn)); -void FORTRAN(gentiedmpc, (char *tieset, ITG *ntie, ITG *itietri, - ITG *ipkon, ITG *kon, char *lakon, char *set, ITG *istartset, +void FORTRAN(gentiedmpc, (char *tieset, ITG *ntie, ITG *itietri, ITG *ipkon, + ITG *kon, char *lakon, char *set, ITG *istartset, ITG *iendset, ITG *ialset, double *cg, double *straight, - ITG *koncont, double *co, double *xo, double *yo, double *zo, - double *x, double *y, double *z, ITG *nx, ITG *ny, ITG *nz, ITG *nset, - ITG *ifaceslave, ITG *istartfield, ITG *iendfield, ITG *ifield, - ITG *ipompc, ITG *nodempc, double *coefmpc, ITG *nmpc, ITG *nmpc_, - ITG *mpcfree, ITG *ikmpc, ITG *ilmpc, char *labmpc, ITG *ithermal, - double *tietol, ITG *icfd, ITG *ncont, ITG *imastop, ITG *ikboun, - ITG *nboun, char *kind)); + ITG *koncont, double *co, double *xo, double *yo, + double *zo, double *x, double *y, double *z, ITG *nx, + ITG *ny, ITG *nz, ITG *nset, ITG *ifaceslave, + ITG *istartfield, ITG *iendfield, ITG *ifield, + ITG *ipompc, ITG *nodempc, double *coefmpc, ITG *nmpc, + ITG *nmpc_, ITG *mpcfree, ITG *ikmpc, ITG *ilmpc, + char *labmpc, ITG *ithermal, double *tietol, ITG *icfd, + ITG *ncont, ITG *imastop, ITG *ikboun, ITG *nboun, + char *kind, char *jobnamef)); void FORTRAN(geomview, (double *vold, double *co, double *pmid, double *e1, double *e2, double *e3, ITG *kontri, double *area, double *cs, @@ -1834,17 +1883,19 @@ void getuncrackedresults(char *masterfile, ITG **integerglobp, void FORTRAN(getdesiinfo2d, (char *set, ITG *istartset, ITG *iendset, ITG *ialset, ITG *nset, ITG *mi, ITG *nactdof, ITG *ndesi, - ITG *nodedesi, ITG *ntie, char *tieset, ITG *nodedesiinv, - char *lakon, ITG *ipkon, ITG *kon, ITG *iponoelfa, ITG *iponod2dto3d, - ITG *iponor2d, ITG *knor2d, ITG *iponoel2d, ITG *inoel2d, ITG *nobject, - char *objectset, ITG *iponk2dto3d, ITG *ne)); + ITG *nodedesi, ITG *ntie, char *tieset, + ITG *nodedesiinv, char *lakon, ITG *ipkon, ITG *kon, + ITG *iponoelfa, ITG *iponod2dto3d, ITG *iponor2d, + ITG *knor2d, ITG *iponoel2d, ITG *inoel2d, + ITG *nobject, char *objectset, ITG *iponk2dto3d, + ITG *ne, char *jobnamef)); void FORTRAN(getdesiinfo3d, (char *set, ITG *istartset, ITG *iendset, ITG *ialset, ITG *nset, ITG *mi, ITG *nactdof, ITG *ndesi, ITG *nodedesi, ITG *ntie, char *tieset, ITG *itmp, ITG *nmpc, ITG *nodempc, ITG *ipompc, ITG *nodedesiinv, ITG *iponoel, ITG *inoel, char *lakon, ITG *ipkon, ITG *kon, ITG *noregion, - ITG *ipoface, ITG *nodface, ITG *nk)); + ITG *ipoface, ITG *nodface, ITG *nk, char *jobnamef)); void FORTRAN(getdesiinfo3d_robust, (char *set, ITG *istartset, ITG *iendset, ITG *ialset, ITG *nset, ITG *mi, ITG *nactdof, @@ -1854,7 +1905,7 @@ void FORTRAN(getdesiinfo3d_robust, (char *set, ITG *istartset, ITG *iendset, ITG *iponoel, ITG *inoel, char *lakon, ITG *ipkon, ITG *kon, ITG *noregion, ITG *ipoface, ITG *nodface, ITG *nk, - ITG *irandomtype)); + ITG *irandomtype, char *jobnamef)); void FORTRAN(getdesiinfobou, (ITG * ndesibou, ITG *nodedesibou, ITG *nodedesiinv, char *lakon, ITG *ipkon, ITG *kon, ITG *ipoface, @@ -1947,18 +1998,21 @@ void FORTRAN(initialcfdfem, (double *yy, ITG *nk, double *co, ITG *ne, ITG *ipko ITG *ibody, double *xbody, double *depth, ITG *nodfreesurf, double *dgravity, double *xg)); -void FORTRAN(initialchannel, (ITG * itg, ITG *ieg, ITG *ntg, double *ac, double *bc, +void FORTRAN(initialchannel, (ITG * itg, ITG *ieg, ITG *ntg, char *lakon, double *v, ITG *ipkon, ITG *kon, ITG *nflow, ITG *ikboun, ITG *nboun, double *prop, - ITG *ielprop, ITG *nactdog, ITG *ndirboun, + ITG *ielprop, ITG *ndirboun, ITG *nodeboun, double *xbounact, ITG *ielmat, ITG *ntmat_, double *shcon, ITG *nshcon, - double *physcon, ITG *ipiv, ITG *nteq, + double *physcon, double *rhcon, ITG *nrhcon, ITG *ipobody, ITG *ibody, double *xbody, double *co, ITG *nbody, ITG *network, - ITG *iin_abs, double *vold, char *set, ITG *istep, + double *vold, char *set, ITG *istep, ITG *iit, ITG *mi, ITG *ineighe, ITG *ilboun, - double *ttime, double *time, ITG *iaxial)); + double *ttime, double *time, ITG *itreated, + ITG *iponoel, ITG *inoel, ITG *istack, double *sfr, + double *hfr, double *sba, double *hba, ITG *ndata, + ITG *jumpup, ITG *jumpdo)); void FORTRAN(initialnet, (ITG * itg, ITG *ieg, ITG *ntg, double *ac, double *bc, char *lakon, double *v, ITG *ipkon, ITG *kon, @@ -2815,7 +2869,8 @@ void massless(ITG *kslav, ITG *lslav, ITG *ktot, ITG *ltot, ITG *nactdof, ITG *mi, double *vold, double *volddof, double *veold, ITG *nk, double *fext, ITG *isolver, ITG *iperturb, double *co, double *springarea, - ITG *neqslav, ITG *neqtot, double *qbk, double *b); + ITG *neqtot, double *qbk, double *b, double *tinc, + double *aloc, double *fric, ITG *iexpl); void mastruct(ITG *nk, ITG *kon, ITG *ipkon, char *lakon, ITG *ne, ITG *nodeboun, ITG *ndirboun, ITG *nboun, ITG *ipompc, @@ -3318,6 +3373,14 @@ void peeq_sen_dv(double *co, ITG *nk, ITG *kon, ITG *ipkon, char *lakon, ITG *ne void *peeq_sen_dvmt(ITG *i); +void FORTRAN(phys2con, (ITG * inomat, double *vold, ITG *ntmat_, double *shcon, + ITG *nshcon, double *physcon, ITG *compressible, + double *vcon, double *rhcon, ITG *nrhcon, ITG *ithermal, + ITG *mi, ITG *ifreesurface, ITG *ierr, double *dgravity, + double *depth, ITG *nk, ITG *nka, ITG *nkb)); + +void *phys2conmt(ITG *i); + void FORTRAN(postprojectgrad, (ITG * ndesi, ITG *nodedesi, double *dgdxglob, ITG *nactive, ITG *nobject, ITG *nnlconst, ITG *ipoacti, ITG *nk, char *objectset, @@ -3374,6 +3437,8 @@ void prediction_em(double *uam, ITG *nmethod, double *bet, double *gam, double * ITG *ithermal, ITG *nk, double *veold, double *v, ITG *iinc, ITG *idiscon, double *vold, ITG *nactdof, ITG *mi); +void *predictmt(ITG *i); + void FORTRAN(prefilter, (double *co, ITG *nodedesi, ITG *ndesi, double *xo, double *yo, double *zo, double *x, double *y, double *z, ITG *nx, ITG *ny, ITG *nz)); @@ -3394,9 +3459,11 @@ void FORTRAN(preprojectgrad, (double *vector, ITG *ndesi, ITG *nodedesi, char *objectset, double *xtf)); void FORTRAN(presgradient, (ITG * iponoel, ITG *inoel, double *sa, - ITG *nk, double *shockcoef, double *dtimef, ITG *ipkon, + double *shockcoef, double *dtimef, ITG *ipkon, ITG *kon, char *lakon, double *vold, ITG *mi, - ITG *nmethod, ITG *nactdoh, ITG *neqp)); + ITG *nactdoh, ITG *nka, ITG *nkb)); + +void *presgradientmt(ITG *i); void FORTRAN(prethickness, (double *co, double *xo, double *yo, double *zo, double *x, double *y, double *z, ITG *nx, ITG *ny, @@ -3514,29 +3581,29 @@ void radcyc(ITG *nk, ITG *kon, ITG *ipkon, char *lakon, ITG *ne, double **cop, double **voldp, ITG *ntrit, ITG *inocs, ITG *mi); void radflowload(ITG *itg, ITG *ieg, ITG *ntg, ITG *ntr, double *adrad, - double *aurad, - double *bcr, ITG *ipivr, double *ac, double *bc, ITG *nload, - char *sideload, ITG *nelemload, double *xloadact, char *lakon, ITG *ipiv, - ITG *ntmat_, double *vold, double *shcon, ITG *nshcon, ITG *ipkon, - ITG *kon, double *co, ITG *kontri, ITG *ntri, - ITG *nloadtr, double *tarea, double *tenv, double *physcon, double *erad, - double **adviewp, double **auviewp, + double *aurad, double *bcr, ITG *ipivr, double *ac, double *bc, + ITG *nload, char *sideload, ITG *nelemload, double *xloadact, + char *lakon, ITG *ipiv, ITG *ntmat_, double *vold, double *shcon, + ITG *nshcon, ITG *ipkon, ITG *kon, double *co, ITG *kontri, + ITG *ntri, ITG *nloadtr, double *tarea, double *tenv, + double *physcon, double *erad, double **adviewp, double **auviewp, ITG *nflow, ITG *ikboun, double *xboun, ITG *nboun, ITG *ithermal, ITG *iinc, ITG *iit, double *cs, ITG *mcs, ITG *inocs, ITG *ntrit, ITG *nk, double *fenv, ITG *istep, double *dtime, double *ttime, double *time, ITG *ilboun, ITG *ikforc, ITG *ilforc, double *xforc, ITG *nforc, double *cam, ITG *ielmat, ITG *nteq, double *prop, - ITG *ielprop, ITG *nactdog, ITG *nacteq, ITG *nodeboun, ITG *ndirboun, - ITG *network, double *rhcon, ITG *nrhcon, - ITG *ipobody, ITG *ibody, double *xbody, ITG *nbody, ITG *iviewfile, - char *jobnamef, double *ctrl, double *xloadold, double *reltime, - ITG *nmethod, char *set, ITG *mi, ITG *istartset, ITG *iendset, - ITG *ialset, ITG *nset, ITG *ineighe, ITG *nmpc, ITG *nodempc, - ITG *ipompc, double *coefmpc, char *labmpc, ITG *iemchange, ITG *nam, + ITG *ielprop, ITG *nactdog, ITG *nacteq, ITG *nodeboun, + ITG *ndirboun, ITG *network, double *rhcon, ITG *nrhcon, + ITG *ipobody, ITG *ibody, double *xbody, ITG *nbody, + ITG *iviewfile, char *jobnamef, double *ctrl, double *xloadold, + double *reltime, ITG *nmethod, char *set, ITG *mi, ITG *istartset, + ITG *iendset, ITG *ialset, ITG *nset, ITG *ineighe, ITG *nmpc, + ITG *nodempc, ITG *ipompc, double *coefmpc, char *labmpc, + ITG *iemchange, ITG *nam, ITG *iamload, ITG *jqrad, ITG *irowrad, ITG *nzsrad, ITG *icolrad, ITG *ne, ITG *iaxial, double *qa, double *cocon, ITG *ncocon, ITG *iponoel, ITG *inoel, ITG *nprop, char *amname, ITG *namta, - double *amta); + double *amta, ITG *iexpl); void FORTRAN(radmatrix, (ITG * ntr, double *adrad, double *aurad, double *bcr, char *sideload, ITG *nelemload, double *xloadact, char *lakon, @@ -3945,7 +4012,7 @@ void resultsini(ITG *nk, double *v, ITG *ithermal, char *filab, double *gam, double *dtime, ITG *mi, double *vini, ITG *nprint, char *prlab, ITG *intpointvar, ITG *calcul_fn, ITG *calcul_f, ITG *calcul_qa, ITG *calcul_cauchy, ITG *ikin, ITG *intpointvart, - char *typeboun, ITG *num_cpus, ITG *mortar); + char *typeboun, ITG *num_cpus, ITG *mortar, ITG *nener); void FORTRAN(resultsini_em, (ITG * nk, double *v, ITG *ithermal, char *filab, ITG *iperturb, double *f, double *fn, ITG *nactdof, ITG *iout, @@ -4205,14 +4272,14 @@ void FORTRAN(rhs, (double *co, ITG *nk, ITG *kon, ITG *ipkon, char *lakon, char *matname, ITG *mi, ITG *ikactmech, ITG *nactmech, ITG *ielprop, double *prop, double *sti, double *xstateini, double *xstate, ITG *nstate_, ITG *ntrans, ITG *inotr, - double *trab, ITG *nea, ITG *neb)); + double *trab, double *fnext, ITG *nea, ITG *neb)); void FORTRAN(rhsnodef, (double *co, ITG *kon, ITG *ne, ITG *ipompc, ITG *nodempc, double *coefmpc, ITG *nmpc, ITG *nodeforc, ITG *ndirforc, - double *xforc, - ITG *nforc, double *fext, ITG *nactdof, ITG *nmethod, ITG *ikmpc, - ITG *ntmat_, ITG *iperturb, ITG *mi, ITG *ikactmech, ITG *nactmech, - ITG *ntrans, ITG *inotr, double *trab)); + double *xforc, ITG *nforc, double *fext, ITG *nactdof, + ITG *nmethod, ITG *ikmpc, ITG *ntmat_, ITG *iperturb, + ITG *mi, ITG *ikactmech, ITG *nactmech, ITG *ntrans, + ITG *inotr, double *trab, double *fnext)); void rhsmain(double *co, ITG *nk, ITG *kon, ITG *ipkon, char *lakon, ITG *ne, ITG *ipompc, ITG *nodempc, double *coefmpc, ITG *nmpc, @@ -4238,7 +4305,7 @@ void rhsmain(double *co, ITG *nk, ITG *kon, ITG *ipkon, char *lakon, ITG *ne, ITG *mi, ITG *ikactmech, ITG *nactmech, ITG *ielprop, double *prop, double *sti, double *xstateini, double *xstate, ITG *nstate_, - ITG *ntrans, ITG *inotr, double *trab); + ITG *ntrans, ITG *inotr, double *trab, double *fnext); void *rhsmt(ITG *i); @@ -4464,15 +4531,9 @@ void FORTRAN(smoothshock, (double *aub, double *adl, void *smoothshockmt(ITG *i); -void FORTRAN(solveeq, (double *adbv, double *aubv, double *adl, - double *b, double *sol, double *aux, ITG *irowv, - ITG *jqv, ITG *neqv, ITG *maxit)); - -void solveeqmain(double *aub, double *adl, double *b, double *sol, ITG *irow, - ITG *jq, ITG *neq, ITG *maxit, ITG *num_cpus); - -void FORTRAN(solveeqpar, (double *aub, double *adl, double *b, double *sol, - double *aux, ITG *irow, ITG *jq, ITG *neqa, ITG *neqb)); +void solveeq(double *adbv, double *aubv, double *adl, + double *b, double *sol, double *aux, ITG *irowv, + ITG *jqv, ITG *neqv, ITG *maxit, ITG *num_cpus); void *solveeqparmt(ITG *i); @@ -4484,6 +4545,10 @@ void FORTRAN(sortev, (ITG * nev, ITG *nmd, double *eigxx, ITG *cyclicsymmetry, ITG *istartnmd, ITG *iendnmd, double *aa, double *bb, ITG *nevcomplex)); +void *sortingmt(ITG *i); + +void *sortingfreqmt(ITG *i); + void FORTRAN(spcmatch, (double *xboun, ITG *nodeboun, ITG *ndirboun, ITG *nboun, double *xbounold, ITG *nodebounold, ITG *ndirbounold, ITG *nbounold, ITG *ikboun, ITG *ilboun, double *vold, @@ -4857,7 +4922,7 @@ void tiedcontact(ITG *ntie, char *tieset, ITG *nset, char *set, double **fmpcp, ITG **nodempcp, double **coefmpcp, ITG *ithermal, double *co, double *vold, ITG *nef, ITG *nmpc_, ITG *mi, ITG *nk, ITG *istep, ITG *ikboun, - ITG *nboun, char *kind1, char *kind2); + ITG *nboun, char *kind1, char *kind2, char *jobnamef); void FORTRAN(topocfdfem, (ITG * nelemface, char *sideface, ITG *nface, ITG *ipoface, ITG *nodface, ITG *ne, ITG *ipkon, ITG *kon, char *lakon, @@ -4866,7 +4931,7 @@ void FORTRAN(topocfdfem, (ITG * nelemface, char *sideface, ITG *nface, ITG *ipof ITG *iponoel, ITG *inoel, ITG *inoelfree, double *co, char *set, ITG *istartset, ITG *iendset, ITG *ialset, ITG *nset, ITG *iturbulent, - ITG *inomat, ITG *ielmat, ITG *ipface)); + ITG *inomat, ITG *ielmat, ITG *ipface, ITG *nknew)); void FORTRAN(totalcontact, (char *tieset, ITG *ntie, ITG *ne, ITG *ipkon, ITG *kon, char *lakon, ITG *islavsurf, ITG *itiefac, @@ -4923,7 +4988,9 @@ void FORTRAN(uout, (double *v, ITG *mi, ITG *ithermal, char *filab, void FORTRAN(updatecon, (double *vold, double *vcon, double *v, ITG *nk, ITG *ithermal, ITG *turbulent, ITG *mi, - ITG *compressible)); + ITG *compressible, ITG *nka, ITG *nkb)); + +void *updateconmt(ITG *i); void FORTRAN(updatecont, (ITG * koncont, ITG *ncont, double *co, double *vold, double *cg, double *straight, ITG *mi)); diff --git a/Makefile b/Makefile index 699cdb8..6bca0cb 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ # https://precice.org/adapter-calculix-get-calculix.html # Set the following variables before building: # Path to original CalculiX source (e.g. $(HOME)/ccx_2.xx/src ) -CCX_VERSION = 2.19 +CCX_VERSION = 2.20 CCX = $(HOME)/CalculiX/ccx_$(CCX_VERSION)/src ### Change these if you built SPOOLES, ARPACK, or yaml-cpp from source ### diff --git a/Makefile_i8_PaStiX b/Makefile_i8_PaStiX index df005b7..8ec89ab 100644 --- a/Makefile_i8_PaStiX +++ b/Makefile_i8_PaStiX @@ -1,8 +1,8 @@ # See our wiki for getting the CalculiX dependencies: # https://precice.org/adapter-calculix-get-calculix.html # Set the following variables before building: -# Path to original CalculiX source (e.g. $(HOME)/ccx_2.19/src ) -CCX = $(HOME)/CalculiX/ccx_2.19/src +# Path to original CalculiX source (e.g. $(HOME)/ccx_2.20/src ) +CCX = $(HOME)/CalculiX/ccx_2.20/src ### Change these if you built SPOOLES, ARPACK, or yaml-cpp from source ### # SPOOLES include flags (e.g. -I$(HOME)/SPOOLES.2.2 ) @@ -86,7 +86,7 @@ FC = mpifort # Include a list of all the source files include $(CCX)/Makefile.inc -SCCXMAIN = ccx_2.19.c +SCCXMAIN = ccx_2.20.c # Append additional sources SCCXC += nonlingeo_precice.c CCXHelpers.c PreciceInterface.c @@ -119,14 +119,14 @@ OCCXC += $(OBJDIR)/ConfigReader.o -$(OBJDIR)/ccx_preCICE: $(OBJDIR) $(OCCXMAIN) $(OBJDIR)/ccx_2.19.a - $(FC) -fopenmp -Wall -O3 -o $@ $(OCCXMAIN) $(OBJDIR)/ccx_2.19.a $(LIBS) +$(OBJDIR)/ccx_preCICE: $(OBJDIR) $(OCCXMAIN) $(OBJDIR)/ccx_2.20.a + $(FC) -fopenmp -Wall -O3 -o $@ $(OCCXMAIN) $(OBJDIR)/ccx_2.20.a $(LIBS) -$(OBJDIR)/ccx_2.19.a: $(OCCXF) $(OCCXC) +$(OBJDIR)/ccx_2.20.a: $(OCCXF) $(OCCXC) ar vr $@ $? $(OBJDIR): mkdir -p $(OBJDIR) clean: - rm -f $(OBJDIR)/*.o $(OBJDIR)/ccx_2.19.a $(OBJDIR)/ccx_preCICE + rm -f $(OBJDIR)/*.o $(OBJDIR)/ccx_2.20.a $(OBJDIR)/ccx_preCICE diff --git a/README.md b/README.md index 2b178b7..e5c50eb 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ The adapter was initially developed for conjugate heat transfer (CHT) simulations via preCICE by Lucia Cheung in the scope of her master’s thesis [[1]](https://www5.in.tum.de/pub/Cheung2016_Thesis.pdf) in cooperation with [SimScale](https://www.simscale.com/). For running the adapter for CHT simulations refer to this thesis. The adapter was extended to fluid-structure interaction by Alexander Rusch [[2]](https://www.gacm2017.uni-stuttgart.de/registration/Upload/ExtendedAbstracts/ExtendedAbstract_0138.pdf). -The latest version of the adapter is based on **CalculiX version 2.19.** +The latest version of the adapter is based on **CalculiX version 2.20.** Legacy versions of the adapter for older versions of CalculiX are supported on various branches. Branches for CalculiX version older than 2.15 require **preCICE v1.x**, whereas newer versions rely on **preCICE v2.x**. ## Start here diff --git a/ccx_2.19.c b/ccx_2.20.c similarity index 90% rename from ccx_2.19.c rename to ccx_2.20.c index 4262a8c..8446623 100644 --- a/ccx_2.19.c +++ b/ccx_2.20.c @@ -1,5 +1,5 @@ /* CalculiX - A 3-dimensional finite element program */ -/* Copyright (C) 1998-2021 Guido Dhondt */ +/* Copyright (C) 1998-2022 Guido Dhondt */ /* This program is free software; you can redistribute it and/or */ /* modify it under the terms of the GNU General Public License as */ @@ -107,9 +107,9 @@ int main(int argc, char *argv[]) double totalCalculixTime; /* - * Additional variables for the coupling with preCICE - * preCICE is used only if a participant name is provided as a command line argument! - */ + * Additional variables for the coupling with preCICE + * preCICE is used only if a participant name is provided as a command line argument! + */ char preciceParticipantName[256] = "", configFilename[256] = "config.yml"; int preciceUsed = 0; @@ -133,7 +133,7 @@ int main(int argc, char *argv[]) break; } if (strcmp1(argv[i], "-v") == 0) { - printf("\nThis is Version 2.19\n\n"); + printf("\nThis is Version 2.20\n\n"); FORTRAN(stop, ()); } } @@ -146,8 +146,8 @@ int main(int argc, char *argv[]) /* for(i=1;i points - to user input; instead it is a generic nonzero - initialization */ + to user input; instead it is a generic nonzero + initialization */ if (istep == 0) { DMEMSET(t0, 0, nk_, 1.2357111319); @@ -648,7 +648,7 @@ int main(int argc, char *argv[]) cyclicsymmetry = 0; if ((f1 = fopen(fneig, "rb")) != NULL) { if (fread(&cyclicsymmetry, sizeof(ITG), 1, f1) != 1) { - printf("*ERROR reading the information whether cyclic symmetry is involved in the eigenvalue file"); + printf(" *ERROR reading the information whether cyclic symmetry is involved in the eigenvalue file"); exit(0); } fclose(f1); @@ -765,7 +765,7 @@ int main(int argc, char *argv[]) lakon, ipkon, kon, tietol, &nmpc, &mpcfree, &memmpc_, &ipompc, &labmpc, &ikmpc, &ilmpc, &fmpc, &nodempc, &coefmpc, ithermal, co, vold, &nef, &nmpc_, mi, &nk, &istep, ikboun, &nboun, - kind1, kind2); + kind1, kind2, jobnamef); /* reallocating space in the first step */ @@ -1005,10 +1005,10 @@ int main(int argc, char *argv[]) RENEW(vold, double, mt *nk); /* if the SPC boundary conditions were changed in the present step, - they have to be rematched with those in the last step. Removed SPC - boundary conditions do not appear any more (this is different from - forces and loads, where removed forces or loads are reset to zero; - a removed SPC constraint does not have a numerical value any more) */ + they have to be rematched with those in the last step. Removed SPC + boundary conditions do not appear any more (this is different from + forces and loads, where removed forces or loads are reset to zero; + a removed SPC constraint does not have a numerical value any more) */ NNEW(reorder, double, nboun); NNEW(nreorder, ITG, nboun); @@ -1027,8 +1027,8 @@ int main(int argc, char *argv[]) SFREE(nreorder); /* for additional forces or loads in the present step, the - corresponding slots in the force and load fields of the - previous steps are initialized */ + corresponding slots in the force and load fields of the + previous steps are initialized */ RENEW(xforcold, double, nforc); for (i = nforcold; i < nforc; i++) @@ -1323,32 +1323,27 @@ int main(int argc, char *argv[]) mpcinfo[2] = icascade; mpcinfo[3] = maxlenmpc; - nonlingeo_precice(&co, &nk, &kon, &ipkon, &lakon, &ne, nodeboun, ndirboun, xboun, &nboun, - &ipompc, &nodempc, &coefmpc, &labmpc, &nmpc, nodeforc, ndirforc, xforc, - &nforc, &nelemload, &sideload, xload, &nload, - nactdof, &icol, jq, &irow, neq, &nzl, &nmethod, &ikmpc, - &ilmpc, ikboun, ilboun, elcon, nelcon, rhcon, nrhcon, - alcon, nalcon, alzero, &ielmat, &ielorien, &norien, orab, &ntmat_, - t0, t1, t1old, ithermal, prestr, &iprestr, - &vold, iperturb, sti, nzs, &kode, filab, &idrct, jmax, - jout, timepar, eme, xbounold, xforcold, xloadold, - veold, accold, amname, amta, namta, - &nam, iamforc, &iamload, iamt1, alpha, - &iexpl, iamboun, plicon, nplicon, plkcon, nplkcon, - &xstate, &npmat_, &istep, &ttime, matname, qaold, mi, + nonlingeo_precice(&co, &nk, &kon, &ipkon, &lakon, &ne, nodeboun, ndirboun, xboun, + &nboun, &ipompc, &nodempc, &coefmpc, &labmpc, &nmpc, nodeforc, + ndirforc, xforc, &nforc, &nelemload, &sideload, xload, &nload, + nactdof, &icol, jq, &irow, neq, &nzl, &nmethod, &ikmpc, &ilmpc, + ikboun, ilboun, elcon, nelcon, rhcon, nrhcon, alcon, nalcon, + alzero, &ielmat, &ielorien, &norien, orab, &ntmat_, t0, t1, t1old, + ithermal, prestr, &iprestr, &vold, iperturb, sti, nzs, &kode, + filab, &idrct, jmax, jout, timepar, eme, xbounold, xforcold, + xloadold, veold, accold, amname, amta, namta, &nam, iamforc, + &iamload, iamt1, alpha, &iexpl, iamboun, plicon, nplicon, plkcon, + nplkcon, &xstate, &npmat_, &istep, &ttime, matname, qaold, mi, &isolver, &ncmat_, &nstate_, &iumat, cs, &mcs, &nkon, &ener, - mpcinfo, output, - shcon, nshcon, cocon, ncocon, physcon, &nflow, ctrl, - set, &nset, istartset, iendset, ialset, &nprint, prlab, - prset, &nener, ikforc, ilforc, trab, inotr, &ntrans, &fmpc, - cbody, ibody, xbody, &nbody, xbodyold, ielprop, prop, - &ntie, tieset, &itpamp, &iviewfile, jobnamec, tietol, &nslavs, thicke, - ics, &nintpoint, &mortar, - &ifacecount, typeboun, &islavsurf, &pslavsurf, &clearini, &nmat, - xmodal, &iaxial, &inext, &nprop, &network, orname, vel, &nef, - velo, veloo, energy, itempuser, - /* New args from 2.19 */ - &ipobody, &inewton, &t0g, &t1g, &ifreebody, + mpcinfo, output, shcon, nshcon, cocon, ncocon, physcon, &nflow, + ctrl, set, &nset, istartset, iendset, ialset, &nprint, prlab, + prset, &nener, ikforc, ilforc, trab, inotr, &ntrans, &fmpc, cbody, + ibody, xbody, &nbody, xbodyold, ielprop, prop, &ntie, tieset, + &itpamp, &iviewfile, jobnamec, tietol, &nslavs, thicke, ics, + &nintpoint, &mortar, &ifacecount, typeboun, &islavsurf, + &pslavsurf, &clearini, &nmat, xmodal, &iaxial, &inext, &nprop, + &network, orname, vel, &nef, velo, veloo, energy, itempuser, + ipobody, &inewton, t0g, t1g, &ifreebody, /* PreCICE args */ preciceParticipantName, configFilename); @@ -1369,32 +1364,27 @@ int main(int argc, char *argv[]) mpcinfo[2] = icascade; mpcinfo[3] = maxlenmpc; - nonlingeo_precice(&co, &nk, &kon, &ipkon, &lakon, &ne, nodeboun, ndirboun, xboun, &nboun, - &ipompc, &nodempc, &coefmpc, &labmpc, &nmpc, nodeforc, ndirforc, xforc, - &nforc, &nelemload, &sideload, xload, &nload, - nactdof, &icol, jq, &irow, neq, &nzl, &nmethod, &ikmpc, - &ilmpc, ikboun, ilboun, elcon, nelcon, rhcon, nrhcon, - alcon, nalcon, alzero, &ielmat, &ielorien, &norien, orab, &ntmat_, - t0, t1, t1old, ithermal, prestr, &iprestr, - &vold, iperturb, sti, nzs, &kode, filab, &idrct, jmax, - jout, timepar, eme, xbounold, xforcold, xloadold, - veold, accold, amname, amta, namta, - &nam, iamforc, &iamload, iamt1, alpha, - &iexpl, iamboun, plicon, nplicon, plkcon, nplkcon, - &xstate, &npmat_, &istep, &ttime, matname, qaold, mi, + nonlingeo_precice(&co, &nk, &kon, &ipkon, &lakon, &ne, nodeboun, ndirboun, xboun, + &nboun, &ipompc, &nodempc, &coefmpc, &labmpc, &nmpc, nodeforc, + ndirforc, xforc, &nforc, &nelemload, &sideload, xload, &nload, + nactdof, &icol, jq, &irow, neq, &nzl, &nmethod, &ikmpc, &ilmpc, + ikboun, ilboun, elcon, nelcon, rhcon, nrhcon, alcon, nalcon, + alzero, &ielmat, &ielorien, &norien, orab, &ntmat_, t0, t1, t1old, + ithermal, prestr, &iprestr, &vold, iperturb, sti, nzs, &kode, + filab, &idrct, jmax, jout, timepar, eme, xbounold, xforcold, + xloadold, veold, accold, amname, amta, namta, &nam, iamforc, + &iamload, iamt1, alpha, &iexpl, iamboun, plicon, nplicon, plkcon, + nplkcon, &xstate, &npmat_, &istep, &ttime, matname, qaold, mi, &isolver, &ncmat_, &nstate_, &iumat, cs, &mcs, &nkon, &ener, - mpcinfo, output, - shcon, nshcon, cocon, ncocon, physcon, &nflow, ctrl, - set, &nset, istartset, iendset, ialset, &nprint, prlab, - prset, &nener, ikforc, ilforc, trab, inotr, &ntrans, &fmpc, - cbody, ibody, xbody, &nbody, xbodyold, ielprop, prop, - &ntie, tieset, &itpamp, &iviewfile, jobnamec, tietol, &nslavs, thicke, - ics, &nintpoint, &mortar, - &ifacecount, typeboun, &islavsurf, &pslavsurf, &clearini, &nmat, - xmodal, &iaxial, &inext, &nprop, &network, orname, vel, &nef, - velo, veloo, energy, itempuser, - /* New args from 2.19 */ - &ipobody, &inewton, &t0g, &t1g, &ifreebody, + mpcinfo, output, shcon, nshcon, cocon, ncocon, physcon, &nflow, + ctrl, set, &nset, istartset, iendset, ialset, &nprint, prlab, + prset, &nener, ikforc, ilforc, trab, inotr, &ntrans, &fmpc, cbody, + ibody, xbody, &nbody, xbodyold, ielprop, prop, &ntie, tieset, + &itpamp, &iviewfile, jobnamec, tietol, &nslavs, thicke, ics, + &nintpoint, &mortar, &ifacecount, typeboun, &islavsurf, + &pslavsurf, &clearini, &nmat, xmodal, &iaxial, &inext, &nprop, + &network, orname, vel, &nef, velo, veloo, energy, itempuser, + ipobody, &inewton, t0g, t1g, &ifreebody, /* PreCICE args */ preciceParticipantName, configFilename); @@ -1410,32 +1400,27 @@ int main(int argc, char *argv[]) mpcinfo[2] = icascade; mpcinfo[3] = maxlenmpc; - nonlingeo_precice(&co, &nk, &kon, &ipkon, &lakon, &ne, nodeboun, ndirboun, xboun, &nboun, - &ipompc, &nodempc, &coefmpc, &labmpc, &nmpc, nodeforc, ndirforc, xforc, - &nforc, &nelemload, &sideload, xload, &nload, - nactdof, &icol, jq, &irow, neq, &nzl, &nmethod, &ikmpc, - &ilmpc, ikboun, ilboun, elcon, nelcon, rhcon, nrhcon, - alcon, nalcon, alzero, &ielmat, &ielorien, &norien, orab, &ntmat_, - t0, t1, t1old, ithermal, prestr, &iprestr, - &vold, iperturb, sti, nzs, &kode, filab, &idrct, jmax, - jout, timepar, eme, xbounold, xforcold, xloadold, - veold, accold, amname, amta, namta, - &nam, iamforc, &iamload, iamt1, alpha, - &iexpl, iamboun, plicon, nplicon, plkcon, nplkcon, - &xstate, &npmat_, &istep, &ttime, matname, qaold, mi, + nonlingeo_precice(&co, &nk, &kon, &ipkon, &lakon, &ne, nodeboun, ndirboun, xboun, + &nboun, &ipompc, &nodempc, &coefmpc, &labmpc, &nmpc, nodeforc, + ndirforc, xforc, &nforc, &nelemload, &sideload, xload, &nload, + nactdof, &icol, jq, &irow, neq, &nzl, &nmethod, &ikmpc, &ilmpc, + ikboun, ilboun, elcon, nelcon, rhcon, nrhcon, alcon, nalcon, + alzero, &ielmat, &ielorien, &norien, orab, &ntmat_, t0, t1, t1old, + ithermal, prestr, &iprestr, &vold, iperturb, sti, nzs, &kode, + filab, &idrct, jmax, jout, timepar, eme, xbounold, xforcold, + xloadold, veold, accold, amname, amta, namta, &nam, iamforc, + &iamload, iamt1, alpha, &iexpl, iamboun, plicon, nplicon, plkcon, + nplkcon, &xstate, &npmat_, &istep, &ttime, matname, qaold, mi, &isolver, &ncmat_, &nstate_, &iumat, cs, &mcs, &nkon, &ener, - mpcinfo, output, - shcon, nshcon, cocon, ncocon, physcon, &nflow, ctrl, - set, &nset, istartset, iendset, ialset, &nprint, prlab, - prset, &nener, ikforc, ilforc, trab, inotr, &ntrans, &fmpc, - cbody, ibody, xbody, &nbody, xbodyold, ielprop, prop, - &ntie, tieset, &itpamp, &iviewfile, jobnamec, tietol, &nslavs, thicke, - ics, &nintpoint, &mortar, - &ifacecount, typeboun, &islavsurf, &pslavsurf, &clearini, &nmat, - xmodal, &iaxial, &inext, &nprop, &network, orname, vel, &nef, - velo, veloo, energy, itempuser, - /* New args from 2.19 */ - &ipobody, &inewton, &t0g, &t1g, &ifreebody, + mpcinfo, output, shcon, nshcon, cocon, ncocon, physcon, &nflow, + ctrl, set, &nset, istartset, iendset, ialset, &nprint, prlab, + prset, &nener, ikforc, ilforc, trab, inotr, &ntrans, &fmpc, cbody, + ibody, xbody, &nbody, xbodyold, ielprop, prop, &ntie, tieset, + &itpamp, &iviewfile, jobnamec, tietol, &nslavs, thicke, ics, + &nintpoint, &mortar, &ifacecount, typeboun, &islavsurf, + &pslavsurf, &clearini, &nmat, xmodal, &iaxial, &inext, &nprop, + &network, orname, vel, &nef, velo, veloo, energy, itempuser, + ipobody, &inewton, t0g, t1g, &ifreebody, /* PreCICE args */ preciceParticipantName, configFilename); @@ -1456,32 +1441,27 @@ int main(int argc, char *argv[]) mpcinfo[2] = icascade; mpcinfo[3] = maxlenmpc; - nonlingeo_precice(&co, &nk, &kon, &ipkon, &lakon, &ne, nodeboun, ndirboun, xboun, &nboun, - &ipompc, &nodempc, &coefmpc, &labmpc, &nmpc, nodeforc, ndirforc, xforc, - &nforc, &nelemload, &sideload, xload, &nload, - nactdof, &icol, jq, &irow, neq, &nzl, &nmethod, &ikmpc, - &ilmpc, ikboun, ilboun, elcon, nelcon, rhcon, nrhcon, - alcon, nalcon, alzero, &ielmat, &ielorien, &norien, orab, &ntmat_, - t0, t1, t1old, ithermal, prestr, &iprestr, - &vold, iperturb, sti, nzs, &kode, filab, &idrct, jmax, - jout, timepar, eme, xbounold, xforcold, xloadold, - veold, accold, amname, amta, namta, - &nam, iamforc, &iamload, iamt1, alpha, - &iexpl, iamboun, plicon, nplicon, plkcon, nplkcon, - &xstate, &npmat_, &istep, &ttime, matname, qaold, mi, + nonlingeo_precice(&co, &nk, &kon, &ipkon, &lakon, &ne, nodeboun, ndirboun, xboun, + &nboun, &ipompc, &nodempc, &coefmpc, &labmpc, &nmpc, nodeforc, + ndirforc, xforc, &nforc, &nelemload, &sideload, xload, &nload, + nactdof, &icol, jq, &irow, neq, &nzl, &nmethod, &ikmpc, &ilmpc, + ikboun, ilboun, elcon, nelcon, rhcon, nrhcon, alcon, nalcon, + alzero, &ielmat, &ielorien, &norien, orab, &ntmat_, t0, t1, t1old, + ithermal, prestr, &iprestr, &vold, iperturb, sti, nzs, &kode, + filab, &idrct, jmax, jout, timepar, eme, xbounold, xforcold, + xloadold, veold, accold, amname, amta, namta, &nam, iamforc, + &iamload, iamt1, alpha, &iexpl, iamboun, plicon, nplicon, plkcon, + nplkcon, &xstate, &npmat_, &istep, &ttime, matname, qaold, mi, &isolver, &ncmat_, &nstate_, &iumat, cs, &mcs, &nkon, &ener, - mpcinfo, output, - shcon, nshcon, cocon, ncocon, physcon, &nflow, ctrl, - set, &nset, istartset, iendset, ialset, &nprint, prlab, - prset, &nener, ikforc, ilforc, trab, inotr, &ntrans, &fmpc, - cbody, ibody, xbody, &nbody, xbodyold, ielprop, prop, - &ntie, tieset, &itpamp, &iviewfile, jobnamec, tietol, &nslavs, thicke, - ics, &nintpoint, &mortar, - &ifacecount, typeboun, &islavsurf, &pslavsurf, &clearini, &nmat, - xmodal, &iaxial, &inext, &nprop, &network, orname, vel, &nef, - velo, veloo, energy, itempuser, - /* New args from 2.19 */ - &ipobody, &inewton, &t0g, &t1g, &ifreebody, + mpcinfo, output, shcon, nshcon, cocon, ncocon, physcon, &nflow, + ctrl, set, &nset, istartset, iendset, ialset, &nprint, prlab, + prset, &nener, ikforc, ilforc, trab, inotr, &ntrans, &fmpc, cbody, + ibody, xbody, &nbody, xbodyold, ielprop, prop, &ntie, tieset, + &itpamp, &iviewfile, jobnamec, tietol, &nslavs, thicke, ics, + &nintpoint, &mortar, &ifacecount, typeboun, &islavsurf, + &pslavsurf, &clearini, &nmat, xmodal, &iaxial, &inext, &nprop, + &network, orname, vel, &nef, velo, veloo, energy, itempuser, + ipobody, &inewton, t0g, t1g, &ifreebody, /* PreCICE args */ preciceParticipantName, configFilename); @@ -1654,7 +1634,7 @@ int main(int argc, char *argv[]) } #else - printf("*ERROR in CalculiX: the ARPACK library is not linked\n\n"); + printf(" *ERROR in CalculiX: the ARPACK library is not linked\n\n"); FORTRAN(stop, ()); #endif @@ -1696,7 +1676,7 @@ int main(int argc, char *argv[]) } #else - printf("*ERROR in CalculiX: the ARPACK library is not linked\n\n"); + printf(" *ERROR in CalculiX: the ARPACK library is not linked\n\n"); FORTRAN(stop, ()); #endif } @@ -1719,7 +1699,7 @@ int main(int argc, char *argv[]) ibody, xbody, &nbody, thicke, jobnamec, &nmat, ielprop, prop, orname, typeboun, t0g, t1g); #else - printf("*ERROR in CalculiX: the ARPACK library is not linked\n\n"); + printf(" *ERROR in CalculiX: the ARPACK library is not linked\n\n"); FORTRAN(stop, ()); #endif } else if (nmethod == 4) { @@ -1932,10 +1912,14 @@ int main(int argc, char *argv[]) else if (nmethod == 15) { crackpropagation(&ipkon, &kon, &lakon, &ne, &nk, jobnamec, &nboun, iamboun, xboun, - &nload, sideload, iamload, &nforc, iamforc, xforc, ithermal, t1, - iamt1, &co, &nkon, mi, &ielmat, matname, output, &nmat, set, + &nload, sideload, iamload, &nforc, iamforc, xforc, ithermal, + &t1, &iamt1, &co, &nkon, mi, &ielmat, matname, output, &nmat, set, &nset, istartset, iendset, ialset, jmax, timepar, nelcon, - elcon, &ncmat_, &ntmat_, &istep, filab, &nmethod, mei); + elcon, &ncmat_, &ntmat_, &istep, filab, &nmethod, mei, &ntrans, + &inotr, &t0, &ne1d, &ne2d, &t0g, &t1g, &nam, &t1old, &vold, + iperturb, &iprestr, &prestr, &norien, &ielorien, &nprop, + &ielprop, &offset, &sti, &eme, &nener, &ener, &nstate_, + &mortar, &nslavs, &nintpoint, &xstate, &iponor, &thicke); } else if (nmethod == 16) { @@ -1963,9 +1947,9 @@ int main(int argc, char *argv[]) if (irefineloop == 1) { /* refinement was requested in the step which was just - finished and a refined mesh was created and stored. - The calculation has to restart from the beginning with - this new mesh */ + finished and a refined mesh was created and stored. + The calculation has to restart from the beginning with + this new mesh */ memcpy(ipoinp, ipoinp_sav, sizeof(ITG) * 2 * nentries); memcpy(inp, inp_sav, sizeof(ITG) * inp_size); @@ -2191,7 +2175,7 @@ int main(int argc, char *argv[]) strcpy(fneig, jobnamec); strcat(fneig, ".frd"); if ((f1 = fopen(fneig, "ab")) == NULL) { - printf("*ERROR in frd: cannot open frd file for writing..."); + printf(" *ERROR in frd: cannot open frd file for writing..."); exit(0); } fprintf(f1, " 9999\n"); diff --git a/dyna_precice.c b/dyna_precice.c index 2ac42ae..c5fc53e 100644 --- a/dyna_precice.c +++ b/dyna_precice.c @@ -1,5 +1,5 @@ /* CalculiX - A 3-dimensional finite element program */ -/* Copyright (C) 1998-2021 Guido Dhondt */ +/* Copyright (C) 1998-2022 Guido Dhondt */ /* This program is free software; you can redistribute it and/or */ /* modify it under the terms of the GNU General Public License as */ /* published by the Free Software Foundation(version 2); */ @@ -142,7 +142,7 @@ void dyna_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **lakonp *shcon = NULL, *xmr = NULL, *xmi = NULL, *xnoels = NULL, *pslavsurf = NULL, *pmastsurf = NULL, *cdnr = NULL, *cdni = NULL, *tinc, *tper, *tmin, *tmax, *energyini = NULL, *energy = NULL, alea, *fext = NULL, *smscale = NULL, - *autloc = NULL, *xboun2 = NULL, *coefmpc2 = NULL; + *autloc = NULL, *xboun2 = NULL, *coefmpc2 = NULL, *fnext = NULL; FILE *f1; @@ -154,17 +154,17 @@ void dyna_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **lakonp ITG token; #endif - /* if iabsload=0: aamech is modified by the present incremental - contribution of fext - iabsload=1: the last incremental contribution is - subtracted before the new one is added to fext; - this latter incremental contribution is used - to update aamech - iabsload=2: aamech is determined by the absolute - contribution of fext (no incremental procedure - for the load; this is necessary if - - nonlinear MPC's are applied or - - user dloads are applied */ + /* if iabsload=0: aamech is modified by the present incremental + contribution of fext + iabsload=1: the last incremental contribution is + subtracted before the new one is added to fext; + this latter incremental contribution is used + to update aamech + iabsload=2: aamech is determined by the absolute + contribution of fext (no incremental procedure + for the load; this is necessary if + - nonlinear MPC's are applied or + - user dloads are applied */ co = *cop; kon = *konp; @@ -350,7 +350,7 @@ void dyna_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **lakonp if (iperturb[0] == 1) { NNEW(vold, double, mt **nk); if (fread(vold, sizeof(double), mt * *nk, f1) != mt * *nk) { - printf("*ERROR in dyna reading the reference displacements in the eigenvalue file..."); + printf(" *ERROR in dyna reading the reference displacements in the eigenvalue file..."); printf(" *INFO in dyna: if there are problems reading the .eig file this may be due to:\n"); printf(" 1) the nonexistence of the .eig file\n"); printf(" 2) other boundary conditions than in the input deck\n"); @@ -360,7 +360,7 @@ void dyna_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **lakonp } /* copying the displacements from the previous step as initial conditions in - vini (only if + vini (only if - not cyclic symmetric; initial conditions for cyclic symmetric calculations are assumed to be zero - AND not perturbed: if this is a perturbation step the initial @@ -393,7 +393,7 @@ void dyna_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **lakonp nboun, nset, ntie, tieset, set, lakon, kon, ipkon, labmpc, ilboun, filab, prlab, prset, nprint, ne, &cyclicsymmetry)); - /* if results are requested in too many nodes, it is faster to + /* if results are requested in too many nodes, it is faster to calculate the results in all nodes */ if ((nmdnode > *nk / 2) && (!cyclicsymmetry)) { @@ -445,7 +445,7 @@ void dyna_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **lakonp SFREE(inoel); } - /* if results are requested in too many nodes, it is faster to + /* if results are requested in too many nodes, it is faster to calculate the results in all nodes */ if ((nmdnode > *nk / 2) && (!cyclicsymmetry)) { @@ -762,7 +762,7 @@ void dyna_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **lakonp for (i = 0; i < *ntie; i++) { if (tieset[i * (81 * 3) + 80] == 'C') { - // a contact constraint was found, so increase nalset + //a contact constraint was found, so increase nalset memcpy(tchar2, &tieset[i * (81 * 3) + 81], 81); tchar2[80] = '\0'; @@ -773,12 +773,12 @@ void dyna_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **lakonp tchar1[80] = '\0'; if (strcmp(tchar1, tchar2) == 0) { - // dependent nodal surface was found + //dependent nodal surface was found (*nalset) += (iendset[j] - istartset[j] + 1) * (nsectors); } else if (strcmp(tchar1, tchar3) == 0) { - // independent element face surface was found + //independent element face surface was found (*nalset) += (iendset[j] - istartset[j] + 1) * (nsectors); } @@ -891,7 +891,7 @@ void dyna_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **lakonp *tmax = *tmax / (*tper); theta = 0.; - /* check for rigid body modes + /* check for rigid body modes if there is a jump of 1.e4 in two subsequent eigenvalues all eigenvalues preceding the jump are considered to be rigid body modes and their frequency is set to zero */ @@ -974,7 +974,7 @@ void dyna_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **lakonp /* contact conditions */ - /* storing the element and topology information before introducing + /* storing the element and topology information before introducing contact elements */ ne0 = *ne; @@ -990,17 +990,17 @@ void dyna_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **lakonp if (fabs(d[i]) > (1.e-10)) { zeta[i] = (alpham + betam * d[i] * d[i]) / (2. * d[i]); } else { - printf("*WARNING in dyna: one of the frequencies is zero\n"); + printf(" *WARNING in dyna: one of the frequencies is zero\n"); printf(" no Rayleigh mass damping allowed\n"); zeta[i] = 0.; } /* if the nodal diameter exceeds half the number of sectors - the sign of the damping has to be reversed (omega is negative) */ + the sign of the damping has to be reversed (omega is negative) */ /* if(cyclicsymmetry){ - if(nm[i]>nsectors/2) zeta[i]*=-1.; - }*/ + if(nm[i]>nsectors/2) zeta[i]*=-1.; + }*/ } } // else{ @@ -1010,7 +1010,7 @@ void dyna_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **lakonp if (nev < (ITG) xmodal[10]) { imax = nev; - printf("*WARNING in dyna: too many modal damping coefficients applied\n"); + printf(" *WARNING in dyna: too many modal damping coefficients applied\n"); printf(" damping coefficients corresponding to nonexisting eigenvalues are ignored\n"); } else { imax = (ITG) xmodal[10]; @@ -1019,11 +1019,11 @@ void dyna_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **lakonp zeta[i] = xmodal[11 + i]; /* if the nodal diameter exceeds half the number of sectors - the sign of the damping has to be reversed (omega is negative) */ + the sign of the damping has to be reversed (omega is negative) */ /* if(cyclicsymmetry){ - if(nm[i]>nsectors/2) zeta[i]*=-1.; - }*/ + if(nm[i]>nsectors/2) zeta[i]*=-1.; + }*/ } } @@ -1119,7 +1119,7 @@ void dyna_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **lakonp NNEW(ipobody,ITG,2**ne); for(k=1;k<=*nbody;k++){ FORTRAN(bodyforce,(cbody,ibody,ipobody,nbody,set,istartset, - iendset,ialset,&inewton,nset,&ifreebody,&k)); + iendset,ialset,&inewton,nset,&ifreebody,&k)); RENEW(ipobody,ITG,2*(*ne+ifreebody)); } RENEW(ipobody,ITG,2*(ifreebody-1)); @@ -1193,9 +1193,9 @@ void dyna_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **lakonp } } - /* calculating the instantaneous loads (forces, surface loading, - centrifugal and gravity loading or temperature) at time 0 - setting iabsload to 2 if user subroutine dload is used */ + /* calculating the instantaneous loads (forces, surface loading, + centrifugal and gravity loading or temperature) at time 0 + setting iabsload to 2 if user subroutine dload is used */ /* FORTRAN(tempload,(xforcold,xforc,xforcact,iamforc,nforc,xloadold, xload,xloadact,iamload,nload,ibody,xbody,nbody,xbodyold, @@ -1235,7 +1235,7 @@ void dyna_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **lakonp nplicon, plkcon, nplkcon, npmat_, ttime, &time0, istep, &iinc, &dtime, physcon, ibody, xbodyold, &reltime, veold, matname, mi, ikactmech, &nactmech, ielprop, prop, sti, xstateini, xstate, nstate_, ntrans, - inotr, trab); + inotr, trab, fnext); /* correction for nonzero SPC's */ @@ -1281,7 +1281,7 @@ void dyna_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **lakonp pardiso_factor(ad, au, adb, aub, &sigma, icol, irow, &neq[1], &nzs[1], &symmetryflag, &inputformat, jq, &nzs[2]); #else - printf("*ERROR in dyna: the PARDISO library is not linked\n\n"); + printf(" *ERROR in dyna: the PARDISO library is not linked\n\n"); FORTRAN(stop, ()); #endif } else if (*isolver == 8) { @@ -1289,7 +1289,7 @@ void dyna_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **lakonp pastix_factor_main(ad, au, adb, aub, &sigma, icol, irow, &neq[1], &nzs[1], &symmetryflag, &inputformat, jq, &nzs[2]); #else - printf("*ERROR in arpack: the PASTIX library is not linked\n\n"); + printf(" *ERROR in arpack: the PASTIX library is not linked\n\n"); FORTRAN(stop, ()); #endif } @@ -1411,7 +1411,7 @@ void dyna_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **lakonp resultmaxprev = 0.; resultmax = 0.; - // while(1.-theta>1.e-6){ + // while(1.-theta>1.e-6){ /* Adapter: Create the interfaces and initialize the coupling */ Precice_Setup(configFilename, preciceParticipantName, &simulationData); @@ -1474,9 +1474,9 @@ void dyna_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **lakonp dtheta = dthetaref * dd; /* check increment length whether - - it does not exceed tmax - - the step length is not exceeded - - a time point is not exceeded */ + - it does not exceed tmax + - the step length is not exceeded + - a time point is not exceeded */ dthetaref = dtheta; checkinclength(&time0, ttime, &theta, &dtheta, idrct, tper, tmax, @@ -1488,7 +1488,7 @@ void dyna_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **lakonp time = reltime * *tper; dtime = dtheta * *tper; - /* calculating the instantaneous loads (forces, surface loading, + /* calculating the instantaneous loads (forces, surface loading, centrifugal and gravity loading or temperature) */ FORTRAN(temploaddiff, (xforcold, xforc, xforcact, iamforc, nforc, @@ -1518,7 +1518,7 @@ void dyna_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **lakonp npmat_, ttime, &time, istep, &iinc, &dtime, physcon, ibody, xbodyold, &reltime, veold, matname, mi, ikactmech, &nactmech, ielprop, prop, sti, xstateini, xstate, nstate_, ntrans, inotr, - trab); + trab, fnext); } else { rhsmain(co, nk, kon, ipkon, lakon, ne, ipompc, nodempc, coefmpc, nmpc, nodeforc, ndirforc, xforcact, @@ -1531,7 +1531,7 @@ void dyna_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **lakonp npmat_, ttime, &time, istep, &iinc, &dtime, physcon, ibody, xbodyold, &reltime, veold, matname, mi, ikactmech, &nactmech, ielprop, prop, sti, xstateini, xstate, nstate_, ntrans, inotr, - trab); + trab, fnext); } /* correction for nonzero SPC's */ @@ -1611,8 +1611,8 @@ void dyna_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **lakonp time = reltime * *tper; dtime = dtheta * *tper; - /* calculating the instantaneous loads (forces, surface loading, - centrifugal and gravity loading or temperature) */ + /* calculating the instantaneous loads (forces, surface loading, + centrifugal and gravity loading or temperature) */ FORTRAN(temploaddiff, (xforcold, xforc, xforcact, iamforc, nforc, xloadold, xload, xloadact, iamload, nload, ibody, xbody, @@ -1641,7 +1641,7 @@ void dyna_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **lakonp npmat_, ttime, &time, istep, &iinc, &dtime, physcon, ibody, xbodyold, &reltime, veold, matname, mi, ikactmech, &nactmech, ielprop, prop, sti, xstateini, xstate, nstate_, ntrans, inotr, - trab); + trab, fnext); } else { rhsmain(co, nk, kon, ipkon, lakon, ne, ipompc, nodempc, coefmpc, nmpc, nodeforc, ndirforc, xforcact, @@ -1654,7 +1654,7 @@ void dyna_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **lakonp npmat_, ttime, &time, istep, &iinc, &dtime, physcon, ibody, xbodyold, &reltime, veold, matname, mi, ikactmech, &nactmech, ielprop, prop, sti, xstateini, xstate, nstate_, ntrans, inotr, - trab); + trab, fnext); } /* correction for nonzero SPC's */ @@ -1959,7 +1959,7 @@ void dyna_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **lakonp if ((iout == 2) || (iout == -2)) { /* deactivating the elements for which the stresses are not - needed */ + needed */ if (nmdnode > 0) { if ((intpointvar == 1)) { @@ -2132,7 +2132,7 @@ void dyna_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **lakonp if ((intpointvar == 1)) SFREE(stx); - /* calculating the displacements and velocities in all nodes as + /* calculating the displacements and velocities in all nodes as initial condition for the next step; only needed if - nonzero initial conditions are allowed (-> no cyclic symmetry) - the output was restricted (-> nmdnode nonzero) */ @@ -2195,7 +2195,7 @@ void dyna_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **lakonp SFREE(qfx); } - /* updating the loading at the end of the step; + /* updating the loading at the end of the step; important in case the amplitude at the end of the step is not equal to one */ diff --git a/nonlingeo_precice.c b/nonlingeo_precice.c index a8bd8ba..01bcc93 100644 --- a/nonlingeo_precice.c +++ b/nonlingeo_precice.c @@ -1,5 +1,5 @@ /* CalculiX - A 3-dimensional finite element program */ -/* Copyright (C) 1998-2021 Guido Dhondt */ +/* Copyright (C) 1998-2022 Guido Dhondt */ /* This program is free software; you can redistribute it and/or */ /* modify it under the terms of the GNU General Public License as */ @@ -99,7 +99,7 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l *sideloadref = NULL, *sideload = NULL, stiffmatrix[132] = "", *sideloadf = NULL; - ITG *inum = NULL, k, iout = 0, icntrl, iinc = 0, jprint = 0, iit = -1, jnz = 0, + ITG *inum = NULL, k, l, iout = 0, icntrl, iinc = 0, jprint = 0, iit = -1, jnz = 0, icutb = 0, istab = 0, uncoupled, n1, n2, itruecontact, iperturb_sav[2], ilin, *icol = NULL, *irow = NULL, ielas = 0, icmd = 0, memmpc_, mpcfree, icascade, maxlenmpc, *nodempc = NULL, *iaux = NULL, @@ -123,7 +123,7 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l coriolis = 0, *ipneigh = NULL, *neigh = NULL, maxprevcontel, nslavs_prev_step, *nelemface = NULL, *ipoface = NULL, *nodface = NULL, *ifreestream = NULL, *isolidsurf = NULL, *neighsolidsurf = NULL, *iponoel = NULL, *inoel = NULL, - nface, nfreestream, nsolidsurf, i, icfd = 0, id, + nface, nfreestream, nsolidsurf, i, icfd = 0, id, mortarsav = 0, node, networknode, iflagact = 0, *nodorig = NULL, *ipivr = NULL, iglob = 0, *inomat = NULL, *ipnei = NULL, ntrimax, *nx = NULL, *ny = NULL, *nz = NULL, idampingwithoutcontact = 0, *nactdoh = NULL, *nactdohinv = NULL, *ipkonf = NULL, @@ -140,7 +140,9 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l *nelemloadf = NULL, *ipobodyf = NULL, nkf, nkonf, memmpcf, nbounf, nloadf, nmpcf, *ikbounf = NULL, *ilbounf = NULL, *ikmpcf = NULL, *ilmpcf = NULL, *iambounf = NULL, *iamloadf = NULL, *inotrf = NULL, *jqtherm = NULL, *jqw = NULL, *iroww = NULL, nzsw, - *kslav = NULL, *lslav = NULL, *ktot = NULL, *ltot = NULL, nmasts, neqslav, neqtot; + *kslav = NULL, *lslav = NULL, *ktot = NULL, *ltot = NULL, nmasts, neqtot, + intpointvarm, calcul_fn, calcul_f, calcul_qa, calcul_cauchy, ikin, + intpointvart; double *stn = NULL, *v = NULL, *een = NULL, cam[5], *epn = NULL, *cg = NULL, *cdn = NULL, *pslavsurfold = NULL, @@ -177,7 +179,7 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l *smscale = NULL, dtset, energym = 0., energymold = 0., *voldf = NULL, *coefmpcf = NULL, *xbounf = NULL, *xloadf = NULL, *xbounoldf = NULL, *xbounactf = NULL, *xloadoldf = NULL, *xloadactf = NULL, *auw = NULL, *volddof = NULL, - *qb = NULL; + *qb = NULL, *aloc = NULL, dtmin, *fric = NULL; FILE *f1; @@ -357,6 +359,14 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l uncoupled = 0; } + /* for massless explicit dynamics a static step in the same + calculation is performed with node-to-face contact */ + + if ((*nmethod == 1) && (*mortar == -1)) { + mortarsav = -1; + *mortar = 0; + } + if (*mortar != 1) { maxprevcontel = *nslavs; } else if (*mortar == 1) { @@ -374,7 +384,7 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l } nslavs_prev_step = *nslavs; - /* turbulence model + /* turbulence model iturbulent==0: laminar iturbulent==1: k-epsilon iturbulent==2: q-omega @@ -431,12 +441,13 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l /* explicit dynamics */ - if (fabs(alpham) > 1.e-30) { + if ((fabs(alpham) > 1.e-30) || ((fabs(betam) > 1.e-30) && (*mortar == -1))) { idamping = 1; idampingwithoutcontact = 1; } - if (fabs(betam) > 1.e-30) { // TODO cmt adapt to massless: we can take BETA - printf(" *ERROR: in explicit dynamic calculations the damping is only\n"); + if ((fabs(betam) > 1.e-30) && (*mortar != -1)) { + printf(" *ERROR in nonlingeo: in explicit dynamic calculations\n"); + printf(" without massless contact the damping is only\n"); printf(" allowed to be mass proportional: the coefficient beta\n"); printf(" of the stiffness proportional term must be zero\n"); FORTRAN(stop, ()); @@ -486,11 +497,11 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l /* invert nactdof */ - NNEW(nactdofinv, ITG, mt * *nk); - MNEW(nodorig, ITG, *nk); - FORTRAN(gennactdofinv, (nactdof, nactdofinv, nk, mi, nodorig, - ipkon, lakon, kon, ne)); - SFREE(nodorig); + /* NNEW(nactdofinv,ITG,mt**nk); + MNEW(nodorig,ITG,*nk); + FORTRAN(gennactdofinv,(nactdof,nactdofinv,nk,mi,nodorig, + ipkon,lakon,kon,ne)); + SFREE(nodorig);*/ /* allocating a field for the stiffness matrix */ @@ -566,7 +577,8 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l nodeboun, nacteq, nboun, ielprop, prop, &nteq, v, network, physcon, shcon, ntmat_, co, vold, set, nshcon, rhcon, nrhcon, mi, nmpc, nodempc, - ipompc, labmpc, ikboun, &nasym, ttime, &time, iaxial)); + ipompc, labmpc, ikboun, &nasym, ttime, &time, + iaxial)); SFREE(v); if ((*mcs > 0) && (ntr > 0)) { @@ -599,6 +611,8 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l if (*network > 0) { FORTRAN(networkelementpernode, (iponoel, inoel, lakon, ipkon, kon, &inoelsize, nflow, ieg, ne, network)); + FORTRAN(checkforhomnet, (ieg, nflow, lakon, ipkon, kon, itg, &ntg, + iponoel, inoel)); } RENEW(inoel, ITG, 2 * inoelsize); } @@ -673,7 +687,7 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l SFREE(nactdohinv); /* rearranging the fluid nodes and elements such that - no gaps occur */ + no gaps occur */ NNEW(ipkonf, ITG, *nef); NNEW(lakonf, char, 8 * *nef); @@ -768,11 +782,10 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l NNEW(inoelf, ITG, 2 * 8 * *nef); NNEW(inomat, ITG, nkftot); FORTRAN(topocfdfem, (nelemface, sideface, &nface, ipoface, nodface, nef, ipkonf, - konf, lakonf, &nkf, - isolidsurf, &nsolidsurf, ifreestream, &nfreestream, - neighsolidsurf, iponoelf, inoelf, &inoelfree, cof, - set, istartset, iendset, - ialset, nset, &iturbulent, inomat, ielmatf, ipface)); + konf, lakonf, &nkf, isolidsurf, &nsolidsurf, ifreestream, + &nfreestream, neighsolidsurf, iponoelf, inoelf, + &inoelfree, cof, set, istartset, iendset, ialset, nset, + &iturbulent, inomat, ielmatf, ipface, nknew)); RENEW(sideface, char, nface); RENEW(nelemface, ITG, nface); SFREE(ipoface); @@ -852,7 +865,7 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l NNEW(clearini, double, 3 * 9 * *ifacecount); /* check whether at least one contact definition involves true contact - and not just tied contact */ + and not just tied contact */ FORTRAN(checktruecontact, (ntie, tieset, tietol, elcon, &itruecontact, ncmat_, ntmat_)); @@ -991,7 +1004,7 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l } } - /* storing the element and topology information before introducing + /* storing the element and topology information before introducing contact elements */ ne0 = *ne; @@ -1011,7 +1024,7 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l /* initialization of the energy */ - if (ithermal[0] <= 1) { + if ((ithermal[0] <= 1) && (*nener == 1)) { isiz = mi[0] * ne0; cpypardou(enerini, ener, &isiz, &num_cpus); } @@ -1038,8 +1051,8 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l dtime = 1.; /* updating the nonlinear mpc's (also affects the boundary - conditions through the nonhomogeneous part of the mpc's) - if contact arises the number of MPC's can also change */ + conditions through the nonhomogeneous part of the mpc's) + if contact arises the number of MPC's can also change */ cam[0] = 0.; cam[1] = 0.; @@ -1089,7 +1102,7 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l /* invert nactdof */ - SFREE(nactdofinv); + // SFREE(nactdofinv); NNEW(nactdofinv, ITG, 1); iout = -1; @@ -1147,15 +1160,15 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l mscalmethod = 0; /* Explicit: Calculation of stable time increment according to - Courant's Law Carlo Monjaraz Tec (CMT) and Selctive Mass Scaling CC*/ + Courant's Law Carlo Monjaraz Tec (CMT) and Selctive Mass Scaling CC*/ /*Mass Scaling - mscalmethod < 0: no explicit dynamics - mscalmethod = 0: no mass scaling - mscalmethod = 1: selective mass scaling for nonlinearity after - Olovsson et. al 2005 + mscalmethod < 0: no explicit dynamics + mscalmethod = 0: no mass scaling + mscalmethod = 1: selective mass scaling for nonlinearity after + Olovsson et. al 2005 - mscalmethod=2 and mscalmethod=3 correspond to 0 and 1, + mscalmethod=2 and mscalmethod=3 correspond to 0 and 1, respectively with in addition contact scaling active; contact scaling is activated if the user time increment cannot be satisfied */ @@ -1167,11 +1180,12 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l nplicon, plkcon, nplkcon, npmat_, mi, &dtime, xstiff, ncmat_, vold, ielmat, t0, t1, matname, lakon, wavespeed, nmat, ipkon, co, kon, &dtvol, - alpha, smscale, &dtset, &mscalmethod)); + alpha, smscale, &dtset, &mscalmethod, mortar, + jobnamef)); - // printf("\033[1;33m"); // yellow - printf("Explicit time integration: Volumetric COURANT initial stable time increment:%e\n\n", dtvol); - // printf("\033[0m"); // reset color + //printf("\033[1;33m"); // yellow + printf(" Explicit time integration: Volumetric COURANT initial stable time increment:%e\n\n", dtvol); + //printf("\033[0m"); // reset color if (dtvol > (*tmax * (*tper))) { *tinc = *tmax * (*tper); @@ -1183,19 +1197,19 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l dtheta = (*tinc) / (*tper); dthetaref = dtheta; - // printf("\033[1;33m"); // yellow - printf("SELECTED time increment:%e\n\n", *tinc); - // printf("\033[0m"); // reset color + //printf("\033[1;33m"); // yellow + printf(" SELECTED time increment:%e\n\n", *tinc); + //printf("\033[0m"); // reset color } /* in mafillsm the stiffness and mass matrix are computed; - The primary aim is to calculate the mass matrix (not + The primary aim is to calculate the mass matrix (not lumped for an implicit dynamic calculation, lumped for an explicit dynamic calculation). However: - for an implicit calculation the mass matrix is "doped" with a small amount of stiffness matrix, therefore the calculation of the stiffness matrix is needed. - - for an explicit calculation the stiffness matrix is not + - for an explicit calculation the stiffness matrix is not needed at all. Since the calculation of the mass matrix alone is not possible in mafillsm, the determination of the stiffness matrix is taken as unavoidable "ballast". */ @@ -1264,14 +1278,18 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l NNEW(lslav, ITG, 3 * *nslavs); NNEW(ktot, ITG, 3 * *nslavs + 3 * nmasts); NNEW(ltot, ITG, 3 * *nslavs + 3 * nmasts); + NNEW(fric, double, *nslavs); - /* Create set of slave and slave+master contact DOFS (sorted) */ + /* Create set of slave and slave+master contact DOFS (sorted); + assign a friction coefficient to each slave node */ FORTRAN(create_contactdofs, (kslav, lslav, ktot, ltot, nslavs, islavnode, - &nmasts, imastnode, nactdof, mi, &neqslav, &neqtot)); + &nmasts, imastnode, nactdof, mi, &neqtot, + nslavnode, fric, tieset, tietol, ntie, elcon, + ncmat_, ntmat_)); - RENEW(kslav, ITG, neqslav); - RENEW(lslav, ITG, neqslav); + RENEW(kslav, ITG, 3 * *nslavs); + RENEW(lslav, ITG, 3 * *nslavs); RENEW(ktot, ITG, neqtot); RENEW(ltot, ITG, neqtot); @@ -1348,9 +1366,13 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l #endif } - } // endif massless + // Storing contact force vector initial solution + + NNEW(aloc, double, 3 * *nslavs); - /* mass x acceleration = f(external)-f(internal) + } //endif massless + + /* mass x acceleration = f(external)-f(internal) only for the mechanical loading*/ /* not needed for massless contact */ @@ -1364,8 +1386,8 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l if (*iexpl <= 1) { /* a small amount of stiffness is added to the mass matrix - otherwise the system leads to huge accelerations in - case of discontinuous load changes at the start of the step */ + otherwise the system leads to huge accelerations in + case of discontinuous load changes at the start of the step */ dtime = *tinc / 10.; scal1 = bet * dtime * dtime * (1. + alpha[0]); @@ -1445,7 +1467,7 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l &symmetryflag, &inputformat, &nzs[2]); spooles_solve(b, &neq[0]); #else - printf("*ERROR in arpack: the SPOOLES library is not linked\n\n"); + printf(" *ERROR in nonlingeo: the SPOOLES library is not linked\n\n"); FORTRAN(stop, ()); #endif } else if (*isolver == 4) { @@ -1454,7 +1476,7 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l sgi_factor(adb, aub, adb, aub, &sigma, icol, irow, &neq[0], &nzs[0], token); sgi_solve(b, token); #else - printf("*ERROR in arpack: the SGI library is not linked\n\n"); + printf(" *ERROR in nonlingeo: the SGI library is not linked\n\n"); FORTRAN(stop, ()); #endif } else if (*isolver == 5) { @@ -1462,7 +1484,7 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l tau_factor(adb, &aub, adb, aub, &sigma, icol, &irow, &neq[0], &nzs[0]); tau_solve(b, &neq[0]); #else - printf("*ERROR in arpack: the TAUCS library is not linked\n\n"); + printf(" *ERROR in nonlingeo: the TAUCS library is not linked\n\n"); FORTRAN(stop, ()); #endif } else if (*isolver == 7) { @@ -1472,7 +1494,7 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l pardiso_solve(b, &neq[0], &symmetryflag, &inputformat, &nrhs); #else - printf("*ERROR in arpack: the PARDISO library is not linked\n\n"); + printf(" *ERROR in nonlingeo: the PARDISO library is not linked\n\n"); FORTRAN(stop, ()); #endif } else if (*isolver == 8) { @@ -1482,7 +1504,7 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l pastix_solve(b, &neq[0], &symmetryflag, &nrhs); #else - printf("*ERROR in arpack: the PASTIX library is not linked\n\n"); + printf(" *ERROR in nonlingeo: the PASTIX library is not linked\n\n"); FORTRAN(stop, ()); #endif } @@ -1506,8 +1528,8 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l MNEW(fn, double, mt **nk); /* setting a "special" time consisting of the first primes; - used to recognize the initial acceleration procedure - in file resultsini.f */ + used to recognize the initial acceleration procedure + in file resultsini.f */ if (ne1d2d == 1) NNEW(inum, ITG, *nk); @@ -1565,8 +1587,8 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l // # # # # # # # # # # # # # # # # # # # # # # # # # # # # # // MPADD start - /* lumping of the mass matrix for implicit calculations to - modify the increment time when contact is involved + /* lumping of the mass matrix for implicit calculations to + modify the increment time when contact is involved */ NNEW(tmp, double, neq[1]); @@ -1593,9 +1615,9 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l /* starting the loop over the increments */ /**************************************************************/ - // printf("\033[0;34m"); // blue - // printf("Starting the loop over the increments\n"); - // printf("\033[0m"); // reset color + //printf("\033[0;34m"); // blue + //printf("Starting the loop over the increments\n"); + //printf("\033[0m"); // reset color newstep = 1; @@ -1650,7 +1672,7 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l jprint++; /* store number of elements (important for implicit dynamic - contact */ + contact */ neini = *ne; @@ -1734,7 +1756,7 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l /* check for max. # of increments */ if (iinc > jmax[0]) { - printf(" *ERROR: max. # of increments reached\n\n"); + printf(" *ERROR in nonlingeo: max. # of increments reached\n\n"); FORTRAN(stop, ()); } @@ -1808,7 +1830,7 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l iamload, jqrad, irowrad, &nzsrad, icolrad, ne, iaxial, qa, cocon, ncocon, iponoel, - inoel, nprop, amname, namta, amta); + inoel, nprop, amname, namta, amta, iexpl); /* check whether network iterations converged */ @@ -1831,8 +1853,8 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l &dampwkini, energystartstep); /* the divergence is flagged by icntrl!=0 - icutb is reset to zero in order to generate - regular contact elements etc.. */ + icutb is reset to zero in order to generate + regular contact elements etc.. */ icutb--; } @@ -1882,17 +1904,17 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l if ((ncont != 0) && (*mortar <= 1) && /* for purely thermal calculations: determine contact integration - points only at the start of a step */ + points only at the start of a step */ ((*ithermal != 2) || (iit == -1))) { *ne = ne0; *nkon = nkon0; - /* at start of new increment: - - copy state variables (node-to-face) - - determine slave integration points (face-to-face) - - interpolate state variables (face-to-face) */ + /* at start of new increment: + - copy state variables (node-to-face) + - determine slave integration points (face-to-face) + - interpolate state variables (face-to-face) */ if (icutb == 0) { if (*mortar == 1) { @@ -1913,7 +1935,7 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l *nintpoint = 0; /* determine the location of the slave integration - points */ + points */ precontact(&ncont, ntie, tieset, nset, set, istartset, iendset, ialset, itietri, lakon, ipkon, kon, koncont, ne, @@ -2000,7 +2022,7 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l contact(&ncont, ntie, tieset, nset, set, istartset, iendset, ialset, itietri, lakon, ipkon, kon, koncont, ne, cg, straight, nkon, co, vold, ielmat, cs, elcon, istep, &iinc, &iit, ncmat_, ntmat_, - &ne0, vini, nmethod, + &ne0, nmethod, iperturb, ikboun, nboun, mi, imastop, nslavnode, islavnode, islavsurf, itiefac, areaslav, iponoels, inoels, springarea, tietol, &reltime, @@ -2009,8 +2031,8 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l xstateini, xstate, nstate_, &icutb, &ialeatoric, jobnamef, &alea, auw, jqw, iroww, &nzsw); - /* check whether, for a dynamic calculation, contact damping - is involved */ + /* check whether, for a dynamic calculation, contact damping + is involved */ if (*nmethod == 4) { if (*iexpl <= 1) { @@ -2039,10 +2061,10 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l /* carlo start */ - /* dynamic time step estimation for explicit dynamics under penalty - contact(CMT) start */ + /* dynamic time step estimation for explicit dynamics under penalty + contact(CMT) start */ - if ((*iexpl > 1)) { + if ((*iexpl > 1) && (*mortar != -1)) { if ((*ne - ne0) < ncontacts) { @@ -2060,14 +2082,20 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l mortar, adb, alpha, nactdof, springarea, &ne0, ntmat_, ncmat_, &dtcont, smscale, &dtset, &mscalmethod)); + if (dtcont < dtvol) { + dtmin = dtcont; + } else { + dtmin = dtvol; + } - if (dtcont > (*tmax * (*tper))) { + if (dtmin > (*tmax * (*tper))) { *tinc = *tmax * (*tper); - } else if (dtcont < dtset) { + } else if (dtmin < dtset) { *tinc = dtset; } else { - *tinc = dtcont; + *tinc = dtmin; } + dtheta = (*tinc) / (*tper); dthetaref = dtheta; @@ -2096,7 +2124,7 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l } /* updating the nonlinear mpc's (also affects the boundary - conditions through the nonhomogeneous part of the mpc's) */ + conditions through the nonhomogeneous part of the mpc's) */ FORTRAN(nonlinmpc, (co, vold, ipompc, nodempc, coefmpc, labmpc, nmpc, ikboun, ilboun, nboun, xbounact, aux, iaux, @@ -2111,9 +2139,13 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l cpypardou(coefmpcref, coefmpc, &isiz, &num_cpus); } - /* recalculating the matrix structure */ + /* recalculating the matrix structure; only needed if: + 1) MPC's are cascaded + 2) contact occurs in an implicit calculation + (in penalty explicit no matrices are needed, in massless + explicit no contact elements are generated) */ - if ((icascade > 0) || (ncont != 0)) + if ((icascade > 0) || ((ncont != 0) && (*iexpl <= 1))) remastruct(ipompc, &coefmpc, &nodempc, nmpc, &mpcfree, nodeboun, ndirboun, nboun, ikmpc, ilmpc, ikboun, ilboun, labmpc, nk, &memmpc_, &icascade, &maxlenmpc, @@ -2123,14 +2155,16 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l typeboun, &cv, &cvini, &iit, network, itiefac, &ne0, &nkon0, nintpoint, islavsurf, pmastsurf, tieset, ntie, &num_cpus); - /* invert nactdof */ + /* invert nactdof (not for dynamic explicit calculations) */ - SFREE(nactdofinv); - NNEW(nactdofinv, ITG, mt * *nk); - MNEW(nodorig, ITG, *nk); - FORTRAN(gennactdofinv, (nactdof, nactdofinv, nk, mi, nodorig, - ipkon, lakon, kon, ne)); - SFREE(nodorig); + if (*iexpl <= 1) { + SFREE(nactdofinv); + NNEW(nactdofinv, ITG, mt * *nk); + MNEW(nodorig, ITG, *nk); + FORTRAN(gennactdofinv, (nactdof, nactdofinv, nk, mi, nodorig, + ipkon, lakon, kon, ne)); + SFREE(nodorig); + } /* check whether the forced displacements changed; if so, and if the procedure is static, the first iteration has to be @@ -2174,29 +2208,29 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l NNEW(stx, double, 6 * mi[0] * *ne); /* determining the internal forces at the start of the increment - + for a static calculation with increased forced displacements the linear strains are calculated corresponding to - + the displacements at the end of the previous increment, extrapolated if appropriate (for nondispersive media) + the forced displacements at the end of the present increment + the temperatures at the end of the present increment (this sum is v) - the displacements at the end of the previous increment (this is vold) - + these linear strains are converted in stresses by multiplication with the tangent element stiffness matrix and converted into nodal - forces. - + forces. + this boils down to the fact that the effect of forced displacements should be handled in a purely linear way at the start of a new increment, in order to speed up the convergence and (for dissipative media) guarantee smooth loading within the increment. - + for all other cases the nodal force calculation is based on the true stresses derived from the appropriate strain tensor taking - into account the extrapolated displacements at the end of the + into account the extrapolated displacements at the end of the previous increment + the forced displacements and the temperatures at the end of the present increment */ @@ -2247,7 +2281,7 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l SFREE(inum); /* check whether any displacements or temperatures are changed - in the new increment */ + in the new increment */ for (k = 0; k < neq[1]; ++k) { f[k] = f[k] + b[k]; @@ -2337,14 +2371,14 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l #endif /* updating the nonlinear mpc's (also affects the boundary - conditions through the nonhomogeneous part of the mpc's) */ + conditions through the nonhomogeneous part of the mpc's) */ if ((iit != 1) || ((uncoupled) && (*ithermal == 1))) { printf(" iteration %" ITGFORMAT "\n\n", iit); /* restoring the distributed loading before adding the - friction heating */ + friction heating */ if ((*ithermal == 3) && (ncont != 0) && (*mortar == 1) && (*ncmat_ >= 11)) { *nload = nloadref; @@ -2389,7 +2423,7 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l set, mi, istartset, iendset, ialset, nset, ineighe, nmpc, nodempc, ipompc, coefmpc, labmpc, &iemchange, nam, iamload, jqrad, irowrad, &nzsrad, icolrad, ne, iaxial, qa, cocon, ncocon, - iponoel, inoel, nprop, amname, namta, amta); + iponoel, inoel, nprop, amname, namta, amta, iexpl); /* check whether network iterations converged */ @@ -2428,10 +2462,10 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l if ((ncont != 0) && (*mortar <= 1) && (ismallsliding == 0) && /* for node-to-face contact: freeze contact elements for - iterations 8 and higher */ + iterations 8 and higher */ ((iit <= 8) || (*mortar == 1)) && /* for purely thermal calculations: freeze contact elements - during complete step */ + during complete step */ ((*ithermal != 2) || (iit == -1))) { neold = *ne; @@ -2441,7 +2475,7 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l ialset, itietri, lakon, ipkon, kon, koncont, ne, cg, straight, nkon, co, vold, ielmat, cs, elcon, istep, &iinc, &iit, ncmat_, ntmat_, &ne0, - vini, nmethod, iperturb, + nmethod, iperturb, ikboun, nboun, mi, imastop, nslavnode, islavnode, islavsurf, itiefac, areaslav, iponoels, inoels, springarea, tietol, &reltime, imastnode, nmastnode, xmastnor, @@ -2449,8 +2483,8 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l clearini, &theta, xstateini, xstate, nstate_, &icutb, &ialeatoric, jobnamef, &alea, auw, jqw, iroww, &nzsw); - /* check whether, for a dynamic calculation, contact damping is - involved */ + /* check whether, for a dynamic calculation, contact damping is + involved */ if (*nmethod == 4) { if (*iexpl <= 1) { @@ -2511,7 +2545,7 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l /* recalculating the matrix structure */ /* for face-to-face contact (mortar=1) this is only done if - the dependent term in nonlinear MPC's changed */ + the dependent term in nonlinear MPC's changed */ if ((icascade > 0) || (ncont != 0)) { if ((*mortar != 1) || (kchdep == 1)) { @@ -2681,9 +2715,9 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l } else { - /* calculating the external loading + /* calculating the external loading - This is only done once per increment. In reality, the + This is only done once per increment. In reality, the external loading is a function of vold (specifically, the body forces and surface loading). This effect is neglected, since the increment size in dynamic explicit @@ -2701,13 +2735,13 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l npmat_, ttime, &time, istep, &iinc, &dtime, physcon, ibody, xbodyold, &reltime, veold, matname, mi, ikactmech, &nactmech, ielprop, prop, sti, xstateini, xstate, nstate_, - ntrans, inotr, trab); + ntrans, inotr, trab, fnext); } - /* for(k=0;k 1) { /* restoring the structure of the original stiffness - matrix */ + matrix */ for (i = 0; i < 3; i++) { nzs[i] = nzstemp[i]; @@ -3301,6 +3343,14 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l NNEW(stx, double, 6 * mi[0] * *ne); MNEW(fn, double, mt **nk); + /* if((*nmethod==4)&&(*iexpl>1)&&(*nener==0)){ + resultsini(nk,v,ithermal,filab,iperturb,f,fn, + nactdof,&iout,qa,vold,b,nodeboun,ndirboun, + xboun,nboun,ipompc,nodempc,coefmpc,labmpc,nmpc,nmethod,cam, + &neq[1],veold,accold,&bet,&gam,&dtime,mi,vini,nprint,prlab, + &intpointvarm,&calcul_fn,&calcul_f,&calcul_qa,&calcul_cauchy, + &ikin,&intpointvart,typeboun,&num_cpus,mortar,nener); + }else{*/ if (ne1d2d == 1) NNEW(inum, ITG, *nk); results(co, nk, kon, ipkon, lakon, ne, v, stn, inum, stx, @@ -3328,6 +3378,7 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l &intscheme); if (ne1d2d == 1) SFREE(inum); + // } /* implicit dynamics (Matteo Pacher) */ @@ -3339,7 +3390,7 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l /* updating the external work (only for dynamic calculations) */ - if ((*nmethod == 4) && (*ithermal < 2)) { + if ((*nmethod == 4) && (*ithermal < 2) && (*nener == 1)) { allwk = allwkini; worparll(&allwk, fnext, &mt, fnextini, v, vini, nk, &num_cpus); @@ -3436,11 +3487,14 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l /* calculating the residual */ - calcresidual(nmethod, neq, b, fext, f, iexpl, nactdof, aux2, vold, - vini, &dtime, accold, nk, adb, aub, jq, irow, nzl, alpha, fextini, fini, - islavnode, nslavnode, mortar, ntie, f_cm, f_cs, mi, - nzs, &nasym, &idamping, veold, adc, auc, cvini, cv, &alpham, - &num_cpus); + // next line: change on 19072022 + if ((*iexpl <= 1) || (*nener == 1)) { + calcresidual(nmethod, neq, b, fext, f, iexpl, nactdof, aux2, vold, vini, &dtime, + accold, nk, adb, aub, jq, irow, nzl, alpha, fextini, fini, + islavnode, nslavnode, mortar, ntie, f_cm, f_cs, mi, + nzs, &nasym, &idamping, veold, adc, auc, cvini, cv, &alpham, + &num_cpus); + } /* fix residuals for mortar contact, add contact forces */ @@ -3452,7 +3506,9 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l isiz = mt * *nk; cpypardou(vold, v, &isiz, &num_cpus); - if (*ithermal != 2) { + // if(*ithermal!=2){ + // next line: change on 19072022 + if ((*ithermal != 2) && ((*iexpl <= 1) || (*nener == 1))) { for (k = 0; k < 6 * mi[0] * ne0; ++k) { sti[k] = stx[k]; } @@ -3544,7 +3600,7 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l } /* next line is inserted to cope with stress-less - temperature calculations */ + temperature calculations */ if (*ithermal != 2) { if (ram[0] < 1.e-6) { @@ -3713,7 +3769,8 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l } /* printing the energies (only for dynamic calculations) */ - if ((icutb == 0) && (*nmethod == 4) && (*ithermal < 2) && (jout[0] == jprint)) { + if ((icutb == 0) && (*nmethod == 4) && (*ithermal < 2) && (jout[0] == jprint) && + (*nener == 1)) { if (*iexpl > 1) { printf(" actual total time=%e\n\n", *ttime + theta * *tper); @@ -4058,7 +4115,7 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l if (jprint != 0) { - /* calculating the displacements and the stresses and storing + /* calculating the displacements and the stresses and storing the results in frd format */ MNEW(v, double, mt **nk); @@ -4203,7 +4260,7 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l strcat(stiffmatrix, ".stm"); if ((f1 = fopen(stiffmatrix, "wb")) == NULL) { - printf("*ERROR in linstatic: cannot open stiffness matrix file for writing..."); + printf(" *ERROR in nonlingeo: cannot open stiffness matrix file for writing..."); exit(0); } @@ -4216,31 +4273,31 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l */ if (fwrite(&nasym, sizeof(ITG), 1, f1) != 1) { - printf("*ERROR saving the symmetry flag to the stiffness matrix file..."); + printf(" *ERROR in nonlingeo saving the symmetry flag to the stiffness matrix file..."); exit(0); } if (fwrite(nzs, sizeof(ITG), 3, f1) != 3) { - printf("*ERROR saving the number of subdiagonal nonzeros to the stiffness matrix file..."); + printf(" *ERROR in nonlingeo saving the number of subdiagonal nonzeros to the stiffness matrix file..."); exit(0); } if (fwrite(irow, sizeof(ITG), nzs[2], f1) != nzs[2]) { - printf("*ERROR saving irow to the stiffness matrix file..."); + printf(" *ERROR in nonlingeo saving irow to the stiffness matrix file..."); exit(0); } if (fwrite(jq, sizeof(ITG), neq[1] + 1, f1) != neq[1] + 1) { - printf("*ERROR saving jq to the stiffness matrix file..."); + printf(" *ERROR in nonlingeo saving jq to the stiffness matrix file..."); exit(0); } if (fwrite(icol, sizeof(ITG), neq[1], f1) != neq[1]) { - printf("*ERROR saving icol to the stiffness matrix file..."); + printf(" *ERROR in nonlingeo saving icol to the stiffness matrix file..."); exit(0); } if (fwrite(adcpy, sizeof(double), neq[1], f1) != neq[1]) { - printf("*ERROR saving the diagonal of the stiffness matrix to the stiffness matrix file..."); + printf(" *ERROR in nonlingeo saving the diagonal of the stiffness matrix to the stiffness matrix file..."); exit(0); } if (fwrite(aucpy, sizeof(double), (nasym + 1) * nzs[2], f1) != (nasym + 1) * nzs[2]) { - printf("*ERROR saving the off-diagonal terms of the stiffness matrix to the stiffness matrix file..."); + printf(" *ERROR in nonlingeo saving the off-diagonal terms of the stiffness matrix to the stiffness matrix file..."); exit(0); } fclose(f1); @@ -4282,7 +4339,7 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l } } - /* updating the loading at the end of the step; + /* updating the loading at the end of the step; important in case the amplitude at the end of the step is not equal to one */ @@ -4296,8 +4353,8 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l continue; /* mechanical boundary conditions are updated only - if the step was not thermal or the node is a - network node */ + if the step was not thermal or the node is a + network node */ } else if ((ndirboun[k] > 0) && (ndirboun[k] < 4)) { node = nodeboun[k]; @@ -4574,9 +4631,11 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l SFREE(lslav); SFREE(ktot); SFREE(ltot); + SFREE(aloc); SFREE(adc); SFREE(auc); SFREE(areaslav); + SFREE(fric); } else if (*mortar == 0) { SFREE(areaslav); } else if (*mortar == 1) { @@ -4726,6 +4785,13 @@ void nonlingeo_precice(double **cop, ITG *nk, ITG **konp, ITG **ipkonp, char **l } // MPADD end + /* restore node-to-face contact to massless contact for massless + explicit dynamic calculations */ + + if ((*nmethod == 1) && (mortarsav == -1)) { + *mortar = -1; + } + (*ttime) += (*tper); /* Adapter: Free the memory */ diff --git a/packaging/calculix-precice2_2.19.0-1_amd64/DEBIAN/control b/packaging/calculix-precice2_2.20.0-1_amd64/DEBIAN/control similarity index 97% rename from packaging/calculix-precice2_2.19.0-1_amd64/DEBIAN/control rename to packaging/calculix-precice2_2.20.0-1_amd64/DEBIAN/control index 858a012..3d0b9cd 100644 --- a/packaging/calculix-precice2_2.19.0-1_amd64/DEBIAN/control +++ b/packaging/calculix-precice2_2.20.0-1_amd64/DEBIAN/control @@ -1,5 +1,5 @@ Package: calculix-precice2 -Version: 2.19.0-1 +Version: 2.20.0-1 Source: calculix-precice2 Architecture: amd64 Section: contrib/science diff --git a/packaging/calculix-precice2_2.19.0-1_amd64/usr/share/doc/calculix-precice2/copyright b/packaging/calculix-precice2_2.20.0-1_amd64/usr/share/doc/calculix-precice2/copyright similarity index 100% rename from packaging/calculix-precice2_2.19.0-1_amd64/usr/share/doc/calculix-precice2/copyright rename to packaging/calculix-precice2_2.20.0-1_amd64/usr/share/doc/calculix-precice2/copyright diff --git a/packaging/changelog.Debian b/packaging/changelog.Debian index ffe5e90..9bb02e0 100644 --- a/packaging/changelog.Debian +++ b/packaging/changelog.Debian @@ -1,4 +1,3 @@ - calculix-precice2 (2.19.0) unstable; urgency=medium * Update to CalculiX 2.19 * Comes compiled with the USE_MT flag, required for parallel usage of diff --git a/packaging/make_deb.sh b/packaging/make_deb.sh index 4f622ba..1b033a8 100755 --- a/packaging/make_deb.sh +++ b/packaging/make_deb.sh @@ -1,7 +1,7 @@ #!/usr/bin/bash DISTRIBUTION="_$1" -ADAPTER_VERSION="2.19.0" +ADAPTER_VERSION="2.20.0" PACKAGE_VERSION="1" PACKAGE_FOLDER="calculix-precice2_$ADAPTER_VERSION-${PACKAGE_VERSION}_amd64" diff --git a/pastix_pre_build.sh b/pastix_pre_build.sh index a745f5c..89e95b1 100755 --- a/pastix_pre_build.sh +++ b/pastix_pre_build.sh @@ -1,6 +1,6 @@ #! /bin/bash echo "Renaming includes of \"pastix.h\" to \"pastix_ccx.h\" to avoid conflict." -sed -i 's/#include "pastix.h"/ #include "pastix_ccx.h"/g' ~/CalculiX/ccx_2.19/src/*.c +sed -i 's/#include "pastix.h"/ #include "pastix_ccx.h"/g' ~/CalculiX/ccx_2.20/src/*.c echo "Renaming CalculiX file pastix.h to pastix_ccx.h" -mv ~/CalculiX/ccx_2.19/src/pastix.h ~/CalculiX/ccx_2.19/src/pastix_ccx.h +mv ~/CalculiX/ccx_2.20/src/pastix.h ~/CalculiX/ccx_2.20/src/pastix_ccx.h