Ignore:
Timestamp:
03/15/21 21:27:31 (4 years ago)
Author:
Eric.Larour
Message:

CHG: new ElementCoordinatesx module, use for an optimized
version of the sea level core. Many bug fixes to get test2002
to run.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/FemModel.cpp

    r26091 r26099  
    844844                case TransientSolutionEnum:{
    845845                        /*We have multiple analyses here, process one by one*/
    846                         bool isSIA,isFS,isthermal,isenthalpy,ismasstransport,isgroundingline,isstressbalance,ismovingfront,ishydrology,isdamage,issmb,isslc,isesa,issampling;
     846                        bool isSIA,isFS,isthermal,isenthalpy,ismasstransport,isoceantransport,isgroundingline,isstressbalance,ismovingfront,ishydrology,isdamage,issmb,isslc,isesa,issampling;
    847847                        iomodel->FindConstant(&isthermal,"md.transient.isthermal");
    848848                        iomodel->FindConstant(&ismovingfront,"md.transient.ismovingfront");
    849849                        iomodel->FindConstant(&ismasstransport,"md.transient.ismasstransport");
     850                        iomodel->FindConstant(&isoceantransport,"md.transient.isoceantransport");
    850851                        iomodel->FindConstant(&isstressbalance,"md.transient.isstressbalance");
    851852                        iomodel->FindConstant(&isgroundingline,"md.transient.isgroundingline");
     
    892893                        if(isdamage){
    893894                                analyses_temp[numanalyses++]=DamageEvolutionAnalysisEnum;
     895                        }
     896                        if(isoceantransport){
     897                                analyses_temp[numanalyses++]=OceantransportAnalysisEnum;
    894898                        }
    895899                        if(isslc){
     
    47444748/*}}}*/
    47454749#endif
    4746 #ifdef _HAVE_SEALEVELRISE_
     4750#ifdef _HAVE_SEALEVELCHANGE_
    47474751void FemModel::SealevelchangeBarystatic(Vector<IssmDouble>* pRSLgi, IssmDouble* poceanarea, IssmDouble* pbslc,IssmDouble* pbslcice, IssmDouble* pbslchydro, IssmDouble** pbslcice_partition,IssmDouble** pbslchydro_partition,SealevelMasks* masks) { /*{{{*/
    47484752
     
    47564760        IssmDouble  oceanarea_cpu  = 0.;
    47574761        int bp_compute_fingerprints= 0;
     4762        bool isoceantransport=false;
    47584763
    47594764        Vector<IssmDouble>* bslcice_partition=NULL;
     
    47654770        IssmDouble* bslchydro_partition_serial=NULL;
    47664771        IssmDouble* partitionhydro=NULL;
     4772        bool istws=0;
    47674773        int nparthydro;
    4768         bool istws;
    4769 
     4774               
     4775        int npartocean;
     4776        Vector<IssmDouble>* bslcocean_partition=NULL;
     4777        IssmDouble* bslcocean_partition_serial=NULL;
     4778        IssmDouble* partitionocean=NULL;
    47704779
    47714780   /*Initialize temporary vector that will be used to sum barystatic components
     
    48004809                bslchydro_partition= new Vector<IssmDouble>(nparthydro);
    48014810        }
     4811
     4812        this->parameters->FindParam(&npartocean,SolidearthNpartOceanEnum);
     4813        if(npartocean){
     4814                this->parameters->FindParam(&partitionocean,&nel,NULL,SolidearthPartitionOceanEnum);
     4815                bslchydro_partition= new Vector<IssmDouble>(npartocean);
     4816        }
     4817        /*For later:
     4818        npartbarystatic=npartice;
     4819        if(nparthydro>npartbarystatic)npartbarystatic=nparthydro;
     4820        if(npartocean>npartbarystatic)npartbarystatic=npartocean;
     4821        bslc_partition=new Matrix(IssmDouble>(npartbarystatic,3);
     4822
     4823        bslc_cpu[0]=0; bslc_cpu[1]=0; bslc_cpu[2]=0;
     4824        for(Object* & object : this->elements->objects){
     4825                Element* element = xDynamicCast<Element*>(object);
     4826                element->SealevelchangeBarystaticLoads(&bslc_cpu[0], localloads,masks, bslcice_partition,partitionice,oceanarea);
     4827        }
     4828        MPI Bcast localloads -> loads
     4829
     4830        for(Object* & object : this->elements->objects){
     4831                Element* element = xDynamicCast<Element*>(object);
     4832                element->SealevelchangeConvolution(loads);
     4833        }
     4834        */
     4835
     4836
     4837
    48024838
    48034839
     
    48214857        /*Call the barystatic sea level change core for bottom pressures: */
    48224858        this->parameters->FindParam(&bp_compute_fingerprints,SolidearthSettingsComputeBpGrdEnum);
    4823         if(bp_compute_fingerprints){
     4859        this->parameters->FindParam(&isoceantransport,TransientIsoceantransportEnum);
     4860        if(bp_compute_fingerprints && isoceantransport){
    48244861                for(int i=0;i<elements->Size();i++){
    48254862                        Element* element=xDynamicCast<Element*>(elements->GetObjectByOffset(i));
     
    51085145                element->GiaDeflection(wg,dwgdt, matlitho, x,y);
    51095146        }
     5147
     5148        /*Assemble parallel vector:*/
     5149        dwgdt->Assemble();
     5150        wg->Assemble();
    51105151}
    51115152/*}}}*/
Note: See TracChangeset for help on using the changeset viewer.