Changeset 22418


Ignore:
Timestamp:
02/14/18 08:41:38 (7 years ago)
Author:
Mathieu Morlighem
Message:

CHG: better way to deal with BAMG compilation

Location:
issm/trunk-jpl/src/c
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/Makefile.am

    r22417 r22418  
    4949                                         ./modules/Bamgx/Bamgx.cpp\
    5050                                         ./modules/BamgConvertMeshx/BamgConvertMeshx.cpp\
    51                                          ./modules/BamgTriangulatex/BamgTriangulatex.cpp\
    52                                          ./modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp
     51                                         ./modules/BamgTriangulatex/BamgTriangulatex.cpp
    5352
    5453#do not include AmrBamg with ADOLC
     
    567566                        ./modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp\
    568567                        ./modules/InterpFromMesh2dx/InterpFromMesh2dxt.cpp\
     568                        ./modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp\
    569569                        ./modules/InterpFromMeshToMesh3dx/InterpFromMeshToMesh3dx.cpp\
    570570                        ./modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp\
  • issm/trunk-jpl/src/c/classes/FemModel.cpp

    r22417 r22418  
    26282628
    26292629        /*Finally: interpolate all inputs and insert them into the new elements.*/
    2630         #ifdef _HAVE_BAMG_
    26312630        this->InterpolateInputs(new_vertices,new_elements);
    2632         #else
    2633         _error_("Cannot interpolate inputs without bamg");
    2634         #endif
    26352631
    26362632        /*Delete old structure and set new pointers*/
     
    28712867}
    28722868/*}}}*/
    2873 #ifdef _HAVE_BAMG_
    28742869void FemModel::InterpolateInputs(Vertices* newfemmodel_vertices,Elements* newfemmodel_elements){/*{{{*/
    28752870       
     
    29862981}
    29872982/*}}}*/
    2988 #endif
    29892983void FemModel::WriteMeshInResults(void){/*{{{*/
    29902984
     
    34273421
    34283422        /*Interpolate spc values and flags in the new partition*/
    3429         #ifdef _HAVE_BAMG_
    34303423        InterpFromMeshToMesh2dx(&newspc,elementslist,x,y,numberofvertices,numberofelements,
    34313424                                                                spc,numberofvertices,numberofcols,
    34323425                                                                newx,newy,newnumberofvertices,NULL);
    3433         #else
    3434         _error_("cannot interpolate without bamg");
    3435         #endif
    34363426       
    34373427        /*Now, insert the interpolated constraints in the data set (constraints)*/
  • issm/trunk-jpl/src/c/classes/FemModel.h

    r22417 r22418  
    176176                void CreateConstraints(Vertices* newfemmodel_vertices,int nodecounter,int constraintcounter,int analysis_enum,Constraints* newfemmodel_constraints);
    177177                void GetInputs(int* pnumP0inputs,IssmDouble** pP0inputs,int** pP0input_enums,int** pP0input_interp,int* pnumP1inputs,IssmDouble** pP1inputs,int** pP1input_enums,int** pP1input_interp);
    178                 #ifdef _HAVE_BAMG_
    179178                void InterpolateInputs(Vertices* newfemmodel_vertices,Elements* newfemmodel_elements);
    180                 #endif
    181179                void UpdateElements(int newnumberofelements,int* newelementslist,bool* my_elements,int nodecounter,int analysis_counter,Elements* newelements);
    182180                void ElementsAndVerticesPartitioning(int& newnumberofvertices,int& newnumberofelements,int& elementswidth,int* newelementslist,bool** pmy_elements,int** pmy_vertices);
  • issm/trunk-jpl/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp

    r22252 r22418  
    77#include "../../toolkits/toolkits.h"
    88#include "../../classes/classes.h"
     9
     10#ifdef _HAVE_BAMG_
    911#include "../../bamg/bamgobjects.h"
    10 
    1112using namespace bamg;
    1213using namespace std;
     14#endif
    1315
    1416int InterpFromMeshToMesh2dx(double** pdata_interp,int* index_data,double* x_data,double* y_data,int nods_data,int nels_data,
    1517                        double* data,int M_data,int N_data,double* x_interp,double* y_interp,int N_interp,Options* options){
     18
     19        #ifdef _HAVE_BAMG_
    1620
    1721        /*Output*/
     
    172176        xDelete<int>(connectivity);
    173177        *pdata_interp=data_interp;
     178
     179        #else
     180        _error_("Cannot interpolate without bamg support");
     181        #endif
    174182        return 1;
    175183}
  • issm/trunk-jpl/src/c/modules/modules.h

    r22417 r22418  
    1010#include "./BamgConvertMeshx/BamgConvertMeshx.h"
    1111#include "./BamgTriangulatex/BamgTriangulatex.h"
    12 #include "./InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.h"
    1312#endif
    1413
     
    4443#include "./InterpFromMesh2dx/InterpFromMesh2dx.h"
    4544#include "./InterpFromGridToMeshx/InterpFromGridToMeshx.h"
     45#include "./InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.h"
    4646#include "./InterpFromMeshToMesh3dx/InterpFromMeshToMesh3dx.h"
    4747#include "./InterpFromMeshToGridx/InterpFromMeshToGridx.h"
Note: See TracChangeset for help on using the changeset viewer.