Changeset 15024


Ignore:
Timestamp:
05/14/13 13:49:24 (12 years ago)
Author:
adhikari
Message:

CHG: dynamic memory allocation done. gives stable solutions. need to refine codes a bit though

Location:
issm/trunk-jpl/src/c/modules/GiaDeflectionCorex
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/GiaDeflectionCorex.cpp

    r15017 r15024  
    1212#include "../InputUpdateFromConstantx/InputUpdateFromConstantx.h"
    1313
    14 
    1514/*External blocks: {{{*/
    1615struct blockp{
     
    2120        double rhoi;
    2221};
    23 
    2422
    2523struct blockn{
     
    4038        int distme_( int* pidisk,int* piedge, int* pNtime, int* pNtimp, int* pNtimm, int* pNafter,double* time,double* bi,double* dmi,double* zhload,double* hload);
    4139
    42         int what0_( int* pidisk,int* piedge);
     40        int what0_( int* pidisk,int* piedge,int* pNtimp,int* pNtimm,double* time,double* bi,double* dmi);
    4341        extern struct blockp blockp_;
    4442        extern struct blocko blocko_;
     
    175173        distme_(&idisk,&iedge,&Ntime,&Ntimp,&Ntimm,&Nafter,blockt_time,blockt_bi,blockt_dmi,blocky_zhload,blocko_hload);
    176174
    177 
    178175        /*Call what0 driver: */
    179         what0_(&idisk,&iedge);
     176        what0_(&idisk,&iedge,&Ntimp,&Ntimm,blockt_time,blockt_bi,blockt_dmi);
    180177
    181178        /*output solution: */
  • issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/ojrule.f

    r14840 r15024  
    22      implicit double precision(a-h,o-z)
    33      parameter (nhank = 1024)
    4       parameter (N3G = 1)
    5       parameter (npat = N3G)
    64      double precision yvalue(nhank),bcin(nhank)
    75      double precision wok, rpos
    86      double precision pset(7)
    9       double precision swok, asrpos, aswokm, distrad
     7      double precision aswokm, distrad
     8c ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    109      common /blockrad/ distrad
    11 c ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    1210      common /blockp/ pset
    13       common /blocki/ INTERN
    1411      common /blockn/ irate
    15       common /blocks/ aswokm,asrpos,swok
     12      common /blocks/ aswokm
    1613      data zero /0.0d0/, one /1.0d0/, two /2.0d0/, three /3.0d0/,
    1714     1rescal/ 1.0d0/
     
    6057c ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    6158      subroutine wolfc(rpos,wok)
    62       parameter (N3G = 1)
    63       parameter (npat = N3G)
    6459      double precision wok, rpos
    6560      double precision pset(7)
     
    6762c ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    6863      common /blockp/ pset
    69       common /blocki/ INTERN
    70       common /blockn/ irate
    71       common /blocks/ aswokm,asrpos,swok
     64      common /blocks/ aswokm
    7265c ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    7366c make single prec. and return to dimensional units.
     
    8578c ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    8679      subroutine rates(rpos,wok)
    87       parameter (N3G = 1)
    88       parameter (npat = N3G)
    8980      double precision wok, rpos
    9081      double precision pset(7)
     
    9283c ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    9384      common /blockp/ pset
    94       common /blocki/ INTERN
    95       common /blockn/ irate
    96       common /blocks/ aswokm,asrpos,swok
     85      common /blocks/ aswokm
    9786c ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    9887      data ngyo /050201/
  • issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/stot.f

    r14836 r15024  
    1       subroutine stot(ikval,qjadon,fltng)
     1      subroutine stot(ikval,qjadon,fltng,Ntimp,Ntimm,time,bi,dmi)
    22      implicit double precision (a-h,o-z)
     3      integer Ntimp,Ntimm
    34      parameter (Nafter = 1)
    4       parameter (Ntime = 5)
    5       parameter (Ntimm = Ntime-1)
    65      parameter (nhank = 1024)
    7       parameter (Ntimp = Ntime + Nafter)
    86      double precision decay(2)
    97      double precision pset(7)
     
    1311c ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    1412      common /blockm/ dekay1,dekay2,amp0,amp1,amp2
    15       common /blockt/ time,bi,dmi
    1613c ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    1714c  This subroutine returns the inverse Laplace transform to the
     
    3936      xi1 = amp1(ikval)
    4037      xi2 = amp2(ikval)
     38
    4139c ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    4240c note that tspan must be updated in the calling routine "what0.f"
  • issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/what0.f

    r14841 r15024  
    1       subroutine what0(idisk,iedge)
     1      subroutine what0(idisk,iedge,Ntimp,Ntimm,time,bi,dmi)
    22      implicit double precision (a-h,o-z)
     3      integer Ntimp,Ntimm
    34      parameter (nhank = 1024)
    45      parameter (N = nhank/2)
     
    89     1decta(2),dyri1(nhank),dyri2(nhank),sna(nhank)
    910      double precision cinner(nhank),bcin(nhank)
     11      double precision time(Ntimp),bi(Ntimm),dmi(Ntimm)
    1012      integer maxk
    1113c ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
     
    8991      pref = diku / ( diku + rghm )
    9092      qjadon = one / ( four * zksamp(ik) * urat )
    91       call stot(ik,qjadon,fltng)
     93      call stot(ik,qjadon,fltng,Ntimp,Ntimm,time,bi,dmi)
    9294      cinner(ik) = - fltng * pref * twoap
    9395      bcin(ik) = cinner(ik) * dbesj1(xakap)
     
    108110      pref = diku / ( diku + rghm )
    109111      qjadon = one / ( four * zksamp(ik) * urat )
    110       call stot(ik,qjadon,fltng)
     112      call stot(ik,qjadon,fltng,Ntimp,Ntimm,time,bi,dmi)
    111113      cinner(ik) = - fltng * pref * twoap
    112114      bcin(ik) = cinner(ik) * oxakap * ( dsin(xakap) * oxakap
Note: See TracChangeset for help on using the changeset viewer.