5 #include "../../shared/shared.h"
6 #include "../../toolkits/toolkits.h"
7 #include "../../classes/classes.h"
12 int migration_style,analysis_type;
13 IssmDouble *vertices_potentially_ungrounding = NULL;
21 if(migration_style==
NoneEnum)
return;
28 switch(migration_style){
48 for(
int i=0;i<elements->
Size();i++){
54 xDelete<IssmDouble>(vertices_potentially_ungrounding);
55 xDelete<IssmDouble>(phi_ungrounding);
63 IssmDouble* serial_vertex_waterpressure = NULL;
70 phi = xNew<IssmDouble>(numberofvertices);
73 for(
int i=0;i<elements->
Size();i++){
80 serial_vertex_sigmann=vertex_sigmann->
ToMPISerial();
81 serial_vertex_waterpressure=vertex_waterpressure->
ToMPISerial();
83 for(
int i=0;i<numberofvertices;i++){
84 if (serial_vertex_waterpressure[i] > serial_vertex_sigmann[i]) phi[i]=-1;
89 delete vertex_sigmann;
90 delete vertex_waterpressure;
91 xDelete<IssmDouble>(serial_vertex_sigmann);
92 xDelete<IssmDouble>(serial_vertex_waterpressure);
99 int i,numberofvertices;
100 IssmDouble* vertices_potentially_ungrounding = NULL;
109 for(i=0;i<elements->
Size();i++){
115 vec_vertices_potentially_ungrounding->
Assemble();
116 vertices_potentially_ungrounding=vec_vertices_potentially_ungrounding->
ToMPISerial();
119 delete vec_vertices_potentially_ungrounding;
120 return vertices_potentially_ungrounding;
125 int nflipped,local_nflipped;
127 IssmDouble* elements_neighboring_floatingce = NULL;
137 for(i=0;i<elements->
Size();i++){
151 for(i=0;i<elements->
Size();i++){
157 vec_elements_neighboring_floatingice->
Assemble();
158 elements_neighboring_floatingce=vec_elements_neighboring_floatingice->
ToMPISerial();
162 for(i=0;i<elements->
Size();i++){
164 if(reCast<int,IssmDouble>(elements_neighboring_floatingce[element->
Sid()])){
174 xDelete<IssmDouble>(elements_neighboring_floatingce);
175 xDelete<IssmDouble>(phi);
178 delete vec_elements_neighboring_floatingice;
184 xDelete<IssmDouble>(elements_neighboring_floatingce);