Changeset 19716


Ignore:
Timestamp:
11/12/15 21:07:00 (9 years ago)
Author:
Eric.Larour
Message:

CHG: new ElementConnectivity javascript module. Simplified the WRAPPER macro, back to what it
was before javascript modifications. The header file for the wrapper now defines WRAPPER.

Location:
issm/trunk-jpl/src
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/mesh/triangle.js

    r19711 r19716  
    5454        //Now, build the connectivity tables for this mesh.
    5555        md.mesh.vertexconnectivity=NodeConnectivity(md.mesh.elements,md.mesh.numberofvertices);
    56         //md.mesh.elementconnectivity=ElementConnectivity(md.mesh.elements,md.mesh.vertexconnectivity);
     56        md.mesh.elementconnectivity=ElementConnectivity(md.mesh.elements,md.mesh.vertexconnectivity);   
    5757
    5858}
  • issm/trunk-jpl/src/wrappers/ElementConnectivity/ElementConnectivity.h

    r14996 r19716  
    4545#endif
    4646
     47#ifdef _HAVE_JAVASCRIPT_MODULES_
     48/* serial input macros: */
     49#define ELEMENTS         elementsin, nelsin,3
     50#define NODECONNECTIVITY nodeconnectivityin, nodsin, widthin
     51/* serial output macros: */
     52#define ELEMENTCONNECTIVITY pelementconnectivity,NULL,NULL
     53#undef WRAPPER
     54#define WRAPPER(modulename) extern "C" { int  ElementConnectivityModule(double** pelementconnectivity, int* elementsin, int* nodeconnectivityin, int nelsin, int nodsin, int widthin)
     55#endif
     56
    4757/* serial arg counts: */
    4858#undef NLHS
  • issm/trunk-jpl/src/wrappers/NodeConnectivity/NodeConnectivity.cpp

    r19711 r19716  
    1010        _printf0_("\n");
    1111}/*}}}*/
    12 WRAPPER(NodeConnectivity, double** pconnectivity, int* pnods, int *pwidth, int* elementsin, int nelsin, int nodsin){
     12WRAPPER(NodeConnectivity){
    1313
    1414        /*inputs: */
  • issm/trunk-jpl/src/wrappers/NodeConnectivity/NodeConnectivity.h

    r19711 r19716  
    2222/*Header files: */
    2323#include "../bindings.h"
    24 #ifndef _HAVE_JAVASCRIPT_MODULES_
    2524#include "../../c/main/globals.h"
    26 #endif
    2725#include "../../c/toolkits/toolkits.h"
    2826#include "../../c/modules/modules.h"
     
    5351/* serial output macros: */
    5452#define CONNECTIVITY pconnectivity,pnods,pwidth
     53#undef WRAPPER
     54#define WRAPPER(modulename) extern "C" { int  NodeConnectivityModule(double** pconnectivity, int* pnods, int *pwidth, int* elementsin, int nelsin, int nodsin)
    5555#endif
    5656
  • issm/trunk-jpl/src/wrappers/TriMesh/TriMesh.cpp

    r19711 r19716  
    1414        _printf_("\n");
    1515}/*}}}*/
    16 WRAPPER(TriMesh,double** pindex, double** px, double** py, int* pnel, int* pnods, double** psegments, double** psegmentmarkers, int* pnsegs, double* domainx, double* domainy, int domainnods, double areain){
     16WRAPPER(TriMesh){
    1717       
    18 
    1918        /*intermediary: */
    2019        double    area;
  • issm/trunk-jpl/src/wrappers/TriMesh/TriMesh.h

    r19715 r19716  
    7171#define SEGMENTS          psegments,pnsegs
    7272#define SEGMENTMARKERLIST psegmentmarkers,pnsegs
     73#undef WRAPPER
     74#define WRAPPER(modulename) extern "C" { int  TriMeshModule(double** pindex, double** px, double** py, int* pnel, int* pnods, double** psegments, double** psegmentmarkers, int* pnsegs, double* domainx, double* domainy, int domainnods, double areain)
    7375#define _DO_NOT_LOAD_GLOBALS_//we only load globals for TriMeshModule.js, not other modules!
    7476#endif
  • issm/trunk-jpl/src/wrappers/javascript/Makefile.am

    r19714 r19716  
    99bin_SCRIPTS =
    1010bin_SCRIPTS += ../TriMesh/TriMesh.js  \
    11                            ../NodeConnectivity/NodeConnectivity.js
     11                           ../NodeConnectivity/NodeConnectivity.js\
     12                           ../ElementConnectivity/ElementConnectivity.js
    1213       
    1314#javascript io{{{
     
    7374
    7475IssmModule_SOURCES = ../TriMesh/TriMesh.cpp \
    75                                          ../NodeConnectivity/NodeConnectivity.cpp
    76 IssmModule_CXXFLAGS= -fPIC -D_DO_NOT_LOAD_GLOBALS_ --memory-init-file 0 $(AM_CXXFLAGS) $(CXXFLAGS) $(CXXOPTFLAGS) $(COPTFLAGS) -s EXPORTED_FUNCTIONS="['_TriMeshModule','_NodeConnectivityModule']"  -s DISABLE_EXCEPTION_CATCHING=0
     76                                         ../NodeConnectivity/NodeConnectivity.cpp\
     77                                         ../ElementConnectivity/ElementConnectivity.cpp
     78
     79IssmModule_CXXFLAGS= -fPIC -D_DO_NOT_LOAD_GLOBALS_ --memory-init-file 0 $(AM_CXXFLAGS) $(CXXFLAGS) $(CXXOPTFLAGS) $(COPTFLAGS) -s EXPORTED_FUNCTIONS="['_TriMeshModule','_NodeConnectivityModule','_ElementConnectivityModule']"  -s DISABLE_EXCEPTION_CATCHING=0
    7780IssmModule_LDADD = ${deps} $(TRIANGLELIB)
    7881#}}}
Note: See TracChangeset for help on using the changeset viewer.