Changeset 26099 for issm/trunk-jpl/src/c/classes/FemModel.cpp
- Timestamp:
- 03/15/21 21:27:31 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/FemModel.cpp
r26091 r26099 844 844 case TransientSolutionEnum:{ 845 845 /*We have multiple analyses here, process one by one*/ 846 bool isSIA,isFS,isthermal,isenthalpy,ismasstransport,is groundingline,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; 847 847 iomodel->FindConstant(&isthermal,"md.transient.isthermal"); 848 848 iomodel->FindConstant(&ismovingfront,"md.transient.ismovingfront"); 849 849 iomodel->FindConstant(&ismasstransport,"md.transient.ismasstransport"); 850 iomodel->FindConstant(&isoceantransport,"md.transient.isoceantransport"); 850 851 iomodel->FindConstant(&isstressbalance,"md.transient.isstressbalance"); 851 852 iomodel->FindConstant(&isgroundingline,"md.transient.isgroundingline"); … … 892 893 if(isdamage){ 893 894 analyses_temp[numanalyses++]=DamageEvolutionAnalysisEnum; 895 } 896 if(isoceantransport){ 897 analyses_temp[numanalyses++]=OceantransportAnalysisEnum; 894 898 } 895 899 if(isslc){ … … 4744 4748 /*}}}*/ 4745 4749 #endif 4746 #ifdef _HAVE_SEALEVEL RISE_4750 #ifdef _HAVE_SEALEVELCHANGE_ 4747 4751 void FemModel::SealevelchangeBarystatic(Vector<IssmDouble>* pRSLgi, IssmDouble* poceanarea, IssmDouble* pbslc,IssmDouble* pbslcice, IssmDouble* pbslchydro, IssmDouble** pbslcice_partition,IssmDouble** pbslchydro_partition,SealevelMasks* masks) { /*{{{*/ 4748 4752 … … 4756 4760 IssmDouble oceanarea_cpu = 0.; 4757 4761 int bp_compute_fingerprints= 0; 4762 bool isoceantransport=false; 4758 4763 4759 4764 Vector<IssmDouble>* bslcice_partition=NULL; … … 4765 4770 IssmDouble* bslchydro_partition_serial=NULL; 4766 4771 IssmDouble* partitionhydro=NULL; 4772 bool istws=0; 4767 4773 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; 4770 4779 4771 4780 /*Initialize temporary vector that will be used to sum barystatic components … … 4800 4809 bslchydro_partition= new Vector<IssmDouble>(nparthydro); 4801 4810 } 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 4802 4838 4803 4839 … … 4821 4857 /*Call the barystatic sea level change core for bottom pressures: */ 4822 4858 this->parameters->FindParam(&bp_compute_fingerprints,SolidearthSettingsComputeBpGrdEnum); 4823 if(bp_compute_fingerprints){ 4859 this->parameters->FindParam(&isoceantransport,TransientIsoceantransportEnum); 4860 if(bp_compute_fingerprints && isoceantransport){ 4824 4861 for(int i=0;i<elements->Size();i++){ 4825 4862 Element* element=xDynamicCast<Element*>(elements->GetObjectByOffset(i)); … … 5108 5145 element->GiaDeflection(wg,dwgdt, matlitho, x,y); 5109 5146 } 5147 5148 /*Assemble parallel vector:*/ 5149 dwgdt->Assemble(); 5150 wg->Assemble(); 5110 5151 } 5111 5152 /*}}}*/
Note:
See TracChangeset
for help on using the changeset viewer.