Changeset 24940 for issm/trunk-jpl/src/c/classes/FemModel.cpp
- Timestamp:
- 05/31/20 21:40:46 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/FemModel.cpp
r24938 r24940 4635 4635 void FemModel::EsaGeodetic3D(Vector<IssmDouble>* pUp, Vector<IssmDouble>* pNorth, Vector<IssmDouble>* pEast, IssmDouble* latitude, IssmDouble* longitude, IssmDouble* radius, IssmDouble* xx, IssmDouble* yy, IssmDouble* zz){/*{{{*/ 4636 4636 4637 IssmDouble eartharea=0;4638 IssmDouble eartharea_cpu=0;4639 4640 4637 int ns,nsmax; 4641 4638 … … 4646 4643 for(int i=0;i<ns;i++){ 4647 4644 Element* element=xDynamicCast<Element*>(elements->GetObjectByOffset(i)); 4648 eartharea_cpu += element->GetAreaSpherical(); 4649 } 4650 ISSM_MPI_Reduce (&eartharea_cpu,&eartharea,1,ISSM_MPI_DOUBLE,ISSM_MPI_SUM,0,IssmComm::GetComm() ); 4651 ISSM_MPI_Bcast(&eartharea,1,ISSM_MPI_DOUBLE,0,IssmComm::GetComm()); 4645 } 4652 4646 4653 4647 /*Figure out max of ns: */ … … 4659 4653 if(i<ns){ 4660 4654 Element* element=xDynamicCast<Element*>(elements->GetObjectByOffset(i)); 4661 element->EsaGeodetic3D(pUp,pNorth,pEast,latitude,longitude,radius,xx,yy,zz ,eartharea);4655 element->EsaGeodetic3D(pUp,pNorth,pEast,latitude,longitude,radius,xx,yy,zz); 4662 4656 } 4663 4657 if(i%100==0){ … … 4694 4688 } 4695 4689 /*}}}*/ 4696 void FemModel::SealevelriseEustatic(Vector<IssmDouble>* pRSLgi, IssmDouble* p eartharea, IssmDouble* poceanarea, IssmDouble* peustatic, SealevelMasks* masks, IssmDouble* latitude, IssmDouble* longitude, IssmDouble* radius,int loop) { /*{{{*/4690 void FemModel::SealevelriseEustatic(Vector<IssmDouble>* pRSLgi, IssmDouble* poceanarea, IssmDouble* peustatic, SealevelMasks* masks, IssmDouble* latitude, IssmDouble* longitude, IssmDouble* radius,int loop) { /*{{{*/ 4697 4691 4698 4692 /*serialized vectors:*/ … … 4702 4696 IssmDouble oceanarea = 0.; 4703 4697 IssmDouble oceanarea_cpu = 0.; 4704 IssmDouble eartharea = 0.;4705 IssmDouble eartharea_cpu = 0.;4706 4698 4707 4699 /*Initialize temporary vector that will be used to sum eustatic components … … 4716 4708 Element* element=xDynamicCast<Element*>(elements->GetObjectByOffset(i)); 4717 4709 IssmDouble area=element->GetAreaSpherical(); 4718 eartharea_cpu += area;4719 4710 if (masks->isoceanin[i]) oceanarea_cpu += area; 4720 4711 } … … 4723 4714 _assert_(oceanarea>0.); 4724 4715 4725 ISSM_MPI_Reduce (&eartharea_cpu,&eartharea,1,ISSM_MPI_DOUBLE,ISSM_MPI_SUM,0,IssmComm::GetComm() );4726 ISSM_MPI_Bcast(&eartharea,1,ISSM_MPI_DOUBLE,0,IssmComm::GetComm());4727 4728 4716 /*Call the sea level rise core: */ 4729 4717 for(int i=0;i<elements->Size();i++){ 4730 4718 Element* element=xDynamicCast<Element*>(elements->GetObjectByOffset(i)); 4731 element->SealevelriseEustatic(RSLgi,&eustatic_cpu_e,masks, latitude,longitude,radius,oceanarea ,eartharea);4719 element->SealevelriseEustatic(RSLgi,&eustatic_cpu_e,masks, latitude,longitude,radius,oceanarea); 4732 4720 eustatic_cpu+=eustatic_cpu_e; 4733 4721 } … … 4747 4735 4748 4736 /*Assign output pointers:*/ 4749 *peartharea = eartharea;4750 4737 *poceanarea = oceanarea; 4751 4738 *peustatic = eustatic; … … 4753 4740 } 4754 4741 /*}}}*/ 4755 void FemModel::SealevelriseNonEustatic(Vector<IssmDouble>* pRSLgo, Vector<IssmDouble>* pRSLg_old, IssmDouble eartharea,SealevelMasks* masks, IssmDouble* latitude, IssmDouble* longitude, IssmDouble* radius, bool verboseconvolution,int loop){/*{{{*/4742 void FemModel::SealevelriseNonEustatic(Vector<IssmDouble>* pRSLgo, Vector<IssmDouble>* pRSLg_old, SealevelMasks* masks, IssmDouble* latitude, IssmDouble* longitude, IssmDouble* radius, bool verboseconvolution,int loop){/*{{{*/ 4756 4743 4757 4744 /*serialized vectors:*/ … … 4774 4761 for(int i=0;i<elements->Size();i++){ 4775 4762 Element* element=xDynamicCast<Element*>(elements->GetObjectByOffset(i)); 4776 element->SealevelriseNonEustatic(RSLgo,RSLg_old,masks, latitude,longitude,radius ,eartharea);4763 element->SealevelriseNonEustatic(RSLgo,RSLg_old,masks, latitude,longitude,radius); 4777 4764 } 4778 4765 pRSLgo->SetValues(gsize,indices,RSLgo,ADD_VAL); … … 4786 4773 } 4787 4774 /*}}}*/ 4788 void FemModel::SealevelriseRotationalFeedback(Vector<IssmDouble>* pRSLgo_rot, Vector<IssmDouble>* pRSLg_old, IssmDouble* pIxz, IssmDouble* pIyz, IssmDouble* pIzz, IssmDouble eartharea,SealevelMasks* masks, IssmDouble* latitude, IssmDouble* longitude, IssmDouble* radius){/*{{{*/4775 void FemModel::SealevelriseRotationalFeedback(Vector<IssmDouble>* pRSLgo_rot, Vector<IssmDouble>* pRSLg_old, IssmDouble* pIxz, IssmDouble* pIyz, IssmDouble* pIzz, SealevelMasks* masks, IssmDouble* latitude, IssmDouble* longitude, IssmDouble* radius){/*{{{*/ 4789 4776 4790 4777 /*serialized vectors:*/ … … 4802 4789 for(int i=0;i<elements->Size();i++){ 4803 4790 Element* element=xDynamicCast<Element*>(elements->GetObjectByOffset(i)); 4804 element->SealevelriseMomentOfInertia(&moi_list[0],RSLg_old,masks , eartharea);4791 element->SealevelriseMomentOfInertia(&moi_list[0],RSLg_old,masks ); 4805 4792 moi_list_cpu[0] += moi_list[0]; 4806 4793 moi_list_cpu[1] += moi_list[1]; … … 4862 4849 } 4863 4850 /*}}}*/ 4864 void FemModel::SealevelriseElastic(Vector<IssmDouble>* pUp, Vector<IssmDouble>* pNorth, Vector<IssmDouble>* pEast, Vector<IssmDouble>* pRSLg, IssmDouble eartharea,SealevelMasks* masks, IssmDouble* latitude, IssmDouble* longitude, IssmDouble* radius, IssmDouble* xx, IssmDouble* yy, IssmDouble* zz,int loop,int horiz){/*{{{*/4851 void FemModel::SealevelriseElastic(Vector<IssmDouble>* pUp, Vector<IssmDouble>* pNorth, Vector<IssmDouble>* pEast, Vector<IssmDouble>* pRSLg, SealevelMasks* masks, IssmDouble* latitude, IssmDouble* longitude, IssmDouble* radius, IssmDouble* xx, IssmDouble* yy, IssmDouble* zz,int loop,int horiz){/*{{{*/ 4865 4852 4866 4853 /*serialized vectors:*/ … … 4888 4875 for(int i=0;i<elements->Size();i++){ 4889 4876 Element* element=xDynamicCast<Element*>(elements->GetObjectByOffset(i)); 4890 element->SealevelriseGeodetic(Up,North,East,RSLg,masks, latitude,longitude,radius,xx,yy,zz, eartharea,horiz);4877 element->SealevelriseGeodetic(Up,North,East,RSLg,masks, latitude,longitude,radius,xx,yy,zz,horiz); 4891 4878 } 4892 4879
Note:
See TracChangeset
for help on using the changeset viewer.