| Line 246... |
Line 246... |
|
|
#if defined(PETSC_HAVE_MATLAB_ENGINE)
|
#if defined(PETSC_HAVE_MATLAB_ENGINE)
|
extern PetscBool PetscBeganMPI;
|
extern PetscBool PetscBeganMPI;
|
|
|
#undef __FUNCT__
|
#undef __FUNCT__
|
#define __FUNCT__ "SlepcInitializeMatlab"
|
#define __FUNCT__ "SlepcInitializeNoPointers"
|
/*
|
/*
|
SlepcInitializeMatlab - Calls SlepcInitialize() from MATLAB (analogue to
|
SlepcInitializeNoPointers - Calls SlepcInitialize() from C/C++ without the pointers
|
PetscInitializeMatlab).
|
to argc and args (analogue to PetscInitializeNoPointers).
|
|
|
Collective
|
Collective
|
|
|
Level: advanced
|
Level: advanced
|
|
|
.seealso: SlepcInitialize()
|
.seealso: SlepcInitialize()
|
*/
|
*/
|
PetscErrorCode SlepcInitializeMatlab(int argc,char **args,const char *filename,const char *help)
|
PetscErrorCode SlepcInitializeNoPointers(int argc,char **args,const char *filename,const char *help)
|
{
|
{
|
PetscErrorCode ierr;
|
PetscErrorCode ierr;
|
int myargc = argc;
|
int myargc = argc;
|
char **myargs = args;
|
char **myargs = args;
|
|
|
PetscFunctionBegin;
|
PetscFunctionBegin;
|
ierr = SlepcInitialize(&myargc,&myargs,filename,help);
|
ierr = SlepcInitialize(&myargc,&myargs,filename,help);
|
ierr = PetscPopSignalHandler();CHKERRQ(ierr);
|
ierr = PetscPopSignalHandler();CHKERRQ(ierr);
|
PetscBeganMPI = PETSC_FALSE;
|
PetscBeganMPI = PETSC_FALSE;
|
PetscFunctionReturn(ierr);
|
PetscFunctionReturn(ierr);
|
}
|
|
|
|
#undef __FUNCT__
|
|
#define __FUNCT__ "SlepcInitializedMatlab"
|
|
/*
|
|
SlepcInitializedMatlab - Has SLEPc been initialized already?
|
|
|
|
Not Collective
|
|
|
|
Level: advanced
|
|
|
|
Notes: this is called only by the SLEPc MATLAB interface.
|
|
|
|
.seealso: SlepcInitialize()
|
|
*/
|
|
int SlepcInitializedMatlab(void)
|
|
{
|
|
PetscBool flg;
|
|
|
|
SlepcInitialized(&flg);
|
|
if (flg) return 1;
|
|
else return 0;
|
|
}
|
}
|
#endif
|
#endif
|
|
|
#ifdef PETSC_USE_DYNAMIC_LIBRARIES
|
#ifdef PETSC_USE_DYNAMIC_LIBRARIES
|
EXTERN_C_BEGIN
|
EXTERN_C_BEGIN
|