Recent content by teqnick

  1. T

    Fortran Generating Coordinates for Silver Atoms in C and Fortran

    The mysterious N variable defines the number of atoms in simple cubic silver lattice, with is 180 so I put an array of the size of 180 instead of N. The L_X, L_Y, L_Z are size of lattice. Corrected code is below but it still gives me wrong values. PROGRAM SC integer :: i, j, k integer...
  2. T

    Fortran Generating Coordinates for Silver Atoms in C and Fortran

    Yes of course, but I do not now how to write it in fortran. That why i put it on that forum. I know where most of the mistakes are, but i do not now how to make it work.
  3. T

    Fortran Generating Coordinates for Silver Atoms in C and Fortran

    U aren't really helping, you just stated the obvious. There is only 180 atoms in sc lattice so there is no need for using 1000 array. There is nothing wrong with REAL declarations. Also I have no idea what that variable N does in the program. (I have not written that C code, and do not fully...
  4. T

    Fortran Generating Coordinates for Silver Atoms in C and Fortran

    So far I've got this, but it gives me wrong values PROGRAM SC integer :: i, j, k integer :: n = 0 REAL :: A = 4.08 REAL :: L_X = 20.0 REAL :: L_Y = 20.0 REAL :: L_Z = 15.0 INTEGER :: N INTEGER :: iMax INTEGER :: jMax INTEGER :: kMax REAL, DIMENSION(180) :: x REAL...
  5. T

    Fortran Generating Coordinates for Silver Atoms in C and Fortran

    Hello Could anyone help me rewrite following C code to Fortran code? It generates coords for sc silver atoms. #include <stdio.h> #include <math.h> int main(void) { int i, j, k, n = 0; double A = 4.08, L_X = 20.0, L_Y = 20.0, L_Z = 15.0; int iMax = ceil(L_X/A)...
Back
Top