Changeset 12462
- Timestamp:
- 06/19/12 11:40:53 (13 years ago)
- Location:
- issm/trunk-jpl/src/c/objects/Constraints
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/objects/Constraints/SpcDynamic.cpp
r12365 r12462 122 122 /*}}}*/ 123 123 /*FUNCTION SpcDynamic::GetValue {{{*/ 124 double SpcDynamic::GetValue(){124 IssmDouble SpcDynamic::GetValue(){ 125 125 _assert_(this->isset); 126 126 _assert_(!isnan(value)); … … 129 129 /*}}}*/ 130 130 /*FUNCTION SpcDynamic::SetDynamicConstraint {{{*/ 131 void SpcDynamic::SetDynamicConstraint(Nodes* nodes, double* yg_serial){131 void SpcDynamic::SetDynamicConstraint(Nodes* nodes,IssmDouble* yg_serial){ 132 132 133 133 int pos; -
issm/trunk-jpl/src/c/objects/Constraints/SpcDynamic.h
r12365 r12462 18 18 int nodeid; /*!node id*/ 19 19 int dof; /*!component*/ 20 double value; /*value*/20 IssmDouble value; /*value*/ 21 21 bool isset; 22 22 int analysis_type; … … 44 44 int GetNodeId(); 45 45 int GetDof(); 46 double GetValue();47 void SetDynamicConstraint(Nodes* nodes, double *yg_serial);46 IssmDouble GetValue(); 47 void SetDynamicConstraint(Nodes* nodes,IssmDouble *yg_serial); 48 48 /*}}}*/ 49 49 -
issm/trunk-jpl/src/c/objects/Constraints/SpcStatic.cpp
r12365 r12462 24 24 /*}}}*/ 25 25 /*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){26 SpcStatic::SpcStatic(int spc_sid,int spc_nodeid, int spc_dof,IssmDouble spc_value,int spc_analysis_type){ 27 27 28 28 sid=spc_sid; … … 123 123 /*}}}*/ 124 124 /*FUNCTION SpcStatic::GetValue {{{*/ 125 double SpcStatic::GetValue(){125 IssmDouble SpcStatic::GetValue(){ 126 126 _assert_(!isnan(value)); 127 127 return value; -
issm/trunk-jpl/src/c/objects/Constraints/SpcStatic.h
r12365 r12462 18 18 int nodeid; /*!node id*/ 19 19 int dof; /*!component*/ 20 double value; /*value*/20 IssmDouble value; /*value*/ 21 21 int analysis_type; 22 22 … … 25 25 /*SpcStatic constructors, destructors:{{{*/ 26 26 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); 28 28 ~SpcStatic(); 29 29 /*}}}*/ … … 43 43 int GetNodeId(); 44 44 int GetDof(); 45 double GetValue();45 IssmDouble GetValue(); 46 46 /*}}}*/ 47 47 -
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 } -
issm/trunk-jpl/src/c/objects/Constraints/SpcTransient.h
r12365 r12462 18 18 int nodeid; /*!node id*/ 19 19 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*/ 22 22 int nsteps; /*number of time steps*/ 23 23 int analysis_type; … … 27 27 /*SpcTransient constructors, destructors:{{{*/ 28 28 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); 30 30 ~SpcTransient(); 31 31 /*}}}*/ … … 45 45 int GetNodeId(); 46 46 int GetDof(); 47 double GetValue();47 IssmDouble GetValue(); 48 48 /*}}}*/ 49 49
Note:
See TracChangeset
for help on using the changeset viewer.