Changeset 24917


Ignore:
Timestamp:
05/29/20 07:46:58 (5 years ago)
Author:
Mathieu Morlighem
Message:

CHG: cosmetics

File:
1 edited

Legend:

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

    r24916 r24917  
    46934693        IssmDouble  oceanarea_cpu  = 0.;
    46944694        IssmDouble  eartharea      = 0.;
    4695         IssmDouble  eartharea_cpu  = 0.;
    4696         IssmDouble* RSLgi  = NULL;
    4697         int* indices = NULL;
    4698         int         gsize;
    4699 
    4700         /*Initialize temporary vector that will be used to sum eustatic components on all local elements, prior
    4701          * to assembly:*/
    4702         gsize = this->nodes->NumberOfDofs(GsetEnum);
    4703         RSLgi=xNewZeroInit<IssmDouble>(gsize);
    4704         indices=xNew<int>(gsize); for (int i=0;i<gsize;i++)indices[i]=i;
     4695        IssmDouble  eartharea_cpu = 0.;
     4696
     4697   /*Initialize temporary vector that will be used to sum eustatic components
     4698    * on all local elements, prior to assembly:*/
     4699        int gsize = this->nodes->NumberOfDofs(GsetEnum);
     4700        IssmDouble* RSLgi=xNewZeroInit<IssmDouble>(gsize);
     4701        int* indices=xNew<int>(gsize);
     4702   for(int i=0;i<gsize;i++) indices[i]=i;
    47054703
    47064704        /*First, figure out the area of the ocean, which is needed to compute the eustatic component: */
    47074705        for(int i=0;i<elements->Size();i++){
    4708                 IssmDouble area;
    4709                 Element* element=xDynamicCast<Element*>(elements->GetObjectByOffset(i));
    4710                 area=element->GetAreaSpherical();
     4706                Element*   element=xDynamicCast<Element*>(elements->GetObjectByOffset(i));
     4707                IssmDouble area=element->GetAreaSpherical();
    47114708                eartharea_cpu += area;
    4712                 if (element->IsOceanInElement()) oceanarea_cpu += area;
     4709                if(element->IsOceanInElement()) oceanarea_cpu += area;
    47134710        }
    47144711        ISSM_MPI_Reduce (&oceanarea_cpu,&oceanarea,1,ISSM_MPI_DOUBLE,ISSM_MPI_SUM,0,IssmComm::GetComm() );
     
    47254722                eustatic_cpu+=eustatic_cpu_e;
    47264723        }
     4724
    47274725        /*Plug values once and assemble: */
    47284726        pRSLgi->SetValues(gsize,indices,RSLgi,ADD_VAL);
     
    47394737
    47404738        /*Assign output pointers:*/
    4741         *peartharea=eartharea;
    4742         *poceanarea=oceanarea;
    4743         *peustatic=eustatic;
     4739        *peartharea = eartharea;
     4740        *poceanarea = oceanarea;
     4741        *peustatic  = eustatic;
    47444742
    47454743}
Note: See TracChangeset for help on using the changeset viewer.