Changeset 17047
- Timestamp:
- 12/23/13 13:36:23 (11 years ago)
- Location:
- issm/trunk-jpl/src/c/classes/Elements
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Element.h
r17028 r17047 237 237 virtual IssmDouble TotalSmb(void)=0; 238 238 virtual IssmDouble Misfit(int modelenum,int observationenum,int weightsenum)=0; 239 virtual IssmDouble MisfitArea(int weightsenum)=0; 239 240 virtual int VertexConnectivity(int vertexindex)=0; 240 241 virtual void VerticalSegmentIndices(int** pindices,int* pnumseg)=0; -
issm/trunk-jpl/src/c/classes/Elements/Penta.h
r17028 r17047 184 184 void InputControlUpdate(IssmDouble scalar,bool save_parameter); 185 185 IssmDouble Misfit(int modelenum,int observationenum,int weightsenum){_error_("not implemented yet");}; 186 IssmDouble MisfitArea(int weightsenum){_error_("not implemented yet");}; 186 187 #endif 187 188 -
issm/trunk-jpl/src/c/classes/Elements/Seg.h
r17028 r17047 206 206 void MaxVz(IssmDouble* pmaxvz){_error_("not implemented yet");}; 207 207 IssmDouble Misfit(int modelenum,int observationenum,int weightsenum){_error_("not implemented yet");}; 208 IssmDouble MisfitArea(int weightsenum){_error_("not implemented yet");}; 208 209 #endif 209 210 -
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r17033 r17047 2240 2240 2241 2241 /*If on water, return 0: */ 2242 if(NoIceInElement())return 0; 2242 if(NoIceInElement()){ 2243 printf("no ice in element!\n"); 2244 return 0; 2245 } 2243 2246 2244 2247 ::GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES); … … 2883 2886 } 2884 2887 /*}}}*/ 2888 /*FUNCTION Tria::MisfitArea{{{*/ 2889 IssmDouble Tria::MisfitArea(int weightsenum){ 2890 2891 /*Intermediaries*/ 2892 IssmDouble weight; 2893 IssmDouble Jdet; 2894 IssmDouble Jelem = 0; 2895 IssmDouble xyz_list[NUMVERTICES][3]; 2896 GaussTria *gauss = NULL; 2897 2898 /*If on water, return 0: */ 2899 if(NoIceInElement())return 0; 2900 2901 /*Retrieve all inputs we will be needing: */ 2902 ::GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES); 2903 Input* weights_input =inputs->GetInput(weightsenum); _assert_(weights_input); 2904 2905 /* Start looping on the number of gaussian points: */ 2906 gauss=new GaussTria(2); 2907 for(int ig=gauss->begin();ig<gauss->end();ig++){ 2908 2909 gauss->GaussPoint(ig); 2910 2911 /* Get Jacobian determinant: */ 2912 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 2913 2914 /*Get parameters at gauss point*/ 2915 weights_input->GetInputValue(&weight,gauss); 2916 2917 /*compute misfit between model and observation */ 2918 Jelem+=Jdet*weight*gauss->weight; 2919 } 2920 2921 /* clean up and Return: */ 2922 delete gauss; 2923 return Jelem; 2924 } 2925 /*}}}*/ 2885 2926 /*FUNCTION Tria::Misfit{{{*/ 2886 2927 IssmDouble Tria::Misfit(int modelenum,int observationenum,int weightsenum){ … … 2917 2958 2918 2959 /*compute misfit between model and observation */ 2919 Jelem+=0.5*(model-observation)*(model-observation)* weight*Jdet*gauss->weight;2960 Jelem+=0.5*(model-observation)*(model-observation)*Jdet*weight*gauss->weight; 2920 2961 } 2921 2962 -
issm/trunk-jpl/src/c/classes/Elements/Tria.h
r17028 r17047 152 152 void MaxVz(IssmDouble* pmaxvz); 153 153 IssmDouble Misfit(int modelenum,int observationenum,int weightsenum); 154 IssmDouble MisfitArea(int weightsenum); 154 155 #endif 155 156
Note:
See TracChangeset
for help on using the changeset viewer.