Changeset 10703


Ignore:
Timestamp:
11/17/11 13:53:36 (13 years ago)
Author:
Eric.Larour
Message:

Added ElementResponsex module, to handle responses where we are averaging
inputs over a certain element.

Location:
issm/trunk/src
Files:
4 added
1 deleted
9 edited

Legend:

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

    r10660 r10703  
    529529                                             ./modules/IceVolumex/IceVolumex.h\
    530530                                             ./modules/IceVolumex/IceVolumex.cpp\
    531                                              ./modules/RheologyBbarx/RheologyBbarx.cpp\
    532                                              ./modules/RheologyBbarx/RheologyBbarx.h\
     531                                             ./modules/ElementResponsex/ElementResponsex.h\
     532                                             ./modules/ElementResponsex/ElementResponsex.cpp\
    533533                                             ./modules/MassFluxx/MassFluxx.cpp\
    534534                                             ./modules/MassFluxx/MassFluxx.h
  • issm/trunk/src/c/modules/Responsex/Responsex.cpp

    r9880 r10703  
    4343                case RheologyBbarAbsGradientEnum:RheologyBbarAbsGradientx( responses, elements,nodes, vertices, loads, materials, parameters,process_units,weight_index); break;
    4444                case DragCoefficientAbsGradientEnum:DragCoefficientAbsGradientx(responses, elements,nodes, vertices, loads, materials, parameters,process_units,weight_index); break;
    45                 case MaterialsRheologyBbarEnum:RheologyBbarx(responses, elements,nodes, vertices, loads, materials, parameters,process_units); break;
     45                case MaterialsRheologyBbarEnum:ElementResponsex(responses, elements,nodes, vertices, loads, materials, parameters,MaterialsRheologyBbarEnum,process_units); break;
     46                case VelEnum:ElementResponsex(responses, elements,nodes, vertices, loads, materials, parameters,VelEnum,process_units); break;
    4647                case FrictionCoefficientEnum:NodalValuex(responses, FrictionCoefficientEnum,elements,nodes, vertices, loads, materials, parameters,process_units); break;
    4748                default: _error_(" response descriptor \"%s\" not supported yet!",response_descriptor); break;
  • issm/trunk/src/c/modules/modules.h

    r10576 r10703  
    6666#include "./MaxAbsVzx/MaxAbsVzx.h"
    6767#include "./MaxVelx/MaxVelx.h"
     68#include "./ElementResponsex/ElementResponsex.h"
    6869#include "./MaxVxx/MaxVxx.h"
    6970#include "./MaxVyx/MaxVyx.h"
     
    99100#include "./ResetCoordinateSystemx/ResetCoordinateSystemx.h"
    100101#include "./Responsex/Responsex.h"
    101 #include "./RheologyBbarx/RheologyBbarx.h"
    102102#include "./RheologyBbarAbsGradientx/RheologyBbarAbsGradientx.h"
    103103#include "./Scotchx/Scotchx.h"
  • issm/trunk/src/c/objects/Elements/Element.h

    r10440 r10703  
    8383                virtual void   MaxAbsVz(double* pmaxabsvz, bool process_units)=0;
    8484                virtual double MassFlux(double* segment,bool process_units)=0;
    85                 virtual double RheologyBbarx(void)=0;
     85                virtual void   ElementResponse(double* presponse,int response_enum,bool process_units)=0;
    8686                virtual double IceVolume(void)=0;
    8787                virtual int    NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units)=0;
  • issm/trunk/src/c/objects/Elements/Penta.cpp

    r10648 r10703  
    28622862}
    28632863/*}}}*/
    2864 /*FUNCTION Penta::RheologyBbarx{{{1*/
    2865 double Penta::RheologyBbarx(void){
    2866 
    2867         double Bbar;
    2868         Penta* base=NULL;
    2869        
    2870         /*We here compute the vertically averaged Bbar. To do so, we go to the
    2871          * base element under this one, and call this->InputDepthAverageAtBase:*/
    2872                
    2873         base=this;
    2874 
    2875         if(!base->IsOnBed()){
    2876 
    2877                 for(;;){
    2878                         base=base->verticalneighbors[0];
    2879                         if(base->IsOnBed())break;
    2880                 }
    2881         }
    2882 
    2883         /*We have found the base under this. Call InputDepthAverageAtBase on it: */
    2884         base->InputDepthAverageAtBase(MaterialsRheologyBEnum,MaterialsRheologyBbarEnum,MaterialsEnum);
    2885 
    2886         /*Ok, base->matice now has the Bbar. Ask Bbar from this enum: */
    2887         Bbar=base->matice->GetBbar();
    2888 
    2889         return Bbar;
    2890 }
    2891 /*}}}*/
    28922864/*FUNCTION Penta::NodalValue {{{1*/
    28932865int    Penta::NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units){
     
    30683040        /*Assign output pointers:*/
    30693041        *pmaxvz=maxvz;
     3042}
     3043/*}}}*/
     3044/*FUNCTION Penta::ElementResponse{{{1*/
     3045void Penta::ElementResponse(double* presponse,int response_enum,bool process_units){
     3046
     3047        switch(response_enum){
     3048                case MaterialsRheologyBbarEnum:
     3049                        *presponse=this->matice->GetBbar();
     3050                        break;
     3051                case VelEnum:
     3052
     3053                        /*Get input:*/
     3054                        double vel;
     3055                        Input* vel_input;
     3056
     3057                        vel_input=this->inputs->GetInput(VelEnum); _assert_(vel_input);
     3058                        vel_input->GetInputAverage(&vel);
     3059
     3060                        /*process units if requested: */
     3061                        if(process_units) vel=UnitConversion(vel,IuToExtEnum,VelEnum);
     3062
     3063                        /*Assign output pointers:*/
     3064                        *presponse=vel;
     3065                default: 
     3066                        _error_("Response type %s not supported yet!",EnumToStringx(response_enum));
     3067        }
     3068
    30703069}
    30713070/*}}}*/
  • issm/trunk/src/c/objects/Elements/Penta.h

    r10628 r10703  
    125125                void   MinVy(double* pminvy, bool process_units);
    126126                void   MinVz(double* pminvz, bool process_units);
    127                 double RheologyBbarx(void);
    128127                int    NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units);
    129128                double MassFlux(double* segment,bool process_units);
     
    132131                void   MaxAbsVz(double* pmaxabsvz, bool process_units);
    133132                void   MaxVel(double* pmaxvel, bool process_units);
     133                void   ElementResponse(double* presponse,int response_enum,bool process_units);
    134134                void   MaxVx(double* pmaxvx, bool process_units);
    135135                void   MaxVy(double* pmaxvy, bool process_units);
  • issm/trunk/src/c/objects/Elements/Tria.cpp

    r10648 r10703  
    26342634}
    26352635/*}}}*/
    2636 /*FUNCTION Tria::RheologyBbarx{{{1*/
    2637 double Tria::RheologyBbarx(void){
    2638 
    2639         return this->matice->GetBbar();
     2636/*FUNCTION Tria::ElementResponse{{{1*/
     2637void Tria::ElementResponse(double* presponse,int response_enum,bool process_units){
     2638
     2639        switch(response_enum){
     2640                case MaterialsRheologyBbarEnum:
     2641                        *presponse=this->matice->GetBbar();
     2642                        break;
     2643                case VelEnum:
     2644
     2645                        /*Get input:*/
     2646                        double vel;
     2647                        Input* vel_input;
     2648
     2649                        vel_input=this->inputs->GetInput(VelEnum); _assert_(vel_input);
     2650                        vel_input->GetInputAverage(&vel);
     2651
     2652                        /*process units if requested: */
     2653                        if(process_units) vel=UnitConversion(vel,IuToExtEnum,VelEnum);
     2654
     2655                        /*Assign output pointers:*/
     2656                        *presponse=vel;
     2657                default: 
     2658                        _error_("Response type %s not supported yet!",EnumToStringx(response_enum));
     2659        }
    26402660
    26412661}
  • issm/trunk/src/c/objects/Elements/Tria.h

    r10574 r10703  
    123123                void   MinVy(double* pminvy, bool process_units);
    124124                void   MinVz(double* pminvz, bool process_units);
    125                 double RheologyBbarx(void);
    126125                int    NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units);
    127126                double MassFlux(double* segment,bool process_units);
     
    129128                void   MaxAbsVy(double* pmaxabsvy, bool process_units);
    130129                void   MaxAbsVz(double* pmaxabsvz, bool process_units);
     130                void   ElementResponse(double* presponse,int response_enum,bool process_units);
    131131                void   MaxVel(double* pmaxvel, bool process_units);
    132132                void   MaxVx(double* pmaxvx, bool process_units);
  • issm/trunk/src/m/classes/qmu.m

    r9853 r10703  
    126126                        end
    127127                        for i=1:numel(obj.params)
    128                                 disp(sprintf('         qmu_params%s:  (array of method-independent parameters)',...
     128                                disp(sprintf('         params%s:  (array of method-independent parameters)',...
    129129                                        string_dim(obj.params,i)));
    130130                                fnames=fieldnames(obj.params(i));
Note: See TracChangeset for help on using the changeset viewer.