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

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

Added 12321-12677

File size: 6.9 KB
RevLine 
[12679]1Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcDynamic.h
2===================================================================
3--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcDynamic.h (revision 12461)
4+++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcDynamic.h (revision 12462)
5@@ -17,7 +17,7 @@
6 int sid; /*! id, to track it*/
7 int nodeid; /*!node id*/
8 int dof; /*!component*/
9- double value; /*value*/
10+ IssmDouble value; /*value*/
11 bool isset;
12 int analysis_type;
13
14@@ -43,8 +43,8 @@
15 /*SpcDynamic management:{{{ */
16 int GetNodeId();
17 int GetDof();
18- double GetValue();
19- void SetDynamicConstraint(Nodes* nodes,double *yg_serial);
20+ IssmDouble GetValue();
21+ void SetDynamicConstraint(Nodes* nodes,IssmDouble *yg_serial);
22 /*}}}*/
23
24 };
25Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcStatic.h
26===================================================================
27--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcStatic.h (revision 12461)
28+++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcStatic.h (revision 12462)
29@@ -17,14 +17,14 @@
30 int sid; /*! id, to track it*/
31 int nodeid; /*!node id*/
32 int dof; /*!component*/
33- double value; /*value*/
34+ IssmDouble value; /*value*/
35 int analysis_type;
36
37 public:
38
39 /*SpcStatic constructors, destructors:{{{*/
40 SpcStatic();
41- SpcStatic(int sid,int nodeid, int dof,double value,int analysis_type);
42+ SpcStatic(int sid,int nodeid, int dof,IssmDouble value,int analysis_type);
43 ~SpcStatic();
44 /*}}}*/
45 /*Object virtual functions definitions:{{{ */
46@@ -42,7 +42,7 @@
47 /*SpcStatic management:{{{ */
48 int GetNodeId();
49 int GetDof();
50- double GetValue();
51+ IssmDouble GetValue();
52 /*}}}*/
53
54 };
55Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.h
56===================================================================
57--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.h (revision 12461)
58+++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.h (revision 12462)
59@@ -17,8 +17,8 @@
60 int sid; /*! id, to track it*/
61 int nodeid; /*!node id*/
62 int dof; /*!component*/
63- double* values; /*different values in time*/
64- double* times; /*different time steps*/
65+ IssmDouble* values; /*different values in time*/
66+ IssmDouble* times; /*different time steps*/
67 int nsteps; /*number of time steps*/
68 int analysis_type;
69
70@@ -26,7 +26,7 @@
71
72 /*SpcTransient constructors, destructors:{{{*/
73 SpcTransient();
74- SpcTransient(int sid,int nodeid, int dof,int nsteps, double* times, double* values,int analysis_type);
75+ SpcTransient(int sid,int nodeid, int dof,int nsteps, IssmDouble* times, IssmDouble* values,int analysis_type);
76 ~SpcTransient();
77 /*}}}*/
78 /*Object virtual functions definitions:{{{ */
79@@ -44,7 +44,7 @@
80 /*SpcTransient management:{{{ */
81 int GetNodeId();
82 int GetDof();
83- double GetValue();
84+ IssmDouble GetValue();
85 /*}}}*/
86
87 };
88Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcDynamic.cpp
89===================================================================
90--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcDynamic.cpp (revision 12461)
91+++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcDynamic.cpp (revision 12462)
92@@ -121,14 +121,14 @@
93 }
94 /*}}}*/
95 /*FUNCTION SpcDynamic::GetValue {{{*/
96-double SpcDynamic::GetValue(){
97+IssmDouble SpcDynamic::GetValue(){
98 _assert_(this->isset);
99 _assert_(!isnan(value));
100 return value;
101 }
102 /*}}}*/
103 /*FUNCTION SpcDynamic::SetDynamicConstraint {{{*/
104-void SpcDynamic::SetDynamicConstraint(Nodes* nodes,double* yg_serial){
105+void SpcDynamic::SetDynamicConstraint(Nodes* nodes,IssmDouble* yg_serial){
106
107 int pos;
108
109Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcStatic.cpp
110===================================================================
111--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcStatic.cpp (revision 12461)
112+++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcStatic.cpp (revision 12462)
113@@ -23,7 +23,7 @@
114 }
115 /*}}}*/
116 /*FUNCTION SpcStatic::SpcStatic(int spc_sid,int spc_nodeid,...){{{*/
117-SpcStatic::SpcStatic(int spc_sid,int spc_nodeid, int spc_dof,double spc_value,int spc_analysis_type){
118+SpcStatic::SpcStatic(int spc_sid,int spc_nodeid, int spc_dof,IssmDouble spc_value,int spc_analysis_type){
119
120 sid=spc_sid;
121 nodeid=spc_nodeid;
122@@ -122,7 +122,7 @@
123 }
124 /*}}}*/
125 /*FUNCTION SpcStatic::GetValue {{{*/
126-double SpcStatic::GetValue(){
127+IssmDouble SpcStatic::GetValue(){
128 _assert_(!isnan(value));
129 return value;
130 }
131Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp
132===================================================================
133--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp (revision 12461)
134+++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp (revision 12462)
135@@ -30,17 +30,17 @@
136 }
137 /*}}}*/
138 /*FUNCTION SpcTransient::SpcTransient(int spc_sid,int spc_nodeid,...){{{*/
139-SpcTransient::SpcTransient(int spc_sid,int spc_nodeid, int spc_dof,int spc_nsteps, double* spc_times, double* spc_values,int spc_analysis_type){
140+SpcTransient::SpcTransient(int spc_sid,int spc_nodeid, int spc_dof,int spc_nsteps, IssmDouble* spc_times, IssmDouble* spc_values,int spc_analysis_type){
141
142 sid=spc_sid;
143 nodeid=spc_nodeid;
144 dof=spc_dof;
145 nsteps=spc_nsteps;
146 if(spc_nsteps){
147- values=xNew<double>(spc_nsteps);
148- times=xNew<double>(spc_nsteps);
149- memcpy(values,spc_values,nsteps*sizeof(double));
150- memcpy(times,spc_times,nsteps*sizeof(double));
151+ values=xNew<IssmDouble>(spc_nsteps);
152+ times=xNew<IssmDouble>(spc_nsteps);
153+ xMemCpy<IssmDouble>(values,spc_values,nsteps);
154+ xMemCpy<IssmDouble>(times,spc_times,nsteps);
155 }
156 analysis_type=spc_analysis_type;
157 return;
158@@ -48,8 +48,8 @@
159 /*}}}*/
160 /*FUNCTION SpcTransient::~SpcTransient{{{*/
161 SpcTransient::~SpcTransient(){
162- xDelete<double>(times);
163- xDelete<double>(values);
164+ xDelete<IssmDouble>(times);
165+ xDelete<IssmDouble>(values);
166 return;
167 }
168 /*}}}*/
169@@ -111,10 +111,10 @@
170 void SpcTransient::ConstrainNode(Nodes* nodes,Parameters* parameters){
171
172 Node* node=NULL;
173- double time=0;
174+ IssmDouble time=0;
175 int i;
176- double alpha=-1;
177- double value;
178+ IssmDouble alpha=-1;
179+ IssmDouble value;
180 bool found=false;
181
182 /*Chase through nodes and find the node to which this SpcTransient applys: */
183@@ -169,7 +169,7 @@
184 }
185 /*}}}*/
186 /*FUNCTION SpcTransient::GetValue {{{*/
187-double SpcTransient::GetValue(){
188+IssmDouble SpcTransient::GetValue(){
189 return values[0];
190 }
191 /*}}}*/
Note: See TracBrowser for help on using the repository browser.