Changeset 14971
- Timestamp:
- 05/08/13 21:00:42 (12 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 5 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 } -
issm/trunk-jpl/src/c/classes/objects/Elements/Tria.h
r14967 r14971 142 142 #ifdef _HAVE_GIA_ 143 143 void GiaDeflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt,IssmDouble* x,IssmDouble* y); 144 void InputUpdateFromSolutionGia(IssmDouble* solution); 144 void InputUpdateFromSolutionGia(IssmDouble* solution); 145 void InputUpdateFromVectorGia(IssmDouble* vector); 145 146 #endif 146 147 -
issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/GiaDeflectionCorex.cpp
r14960 r14971 176 176 } 177 177 else if (irate==1){ 178 *pwi=0; 178 179 dwidt = blocks_.aswokm; 179 180 *pdwidt=dwidt; 180 *pwi=0;181 181 } 182 182 183 //printf("deflection: %g deflection rate %g\n",wi, dwidt);184 185 183 } -
issm/trunk-jpl/src/c/solutions/AnalysisConfiguration.cpp
r14960 r14971 120 120 analyses[7]=EnthalpyAnalysisEnum; 121 121 analyses[8]=PrognosticAnalysisEnum; 122 //analyses[9]=GiaAnalysisEnum;123 122 break; 124 123 -
issm/trunk-jpl/src/c/solutions/gia_core.cpp
r14960 r14971 10 10 #include "../modules/modules.h" 11 11 #include "../solvers/solvers.h" 12 13 12 void gia_core(FemModel* femmodel){ 14 13 15 14 int i; 16 15 Vector<IssmDouble>* wg = NULL; 17 Vector<IssmDouble>* dw gdt= NULL;16 Vector<IssmDouble>* dwdtg = NULL; 18 17 IssmDouble* x = NULL; 19 18 IssmDouble* y = NULL; … … 36 35 gsize = femmodel->nodes->NumberOfDofs(configuration_type,GsetEnum); 37 36 wg = new Vector<IssmDouble>(gsize); 38 dw gdt= new Vector<IssmDouble>(gsize);37 dwdtg = new Vector<IssmDouble>(gsize); 39 38 40 39 /*first, recover x and y vectors from vertices: */ … … 42 41 43 42 /*call the main module: */ 44 femmodel->Deflection(wg,dw gdt,x,y);43 femmodel->Deflection(wg,dwdtg,x,y); 45 44 46 45 /*assemble vector: */ 47 46 wg->Assemble(); 48 dw gdt->Assemble();47 dwdtg->Assemble(); 49 48 50 49 InputUpdateFromSolutionx( femmodel->elements,femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,wg); 51 InputUpdateFromVectorx( femmodel->elements,femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,dw gdt,GiadWdtEnum,VertexEnum);50 InputUpdateFromVectorx( femmodel->elements,femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,dwdtg,GiadWdtEnum,GiaAnalysisEnum); 52 51 53 52 if(save_results){
Note:
See TracChangeset
for help on using the changeset viewer.