Changeset 26234


Ignore:
Timestamp:
05/04/21 10:02:06 (4 years ago)
Author:
caronlam
Message:

adding new formalism for lovenumbers

Location:
issm/trunk-jpl/src/c
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/analyses/LoveAnalysis.cpp

    r26047 r26234  
    1919}/*}}}*/
    2020void LoveAnalysis::UpdateParameters(Parameters* parameters,IoModel* iomodel,int solution_enum,int analysis_enum){/*{{{*/
    21 
    2221        IssmDouble* frequencies = NULL;
    2322        int         nfreq;
     
    3332        parameters->AddObject(iomodel->CopyConstantObject("md.love.r0",LoveR0Enum));
    3433        parameters->AddObject(iomodel->CopyConstantObject("md.love.mu0",LoveMu0Enum));
     34        parameters->AddObject(iomodel->CopyConstantObject("md.love.Gravitational_Constant",LoveGravitationalConstantEnum));
    3535        parameters->AddObject(iomodel->CopyConstantObject("md.love.allow_layer_deletion",LoveAllowLayerDeletionEnum));
     36        parameters->AddObject(iomodel->CopyConstantObject("md.love.underflow_tol",LoveUnderflowTolEnum));
     37        parameters->AddObject(iomodel->CopyConstantObject("md.love.integration_steps_per_layer",LoveIntStepsPerLayerEnum));
     38        parameters->AddObject(iomodel->CopyConstantObject("md.love.istemporal",LoveIsTemporalEnum));
     39        parameters->AddObject(iomodel->CopyConstantObject("md.love.n_temporal_iterations",LoveNTemporalIterationsEnum));
    3640        parameters->AddObject(iomodel->CopyConstantObject("md.love.love_kernels",LoveKernelsEnum));
    3741        parameters->AddObject(iomodel->CopyConstantObject("md.love.forcing_type",LoveForcingTypeEnum));
     42        parameters->AddObject(iomodel->CopyConstantObject("md.love.inner_core_boundary",LoveInnerCoreBoundaryEnum));
     43        parameters->AddObject(iomodel->CopyConstantObject("md.love.core_mantle_boundary",LoveCoreMantleBoundaryEnum));
    3844}/*}}}*/
    3945void LoveAnalysis::UpdateConstraints(FemModel* femmodel){/*{{{*/
  • issm/trunk-jpl/src/c/classes/Materials/Matlitho.cpp

    r25508 r26234  
    2121        this->burgers_viscosity=NULL;
    2222        this->burgers_mu=NULL;
     23        this->ebm_alpha=NULL;
     24        this->ebm_delta=NULL;   
     25        this->ebm_taul=NULL;
     26        this->ebm_tauh=NULL;
    2327        this->density=NULL;
    24         this->isburgers=NULL;
     28        this->rheologymodel=NULL;
    2529        this->issolid=NULL;
    2630        return;
     
    2933Matlitho::Matlitho(int matlitho_mid, IoModel* iomodel){/*{{{*/
    3034
    31         IssmDouble* isburgersd=NULL;
     35        IssmDouble* rheologymodeld=NULL;
    3236        IssmDouble* issolidd=NULL;
    3337
     
    5357        xMemCpy<IssmDouble>(this->burgers_mu, iomodel->Data("md.materials.burgers_mu"),this->numlayers);
    5458
     59        this->ebm_alpha=xNew<IssmDouble>(this->numlayers);
     60        xMemCpy<IssmDouble>(this->ebm_alpha, iomodel->Data("md.materials.ebm_alpha"),this->numlayers);
     61
     62        this->ebm_delta=xNew<IssmDouble>(this->numlayers);
     63        xMemCpy<IssmDouble>(this->ebm_delta, iomodel->Data("md.materials.ebm_delta"),this->numlayers);
     64
     65        this->ebm_taul=xNew<IssmDouble>(this->numlayers);
     66        xMemCpy<IssmDouble>(this->ebm_taul, iomodel->Data("md.materials.ebm_taul"),this->numlayers);
     67
     68        this->ebm_tauh=xNew<IssmDouble>(this->numlayers);
     69        xMemCpy<IssmDouble>(this->ebm_tauh, iomodel->Data("md.materials.ebm_tauh"),this->numlayers);
     70
    5571        this->density=xNew<IssmDouble>(this->numlayers);
    5672        xMemCpy<IssmDouble>(this->density, iomodel->Data("md.materials.density"),this->numlayers);
    5773
    58         this->isburgers=xNew<IssmDouble>(this->numlayers);
    59         xMemCpy<IssmDouble>(this->isburgers, iomodel->Data("md.materials.isburgers"),this->numlayers);
     74        this->rheologymodel=xNew<IssmDouble>(this->numlayers);
     75        xMemCpy<IssmDouble>(this->rheologymodel, iomodel->Data("md.materials.rheologymodel"),this->numlayers);
    6076
    6177        this->issolid=xNew<IssmDouble>(this->numlayers);
    6278        xMemCpy<IssmDouble>(this->issolid, iomodel->Data("md.materials.issolid"),this->numlayers);
    6379
    64         /*isburgersd= xNew<IssmDouble>(this->numlayers);
    65         this->isburgers=xNew<bool>(this->numlayers);
    66         xMemCpy<IssmDouble>(isburgersd, iomodel->Data("md.materials.isburgers"),this->numlayers);
    67         for (int i=0;i<this->numlayers;i++)this->isburgers[i]=reCast<bool,IssmDouble>(isburgersd[i]);
     80        /*rheologymodeld= xNew<IssmDouble>(this->numlayers);
     81        this->rheologymodel=xNew<bool>(this->numlayers);
     82        xMemCpy<IssmDouble>(rheologymodeld, iomodel->Data("md.materials.rheologymodel"),this->numlayers);
     83        for (int i=0;i<this->numlayers;i++)this->rheologymodel[i]=reCast<bool,IssmDouble>(rheologymodeld[i]);
    6884
    6985        issolidd= xNew<IssmDouble>(this->numlayers);
     
    7389
    7490        /*free ressources: */
    75         xDelete<IssmDouble>(isburgersd);
     91        xDelete<IssmDouble>(rheologymodeld);
    7692        xDelete<IssmDouble>(issolidd);
    7793}
     
    85101        xDelete<IssmDouble>(burgers_viscosity);
    86102        xDelete<IssmDouble>(burgers_mu);
     103        xDelete<IssmDouble>(ebm_alpha);
     104        xDelete<IssmDouble>(ebm_delta);
     105        xDelete<IssmDouble>(ebm_taul);
     106        xDelete<IssmDouble>(ebm_tauh);
    87107        xDelete<IssmDouble>(density);
    88         xDelete<IssmDouble>(isburgers);
     108        xDelete<IssmDouble>(rheologymodel);
    89109        xDelete<IssmDouble>(issolid);
    90110
     
    116136                matlitho->burgers_viscosity=xNew<IssmDouble>(this->numlayers); xMemCpy<IssmDouble>(matlitho->burgers_viscosity, this->burgers_viscosity,this->numlayers);
    117137                matlitho->burgers_mu=xNew<IssmDouble>(this->numlayers); xMemCpy<IssmDouble>(matlitho->burgers_mu, this->burgers_mu,this->numlayers);
     138                matlitho->ebm_alpha=xNew<IssmDouble>(this->numlayers); xMemCpy<IssmDouble>(matlitho->ebm_alpha, this->ebm_alpha,this->numlayers);
     139                matlitho->ebm_delta=xNew<IssmDouble>(this->numlayers); xMemCpy<IssmDouble>(matlitho->ebm_delta, this->ebm_delta,this->numlayers);
     140                matlitho->ebm_taul=xNew<IssmDouble>(this->numlayers); xMemCpy<IssmDouble>(matlitho->ebm_taul, this->ebm_taul,this->numlayers);
     141                matlitho->ebm_tauh=xNew<IssmDouble>(this->numlayers); xMemCpy<IssmDouble>(matlitho->ebm_tauh, this->ebm_tauh,this->numlayers);
    118142                matlitho->density=xNew<IssmDouble>(this->numlayers); xMemCpy<IssmDouble>(matlitho->density, this->density,this->numlayers);
    119                 matlitho->isburgers=xNew<IssmDouble>(this->numlayers); xMemCpy<IssmDouble>(matlitho->isburgers, this->isburgers,this->numlayers);
     143                matlitho->rheologymodel=xNew<IssmDouble>(this->numlayers); xMemCpy<IssmDouble>(matlitho->rheologymodel, this->rheologymodel,this->numlayers);
    120144                matlitho->issolid=xNew<IssmDouble>(this->numlayers); xMemCpy<IssmDouble>(matlitho->issolid, this->issolid,this->numlayers);
    121                 /*matlitho->isburgers=xNew<bool>(this->numlayers); for(int i=0;i<this->numlayers;i++)matlitho->isburgers[i]=this->isburgers[i];
     145                /*matlitho->rheologymodel=xNew<bool>(this->numlayers); for(int i=0;i<this->numlayers;i++)matlitho->rheologymodel[i]=this->rheologymodel[i];
    122146                matlitho->issolid=xNew<bool>(this->numlayers); for(int i=0;i<this->numlayers;i++)matlitho->issolid[i]=this->issolid[i];*/
    123147        }
     
    136160        _printf_("   mid: " << mid << "\n");
    137161        _printf_("   numlayers: " << numlayers << "\n");
    138         _printf_("layer radius viscosity lame_lambda lame_mu burgers_viscosity burgers_mu density isburgers issolid\n");
     162        _printf_("layer radius viscosity lame_lambda lame_mu burgers_viscosity burgers_mu ebm_alpha ebm_delta ebm_taul ebm_tauh density rheologymodel issolid\n");
    139163        for (int i=0;i<numlayers;i++){
    140                 _printf_(i << " " << radius[i] << " " << viscosity[i] << " " << lame_lambda[i] << " " << lame_mu[i] << " " << burgers_viscosity[i] << " " << burgers_mu[i] << " " << density[i] << " " << isburgers[i] << " " << issolid[i]);
     164                _printf_(i << " " << radius[i] << " " << viscosity[i] << " " << lame_lambda[i] << " " << lame_mu[i] << " " << burgers_viscosity[i] << " " << burgers_mu[i] << " " << ebm_alpha[i] << " " << ebm_delta[i] << " " << ebm_taul[i] << " " << ebm_tauh[i] << " " << density[i] << " " << rheologymodel[i] << " " << issolid[i]);
    141165        }
    142166        return;
     
    158182                marshallhandle->call(this->burgers_viscosity,numlayers);
    159183                marshallhandle->call(this->burgers_mu,numlayers);
     184                marshallhandle->call(this->ebm_alpha,numlayers);
     185                marshallhandle->call(this->ebm_delta,numlayers);
     186                marshallhandle->call(this->ebm_taul,numlayers);
     187                marshallhandle->call(this->ebm_tauh,numlayers);
    160188                marshallhandle->call(this->density,numlayers);
    161                 marshallhandle->call(this->isburgers,numlayers);
     189                marshallhandle->call(this->rheologymodel,numlayers);
    162190                marshallhandle->call(this->issolid,numlayers);
    163191        }
     
    169197                burgers_viscosity = NULL;
    170198                burgers_mu        = NULL;
     199                ebm_alpha         = NULL;
     200                ebm_delta         = NULL;
     201                ebm_taul          = NULL;
     202                ebm_tauh          = NULL;
    171203                density           = NULL;
    172                 isburgers         = NULL;
     204                rheologymodel     = NULL;
    173205                issolid           = NULL;
    174206        }
  • issm/trunk-jpl/src/c/classes/Materials/Matlitho.h

    r25508 r26234  
    2323                IssmDouble*  burgers_viscosity;
    2424                IssmDouble*  burgers_mu;
     25                IssmDouble*  ebm_alpha;
     26                IssmDouble*  ebm_delta;
     27                IssmDouble*  ebm_taul;
     28                IssmDouble*  ebm_tauh;
    2529                IssmDouble*  density;
    26                 IssmDouble*  isburgers;
     30                IssmDouble*  rheologymodel;
    2731                IssmDouble*  issolid;
    2832
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateElementsVerticesAndMaterials.cpp

    r26097 r26234  
    198198                                        case MatlithoEnum:
    199199                                                { /*{{{*/
    200                                                         iomodel->FetchData(9,"md.materials.radius","md.materials.viscosity","md.materials.lame_lambda","md.materials.lame_mu","md.materials.burgers_viscosity","md.materials.burgers_mu","md.materials.isburgers","md.materials.issolid","md.materials.density");
     200                                                        iomodel->FetchData(13,"md.materials.radius","md.materials.viscosity","md.materials.lame_lambda","md.materials.lame_mu","md.materials.burgers_viscosity","md.materials.burgers_mu","md.materials.ebm_alpha","md.materials.ebm_delta","md.materials.ebm_taul","md.materials.ebm_tauh","md.materials.rheologymodel","md.materials.issolid","md.materials.density");
    201201                                                        materials->AddObject(new Matlitho(iomodel->numberofelements+1,iomodel));
    202                                                         iomodel->DeleteData(9,"md.materials.radius","md.materials.viscosity","md.materials.lame_lambda","md.materials.lame_mu","md.materials.burgers_viscosity","md.materials.burgers_mu","md.materials.isburgers","md.materials.issolid","md.materials.density");
     202                                                        iomodel->DeleteData(13,"md.materials.radius","md.materials.viscosity","md.materials.lame_lambda","md.materials.lame_mu","md.materials.burgers_viscosity","md.materials.burgers_mu","md.materials.ebm_alpha","md.materials.ebm_delta","md.materials.ebm_taul","md.materials.ebm_tauh","md.materials.rheologymodel","md.materials.issolid","md.materials.density");
    203203                                                }
    204204                                                /*}}}*/
Note: See TracChangeset for help on using the changeset viewer.