Index: /issm/trunk/src/c/objects/Inputs/TransientInput.cpp
===================================================================
--- /issm/trunk/src/c/objects/Inputs/TransientInput.cpp	(revision 8790)
+++ /issm/trunk/src/c/objects/Inputs/TransientInput.cpp	(revision 8791)
@@ -21,10 +21,11 @@
 /*FUNCTION TransientInput::TransientInput(){{{1*/
 TransientInput::TransientInput(){
-	enum_type=NoneEnum;
+
+   enum_type=UNDEF;
 	inputs=NULL;
-	numtimesteps=0;
-	parameters=NULL;
-	timesteps=NULL;
-	return;
+	this->numtimesteps=0;
+	this->parameters=NULL;
+	this->timesteps=NULL;
+
 }
 /*}}}*/
@@ -46,4 +47,5 @@
 TransientInput::~TransientInput(){
 	xfree((void**)&this->timesteps);
+	this->timesteps=NULL;
 	this->numtimesteps=0;
 	parameters=NULL;
@@ -198,4 +200,5 @@
 	output->enum_type=this->enum_type;
 	output->numtimesteps=this->numtimesteps;
+	output->timesteps=(double*)xmalloc(this->numtimesteps*sizeof(double));
    memcpy(output->timesteps,this->timesteps,this->numtimesteps*sizeof(double));
 	output->inputs=(Inputs*)this->inputs->Copy();
@@ -224,5 +227,9 @@
 	outinput=new TransientInput();
 	outinput->enum_type=this->enum_type;
+	outinput->numtimesteps=this->numtimesteps;
+	outinput->timesteps=(double*)xmalloc(this->numtimesteps*sizeof(double));
+	memcpy(outinput->timesteps,this->timesteps,this->numtimesteps*sizeof(double));
 	outinput->inputs=(Inputs*)this->inputs->SpawnTriaInputs(indices);
+	outinput->parameters=this->parameters;
 
 	/*Assign output*/
@@ -242,5 +249,5 @@
 	elementresult=input->SpawnResult(step,time);
 
-   xfree((void**)&input);
+   delete input;
 
 	return elementresult;
@@ -255,5 +262,5 @@
 
 	/*First, recover current time from parameters: */
-	parameters->FindParam(&time,TimeEnum);
+	this->parameters->FindParam(&time,TimeEnum);
 
 	/*Retrieve interpolated values for this time step: */
@@ -263,5 +270,5 @@
 	input->GetParameterValue(pvalue,gauss);
 
-	xfree((void**)&input);
+	delete input;
 
 }
@@ -281,5 +288,6 @@
 	input->GetParameterDerivativeValue(p,xyz_list,gauss);
 
-	xfree((void**)&input);
+	delete input;
+
 }
 /*}}}*/
@@ -303,5 +311,5 @@
 	input->GetParameterAverage(pvalue);
 			   
-	xfree((void**)&input);
+	delete input;
 
 }
@@ -323,5 +331,5 @@
 	input->SquareMin(psquaremin,process_units,parameters);
 			   
-	xfree((void**)&input);
+	delete input;
 
 }
@@ -342,5 +350,5 @@
 	infnorm=input->InfinityNorm();
 			   
-	xfree((void**)&input);
+	delete input;
 
 }
@@ -361,5 +369,5 @@
 	max=input->Max();
 			   
-	xfree((void**)&input);
+	delete input;
 
 	return max;
@@ -381,7 +389,8 @@
 	maxabs=input->MaxAbs();
 
-	xfree((void**)&input);
+	delete input;
 
 	return maxabs;
+
 }
 /*}}}*/
@@ -401,7 +410,8 @@
 	min=input->Min();
 
-	xfree((void**)&input);
+	delete input;
 
 	return min;
+
 }
 /*}}}*/
@@ -421,5 +431,5 @@
 	minabs=input->MinAbs();
 			   
-	xfree((void**)&input);
+	delete input;
 
 	return minabs;
@@ -440,5 +450,5 @@
 	input->GetVectorFromInputs(vector,doflist);
 			   
-	xfree((void**)&input);
+	delete input;
 
 } /*}}}*/
