Changeset 24377 for issm/trunk-jpl/src/c/classes/Elements/Element.cpp
- Timestamp:
- 11/21/19 14:16:34 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Element.cpp
r24376 r24377 1106 1106 } 1107 1107 /*}}}*/ 1108 Input* Element::GetInput(int inputenum){/*{{{*/1109 return inputs->GetInput(inputenum);1110 }/*}}}*/1111 1108 void Element::GetInputListOnNodes(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue){/*{{{*/ 1112 1109 … … 4032 4029 } 4033 4030 /*}}}*/ 4034 void Element::StrainRateESA(IssmDouble* epsilon,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input){/*{{{*/4035 4036 /*Intermediaries*/4037 IssmDouble dvx[3];4038 IssmDouble dvy[3];4039 4040 /*Check that both inputs have been found*/4041 if(!vx_input || !vy_input){4042 _error_("Input missing. Here are the input pointers we have for vx: " << vx_input << ", vy: " << vy_input << "\n");4043 }4044 4045 /*Get strain rate assuming that epsilon has been allocated*/4046 vx_input->GetInputDerivativeValue(&dvx[0],xyz_list,gauss);4047 vy_input->GetInputDerivativeValue(&dvy[0],xyz_list,gauss);4048 epsilon[0] = dvx[0]; // normal strain rate x-direction4049 epsilon[1] = dvy[1]; // normal strain rate y-direction4050 epsilon[2] = 0.5*(dvx[1] + dvy[0]); // shear strain rate4051 epsilon[3] = 0.5*(dvx[1] - dvy[0]); // rotation rate4052 4053 }/*}}}*/4054 void Element::StrainRateFS(IssmDouble* epsilon,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input,Input* vz_input){/*{{{*/4055 /*Compute the 3d Strain Rate (6 components):4056 *4057 * epsilon=[exx eyy ezz exy exz eyz]4058 */4059 4060 /*Intermediaries*/4061 IssmDouble dvx[3];4062 IssmDouble dvy[3];4063 IssmDouble dvz[3];4064 4065 /*Check that both inputs have been found*/4066 if (!vx_input || !vy_input || !vz_input){4067 _error_("Input missing. Here are the input pointers we have for vx: " << vx_input << ", vy: " << vy_input << ", vz: " << vz_input << "\n");4068 }4069 4070 /*Get strain rate assuming that epsilon has been allocated*/4071 vx_input->GetInputDerivativeValue(&dvx[0],xyz_list,gauss);4072 vy_input->GetInputDerivativeValue(&dvy[0],xyz_list,gauss);4073 vz_input->GetInputDerivativeValue(&dvz[0],xyz_list,gauss);4074 epsilon[0] = dvx[0];4075 epsilon[1] = dvy[1];4076 epsilon[2] = dvz[2];4077 epsilon[3] = 0.5*(dvx[1] + dvy[0]);4078 epsilon[4] = 0.5*(dvx[2] + dvz[0]);4079 epsilon[5] = 0.5*(dvy[2] + dvz[1]);4080 4081 }/*}}}*/4082 void Element::StrainRateHO(IssmDouble* epsilon,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input){/*{{{*/4083 /*Compute the 3d Blatter/HOStrain Rate (5 components):4084 *4085 * epsilon=[exx eyy exy exz eyz]4086 *4087 * with exz=1/2 du/dz4088 * eyz=1/2 dv/dz4089 *4090 * the contribution of vz is neglected4091 */4092 4093 /*Intermediaries*/4094 IssmDouble dvx[3];4095 IssmDouble dvy[3];4096 4097 /*Check that both inputs have been found*/4098 if (!vx_input || !vy_input){4099 _error_("Input missing. Here are the input pointers we have for vx: " << vx_input << ", vy: " << vy_input << "\n");4100 }4101 4102 /*Get strain rate assuming that epsilon has been allocated*/4103 vx_input->GetInputDerivativeValue(&dvx[0],xyz_list,gauss);4104 vy_input->GetInputDerivativeValue(&dvy[0],xyz_list,gauss);4105 epsilon[0] = dvx[0];4106 epsilon[1] = dvy[1];4107 epsilon[2] = 0.5*(dvx[1] + dvy[0]);4108 epsilon[3] = 0.5*dvx[2];4109 epsilon[4] = 0.5*dvy[2];4110 4111 }/*}}}*/4112 void Element::StrainRateHO2dvertical(IssmDouble* epsilon,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input){/*{{{*/4113 /*Compute the 2d Blatter/HOStrain Rate (2 components):4114 *4115 * epsilon=[exx exz]4116 *4117 * with exz=1/2 du/dz4118 *4119 * the contribution of vz is neglected4120 */4121 4122 /*Intermediaries*/4123 IssmDouble dvx[3];4124 4125 /*Check that both inputs have been found*/4126 if (!vx_input){4127 _error_("Input missing. Here are the input pointers we have for vx: " << vx_input <<"\n");4128 }4129 4130 /*Get strain rate assuming that epsilon has been allocated*/4131 vx_input->GetInputDerivativeValue(&dvx[0],xyz_list,gauss);4132 epsilon[0] = dvx[0];4133 epsilon[1] = 0.5*dvx[1];4134 4135 }/*}}}*/4136 void Element::StrainRateSSA(IssmDouble* epsilon,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input){/*{{{*/4137 4138 /*Intermediaries*/4139 IssmDouble dvx[3];4140 IssmDouble dvy[3];4141 4142 /*Check that both inputs have been found*/4143 if(!vx_input || !vy_input){4144 _error_("Input missing. Here are the input pointers we have for vx: " << vx_input << ", vy: " << vy_input << "\n");4145 }4146 4147 /*Get strain rate assuming that epsilon has been allocated*/4148 vx_input->GetInputDerivativeValue(&dvx[0],xyz_list,gauss);4149 vy_input->GetInputDerivativeValue(&dvy[0],xyz_list,gauss);4150 epsilon[0] = dvx[0];4151 epsilon[1] = dvy[1];4152 epsilon[2] = 0.5*(dvx[1] + dvy[0]);4153 4154 }/*}}}*/4155 void Element::StrainRateSSA1d(IssmDouble* epsilon,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input){/*{{{*/4156 4157 /*Intermediaries*/4158 IssmDouble dvx[3];4159 4160 /*Check that both inputs have been found*/4161 if (!vx_input){4162 _error_("Input missing. Here are the input pointers we have for vx: " << vx_input << "\n");4163 }4164 4165 /*Get strain rate assuming that epsilon has been allocated*/4166 vx_input->GetInputDerivativeValue(&dvx[0],xyz_list,gauss);4167 *epsilon = dvx[0];4168 4169 }/*}}}*/4170 4031 void Element::StrainRateESA(IssmDouble* epsilon,IssmDouble* xyz_list,Gauss* gauss,Input2* vx_input,Input2* vy_input){/*{{{*/ 4171 4032
Note:
See TracChangeset
for help on using the changeset viewer.