source:
issm/oecreview/Archive/12321-12677/ISSM-12461-12462.diff
Last change on this file was 12679, checked in by , 13 years ago | |
---|---|
File size: 6.9 KB |
-
u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcDynamic.h
17 17 int sid; /*! id, to track it*/ 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; 23 23 … … 43 43 /*SpcDynamic management:{{{ */ 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 50 50 }; -
u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcStatic.h
17 17 int sid; /*! id, to track it*/ 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 23 23 public: 24 24 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 /*}}}*/ 30 30 /*Object virtual functions definitions:{{{ */ … … 42 42 /*SpcStatic management:{{{ */ 43 43 int GetNodeId(); 44 44 int GetDof(); 45 double GetValue();45 IssmDouble GetValue(); 46 46 /*}}}*/ 47 47 48 48 }; -
u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.h
17 17 int sid; /*! id, to track it*/ 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; 24 24 … … 26 26 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 /*}}}*/ 32 32 /*Object virtual functions definitions:{{{ */ … … 44 44 /*SpcTransient management:{{{ */ 45 45 int GetNodeId(); 46 46 int GetDof(); 47 double GetValue();47 IssmDouble GetValue(); 48 48 /*}}}*/ 49 49 50 50 }; -
u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcDynamic.cpp
121 121 } 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)); 127 127 return value; 128 128 } 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; 134 134 -
u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcStatic.cpp
23 23 } 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; 29 29 nodeid=spc_nodeid; … … 122 122 } 123 123 /*}}}*/ 124 124 /*FUNCTION SpcStatic::GetValue {{{*/ 125 double SpcStatic::GetValue(){125 IssmDouble SpcStatic::GetValue(){ 126 126 _assert_(!isnan(value)); 127 127 return value; 128 128 } -
u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp
30 30 } 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; 36 36 nodeid=spc_nodeid; 37 37 dof=spc_dof; 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; 46 46 return; … … 48 48 /*}}}*/ 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 } 55 55 /*}}}*/ … … 111 111 void SpcTransient::ConstrainNode(Nodes* nodes,Parameters* parameters){ 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 120 120 /*Chase through nodes and find the node to which this SpcTransient applys: */ … … 169 169 } 170 170 /*}}}*/ 171 171 /*FUNCTION SpcTransient::GetValue {{{*/ 172 double SpcTransient::GetValue(){172 IssmDouble SpcTransient::GetValue(){ 173 173 return values[0]; 174 174 } 175 175 /*}}}*/
Note:
See TracBrowser
for help on using the repository browser.