Changeset 14650


Ignore:
Timestamp:
04/18/13 13:42:43 (12 years ago)
Author:
Eric.Larour
Message:

Finished implementation of the solution core and Tria routines.
We now have a module GiaDeflectionCorex which will implement the physics
of PGR for a single disk, loaded using a history of thicknesses, for a
certain radial distance ri.

Location:
issm/trunk-jpl
Files:
4 added
15 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/Makefile.am

    r14648 r14650  
    500500                           ./modules/ModelProcessorx/Gia/CreateNodesGia.cpp \
    501501                           ./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
    503505
    504506#}}}
  • issm/trunk-jpl/src/c/classes/FemModel.cpp

    r14648 r14650  
    15521552        for (i=0;i<elements->Size();i++){
    15531553                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  
    101101
    102102                #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;
    104104                #endif
    105105
  • issm/trunk-jpl/src/c/classes/objects/Elements/Penta.cpp

    r14648 r14650  
    34863486
    34873487#ifdef _HAVE_GIA_
    3488 /*FUNCTION Penta::Deflection {{{*/
    3489 void Penta::Deflection(Vector<IssmDouble>* wg,IssmDouble* x, IssmDouble* y){
     3488/*FUNCTION Penta::GiaDeflection {{{*/
     3489void Penta::GiaDeflection(Vector<IssmDouble>* wg,IssmDouble* x, IssmDouble* y){
    34903490        _error_("GIA deflection not implemented yet!");
    34913491}
  • issm/trunk-jpl/src/c/classes/objects/Elements/Penta.h

    r14648 r14650  
    143143
    144144                #ifdef _HAVE_GIA_
    145                 void   Deflection(Vector<IssmDouble>* wg,IssmDouble* x,IssmDouble* y);
     145                void   GiaDeflection(Vector<IssmDouble>* wg,IssmDouble* x,IssmDouble* y);
    146146                #endif
    147147
  • issm/trunk-jpl/src/c/classes/objects/Elements/Tria.cpp

    r14648 r14650  
    1717#include "../../../Container/Container.h"
    1818#include "../../../include/include.h"
     19#ifdef _HAVE_GIA_
     20#include "../../../modules/GiaDeflectionCorex/GiaDeflectionCorex.h"
     21#endif
    1922/*}}}*/
    2023
     
    30403043
    30413044#ifdef _HAVE_GIA_
    3042 /*FUNCTION Tria::Deflection {{{*/
    3043 void Tria::Deflection(Vector<IssmDouble>* wg,IssmDouble* x, IssmDouble* y){
     3045/*FUNCTION Tria::GiaDeflection {{{*/
     3046void Tria::GiaDeflection(Vector<IssmDouble>* wg,IssmDouble* x, IssmDouble* y){
    30443047
    30453048        int i;
     
    30483051        IssmDouble x0,y0;
    30493052        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;
    30513062
    30523063        /*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(&currenttime,TimeEnum);
     3068
     3069        /*pull thickness averages: */
    30563070        Input* thickness_input=inputs->GetInput(ThicknessEnum);
    30573071        if (!thickness_input)_error_("thickness input needed to compute gia deflection!");
    3058         thickness_input->GetInputAverage(&he);
     3072        thickness_input->GetInputAllTimeAverages(&hes,&times,&numtimes);
    30593073       
     3074        /*pull area of this Tria: */
    30603075        area=this->GetArea();
    30613076
     
    30693084
    30703085        for(i=0;i<gsize;i++){
     3086                /*compute distance from the center of the tria to the vertex i: */
    30713087                xi=x[i]; yi=y[i];
    30723088                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);
    30743100
    30753101        return;
  • issm/trunk-jpl/src/c/classes/objects/Elements/Tria.h

    r14648 r14650  
    141141
    142142                #ifdef _HAVE_GIA_
    143                 void   Deflection(Vector<IssmDouble>* wg,IssmDouble* x,IssmDouble* y);
     143                void   GiaDeflection(Vector<IssmDouble>* wg,IssmDouble* x,IssmDouble* y);
    144144                #endif
    145145
  • issm/trunk-jpl/src/c/classes/objects/Inputs/TransientInput.cpp

    r14648 r14650  
    250250void TransientInput::GetInputAllTimeAverages(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes){
    251251
    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;
    254269}
    255270/*}}}*/
  • issm/trunk-jpl/src/c/classes/objects/Inputs/TriaP1Input.cpp

    r13787 r14650  
    181181}
    182182/*}}}*/
     183/*FUNCTION TriaP1Input::GetInputAllTimeAverages{{{*/
     184void 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
    183204
    184205/*Intermediary*/
  • issm/trunk-jpl/src/c/classes/objects/Inputs/TriaP1Input.h

    r14648 r14650  
    5555                void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
    5656                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);
    5858                void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussTria* gauss);
    5959                void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussTria* gauss);
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/Gia/UpdateElementsGia.cpp

    r14588 r14650  
    3434        }
    3535
    36         iomodel->FetchDataToInput(elements,SurfaceEnum);
    37         iomodel->FetchDataToInput(elements,BedEnum);
     36        iomodel->FetchDataToInput(elements,ThicknessEnum);
    3837
    3938        /*Free data: */
  • issm/trunk-jpl/src/c/modules/modules.h

    r14648 r14650  
    3030#include "./GetVectorFromInputsx/GetVectorFromInputsx.h"
    3131#include "./GetVectorFromControlInputsx/GetVectorFromControlInputsx.h"
     32#include "./GiaDeflectionCorex/GiaDeflectionCorex.h"
    3233#include "./SetControlInputsFromVectorx/SetControlInputsFromVectorx.h"
    3334#include "./Gradjx/Gradjx.h"
  • issm/trunk-jpl/src/c/solutions/gia_core.cpp

    r14648 r14650  
    4141        /*call the main module: */
    4242        femmodel->Deflection(wg,x,y);
    43        
     43
     44        /*assemble vector: */
     45        wg->Assemble();
     46
    4447        InputUpdateFromSolutionx( femmodel->elements,femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,wg);
    4548
  • issm/trunk-jpl/test/NightlyRun/test330.m

    r14593 r14650  
    55md=setflowequation(md,'macayeal','all');
    66md.cluster=generic('name',oshostname(),'np',3);
     7%md.verbose=verbose('convergence',true,'solution',true,'module',true,'solver',true,'mprocessor',true);
    78md=solve(md,GiaSolutionEnum());
    89
Note: See TracChangeset for help on using the changeset viewer.