Ignore:
Timestamp:
03/24/10 16:53:27 (15 years ago)
Author:
Mathieu Morlighem
Message:

Do not use throw ErrorException -> ISSMERROR macro
Removed all FUNCT definitions (now useless)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/Riftfront.cpp

    r3201 r3332  
    202202/*Object functions*/
    203203/*FUNCTION Riftfront::Configure {{{1*/
    204 #undef __FUNCT__
    205 #define __FUNCT__ "Riftfront::Configure"
    206204void  Riftfront::Configure(void* pelementsin,void* pnodesin,void* pmaterialsin){
    207205
     
    224222#define _ZIGZAGCOUNTER_
    225223
    226 #undef __FUNCT__
    227 #define __FUNCT__ "Riftfront::Constrain"
    228224int   Riftfront::Constrain(int* punstable, void* vinputs, int analysis_type){
    229225
     
    249245        /*First recover parameter inputs: */
    250246        found=inputs->Recover("velocity",&vxvy_list[0][0],2,dofs,numgrids,(void**)nodes);
    251         if(!found)throw ErrorException(__FUNCT__," could not find velocity in inputs!");
     247        if(!found)ISSMERROR(" could not find velocity in inputs!");
    252248
    253249
     
    294290/*}}}1*/
    295291/*FUNCTION Riftfront::CreateKMatrix {{{1*/
    296 #undef __FUNCT__
    297 #define __FUNCT__ "Riftfront::CreateKMatrix"
    298292void  Riftfront::CreateKMatrix(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){
    299293        /*do nothing: */
     
    301295/*}}}1*/
    302296/*FUNCTION Riftfront::CreatePVector {{{1*/
    303 #undef __FUNCT__
    304 #define __FUNCT__ "Riftfront::CreatePVector"
    305297void  Riftfront::CreatePVector(Vec pg, void* inputs, int analysis_type,int sub_analysis_type){
    306298        /*do nothing: */
     
    373365/*}}}1*/
    374366/*FUNCTION Riftfront::GetDofList {{{1*/
    375 #undef __FUNCT__
    376 #define __FUNCT__ "Riftfront::GetDofList"
    377367
    378368void  Riftfront::GetDofList(int* doflist,int* pnumberofdofspernode){
     
    402392/*}}}1*/
    403393/*FUNCTION Riftfront::IsMaterialStable {{{1*/
    404 #undef __FUNCT__
    405 #define __FUNCT__ "Riftfront::IsMaterialStable"
    406394int   Riftfront::IsMaterialStable(void* vinputs, int analysis_type){
    407395
     
    413401
    414402        found=inputs->Recover("converged",&converged);
    415         if(!found)throw ErrorException(__FUNCT__," could not find converged flag  in inputs!");
     403        if(!found)ISSMERROR(" could not find converged flag  in inputs!");
    416404
    417405        if(converged){
     
    426414/*}}}1*/
    427415/*FUNCTION Riftfront::MaxPenetration {{{1*/
    428 #undef __FUNCT__
    429 #define __FUNCT__ "Riftfront::MaxPenetration"
    430416int   Riftfront::MaxPenetration(double* ppenetration, void* vinputs, int analysis_type){
    431417
     
    445431
    446432        found=inputs->Recover("velocity",&vxvy_list[0][0],2,dofs,numgrids,(void**)nodes);
    447         if(!found)throw ErrorException(__FUNCT__," could not find velocity in inputs!");
     433        if(!found)ISSMERROR(" could not find velocity in inputs!");
    448434
    449435        /*Grid 1 faces grid2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */
     
    468454/*}}}1*/
    469455/*FUNCTION Riftfront::OutputProperties {{{1*/
    470 #undef __FUNCT__
    471 #define __FUNCT__ "Riftfront::OutputProperties"
    472456void  Riftfront::OutputProperties(Vec riftproperties){
    473457
     
    484468/*}}}1*/
    485469/*FUNCTION Riftfront::PenaltyCreateKMatrix {{{1*/
    486 #undef __FUNCT__
    487 #define __FUNCT__ "Riftfront::PenaltyCreateKMatrix"
    488470void  Riftfront::PenaltyCreateKMatrix(Mat Kgg,void* vinputs,double kmax,int analysis_type,int sub_analysis_type){
    489471
     
    519501                /*Recover input parameters: */
    520502                inputs->Recover("thickness",&h[0],1,dofs,MAX_RIFTFRONT_GRIDS,(void**)nodes);
    521                 if (h[0]!=h[1])throw ErrorException(__FUNCT__," different thicknesses not supported for rift fronts");
     503                if (h[0]!=h[1])ISSMERROR(" different thicknesses not supported for rift fronts");
    522504                thickness=h[0];
    523505
     
    583565/*}}}1*/
    584566/*FUNCTION Riftfront::PenaltyCreatePVector {{{1*/
    585 #undef __FUNCT__
    586 #define __FUNCT__ "Riftfront::PenaltyCreatePVector"
    587567void  Riftfront::PenaltyCreatePVector(Vec pg,void* vinputs,double kmax,int analysis_type,int sub_analysis_type){
    588568
     
    632612                /*get thickness: */
    633613                inputs->Recover("thickness",&h[0],1,dofs,MAX_RIFTFRONT_GRIDS,(void**)nodes);
    634                 if (h[0]!=h[1])throw ErrorException(__FUNCT__," different thicknesses not supported for rift fronts");
     614                if (h[0]!=h[1])ISSMERROR(" different thicknesses not supported for rift fronts");
    635615                thickness=h[0];
    636616
    637617                inputs->Recover("bed",&b[0],1,dofs,MAX_RIFTFRONT_GRIDS,(void**)nodes);
    638                 if (b[0]!=b[1])throw ErrorException(__FUNCT__," different beds not supported for rift fronts");
     618                if (b[0]!=b[1])ISSMERROR(" different beds not supported for rift fronts");
    639619                bed=b[0];
    640620
     
    658638                else if(fill==MelangeEnum()){ //icefront finding itself against another icefront (pressure imbalance is fully compensated, ice vs ice)
    659639                       
    660                         if(!shelf) throw ErrorException(__FUNCT__,exprintf("%s%s%i%s",__FUNCT__," error message: fill type ",fill," not supported on ice sheets yet."));
     640                        if(!shelf) ISSMERROR(exprintf("%s%i%s","fill type ",fill," not supported on ice sheets yet."));
    661641
    662642                        pressure_litho=rho_ice*gravity*pow(thickness,(double)2)/(double)2;
     
    668648                }
    669649                else{
    670                         throw ErrorException(__FUNCT__,exprintf("%s%s%i%s",__FUNCT__," error message: fill type ",fill," not supported yet."));
     650                        ISSMERROR(exprintf("%s%i%s","fill type ",fill," not supported yet."));
    671651                }
    672652
     
    690670/*}}}1*/
    691671/*FUNCTION Riftfront::Penetration {{{1*/
    692 #undef __FUNCT__
    693 #define __FUNCT__ "Riftfront::Penetration"
    694672int   Riftfront::Penetration(double* ppenetration, void* vinputs, int analysis_type){
    695673
     
    707685
    708686        found=inputs->Recover("velocity",&vxvy_list[0][0],2,dofs,numgrids,(void**)nodes);
    709         if(!found)throw ErrorException(__FUNCT__," could not find velocity in inputs!");
     687        if(!found)ISSMERROR(" could not find velocity in inputs!");
    710688
    711689        /*Grid 1 faces grid2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */
     
    722700/*FUNCTION Riftfront::PotentialUnstableC
    723701 * nstraint {{{1*/
    724 #undef __FUNCT__
    725 #define __FUNCT__ "Riftfront::PotentialUnstableConstraint"
    726702int   Riftfront::PotentialUnstableConstraint(int* punstable, void* vinputs, int analysis_type){
    727703
     
    741717
    742718        found=inputs->Recover("velocity",&vxvy_list[0][0],2,dofs,numgrids,(void**)nodes);
    743         if(!found)throw ErrorException(__FUNCT__," could not find velocity in inputs!");
     719        if(!found)ISSMERROR(" could not find velocity in inputs!");
    744720
    745721        /*Grid 1 faces grid2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */
     
    764740/*}}}1*/
    765741/*FUNCTION Riftfront::PreConstrain {{{1*/
    766 #undef __FUNCT__
    767 #define __FUNCT__ "Riftfront::PreConstrain"
    768742int   Riftfront::PreConstrain(int* punstable, void* vinputs, int analysis_type){
    769743
     
    780754        /*First recover velocity: */
    781755        found=inputs->Recover("velocity",&vxvy_list[0][0],2,dofs,numgrids,(void**)nodes);
    782         if(!found)throw ErrorException(__FUNCT__," could not find velocity in inputs!");
     756        if(!found)ISSMERROR(" could not find velocity in inputs!");
    783757       
    784758        /*Grid 1 faces grid2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */
     
    828802/*}}}1*/
    829803/*FUNCTION Riftfront::UpdateFromInputs {{{1*/
    830 #undef __FUNCT__
    831 #define __FUNCT__ "Riftfront::UpdateFromInputs"
    832804void  Riftfront::UpdateFromInputs(void* vinputs){
    833805
     
    844816/*}}}1*/
    845817/*FUNCTION Riftfront::FreezeConstraints{{{1*/
    846 #undef __FUNCT__
    847 #define __FUNCT__ "Riftfront::FreezeConstraints"
    848818void   Riftfront::FreezeConstraints(void* vinputs, int analysis_type){
    849819
     
    854824/*}}}1*/
    855825/*FUNCTION Riftfront::IsFrozen{{{1*/
    856 #undef __FUNCT__
    857 #define __FUNCT__ "Riftfront::IsFrozen"
    858826bool   Riftfront::IsFrozen(void){
    859827
Note: See TracChangeset for help on using the changeset viewer.