10 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
15 #include "../classes.h"
35 const int RIFTINFOSIZE = 12;
36 int riftfront_node_ids[2];
37 int riftfront_elem_ids[2];
50 el1=reCast<int,IssmDouble>(*(iomodel->
Data(
"md.rifts.riftstruct")+RIFTINFOSIZE*i+2));
51 el2=reCast<int,IssmDouble>(*(iomodel->
Data(
"md.rifts.riftstruct")+RIFTINFOSIZE*i+3)) ;
53 node1=reCast<int,IssmDouble>(*(iomodel->
Data(
"md.rifts.riftstruct")+RIFTINFOSIZE*i+0));
54 node2=reCast<int,IssmDouble>(*(iomodel->
Data(
"md.rifts.riftstruct")+RIFTINFOSIZE*i+1));
57 this->
id=riftfront_id;
60 riftfront_node_ids[0]=node1;
61 riftfront_node_ids[1]=node2;
62 riftfront_elem_ids[0]=el1;
63 riftfront_elem_ids[1]=el2;
77 this->
normal[0]=*(iomodel->
Data(
"md.rifts.riftstruct")+RIFTINFOSIZE*i+4);
78 this->
normal[1]=*(iomodel->
Data(
"md.rifts.riftstruct")+RIFTINFOSIZE*i+5);
79 this->
length=*(iomodel->
Data(
"md.rifts.riftstruct")+RIFTINFOSIZE*i+6);
80 this->
fraction=*(iomodel->
Data(
"md.rifts.riftstruct")+RIFTINFOSIZE*i+9);
81 this->
state=reCast<int,IssmDouble>(*(iomodel->
Data(
"md.rifts.riftstruct")+RIFTINFOSIZE*i+11));
86 this->
friction=*(iomodel->
Data(
"md.rifts.riftstruct")+RIFTINFOSIZE*i+8);
88 this->
shelf=reCast<bool,IssmDouble>(iomodel->
Data(
"md.mask.ocean_levelset")[node1-1]<0.);
114 riftfront->
id=this->
id;
170 _printf_(
" internal parameters: \n");
208 this->
hnodes->
Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
209 this->
hvertices->
Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
210 this->
helements->
Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
314 switch(analysis_type){
322 _error_(
"analysis " << analysis_type <<
" (" <<
EnumToStringx(analysis_type) <<
") not supported yet");
339 switch(analysis_type){
347 _error_(
"analysis " << analysis_type <<
" (" <<
EnumToStringx(analysis_type) <<
") not supported yet");
384 if(!flags[this->
nodes[i]->Lid()]){
391 flagsindices[
counter]=this->nodes[i]->Lid();
397 if(this->nodes[i]->IsClone())
405 if(this->nodes[i]->IsClone())
413 if(this->nodes[i]->IsClone())
419 default:
_error_(
"not supported");
444 if(!this->
active)
return NULL;
451 if (h[0]!=h[1])
_error_(
"different thicknesses not supported for rift fronts");
458 Ke->
values[0*numdof+0]+= +pow(
normal[0],2)*kmax*pow(10,penalty_offset);
460 Ke->
values[0*numdof+2]+= -pow(
normal[0],2)*kmax*pow(10,penalty_offset);
464 Ke->
values[1*numdof+1]+= +pow(
normal[1],2)*kmax*pow(10,penalty_offset);
466 Ke->
values[1*numdof+3]+= -pow(
normal[1],2)*kmax*pow(10,penalty_offset);
468 Ke->
values[2*numdof+0]+= -pow(
normal[0],2)*kmax*pow(10,penalty_offset);
470 Ke->
values[2*numdof+2]+= +pow(
normal[0],2)*kmax*pow(10,penalty_offset);
474 Ke->
values[3*numdof+1]+= -pow(
normal[1],2)*kmax*pow(10,penalty_offset);
476 Ke->
values[3*numdof+3]+= +pow(
normal[1],2)*kmax*pow(10,penalty_offset);
526 if(this->
active)
return NULL;
535 if (h[0]!=h[1])
_error_(
"different thicknesses not supported for rift fronts");
539 if (b[0]!=b[1])
_error_(
"different beds not supported for rift fronts");
552 pressure=rho_ice*gravity*pow(thickness,2)/2.- rho_water*gravity*pow(bed,2)/2.;
556 pressure=rho_ice*gravity*pow(thickness,2)/2.- rho_water*gravity*pow(thickness,2)/2.;
560 pressure=rho_ice*gravity*pow(thickness,2)/2.;
567 if(!
shelf)
_error_(
"fill type " <<
fill <<
" not supported on ice sheets yet.");
569 pressure_litho=rho_ice*gravity*pow(thickness,2)/2.;
571 pressure_melange=rho_ice*gravity*pow(
fraction*thickness,2)/2.;
572 pressure_water=1.0/2.0*rho_water*gravity* ( pow(bed,2.0)-pow(rho_ice/rho_water*
fraction*thickness,2.0) );
574 pressure=pressure_litho-pressure_air-pressure_melange-pressure_water;
577 _error_(
"fill type " <<
fill <<
" not supported yet.");
581 for(
int j=0;j<2;j++){
586 for(
int j=0;j<2;j++){
642 if(penetration<0)activate=
true;
657 if(this->
active==activate){