- Timestamp:
- 06/19/12 11:40:53 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp
r12456 r12462 31 31 /*}}}*/ 32 32 /*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){33 SpcTransient::SpcTransient(int spc_sid,int spc_nodeid, int spc_dof,int spc_nsteps, IssmDouble* spc_times, IssmDouble* spc_values,int spc_analysis_type){ 34 34 35 35 sid=spc_sid; … … 38 38 nsteps=spc_nsteps; 39 39 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); 44 44 } 45 45 analysis_type=spc_analysis_type; … … 49 49 /*FUNCTION SpcTransient::~SpcTransient{{{*/ 50 50 SpcTransient::~SpcTransient(){ 51 xDelete< double>(times);52 xDelete< double>(values);51 xDelete<IssmDouble>(times); 52 xDelete<IssmDouble>(values); 53 53 return; 54 54 } … … 112 112 113 113 Node* node=NULL; 114 double time=0;114 IssmDouble time=0; 115 115 int i; 116 double alpha=-1;117 double value;116 IssmDouble alpha=-1; 117 IssmDouble value; 118 118 bool found=false; 119 119 … … 170 170 /*}}}*/ 171 171 /*FUNCTION SpcTransient::GetValue {{{*/ 172 double SpcTransient::GetValue(){172 IssmDouble SpcTransient::GetValue(){ 173 173 return values[0]; 174 174 }
Note:
See TracChangeset
for help on using the changeset viewer.