From 588525611b4dd23ef88954d664101a2dc92049e9 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 1 Feb 2020 09:04:02 +0100 Subject: [PATCH] also report correctly negative seeds --- src/math.f90 | 12 +++++------- src/mesh_marc.f90 | 4 ++-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/math.f90 b/src/math.f90 index c63f30881..f45a8ead4 100644 --- a/src/math.f90 +++ b/src/math.f90 @@ -91,28 +91,26 @@ subroutine math_init integer :: randSize integer, dimension(:), allocatable :: randInit - write(6,'(/,a)') ' <<<+- math init -+>>>' + write(6,'(/,a)') ' <<<+- math init -+>>>'; flush(6) call random_seed(size=randSize) allocate(randInit(randSize)) if (randomSeed > 0) then randInit = randomSeed - call random_seed(put=randInit) else call random_seed() call random_seed(get = randInit) randInit(2:randSize) = randInit(1) - call random_seed(put = randInit) endif + call random_seed(put=randInit) + do i = 1, 4 call random_number(randTest(i)) enddo - write(6,'(a,I2)') ' size of random seed: ', randSize - do i = 1,randSize - write(6,'(a,I2,I14)') ' value of random seed: ', i, randInit(i) - enddo + write(6,'(a,i2)') ' size of random seed: ', randSize + write(6,'(a,i0)') ' value of random seed: ', randInit(1) write(6,'(a,4(/,26x,f17.14),/)') ' start of random sequence: ', randTest call random_seed(put = randInit) diff --git a/src/mesh_marc.f90 b/src/mesh_marc.f90 index 14e001eaf..342bf370c 100644 --- a/src/mesh_marc.f90 +++ b/src/mesh_marc.f90 @@ -54,12 +54,12 @@ subroutine mesh_init(ip,el) node0_cell type(tElement) :: elem - integer :: nElems integer, dimension(:), allocatable :: & microstructureAt, & homogenizationAt integer:: & - Nnodes !< total number of nodes in mesh + Nnodes, & !< total number of nodes in the mesh + Nelems !< total number of elements in the mesh real(pReal), dimension(:,:), allocatable :: & IP_reshaped