c--------------------------------------------------------------------- c--------------------------------------------------------------------- integer function nodedim(num) c--------------------------------------------------------------------- c--------------------------------------------------------------------- c--------------------------------------------------------------------- c c compute the exponent where num = 2**nodedim c NOTE: assumes a power-of-two number of nodes c c--------------------------------------------------------------------- implicit none c--------------------------------------------------------------------- c input parameters c--------------------------------------------------------------------- integer num c--------------------------------------------------------------------- c local variables c--------------------------------------------------------------------- double precision fnum fnum = dble(num) nodedim = log(fnum)/log(2.0d+0) + 0.00001 return end