Index: /issm/trunk-jpl/src/c/Container/Loads.cpp
===================================================================
--- /issm/trunk-jpl/src/c/Container/Loads.cpp	(revision 13915)
+++ /issm/trunk-jpl/src/c/Container/Loads.cpp	(revision 13916)
@@ -53,5 +53,31 @@
 }
 /*}}}*/
-/*FUNCTION Loads::NumberOfLoads{{{*/
+/*FUNCTION Loads::MaxNumNodes{{{*/
+int Loads::MaxNumNodes(int analysis_type){
+
+	int max=0;
+	int allmax;
+	int numnodes=0;
+
+	/*Now go through all loads, and get how many nodes they own, unless they are clone nodes: */
+	for(int i=0;i<this->Size();i++){
+
+		Load* load=dynamic_cast<Load*>(this->GetObjectByOffset(i));
+		if (load->InAnalysis(analysis_type)){
+			numnodes=load->GetNumberOfNodes();
+			if(numnodes>max)max=numnodes;
+		}
+	}
+
+	/*Grab max of all cpus: */
+#ifdef _HAVE_MPI_
+	MPI_Allreduce((void*)&max,(void*)&allmax,1,MPI_INT,MPI_MAX,IssmComm::GetComm());
+	max=allmax;
+#endif
+
+	return max;
+}
+/*}}}*/
+/*FUNCTION Loads::NumberOfLoads(){{{*/
 int Loads::NumberOfLoads(void){
 
@@ -73,4 +99,53 @@
 }
 /*}}}*/
+/*FUNCTION Loads::NumberOfLoads(int analysis){{{*/
+int Loads::NumberOfLoads(int analysis_type){
+
+	int localloads = 0;
+	int numberofloads;
+
+	/*Get number of local loads*/
+	for(int i=0;i<this->Size();i++){
+
+		Load* load=dynamic_cast<Load*>(this->GetObjectByOffset(i));
+
+		/*Check that this load corresponds to our analysis currently being carried out: */
+		if (load->InAnalysis(analysis_type)) localloads++;
+	}
+
+	/*figure out total number of loads combining all the cpus (no clones here)*/
+#ifdef _HAVE_MPI_
+	MPI_Reduce(&localloads,&numberofloads,1,MPI_INT,MPI_SUM,0,IssmComm::GetComm() );
+	MPI_Bcast(&numberofloads,1,MPI_INT,0,IssmComm::GetComm());
+#else
+	numberofloads=localloads;
+#endif
+
+	return numberofloads;
+}
+/*}}}*/
+/*FUNCTION Loads::Size(){{{*/
+int Loads::Size(void){
+
+	return this->DataSet::Size();
+}
+/*}}}*/
+/*FUNCTION Loads::Size(int analysis){{{*/
+int Loads::Size(int analysis_type){
+
+	int localloads = 0;
+
+	/*Get number of local loads*/
+	for(int i=0;i<this->Size();i++){
+
+		Load* load=dynamic_cast<Load*>(this->GetObjectByOffset(i));
+
+		/*Check that this load corresponds to our analysis currently being carried out: */
+		if (load->InAnalysis(analysis_type)) localloads++;
+	}
+
+	return localloads;
+}
+/*}}}*/
 /*FUNCTION Loads::SetCurrentConfiguration{{{*/
 void Loads::SetCurrentConfiguration(Elements* elements,Loads* loads, Nodes* nodes, Vertices* vertices, Materials* materials,Parameters* parameters){
Index: /issm/trunk-jpl/src/c/Container/Loads.h
===================================================================
--- /issm/trunk-jpl/src/c/Container/Loads.h	(revision 13915)
+++ /issm/trunk-jpl/src/c/Container/Loads.h	(revision 13916)
@@ -26,6 +26,10 @@
 		/*numerics*/
 		void  Configure(Elements* elements,Loads* loads, Nodes* nodes, Vertices* vertices, Materials* materials,Parameters* parameters);
+		int   MaxNumNodes(int analysis);
 		int   NumberOfLoads(void);
+		int   NumberOfLoads(int analysis);
 		void  SetCurrentConfiguration(Elements* elements,Loads* loads, Nodes* nodes, Vertices* vertices, Materials* materials,Parameters* parameters);
+		int   Size(int analysis);
+		int   Size(void);
 
 };
