Index: ../trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp =================================================================== --- ../trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp (revision 17704) +++ ../trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp (revision 17705) @@ -63,27 +63,15 @@ IssmDouble* serial_vertexgrounded = NULL; IssmDouble* serial_vertexfloating = NULL; IssmDouble* phi = NULL; - int index; - int* dof=NULL; - IssmDouble* xyz_list=NULL; /*Initialize vector with number of vertices*/ - int numberofvertices = vertices->NumberOfVertices(); - vertexgrounded = new Vector(numberofvertices); - vertexfloating = new Vector(numberofvertices); - phi = xNew(numberofvertices); - IssmDouble x[numberofvertices]; - - /*Get x coordinate for each vertex*/ - for(int i = 0;iSize();i++){ - Element* element = dynamic_cast(elements->GetObjectByOffset(i)); - element->GetVerticesCoordinates(&xyz_list); - element->GetDofList(&dof,FSvelocityEnum,GsetEnum); - for (int j=0;j<3;j++) x[dof[j]]=xyz_list[3*j]; - } + int numberofvertices = vertices->NumberOfVertices(); + vertexgrounded = new Vector(numberofvertices); + vertexfloating = new Vector(numberofvertices); + phi = xNew(numberofvertices); /*Fill vector vertices_potentially_floating: */ - for(int i = 0;iSize();i++){ + for(int i=0;iSize();i++){ Element* element=dynamic_cast(elements->GetObjectByOffset(i)); element->FSContactMigration(vertexgrounded,vertexfloating); } @@ -91,27 +79,22 @@ /*Assemble vector and serialize */ vertexgrounded->Assemble(); vertexfloating->Assemble(); - serial_vertexgrounded = vertexgrounded->ToMPISerial(); - serial_vertexfloating = vertexfloating->ToMPISerial(); + serial_vertexgrounded=vertexgrounded->ToMPISerial(); + serial_vertexfloating=vertexfloating->ToMPISerial(); - /*find vertex on GL */ - for(int i = 0;i0*/ - for(int i = 0;i x[index]) { - phi[i] = -1.; + else if(serial_vertexfloating[i]==1.){ + phi[i]=-1.; } - else if (x[i]==x[index]) { - phi[i] = 0; + else{ + _error_("not supported (vertexfloating="<