source: issm/oecreview/Archive/12321-12677/ISSM-12461-12462.diff

Last change on this file was 12679, checked in by Mathieu Morlighem, 13 years ago

Added 12321-12677

File size: 6.9 KB
  • u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcDynamic.h

     
    1717                int     sid; /*! id, to track it*/
    1818                int     nodeid; /*!node id*/
    1919                int dof; /*!component*/
    20                 double value; /*value*/
     20                IssmDouble value; /*value*/
    2121                bool isset;
    2222                int analysis_type;
    2323
     
    4343                /*SpcDynamic management:{{{ */
    4444                int    GetNodeId();
    4545                int    GetDof();
    46                 double GetValue();
    47                 void   SetDynamicConstraint(Nodes* nodes,double *yg_serial);
     46                IssmDouble GetValue();
     47                void   SetDynamicConstraint(Nodes* nodes,IssmDouble *yg_serial);
    4848                /*}}}*/
    4949
    5050};
  • u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcStatic.h

     
    1717                int     sid; /*! id, to track it*/
    1818                int     nodeid; /*!node id*/
    1919                int dof; /*!component*/
    20                 double value; /*value*/
     20                IssmDouble value; /*value*/
    2121                int analysis_type;
    2222
    2323        public:
    2424
    2525                /*SpcStatic constructors, destructors:{{{*/
    2626                SpcStatic();
    27                 SpcStatic(int sid,int nodeid, int dof,double value,int analysis_type);
     27                SpcStatic(int sid,int nodeid, int dof,IssmDouble value,int analysis_type);
    2828                ~SpcStatic();
    2929                /*}}}*/
    3030                /*Object virtual functions definitions:{{{ */
     
    4242                /*SpcStatic management:{{{ */
    4343                int    GetNodeId();
    4444                int    GetDof();
    45                 double GetValue();
     45                IssmDouble GetValue();
    4646                /*}}}*/
    4747
    4848};
  • u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.h

     
    1717                int     sid; /*! id, to track it*/
    1818                int     nodeid; /*!node id*/
    1919                int dof; /*!component*/
    20                 double* values; /*different values in time*/
    21                 double* times; /*different time steps*/
     20                IssmDouble* values; /*different values in time*/
     21                IssmDouble* times; /*different time steps*/
    2222                int nsteps; /*number of time steps*/
    2323                int analysis_type;
    2424
     
    2626
    2727                /*SpcTransient constructors, destructors:{{{*/
    2828                SpcTransient();
    29                 SpcTransient(int sid,int nodeid, int dof,int nsteps, double* times, double* values,int analysis_type);
     29                SpcTransient(int sid,int nodeid, int dof,int nsteps, IssmDouble* times, IssmDouble* values,int analysis_type);
    3030                ~SpcTransient();
    3131                /*}}}*/
    3232                /*Object virtual functions definitions:{{{ */
     
    4444                /*SpcTransient management:{{{ */
    4545                int    GetNodeId();
    4646                int    GetDof();
    47                 double GetValue();
     47                IssmDouble GetValue();
    4848                /*}}}*/
    4949
    5050};
  • u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcDynamic.cpp

     
    121121}
    122122/*}}}*/
    123123/*FUNCTION SpcDynamic::GetValue {{{*/
    124 double SpcDynamic::GetValue(){
     124IssmDouble SpcDynamic::GetValue(){
    125125        _assert_(this->isset);
    126126        _assert_(!isnan(value));
    127127        return value;
    128128}
    129129/*}}}*/
    130130/*FUNCTION SpcDynamic::SetDynamicConstraint {{{*/
    131 void SpcDynamic::SetDynamicConstraint(Nodes* nodes,double* yg_serial){
     131void SpcDynamic::SetDynamicConstraint(Nodes* nodes,IssmDouble* yg_serial){
    132132
    133133        int pos;
    134134
  • u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcStatic.cpp

     
    2323}
    2424/*}}}*/
    2525/*FUNCTION SpcStatic::SpcStatic(int spc_sid,int spc_nodeid,...){{{*/
    26 SpcStatic::SpcStatic(int spc_sid,int spc_nodeid, int spc_dof,double spc_value,int spc_analysis_type){
     26SpcStatic::SpcStatic(int spc_sid,int spc_nodeid, int spc_dof,IssmDouble spc_value,int spc_analysis_type){
    2727
    2828        sid=spc_sid;
    2929        nodeid=spc_nodeid;
     
    122122}
    123123/*}}}*/
    124124/*FUNCTION SpcStatic::GetValue {{{*/
    125 double SpcStatic::GetValue(){
     125IssmDouble SpcStatic::GetValue(){
    126126        _assert_(!isnan(value));
    127127        return value;
    128128}
  • u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp

     
    3030}
    3131/*}}}*/
    3232/*FUNCTION SpcTransient::SpcTransient(int spc_sid,int spc_nodeid,...){{{*/
    33 SpcTransient::SpcTransient(int spc_sid,int spc_nodeid, int spc_dof,int spc_nsteps, double* spc_times, double* spc_values,int spc_analysis_type){
     33SpcTransient::SpcTransient(int spc_sid,int spc_nodeid, int spc_dof,int spc_nsteps, IssmDouble* spc_times, IssmDouble* spc_values,int spc_analysis_type){
    3434
    3535        sid=spc_sid;
    3636        nodeid=spc_nodeid;
    3737        dof=spc_dof;
    3838        nsteps=spc_nsteps;
    3939        if(spc_nsteps){
    40                 values=xNew<double>(spc_nsteps);
    41                 times=xNew<double>(spc_nsteps);
    42                 memcpy(values,spc_values,nsteps*sizeof(double));
    43                 memcpy(times,spc_times,nsteps*sizeof(double));
     40                values=xNew<IssmDouble>(spc_nsteps);
     41                times=xNew<IssmDouble>(spc_nsteps);
     42                xMemCpy<IssmDouble>(values,spc_values,nsteps);
     43                xMemCpy<IssmDouble>(times,spc_times,nsteps);
    4444        }
    4545        analysis_type=spc_analysis_type;
    4646        return;
     
    4848/*}}}*/
    4949/*FUNCTION SpcTransient::~SpcTransient{{{*/
    5050SpcTransient::~SpcTransient(){
    51         xDelete<double>(times);
    52         xDelete<double>(values);
     51        xDelete<IssmDouble>(times);
     52        xDelete<IssmDouble>(values);
    5353        return;
    5454}
    5555/*}}}*/
     
    111111void SpcTransient::ConstrainNode(Nodes* nodes,Parameters* parameters){
    112112
    113113        Node* node=NULL;
    114         double time=0;
     114        IssmDouble time=0;
    115115        int    i;
    116         double alpha=-1;
    117         double value;
     116        IssmDouble alpha=-1;
     117        IssmDouble value;
    118118        bool   found=false;
    119119
    120120        /*Chase through nodes and find the node to which this SpcTransient applys: */
     
    169169}
    170170/*}}}*/
    171171/*FUNCTION SpcTransient::GetValue {{{*/
    172 double SpcTransient::GetValue(){
     172IssmDouble SpcTransient::GetValue(){
    173173        return values[0];
    174174}
    175175/*}}}*/
Note: See TracBrowser for help on using the repository browser.