/***********************************************************************
* 
*               *****   ***    ***
*                  *   *   *  *   *
*                 *     ***    ***
*                *     *   *  *   *
*               *****   ***    ***
*
* A FREE Finite Elements Analysis Program in ANSI C for the UNIX OS.
*
* Composed and edited and copyright by 
* Professor Dr.-Ing. Frank Rieg, University of Bayreuth, Germany
*
* eMail: 
* frank.rieg@uni-bayreuth.de
* dr.frank.rieg@t-online.de
* 
* V10.0  December 12, 2001
*
* Z88 should compile and run under any UNIX OS and Motif 2.0.
*
* 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; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING.  If not, write to
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
***********************************************************************/ 
/***********************************************************************
* Diese Compilerunit umfasst:
* wrim88i gibt Texte aus (1 FR_INT4)
* wtyp88i gibt Elementtypen aus (1 FR_INT4, 1 FR_INT4)
* wfor88i gibt kfoun beim Sortieren aus (1 FR_INT4, 1 FR_INT4)
* wran88i gibt Randbedingungen aus (1 FR_INT4, 1 FR_INT4)
* 30.03.02 Rieg
***********************************************************************/ 

/***********************************************************************
* Fuer UNIX
***********************************************************************/
#ifdef FR_UNIX
#include <z88i.h>
#include <stdio.h>    /* printf */
#endif

/***********************************************************************
*  hier beginnt Function wrim88i
***********************************************************************/
int wrim88i(FR_INT4 i,int iatx)
{
extern FR_INT4 LANG;

switch(iatx)
  {
  case TX_CR:
    printf("\n");
  break;

  case TX_ITERA:
#ifdef FR_XLOLO
    printf("\r%lld. Iteration",i);
#endif

#ifdef FR_XLONG
    printf("\r%ld. Iteration",i);
#endif
    fflush(stdout);
  break;  
 
  case TX_CHOJ:
#ifdef FR_XLOLO
    printf("\r%lld",i);
#endif

#ifdef FR_XLONG
    printf("\r%ld",i);
#endif
  break;

  case TX_ELE:
#ifdef FR_XLOLO
    if(LANG == 1) printf("\rElement %lld",i);
    if(LANG == 2) printf("\relement %lld",i);
#endif

#ifdef FR_XLONG
    if(LANG == 1) printf("\rElement %ld",i);
    if(LANG == 2) printf("\relement %ld",i);
#endif
  break;

  case TX_NFG:
#ifdef FR_XLOLO
    if(LANG == 1) printf("%lld * %lld = Groesse Gleichungsystem \n",i,i);
    if(LANG == 2) printf("%lld * %lld = size of system of equations\n",i,i);
#endif

#ifdef FR_XLONG
    if(LANG == 1) printf("%ld * %ld = Groesse Gleichungsystem \n",i,i);
    if(LANG == 2) printf("%ld * %ld = size of system of equations\n",i,i);
#endif

  break;

  case TX_SUMMEMY:
#ifdef FR_XLOLO
    if(LANG == 1) printf("Programm hat %lld MB angefordert\n", i);
    if(LANG == 2) printf("program desired %lld MB\n",i);
#endif

#ifdef FR_XLONG
    if(LANG == 1) printf("Programm hat %ld MB angefordert\n", i);
    if(LANG == 2) printf("program desired %ld MB\n",i);
#endif
  break;

  case TX_REAI1:
    if(LANG == 1) printf("Z88I1.TXT einlesen\n");
    if(LANG == 2) printf("reading Z88I1.TXT\n");
  break;

  case TX_KOOR:
    if(LANG == 1) printf("Koordinaten einlesen\n");
    if(LANG == 2) printf("reading coordinates\n");
  break;

  case TX_POLAR:
    if(LANG == 1) printf("Polar/Zylinder-Koordinaten umrechnen\n");
    if(LANG == 2) printf("converting polar/cylinder coordinates\n");
  break;

  case TX_KOIN:
    if(LANG == 1) printf("Koinzidenz einlesen\n");
    if(LANG == 2) printf("reading element informations\n");
  break;

  case TX_EGES:
    if(LANG == 1) printf("Elastizitaetsgesetze einlesen\n");
    if(LANG == 2) printf("reading material informations\n");
  break;

  case TX_Z88A:
    if(LANG == 1) printf(">>> Start Z88AI <<<\n");
    if(LANG == 2) printf(">>> start Z88AI <<<\n");
  break;

  case TX_NONZ:
#ifdef FR_XLOLO
    if(LANG == 1) printf("\n%lld Elemente in IJ entdeckt\n", i);
    if(LANG == 2) printf("\n%lld elements in IJ detected\n",i);
#endif

#ifdef FR_XLONG
    if(LANG == 1) printf("\n%ld Elemente in IJ entdeckt\n", i);
    if(LANG == 2) printf("\n%ld elements in IJ detected\n",i);
#endif
  break;

  case TX_GSSO:
    if(LANG == 1) printf("Pointer- Structure IJ assembliert\n");
    if(LANG == 2) printf("pointer structure IJ assembled\n");
  break;

  case TX_Z88B:
    if(LANG == 1) printf(">>> Start Z88BI: Pass 1 von Z88I2 <<<\n");
    if(LANG == 2) printf(">>> start Z88BI: pass 1 of Z88I2 <<<\n");
  break;

  case TX_FORMA:
    if(LANG == 1) printf("***** Formatieren *****\n");
    if(LANG == 2) printf("***** formatting *****\n");
  break;

  case TX_WRIO0:
    if(LANG == 1) printf("Z88O0.TXT beschreiben\n");
    if(LANG == 2) printf("writing Z88O0.TXT\n");
  break;

  case TX_WRIO1:
    if(LANG == 1) printf("Z88O1.TXT beschreiben\n");
    if(LANG == 2) printf("writing Z88O1.TXT\n");
  break;

  case TX_WRIO2:
    if(LANG == 1) printf("Z88O2.TXT beschreiben, Ende Z88I2\n");
    if(LANG == 2) printf("writing Z88O2.TXT, Z88I2 done\n");
  break;

  case TX_WRI1Y:
    if(LANG == 1) printf("Z88O1.BNY beschreiben\n");
    if(LANG == 2) printf("writing Z88O1.BNY\n");
  break;

  case TX_WRI4Y:
    if(LANG == 1) printf("Z88O4.BNY beschreiben\n");
    if(LANG == 2) printf("writing Z88O4.BNY\n");
  break;

  case TX_ENDI1:
    if(LANG == 1) printf("Ende Z88I1\n\
Sie koennten Z88.DYN einstellen (MAXGS & MAXKOI),\n\
dann starten Sie den Solver Part2: Z88I2\n");
    if(LANG == 2) printf("Z88I1 done\n\
you may now adjust Z88.DYN (MAXGS & MAXKOI)\n\
then lauch the solver part2: Z88I2\n");
  break;

  case TX_GSERF:
#ifdef FR_XLOLO
    if(LANG == 1) printf("Vektor GS erfordert %lld Elemente\n",i);
    if(LANG == 2) printf("vector GS needs %lld elements\n",i);
#endif

#ifdef FR_XLONG
    if(LANG == 1) printf("Vektor GS erfordert %ld Elemente\n",i);
    if(LANG == 2) printf("vector GS needs %ld elements\n",i);
#endif
  break;

  case TX_KOIERF:
#ifdef FR_XLOLO
    if(LANG == 1) printf("Vektor KOI erfordert %lld Elemente\n",i);
    if(LANG == 2) printf("vector KOI needs %lld elements\n",i);
#endif

#ifdef FR_XLONG
    if(LANG == 1) printf("Vektor KOI erfordert %ld Elemente\n",i);
    if(LANG == 2) printf("vector KOI needs %ld elements\n",i);
#endif
  break;

  case TX_WRI2Y:
    if(LANG == 1) printf("Z88O2.BNY beschreiben\n");
    if(LANG == 2) printf("writing Z88O2.BNY\n");
  break;

  case TX_WRI3Y:
    if(LANG == 1) printf("Z88O3.BNY beschreiben\n");
    if(LANG == 2) printf("writing Z88O3.BNY\n");
  break;

  case TX_COMPI:
    if(LANG == 1) printf("***** Compilation *****\n");
    if(LANG == 2) printf("***** compilation *****\n");
  break;

  case TX_REAO1Y:
    if(LANG == 1) printf("Fortsetzung: Z88O1.BNY einlesen\n");
    if(LANG == 2) printf("execution continuing: reading Z88O1.BNY\n");
  break;

  case TX_REA2Y:
    if(LANG == 1) printf("Z88O2.BNY einlesen\n");
    if(LANG == 2) printf("reading Z88O2.BNY\n");
  break;

  case TX_REA4Y:
    if(LANG == 1) printf("Z88O4.BNY einlesen\n");
    if(LANG == 2) printf("reading Z88O4.BNY\n");
  break;

  case TX_Z88CC:
    if(LANG == 1) printf("\n>>> Start Z88CI: Pass 2 von Z88I2 <<<\n");
    if(LANG == 2) printf("\n>>> start Z88CI: pass 2 of Z88I2 <<<\n");
  break;

  case TX_REAI4:
    if(LANG == 1) printf("Einlesen von Steuerfile Z88I4.TXT\n");
    if(LANG == 2) printf("reading parameter file Z88I4.TXT\n");
  break;

  case TX_REAI2:
    if(LANG == 1) printf("Einlesen von Randbedingungsfile Z88I2.TXT\n");
    if(LANG == 2) printf("reading constraint file Z88I2.TXT\n");
  break;

  case TX_REAI2P2:
    if(LANG == 1) printf("\nEinlesen von Randbedingungsfile Z88I2.TXT\n");
    if(LANG == 2) printf("\nreading constraint file Z88I2.TXT\n");
  break;

  case TX_ERBPA:
#ifdef FR_XLOLO
    if(LANG == 1) printf("Einarbeiten der Randbedingungen Pass %lld\n",i);
    if(LANG == 2) printf("incorporating constraints pass %lld\n",i);
#endif

#ifdef FR_XLONG
    if(LANG == 1) printf("Einarbeiten der Randbedingungen Pass %ld\n",i);
    if(LANG == 2) printf("incorporating constraints pass %ld\n",i);
#endif
  break;

  case TX_SCAL88:
    if(LANG == 1) printf("Start SCAL88\n");
    if(LANG == 2) printf("start SCAL88\n");
  break;

  case TX_PART88:
#ifdef FR_XLOLO
    if(LANG == 1) printf("\rpartielle Cholesky- Zerlegung Nr.%lld",i);
    if(LANG == 2) printf("\rincomplete Cholesky decomposition no.%lld",i);
#endif

#ifdef FR_XLONG
    if(LANG == 1) printf("\rpartielle Cholesky- Zerlegung Nr.%ld",i);
    if(LANG == 2) printf("\rincomplete Cholesky decomposition no.%ld",i);
#endif
    fflush(stdout);
  break;

  case TX_SICCG88:
    if(LANG == 1)
    printf("***** Start des Solvers SICCG88 *****\n");
    if(LANG == 2)
    printf("***** start of solver SICCG88 *****\n");
  break;

  case TX_SORCG88:
    if(LANG == 1)
    printf("***** Start des Solvers SORCG88 *****\n");
    if(LANG == 2)
    printf("***** start of solver SORCG88 *****\n");
  break;

  case TX_JACOOK:
    if(LANG == 1) printf("\nResiduenvektor < Eps, alles paletti!\n");
    if(LANG == 2) printf("\nlimit Eps reached, sounds good!\n");
  break;

  case TX_JACONOTOK:
    if(LANG == 1) printf("\nEps nicht erreicht, maxit erreicht -leider!\n");
    if(LANG == 2) printf("\neps not reached, maxit reached, oops!\n");
  break;
  }
return(0);
}

/***********************************************************************
*  function wtyp88i gibt Elementtypen in Z88I aus
***********************************************************************/ 
int wtyp88i(FR_INT4 k,FR_INT4 i)
{
extern FR_INT4 LANG;

#ifdef FR_XLOLO
if(LANG == 1) printf("\rNr. %lld Typ %lld                         ",k,i);
if(LANG == 2) printf("\rno. %lld type %lld                        ",k,i);
#endif

#ifdef FR_XLONG
if(LANG == 1) printf("\rNr. %ld Typ %ld                         ",k,i);
if(LANG == 2) printf("\rno. %ld type %ld                        ",k,i);
#endif

return(0);
}

/***********************************************************************
*  function wfor88i gibt kfoun beim Sortieren in Z88I1 aus
***********************************************************************/ 
int wfor88i(FR_INT4 k,FR_INT4 i)
{
extern FR_INT4 LANG;

#ifdef FR_XLOLO
if(LANG == 1) printf("\rNr. %lld, Sortieren, SOR %lld",k,i);
if(LANG == 2) printf("\rno. %lld, sorting, SOR %lld",k,i);
#endif

#ifdef FR_XLONG
if(LANG == 1) printf("\rNr. %ld, Sortieren, SOR %ld",k,i);
if(LANG == 2) printf("\rno. %ld, sorting, SOR %ld",k,i);
#endif

return(0);
}

/***********************************************************************
*  function wran88i gibt Randbedingungen aus
***********************************************************************/ 
int wran88i(FR_INT4 k,FR_INT4 i)
{
extern FR_INT4 LANG;

#ifdef FR_XLOLO
if(LANG == 1) printf("\rRandbedingung Nr. %lld Typ %lld",k,i);
if(LANG == 2) printf("\rconstraint no. %lld type %lld",k,i);
#endif

#ifdef FR_XLONG
if(LANG == 1) printf("\rRandbedingung Nr. %ld Typ %ld",k,i);
if(LANG == 2) printf("\rconstraint no. %ld type %ld",k,i);
#endif

fflush(stdout);
return(0);
}
