Changeset 14971 for issm/trunk-jpl/src/c/classes/objects/Elements/Tria.cpp
- Timestamp:
- 05/08/13 21:00:42 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/objects/Elements/Tria.cpp
r14970 r14971 1881 1881 void Tria::InputUpdateFromVector(IssmDouble* vector, int name, int type){ 1882 1882 1883 1884 1883 const int numdof = NDOF1 *NUMVERTICES; 1885 1884 int *doflist = NULL; … … 1890 1889 1891 1890 switch(type){ 1891 #ifdef _HAVE_GIA_ 1892 case GiaAnalysisEnum: 1893 InputUpdateFromVectorGia(vector); 1894 break; 1895 #endif 1892 1896 case VertexEnum: 1893 1897 /*Get values on the 3 vertices*/ … … 1902 1906 this->inputs->AddInput(new TriaP1Input(name,values)); 1903 1907 } 1904 return; 1908 return; 1905 1909 1906 1910 case NodesEnum: … … 1915 1919 /*Add input to the element: */ 1916 1920 this->inputs->AddInput(new TriaP1Input(name,values)); 1921 1917 1922 /*Free ressources:*/ 1918 1923 xDelete<int>(doflist); … … 1920 1925 1921 1926 default: 1922 1923 _error_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");1924 } 1927 _error_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet"); 1928 } 1929 1925 1930 } 1926 1931 /*}}}*/ … … 3235 3240 /*Add input to the element: */ 3236 3241 this->inputs->AddInput(new TriaP1Input(GiaWEnum,values)); 3242 3243 } 3244 /*}}}*/ 3245 /*FUNCTION Tria::InputUpdateFromVectorGia{{{*/ 3246 void Tria::InputUpdateFromVectorGia(IssmDouble* vector){ 3247 3248 int vertexsidlist[NUMVERTICES]; 3249 IssmDouble values[NUMVERTICES]; 3250 3251 /*Get sid list: */ 3252 this->GetVertexSidList(&vertexsidlist[0]); 3253 3254 /*Use the dof list to index into the solution vector: */ 3255 for(int i=0;i<NUMVERTICES;i++){ 3256 values[i]=vector[vertexsidlist[i]]; 3257 if(xIsNan<IssmDouble>(values[i])) _error_("NaN found in solution vector"); 3258 } 3259 3260 /*Add input to the element: */ 3261 this->inputs->AddInput(new TriaP1Input(GiadWdtEnum,values)); 3237 3262 3238 3263 }
Note:
See TracChangeset
for help on using the changeset viewer.