Changeset 24342
- Timestamp:
- 11/16/19 23:01:19 (5 years ago)
- Location:
- issm/trunk-jpl/src/c/classes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r24339 r24342 3267 3267 if(xIsInf<IssmDouble>(values[i])) _error_("Inf found in vector"); 3268 3268 } 3269 //this->inputs->AddInput(new TriaInput(name,values,this->element_type)); 3270 _error_("not implemented"); 3269 if(this->element_type==P1Enum){ 3270 inputs2->SetTriaInput(name,P1Enum,NUMVERTICES,lidlist,values); 3271 } 3272 else{ 3273 inputs2->SetTriaInput(name,this->element_type,this->lid,numnodes,values); 3274 } 3271 3275 break; 3272 3276 -
issm/trunk-jpl/src/c/classes/FemModel.cpp
r24340 r24342 5141 5141 5142 5142 for(int i=0;i<numoutputs;i++){ 5143 if(transientinput_enum[i]<0){ 5144 _error_("Can't deal with non enum fields for result Stack"); 5145 } 5146 else{ 5147 _error_("not implemented with inputs2"); 5148 for(int j=0;j<elements->Size();j++){ 5149 /*Intermediaries*/ 5150 TransientInput* transient_input = new TransientInput(transientinput_enum[i]); 5151 Element* element=xDynamicCast<Element*>(elements->GetObjectByOffset(j)); 5152 element->inputs->AddInput(transient_input); 5153 } 5154 } 5143 this->inputs2->DeleteInput(transientinput_enum[i]); 5144 this->inputs2->SetTransientInput(transientinput_enum[i],NULL,0); 5155 5145 } 5156 5146 } … … 5165 5155 for(int j=0;j<elements->Size();j++){ 5166 5156 /*Intermediaries*/ 5157 _error_("TODO"); 5167 5158 Element* element=xDynamicCast<Element*>(elements->GetObjectByOffset(j)); 5168 5159 Input* input=element->inputs->GetInput(transientinput_enum[i]); _assert_(input); //this is the enum stack -
issm/trunk-jpl/src/c/classes/Inputs2/TransientInput2.cpp
r24335 r24342 37 37 38 38 /*Allocate values and timesteps, and copy: */ 39 _assert_(N> 0 && N<1e6);39 _assert_(N>=0 && N<1e6); 40 40 this->numtimesteps=N; 41 this->timesteps=xNew<IssmDouble>(N); 42 xMemCpy(this->timesteps,timesin,N); 43 44 this->inputs = xNew<Input2*>(N); 45 for(int i=0;i<N;i++) this->inputs[i] = NULL; 41 if(N>0){ 42 this->timesteps=xNew<IssmDouble>(N); 43 xMemCpy(this->timesteps,timesin,N); 44 45 this->inputs = xNew<Input2*>(N); 46 for(int i=0;i<N;i++) this->inputs[i] = NULL; 47 } 48 else{ 49 this->timesteps=0; 50 this->inputs =0; 51 } 46 52 this->parameters = NULL; 47 48 53 this->current_input=NULL; 49 54 this->current_step=-1;
Note:
See TracChangeset
for help on using the changeset viewer.