Index: /issm/trunk-jpl/src/c/classes/AdaptiveMeshRefinement.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/AdaptiveMeshRefinement.cpp	(revision 24490)
+++ /issm/trunk-jpl/src/c/classes/AdaptiveMeshRefinement.cpp	(revision 24491)
@@ -612,7 +612,7 @@
 
 	/*Generate the elements*/
-	long index;
+	int64_t index;
    const int mat = this->GetElemMaterialID();
-   TPZManVector<long> elem(this->GetNumberOfNodes(),0);
+   TPZManVector<int64_t> elem(this->GetNumberOfNodes(),0);
 	this->index2sid.clear(); this->index2sid.resize(this->numberofelements);
    this->sid2index.clear();
@@ -646,5 +646,5 @@
    int mat     = this->GetElemMaterialID();;
    int reftype = 1;
-   long index; 
+   int64_t index; 
 
 	//nodes
@@ -662,5 +662,5 @@
 		}
 
-		TPZManVector<long> elem(3,0);
+		TPZManVector<int64_t> elem(3,0);
       for(int j=0;j<3;j++) elem[j] = geoel->NodeIndex(j);
 
@@ -732,6 +732,6 @@
 	/*Basic verification*/
 	if(!pdata) _error_("Impossible to continue: pdata is NULL!\n");
-	if(pdata[0]<=0) _error_("Impossible to continue: nvertices <=0!\n");
-	if(pdata[1]<=0) _error_("Impossible to continue: nelements <=0!\n");
+	if(*pdata[0]<=0) _error_("Impossible to continue: nvertices <=0!\n");
+	if(*pdata[1]<=0) _error_("Impossible to continue: nelements <=0!\n");
 	if(!pxy) _error_("Impossible to continue: pxy is NULL!\n");
 	if(!pelements) _error_("Impossible to continue: pelements is NULL!\n");
