Changeset 14650
- Timestamp:
- 04/18/13 13:42:43 (12 years ago)
- Location:
- issm/trunk-jpl
- Files:
-
- 4 added
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/Makefile.am
r14648 r14650 500 500 ./modules/ModelProcessorx/Gia/CreateNodesGia.cpp \ 501 501 ./modules/ModelProcessorx/Gia/CreateConstraintsGia.cpp\ 502 ./modules/ModelProcessorx/Gia/CreateLoadsGia.cpp 502 ./modules/ModelProcessorx/Gia/CreateLoadsGia.cpp\ 503 ./modules/GiaDeflectionCorex/GiaDeflectionCorex.cpp\ 504 ./modules/GiaDeflectionCorex/GiaDeflectionCorex.h 503 505 504 506 #}}} -
issm/trunk-jpl/src/c/classes/FemModel.cpp
r14648 r14650 1552 1552 for (i=0;i<elements->Size();i++){ 1553 1553 element=dynamic_cast<Element*>(elements->GetObjectByOffset(i)); 1554 element-> Deflection(wg,x,y);1555 } 1556 } 1557 /*}}}*/ 1558 #endif 1554 element->GiaDeflection(wg,x,y); 1555 } 1556 } 1557 /*}}}*/ 1558 #endif -
issm/trunk-jpl/src/c/classes/objects/Elements/Element.h
r14648 r14650 101 101 102 102 #ifdef _HAVE_GIA_ 103 virtual void Deflection(Vector<IssmDouble>* wg,IssmDouble* x,IssmDouble* y)=0;103 virtual void GiaDeflection(Vector<IssmDouble>* wg,IssmDouble* x,IssmDouble* y)=0; 104 104 #endif 105 105 -
issm/trunk-jpl/src/c/classes/objects/Elements/Penta.cpp
r14648 r14650 3486 3486 3487 3487 #ifdef _HAVE_GIA_ 3488 /*FUNCTION Penta:: Deflection {{{*/3489 void Penta:: Deflection(Vector<IssmDouble>* wg,IssmDouble* x, IssmDouble* y){3488 /*FUNCTION Penta::GiaDeflection {{{*/ 3489 void Penta::GiaDeflection(Vector<IssmDouble>* wg,IssmDouble* x, IssmDouble* y){ 3490 3490 _error_("GIA deflection not implemented yet!"); 3491 3491 } -
issm/trunk-jpl/src/c/classes/objects/Elements/Penta.h
r14648 r14650 143 143 144 144 #ifdef _HAVE_GIA_ 145 void Deflection(Vector<IssmDouble>* wg,IssmDouble* x,IssmDouble* y);145 void GiaDeflection(Vector<IssmDouble>* wg,IssmDouble* x,IssmDouble* y); 146 146 #endif 147 147 -
issm/trunk-jpl/src/c/classes/objects/Elements/Tria.cpp
r14648 r14650 17 17 #include "../../../Container/Container.h" 18 18 #include "../../../include/include.h" 19 #ifdef _HAVE_GIA_ 20 #include "../../../modules/GiaDeflectionCorex/GiaDeflectionCorex.h" 21 #endif 19 22 /*}}}*/ 20 23 … … 3040 3043 3041 3044 #ifdef _HAVE_GIA_ 3042 /*FUNCTION Tria:: Deflection {{{*/3043 void Tria:: Deflection(Vector<IssmDouble>* wg,IssmDouble* x, IssmDouble* y){3045 /*FUNCTION Tria::GiaDeflection {{{*/ 3046 void Tria::GiaDeflection(Vector<IssmDouble>* wg,IssmDouble* x, IssmDouble* y){ 3044 3047 3045 3048 int i; … … 3048 3051 IssmDouble x0,y0; 3049 3052 IssmDouble xyz_list[NUMVERTICES][3]; 3050 IssmDouble he; 3053 3054 /*thickness averages: */ 3055 IssmDouble* hes=NULL; 3056 IssmDouble* times=NULL; 3057 IssmDouble currenttime; 3058 int numtimes; 3059 3060 /*output: */ 3061 IssmDouble wi; 3051 3062 3052 3063 /*how many dofs are we working with here? */ 3053 gsize=this->nodes[0]->indexing.gsize; 3054 3055 /*pull thickness average and area: */ 3064 this->parameters->FindParam(&gsize,MeshNumberofverticesEnum); 3065 3066 /*what time is it? :*/ 3067 this->parameters->FindParam(¤ttime,TimeEnum); 3068 3069 /*pull thickness averages: */ 3056 3070 Input* thickness_input=inputs->GetInput(ThicknessEnum); 3057 3071 if (!thickness_input)_error_("thickness input needed to compute gia deflection!"); 3058 thickness_input->GetInputA verage(&he);3072 thickness_input->GetInputAllTimeAverages(&hes,×,&numtimes); 3059 3073 3074 /*pull area of this Tria: */ 3060 3075 area=this->GetArea(); 3061 3076 … … 3069 3084 3070 3085 for(i=0;i<gsize;i++){ 3086 /*compute distance from the center of the tria to the vertex i: */ 3071 3087 xi=x[i]; yi=y[i]; 3072 3088 ri=sqrt(pow(xi-x0,2)+pow(yi-y0,2)); 3073 } 3089 3090 /*for this Tria, compute contribution to rebound at vertex i: */ 3091 GiaDeflectionCorex(&wi,ri,re,hes,times,currenttime,numtimes); 3092 3093 /*plug value into solution vector: */ 3094 wg->SetValue(i,wi,ADD_VAL); 3095 } 3096 3097 /*Free ressources: */ 3098 xDelete<IssmDouble>(hes); 3099 xDelete<IssmDouble>(times); 3074 3100 3075 3101 return; -
issm/trunk-jpl/src/c/classes/objects/Elements/Tria.h
r14648 r14650 141 141 142 142 #ifdef _HAVE_GIA_ 143 void Deflection(Vector<IssmDouble>* wg,IssmDouble* x,IssmDouble* y);143 void GiaDeflection(Vector<IssmDouble>* wg,IssmDouble* x,IssmDouble* y); 144 144 #endif 145 145 -
issm/trunk-jpl/src/c/classes/objects/Inputs/TransientInput.cpp
r14648 r14650 250 250 void TransientInput::GetInputAllTimeAverages(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes){ 251 251 252 _error_("not implemented yet!"); 253 252 int i; 253 IssmDouble* times=NULL; 254 IssmDouble* values=NULL; 255 256 /*allocate: */ 257 times=xNew<IssmDouble>(this->numtimesteps); 258 values=xNew<IssmDouble>(this->numtimesteps); 259 260 for(i=0;i<numtimesteps;i++){ 261 Input* input=(Input*)this->inputs->GetObjectByOffset(i); 262 input->GetInputAverage(values+i); 263 times[i]=this->timesteps[i]; 264 } 265 266 *pvalues=values; 267 *ptimes=times; 268 *pnumtimes=numtimesteps; 254 269 } 255 270 /*}}}*/ -
issm/trunk-jpl/src/c/classes/objects/Inputs/TriaP1Input.cpp
r13787 r14650 181 181 } 182 182 /*}}}*/ 183 /*FUNCTION TriaP1Input::GetInputAllTimeAverages{{{*/ 184 void TriaP1Input::GetInputAllTimeAverages(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes){ 185 186 IssmDouble* outvalues=NULL; 187 IssmDouble* times=NULL; 188 IssmDouble numtimes; 189 190 /*this is not a transient forcing, so we only have 1 value, steady state: */ 191 numtimes=1; 192 outvalues=xNew<IssmDouble>(1); 193 times=xNew<IssmDouble>(1); 194 195 outvalues[0]=1./3.*(values[0]+values[1]+values[2]); 196 times[0]=0; /*we don't have a time*/ 197 198 *pvalues=outvalues; 199 *ptimes=times; 200 *pnumtimes=numtimes; 201 } 202 /*}}}*/ 203 183 204 184 205 /*Intermediary*/ -
issm/trunk-jpl/src/c/classes/objects/Inputs/TriaP1Input.h
r14648 r14650 55 55 void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");}; 56 56 void GetInputAverage(IssmDouble* pvalue); 57 void GetInputAllTimeAverages(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes) {_error_("not implemented yet");};57 void GetInputAllTimeAverages(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes); 58 58 void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussTria* gauss); 59 59 void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussTria* gauss); -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Gia/UpdateElementsGia.cpp
r14588 r14650 34 34 } 35 35 36 iomodel->FetchDataToInput(elements,SurfaceEnum); 37 iomodel->FetchDataToInput(elements,BedEnum); 36 iomodel->FetchDataToInput(elements,ThicknessEnum); 38 37 39 38 /*Free data: */ -
issm/trunk-jpl/src/c/modules/modules.h
r14648 r14650 30 30 #include "./GetVectorFromInputsx/GetVectorFromInputsx.h" 31 31 #include "./GetVectorFromControlInputsx/GetVectorFromControlInputsx.h" 32 #include "./GiaDeflectionCorex/GiaDeflectionCorex.h" 32 33 #include "./SetControlInputsFromVectorx/SetControlInputsFromVectorx.h" 33 34 #include "./Gradjx/Gradjx.h" -
issm/trunk-jpl/src/c/solutions/gia_core.cpp
r14648 r14650 41 41 /*call the main module: */ 42 42 femmodel->Deflection(wg,x,y); 43 43 44 /*assemble vector: */ 45 wg->Assemble(); 46 44 47 InputUpdateFromSolutionx( femmodel->elements,femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,wg); 45 48 -
issm/trunk-jpl/test/NightlyRun/test330.m
r14593 r14650 5 5 md=setflowequation(md,'macayeal','all'); 6 6 md.cluster=generic('name',oshostname(),'np',3); 7 %md.verbose=verbose('convergence',true,'solution',true,'module',true,'solver',true,'mprocessor',true); 7 8 md=solve(md,GiaSolutionEnum()); 8 9
Note:
See TracChangeset
for help on using the changeset viewer.