Ice Sheet System Model  4.18
Code documentation
Functions
DistanceToMaskBoundary.cpp File Reference
#include "./DistanceToMaskBoundary.h"

Go to the source code of this file.

Functions

void DistanceToMaskBoundaryUsage (void)
 
 WRAPPER (DistanceToMaskBoundary_python)
 

Function Documentation

◆ DistanceToMaskBoundaryUsage()

void DistanceToMaskBoundaryUsage ( void  )

Definition at line 7 of file DistanceToMaskBoundary.cpp.

7  {/*{{{*/
8  _printf0_("DISTANCETOMASKBOUNDARYUSAGE - compute distance from any point in a mesh to a mask boundary\n");
9  _printf0_("\n");
10  _printf0_(" This function is a multi-threaded mex file\n");
11  _printf0_("\n");
12  _printf0_(" Usage:\n");
13  _printf0_(" [distance]=DistanceToMaskBoundary(x,y,mask)\n");
14  _printf0_("\n");
15  _printf0_(" x,y,mask: mesh vertices with corresponding mask values. \n");
16  _printf0_(" distance: distance from x,y to the mask transition between 0 and 1\n");
17  _printf0_("\n");
18 }/*}}}*/

◆ WRAPPER()

WRAPPER ( DistanceToMaskBoundary_python  )

Definition at line 20 of file DistanceToMaskBoundary.cpp.

20  {
21 
22  /*input datasets: */
23  double* x=NULL;
24  double* y=NULL;
25  double* mask=NULL;
26  int nods;
27 
28  /* output datasets: */
29  double* distance=NULL;
30 
31  /*Boot module: */
32  MODULEBOOT();
33 
34  /*checks on arguments on the matlab side: */
35  #ifdef _HAVE_MATLAB_MODULES_
37  #endif
38 
39  /*Input datasets: */
40  FetchData(&x,&nods,NULL,X);
41  FetchData(&y,NULL,NULL,Y);
42  FetchData(&mask,NULL,NULL,MASK);
43 
44  /*Call core of computation: */
45  _error_("messing up with AD, is this fonction really used??");
46  //DistanceToMaskBoundaryx(&distance,x,y,mask,nods);
47 
48  /*Write results: */
49  WriteData(DISTANCE,distance,nods);
50 
51  /*Free ressources: */
52  xDelete<double>(x);
53  xDelete<double>(y);
54  xDelete<double>(mask);
55  xDelete<double>(distance);
56 
57  /*end module: */
58  MODULEEND();
59 }
_printf0_
#define _printf0_(StreamArgs)
Definition: Print.h:29
WriteData
void WriteData(IssmPDouble **pmatrix, int *pnel, int *matrix, int M, int N)
Definition: WriteJavascriptData.cpp:16
NRHS
#define NRHS
Definition: BamgConvertMesh.h:52
CheckNumMatlabArguments
int CheckNumMatlabArguments(int nlhs, int NLHS, int nrhs, int NRHS, const char *THISFUNCTION, void(*function)(void))
Definition: CheckNumMatlabArguments.cpp:7
FetchData
void FetchData(char **pstring, char *stringin)
Definition: FetchJavascriptData.cpp:16
__FUNCT__
#define __FUNCT__
Definition: Chacox.h:43
NLHS
#define NLHS
Definition: BamgConvertMesh.h:50
DistanceToMaskBoundaryUsage
void DistanceToMaskBoundaryUsage(void)
Definition: DistanceToMaskBoundary.cpp:7
_error_
#define _error_(StreamArgs)
Definition: exceptions.h:49