Commit Graph

77 Commits

Author SHA1 Message Date
Philip Eisenlohr dced3f9430 changed FFT reporting of dimension and resolution to one line each. 2012-02-09 13:18:59 +00:00
Krishna Komerla 7e23f84d2c new subroutine find_nearest_neigbor, basically a wrapper function for our purpose to kdtree2
split up kdtree2.f90 again from math.f90 to make the files better accessible
2012-02-02 15:57:22 +00:00
Martin Diehl faed4ec232 added deallocation of arrays (fftw_free) 2012-02-02 13:19:35 +00:00
Martin Diehl 800e291240 made code standard conform to Fortran 2008 (ignoring warning concerning comments beyond character 132). Basically, changing "x" format specifier to "Nx" ("1x") plus removing $ format specifier
added compiler switches for gfortran and ifort to check for standard conformity
old gnu compilers <4.4 are not longer supported because they don't provide the c binding for fftw
2012-01-31 19:18:55 +00:00
Martin Diehl 80583fefb5 added compilation_info.f90, to store compilation date,time and compiler info in each file
added #include statement at each init() routine
2012-01-31 14:54:49 +00:00
Martin Diehl eeda357710 N^2 initialization loop (former spectralPictureMode) rewritten in material.f90
additional output in DAMASK_spectral_interface.f90 
132 character cut off in constitutive_nonlocal.f90
rounding error in math.f90 complex number initialization (1.0_pReal)*2.0_pReal*pi
new $DAMASK_NUM_THREADS warning in numerics.f90 / IO.f90
polishing in DAMASK_spectral.f90
2012-01-30 13:52:41 +00:00
Christoph Kords 1330576a01 added new math function "math_deviatoric33" which returns the deviatoric part of a 3x3 tensor
renamed some math functions, so that we have a universal naming scheme: for matrix multiplications use an "x" (e.g. math_mul33x3); don't use the "x" to describe the shape of the tensor that the function is applied to (e.g. math_invert33 instead of math_invert3x3)
2012-01-26 13:50:00 +00:00
Martin Diehl e6495c986b corrected order of arguments for calling functions from python, small polishing in math.f90 (substituting manual summation by sum() ) 2012-01-25 14:31:21 +00:00
Martin Diehl bd48620de2 improved Curl_fft, corrected Divergence_fft and added math_skew3x3 2012-01-25 10:30:39 +00:00
Philip Eisenlohr 0cb90d4926 corrected debug_verbosity glitch (missed ">0" in logical expression) 2012-01-23 13:32:37 +00:00
Philip Eisenlohr a13aeb045f corrected curl_fft subroutine 2012-01-19 20:38:52 +00:00
Martin Diehl 3a22bf7e27 changed fftw from legacy fortran to new (2003) fortran (calling c routines directly)
renamed "steps" consequently to "incs"
moved kdtree2 to math.f90, put original source to private folder
2012-01-13 16:18:16 +00:00
Martin Diehl 99fa0e0be8 corrected calculation of curl (last version was more a dummy function) 2011-12-23 12:23:13 +00:00
Christoph Kords b2547e0117 Math inversion used to return zero (math_inv3x3) or error (math_invert3x3) for negative determinant. Now checking whether the absolute(!) value of the determinant is close to zero to avoid singularities, negative determinants are very well allowed. 2011-12-14 08:55:24 +00:00
Martin Diehl ea0fe7b406 corrected 3D visualize (math.f90 part was not working)
small polishing of voronoi_tessellation.f90
2011-12-06 17:46:33 +00:00
Martin Diehl 5ebeb96e85 made DAMASK to work with gfortran:
-removed to long lines
-restructured f2py modules and merged make_DAMASK2Python into setup processing
-setup_code.py now sets library path in makefile and asks for compile switches for spectral code
-substituted \ in format strings with $

restructured DAMASK_spectral:
-more logical output and structure of code
-better input for spectral debug parameters
2011-12-06 16:58:17 +00:00
Martin Diehl ace6851389 moved all routines from postprocessingMath to math.90, renamed the module to DAMASK, changed scripts and interfaces accordingly.
polished math.f90 (mainly added _pInt/_pReal and intent(in/out))
curl_fft is still a dummy function
2011-12-01 12:01:13 +00:00
Martin Diehl ee7022d8cf correctet random seed generation to work with gfortran. 2011-11-04 10:29:35 +00:00
Martin Diehl 15c356c3a7 some small improvements regarding the rotation of the loadcase frame 2011-10-25 13:38:24 +00:00
Martin Diehl c13aa2a829 first try of implementing a rotation of the loadcase coordinate system. Seems to work so far for one loadcase and homogeneous materials. 2011-10-24 18:26:34 +00:00
Martin Diehl 8ac1891b3c moved DAMASK_NaN to prec.f90 respectively prec_single.f90 as it is precision dependent 2011-10-20 16:46:11 +00:00
Martin Diehl 7604a8aeb4 corrected calculation of NaN, renamed variable to 'DAMASK_NaN'
!incremental update, wait for commit of damask_spectral.f90 before checking out
2011-10-18 09:21:38 +00:00
Franz Roters 8edb59d50c removed some unused variables 2011-09-26 09:55:38 +00:00
Franz Roters ee83904548 added math_spectralDecompositionSym3x3 used by shear band model 2011-09-14 13:26:00 +00:00
Martin Diehl 0469d37fc3 cleaned and restructured output on screen, changed L_inf norm to L_2 for calculation of error in Fourier space.
removed unnecessary function from math.f90
added some documents/manuals regarding spectral method
2011-08-31 14:37:01 +00:00
Martin Diehl 8f90f1f1f9 corrected description of algorithm to invert matrix 2011-08-30 07:29:13 +00:00
Martin Diehl 4fb1cb8f87 merged calcmodes, i.e. equilibrium and fulfilling of stress BC is done in one step,
made convergence independent of size and resolution,
polishing output in DAMASK_spectral.f90
added function to compute eigenvalues without eigenvectors and function to convert a 3x3 logical to a 9 vector in math.f90
removed obsolete variable in numerics.f90
2011-08-26 14:06:37 +00:00
Martin Diehl f99bf63397 removed functions added for debugging of divergence calculation to math.f90
corrected calculation of stress BC condition. Depending on given BC, the stiffness matrix is reduced and than inversed. Then it is filled with zeros and used for the calculation of the correct change of deformation gradient. All calculation is done using dP/dF
2011-08-10 17:45:37 +00:00
Martin Diehl 34de2e301b DEBUGGING VERSION for calculation of Divergence (various methods implemented). DO NOT USE. Wait for next update coming in a few minutes 2011-08-10 16:02:13 +00:00
Martin Diehl 3adb7ab382 corrected makefile, now working again without giving standard values explicitly.
did some small modification in order to make it possible to compile with gfortran. Changed NaN=0.0/0.0 to bitwise representation (3 different ways)
2011-08-01 10:11:32 +00:00
Christoph Kords fb121b1435 * boundary condition masking changed
* damper initialized with one 
* inversion of Mandelized stiffness tensor does not work, have to use plain tensor
* new functions in math that allow for conversion between Mandel and Plain tensors
2011-07-29 15:57:39 +00:00
Philip Eisenlohr 1877026d86 sorry, dangling "endif"... 2011-06-14 14:35:55 +00:00
Philip Eisenlohr cc925cadee changed output/debug-level relation for two statements 2011-06-14 14:08:13 +00:00
Franz Roters 08d39342e4 reworked restarting for compatibility with abaqus (not yet fully working)
added new orientation feature for direct simulation:
  component type (random) asigns random orientation to an entire grain
2011-05-28 09:44:43 +00:00
Franz Roters 7d84a0911e removed unused variables 2011-04-13 14:16:22 +00:00
Franz Roters c1b8391110 changed enconding of all source files to UTF-8 without BOM (signature) Codepage 65001 2011-04-07 07:20:28 +00:00
Franz Roters fcdb805225 added copyright text to all f90 (free) format files 2011-04-04 14:09:54 +00:00
Christoph Kords 11138e3ee2 debugging output is now controlled by the "verbosity" parameter in the debug.config ranging from 0 (=almost no output) to 8 (=very detailed output)
0 : only version infos and all from "hypela2"/"umat"
1 : basic outputs from "CPFEM.f90", basic output from initialization routines, debug_info
2 : extensive outputs from "CPFEM.f90", extensive output from initialization routines
3 : basic outputs from "homogenization.f90"
4 : extensive outputs from "homogenization.f90"
5 : basic outputs from "crystallite.f90"
6 : extensive outputs from "crystallite.f90"
7 : basic outputs from the constitutive files 
8 : extensive outputs from the constitutive files

If verbosity is equal to zero, all counters in debug are not set during calculation (e.g. debug_StressLoopDistribution or debug_cumDotStateTicks). This might speed up parallel calculation, because all these need critical statements which extremely slow down parallel computation.
2011-03-21 10:31:17 +00:00
Christoph Kords 235266b169 openmp parallelization working again (at least for j2 and nonlocal constitutive model).
In order to keep it like that, please follow these simple rules:

DON'T use implicit array subscripts:
example:    real, dimension(3,3) :: A,B
                  A(:,2) = B(:,1)               <--- DON'T USE
                  A(1:3,2) = B(1:3,1)       <--- BETTER USE
In many cases the use of explicit array subscripts is inevitable for parallelization. Additionally, it is an easy means to  prevent memory leaks.

Enclose all write statements with the following:
!$OMP CRITICAL (write2out)
<your write statement>
!$OMP END CRITICAL (write2out)

Whenever you change something in the code and are not sure if it affects parallelization and leads to nonconforming behavior, please ask me and/or Franz to check this.
2011-03-17 10:46:17 +00:00
Franz Roters 654b5ea987 set type for acos_arg 2011-03-04 14:57:22 +00:00
Franz Roters 2975c99144 now the maybe not perfect quartenions caused trouble in math_QuaternionToEuler 2011-03-03 14:23:39 +00:00
Franz Roters e7c7ccdcdd improper rotation matrix from pdecomposition could cause negative arguments in squareroot 2011-03-03 10:47:07 +00:00
Martin Diehl 8cae4d609a some polishing for single precision version.
Now only prec and mpie_spectral are needed in different versions
2011-02-25 12:41:46 +00:00
Martin Diehl cd5407b08b removed all math functions only for double precision by the more flexible counterpart, e.g. "dsqrt --> sqrt", "dsin --> sin". Should not cause any harm, as long as "implicit none" is used.
Now it is possible to compile a single precision spectral solver/crystal plasticity by replacing mesh.f90 and prec.f90 with mesh_single.f90 and prec_single.f90.
For the spectral method, just call "make precision=single" instead of "make". Use "make clean" evertime you switch precision
2011-02-25 09:25:53 +00:00
Christoph Kords faba13f7fd * now able to introduce some scatter in the initial single dislocation density (only for nonlocal model!) ; setting the parameter "rhoSglScatter" to a positive value generates a gauss distribution for the dislocation density with standard deviation equal to "rhoSglScatter"
* dislocation stress calculation is only done for nonlocal constitution ("/nonlocal/" keyword is present in material.config)
2011-02-04 15:41:32 +00:00
Philip Eisenlohr 794aeb253b crystallite and CPFEM now print/output tensors in ij notation (used to be, particularly in the t16, ji, i.e. transposed...)
math reports random seed used for rnd() generation
2011-01-20 19:25:45 +00:00
Martin Diehl 3c502561ee added matrix multiplication 3333x33 to math.f90
added some parameters for spectral method to numerics.f90 (tolerance)
changed error message concerning spectral method in IO.f90
corrected calculation of stress BC in mpie_spectral.f90
2010-10-13 16:04:44 +00:00
Philip Eisenlohr a8dfdc6487 added _mul33xx33 double contraction: A_ij * B_ij = scalar 2010-09-30 09:32:49 +00:00
Christoph Kords cb4b4afc88 corrected header for math_qRot 2010-09-30 08:46:58 +00:00
Martin Diehl 6ea8623f65 added functions math_mul33x3_complex math_Plain99to3333 to math.f90.
mpie_spectral.f90 uses both functions
math_Plain99to3333 is used for inversion of c0
math_mul33x3_complex is used for equilibrium check in fourier space
also did some cleaning up on mpie_spectral.f90
2010-09-22 12:04:43 +00:00