• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ KINProcessError函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中KINProcessError函数的典型用法代码示例。如果您正苦于以下问题:C++ KINProcessError函数的具体用法?C++ KINProcessError怎么用?C++ KINProcessError使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了KINProcessError函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: KINDlsSetBandJacFn

int KINDlsSetBandJacFn(void *kinmem, KINDlsBandJacFn jac)
{
    KINMem kin_mem;
    KINDlsMem kindls_mem;

    /* Return immediately if kinmem is NULL */
    if (kinmem == NULL)
    {
        KINProcessError(NULL, KINDLS_MEM_NULL, "KINDLS", "KINDlsSetBandJacFn", MSGD_KINMEM_NULL);
        return(KINDLS_MEM_NULL);
    }
    kin_mem = (KINMem) kinmem;

    if (lmem == NULL)
    {
        KINProcessError(kin_mem, KINDLS_LMEM_NULL, "KINDLS", "KINDlsSetBandJacFn", MSGD_LMEM_NULL);
        return(KINDLS_LMEM_NULL);
    }
    kindls_mem = (KINDlsMem) lmem;

    if (jac != NULL)
    {
        jacDQ = FALSE;
        bjac = jac;
    }
    else
    {
        jacDQ = TRUE;
    }

    return(KINDLS_SUCCESS);
}
开发者ID:ASP1234,项目名称:Scilabv5.5.2,代码行数:32,代码来源:kinsol_direct.c


示例2: KINSetEtaParams

int KINSetEtaParams(void *kinmem, realtype egamma, realtype ealpha)
{
  KINMem kin_mem;

  if (kinmem == NULL) {
    KINProcessError(NULL, KIN_MEM_NULL, "KINSOL", "KINSetEtaParams", MSG_NO_MEM);
    return(KIN_MEM_NULL);
  }

  kin_mem = (KINMem) kinmem;

  if ((ealpha <= ONE) || (ealpha > TWO))
    if (ealpha != ZERO) {
      KINProcessError(NULL, KIN_ILL_INPUT, "KINSOL", "KINSetEtaParams", MSG_BAD_ALPHA);
      return(KIN_ILL_INPUT);
    }
  
  if (ealpha == ZERO) 
    kin_mem->kin_eta_alpha = TWO;
  else
    kin_mem->kin_eta_alpha = ealpha;

  if ((egamma <= ZERO) || (egamma > ONE))
    if (egamma != ZERO) {
      KINProcessError(NULL, KIN_ILL_INPUT, "KINSOL", "KINSetEtaParams", MSG_BAD_GAMMA);
      return(KIN_ILL_INPUT);
    }

  if (egamma == ZERO)
    kin_mem->kin_eta_gamma = POINT9;
  else
    kin_mem->kin_eta_gamma = egamma;

  return(KIN_SUCCESS);
}
开发者ID:A1kmm,项目名称:modml-solver,代码行数:35,代码来源:kinsol_io.c


示例3: KINKluSetOrderingFn

/*
 * Allow the user to specify a matrix permutation function for KLU in place
 * of, for example, AMD. 
 */
int KINKluSetOrderingFn(void *kin_memory, KINKluOrderingFn ordering_fun){
	
	//create KINSOL and KINKlu memory blocks.
	KINMem kin_mem;
	KINKluMem kin_klu_mem;
	
	//check that the KINSOL memory block is not null.
	if(!kin_memory){
		KINProcessError(NULL, KINDLS_MEM_NULL, "KINKLU", "KINKluSetOrderingFn", MSGD_KINMEM_NULL);
		return(KINDLS_MEM_NULL);
	}
	
	//cast it if it's not
	kin_mem = (KINMem) kin_memory;
	
	//check if the klu memory block is null
	if(!kin_mem->kin_lmem){
		KINProcessError(NULL, KINDLS_MEM_NULL, "KINKLU", "KINKluSetOrderingJacFn", MSGD_KINMEM_NULL);
		return(KINDLS_MEM_NULL);
	}
	
	//if not, grab it
	kin_klu_mem = (KINKluMem)kin_mem->kin_lmem;
	
	//set the klu memory block's ordering function to the one passed in
	kin_klu_mem->klu_comm.user_order = ordering_fun;
	
	//return with triumphant success
	return(KINDLS_SUCCESS);
}
开发者ID:phines,项目名称:cosmic,代码行数:34,代码来源:kin_klu.c


示例4: KINSetScaledStepTol

int KINSetScaledStepTol(void *kinmem, realtype scsteptol)
{
  KINMem kin_mem;
  realtype uround;

  if (kinmem == NULL) {
    KINProcessError(NULL, KIN_MEM_NULL, "KINSOL", "KINSetScaledStepTol", MSG_NO_MEM);
    return(KIN_MEM_NULL);
  }

  kin_mem = (KINMem) kinmem;

  if (scsteptol < ZERO) {
    KINProcessError(NULL, KIN_ILL_INPUT, "KINSOL", "KINSetScaledStepTol", MSG_BAD_SCSTEPTOL);
    return(KIN_ILL_INPUT);
  }

  if (scsteptol == ZERO) {
    uround = kin_mem->kin_uround;
    kin_mem->kin_scsteptol = RPowerR(uround,TWOTHIRDS);
  } else {
    kin_mem->kin_scsteptol = scsteptol;
  }

  return(KIN_SUCCESS);
}
开发者ID:A1kmm,项目名称:modml-solver,代码行数:26,代码来源:kinsol_io.c


示例5: KINSpilsSetMaxRestarts

int KINSpilsSetMaxRestarts(void *kinmem, int maxrs)
{
  KINMem kin_mem;
  KINSpilsMem kinspils_mem;

  /* return immediately if kinmem is NULL */

  if (kinmem == NULL) {
    KINProcessError(NULL, KINSPILS_MEM_NULL, "KINSPILS", "KINSpilsSetMaxRestarts", MSGS_KINMEM_NULL);
    return(KINSPILS_MEM_NULL);
  }
  kin_mem = (KINMem) kinmem;

  if (lmem == NULL) {
    KINProcessError(kin_mem, KINSPILS_LMEM_NULL, "KINSPILS", "KINSpilsSetMaxRestarts", MSGS_LMEM_NULL);
    return(KINSPILS_LMEM_NULL);
  }
  kinspils_mem = (KINSpilsMem) lmem;

  /* check for legal maxrs */

  if (maxrs < 0) {
    KINProcessError(kin_mem, KINSPILS_ILL_INPUT, "KINSPILS", "KINSpilsSetMaxRestarts", MSGS_NEG_MAXRS);
    return(KINSPILS_ILL_INPUT);
  }
  kinspils_mem->s_maxlrst = maxrs;

  return(KINSPILS_SUCCESS);
}
开发者ID:OpenCMISS-Dependencies,项目名称:libcellml,代码行数:29,代码来源:kinsol_spils.c


示例6: KINDlsGetWorkSpace

int KINDlsGetWorkSpace(void *kinmem, long int *lenrwLS, long int *leniwLS)
{
    KINMem kin_mem;
    KINDlsMem kindls_mem;

    /* Return immediately if kinmem is NULL */
    if (kinmem == NULL)
    {
        KINProcessError(NULL, KINDLS_MEM_NULL, "KINDLS", "KINBandGetWorkSpace", MSGD_KINMEM_NULL);
        return(KINDLS_MEM_NULL);
    }
    kin_mem = (KINMem) kinmem;

    if (lmem == NULL)
    {
        KINProcessError(kin_mem, KINDLS_LMEM_NULL, "KINDLS", "KINBandGetWorkSpace", MSGD_LMEM_NULL);
        return(KINDLS_LMEM_NULL);
    }
    kindls_mem = (KINDlsMem) lmem;

    if (mtype == SUNDIALS_DENSE)
    {
        *lenrwLS = n * n;
        *leniwLS = n;
    }
    else if (mtype == SUNDIALS_BAND)
    {
        *lenrwLS = n * (smu + mu + 2 * ml + 2);
        *leniwLS = n;
    }

    return(KINDLS_SUCCESS);
}
开发者ID:ASP1234,项目名称:Scilabv5.5.2,代码行数:33,代码来源:kinsol_direct.c


示例7: KINSlsGetLastFlag

/*
 * KINSlsGetLastFlag returns the last flag set in a KINSLS function.
 */
int KINSlsGetLastFlag(void *kin_mem_v, long int *flag)
{
  KINMem kin_mem;
  KINSlsMem kinsls_mem;

  kin_mem= (KINMem) kin_mem_v;

  /* Return immediately if kin_mem is NULL */
  if (kin_mem == NULL) {
    KINProcessError(NULL, KINSLS_MEM_NULL, "KINSLS", "KINSlsGetLastFlag", 
		    MSGSP_KINMEM_NULL);
    return(KINSLS_MEM_NULL);
  }

  if (kin_mem->kin_lmem == NULL) {
    KINProcessError(kin_mem, KINSLS_LMEM_NULL, "KINSLS", 
		    "KINSlsGetLastFlag", MSGSP_LMEM_NULL);
    return(KINSLS_LMEM_NULL);
  }
  kinsls_mem = (KINSlsMem) kin_mem->kin_lmem;

  *flag = kinsls_mem->s_last_flag;

  return(KINSLS_SUCCESS);
}
开发者ID:MaveriQ,项目名称:AMICI,代码行数:28,代码来源:kinsol_sparse.c


示例8: KINKluSetSparseJacFn

/*
 * Allows the user to specify a sparse Jacobian evaluation function for
 * use with KLU.
 */
int KINKluSetSparseJacFn(void *kin_memory, KINKluSparseJacFn jac_fun){
	
	//create KINSOL and KINKlu memory blocks.
	KINMem kin_mem;
	KINKluMem kin_klu_mem;
	
	//check that the KINSOL memory block is not null.
	if (!kin_memory) {
		KINProcessError(NULL, KINDLS_MEM_NULL, "KINKLU", "KINKluSetSparseJacFn", MSGD_KINMEM_NULL);
		return(KINDLS_MEM_NULL);
	}
	
	//grab it if okay
	kin_mem=(KINMem)kin_memory;
	
	//check if the klu memory block is null
	if(!kin_mem->kin_lmem){
		KINProcessError(NULL, KINDLS_MEM_NULL, "KINKLU", "KINKluSetSparseJacFn", MSGD_KINMEM_NULL);
		return(KINDLS_MEM_NULL);
	}
	
	//if not, grab it
	kin_klu_mem=(KINKluMem)kin_mem->kin_lmem;
	
	//now attach the jacobian function to the klu memory block
	kin_klu_mem->jac_fun=jac_fun;
	
	//return
	return(KINDLS_SUCCESS);
}
开发者ID:phines,项目名称:cosmic,代码行数:34,代码来源:kin_klu.c


示例9: KINSpilsSetPreconditioner

int KINSpilsSetPreconditioner(void *kinmem,
			      KINSpilsPrecSetupFn pset, KINSpilsPrecSolveFn psolve)
{
  KINMem kin_mem;
  KINSpilsMem kinspils_mem;

  /* return immediately if kinmem is NULL */

  if (kinmem == NULL) {
    KINProcessError(NULL, KINSPILS_MEM_NULL, "KINSPILS", "KINSpilsSetPreconditioner", MSGS_KINMEM_NULL);
    return(KINSPILS_MEM_NULL);
  }
  kin_mem = (KINMem) kinmem;

  if (lmem == NULL) {
    KINProcessError(kin_mem, KINSPILS_LMEM_NULL, "KINSPILS", "KINSpilsSetPreconditioner", MSGS_LMEM_NULL);
    return(KINSPILS_LMEM_NULL);
  }
  kinspils_mem = (KINSpilsMem) lmem;

  kinspils_mem->s_pset   = pset;
  kinspils_mem->s_psolve = psolve;

  return(KINSPILS_SUCCESS);
}
开发者ID:OpenCMISS-Dependencies,项目名称:libcellml,代码行数:25,代码来源:kinsol_spils.c


示例10: KINSpilsSetJacTimesVecFn

int KINSpilsSetJacTimesVecFn(void *kinmem, KINSpilsJacTimesVecFn jtv)

{
  KINMem kin_mem;
  KINSpilsMem kinspils_mem;

  /* return immediately if kinmem is NULL */

  if (kinmem == NULL) {
    KINProcessError(NULL, KINSPILS_MEM_NULL, "KINSPILS", "KINSpilsSetJacTimesVecFn", MSGS_KINMEM_NULL);
    return(KINSPILS_MEM_NULL);
  }
  kin_mem = (KINMem) kinmem;

  if (lmem == NULL) {
    KINProcessError(kin_mem, KINSPILS_LMEM_NULL, "KINSPILS", "KINSpilsSetJacTimesVecFn", MSGS_LMEM_NULL);
    return(KINSPILS_LMEM_NULL);
  }
  kinspils_mem = (KINSpilsMem) lmem;

  if (jtv != NULL) {
    jtimesDQ = FALSE;
    jtimes = jtv;
  } else {
    jtimesDQ = TRUE;
  }

  return(KINSPILS_SUCCESS);
}
开发者ID:OpenCMISS-Dependencies,项目名称:libcellml,代码行数:29,代码来源:kinsol_spils.c


示例11: KINSlsSetSparseJacFn

/*
 * KINSlsSetSparseJacFn specifies the sparse Jacobian function.
 */
int KINSlsSetSparseJacFn(void *kin_mem_v, KINSlsSparseJacFn jac)
{
  KINMem kin_mem;
  KINSlsMem kinsls_mem;

  kin_mem = (KINMem) kin_mem_v;

  /* Return immediately if kin_mem is NULL */
  if (kin_mem == NULL) {
    KINProcessError(NULL, KINSLS_MEM_NULL, "KINSLS", "KINSlsSetSparseJacFn", 
		    MSGSP_KINMEM_NULL);
    return(KINSLS_MEM_NULL);
  }

  if (kin_mem->kin_lmem == NULL) {
    KINProcessError(kin_mem, KINSLS_LMEM_NULL, "KINSLS", 
		    "KINSlsSetSparseJacFn", MSGSP_LMEM_NULL);
    return(KINSLS_LMEM_NULL);
  }
  kinsls_mem = (KINSlsMem) kin_mem->kin_lmem;

  kinsls_mem->s_jaceval = jac;

  return(KINSLS_SUCCESS);
}
开发者ID:MaveriQ,项目名称:AMICI,代码行数:28,代码来源:kinsol_sparse.c


示例12: KINBBDPrecGetWorkSpace

int KINBBDPrecGetWorkSpace(void *kinmem, long int *lenrwBBDP, long int *leniwBBDP)
{
  KINMem kin_mem;
  KINSpilsMem kinspils_mem;
  KBBDPrecData pdata;

  if (kinmem == NULL) {
    KINProcessError(NULL, KINSPILS_MEM_NULL, "KINBBDPRE", "KINBBDPrecGetWorkSpace", MSGBBD_MEM_NULL);
    return(KINSPILS_MEM_NULL);
  }
  kin_mem = (KINMem) kinmem;

  if (kin_mem->kin_lmem == NULL) {
    KINProcessError(kin_mem, KINSPILS_LMEM_NULL, "KINBBDPRE", "KINBBDPrecGetWorkSpace", MSGBBD_LMEM_NULL);
    return(KINSPILS_LMEM_NULL);
  }
  kinspils_mem = (KINSpilsMem) kin_mem->kin_lmem;

  if (kinspils_mem->s_P_data == NULL) {
    KINProcessError(kin_mem, KINSPILS_PMEM_NULL, "KINBBDPRE", "KINBBDPrecGetWorkSpace", MSGBBD_PMEM_NULL);
    return(KINSPILS_PMEM_NULL);
  } 
  pdata = (KBBDPrecData) kinspils_mem->s_P_data;

  *lenrwBBDP = pdata->rpwsize;
  *leniwBBDP = pdata->ipwsize;

  return(KINSPILS_SUCCESS);
}
开发者ID:luca-heltai,项目名称:sundials,代码行数:29,代码来源:kinsol_bbdpre.c


示例13: KINBBDPrecGetNumGfnEvals

int KINBBDPrecGetNumGfnEvals(void *kinmem, long int *ngevalsBBDP)
{
  KINMem kin_mem;
  KINSpilsMem kinspils_mem;
  KBBDPrecData pdata;

  if (kinmem == NULL) {
    KINProcessError(NULL, KINSPILS_MEM_NULL, "KINBBDPRE", "KINBBDPrecGetNumGfnEvals", MSGBBD_MEM_NULL);
    return(KINSPILS_MEM_NULL);
  }
  kin_mem = (KINMem) kinmem;

  if (kin_mem->kin_lmem == NULL) {
    KINProcessError(kin_mem, KINSPILS_LMEM_NULL, "KINBBDPRE", "KINBBDPrecGetNumGfnEvals", MSGBBD_LMEM_NULL);
    return(KINSPILS_LMEM_NULL);
  }
  kinspils_mem = (KINSpilsMem) kin_mem->kin_lmem;

  if (kinspils_mem->s_P_data == NULL) {
    KINProcessError(kin_mem, KINSPILS_PMEM_NULL, "KINBBDPRE", "KINBBDPrecGetNumGfnEvals", MSGBBD_PMEM_NULL);
    return(KINSPILS_PMEM_NULL);
  } 
  pdata = (KBBDPrecData) kinspils_mem->s_P_data;

  *ngevalsBBDP = pdata->nge;

  return(KINSPILS_SUCCESS);
}
开发者ID:luca-heltai,项目名称:sundials,代码行数:28,代码来源:kinsol_bbdpre.c


示例14: KINSetFuncNormTol

int KINSetFuncNormTol(void *kinmem, realtype fnormtol)
{
  KINMem kin_mem;
  realtype uround;

  if (kinmem == NULL) {
    KINProcessError(NULL, KIN_MEM_NULL, "KINSOL", "KINSetFuncNormTol", MSG_NO_MEM);
    return(KIN_MEM_NULL);
  }

  kin_mem = (KINMem) kinmem;

  if (fnormtol < ZERO) {
    KINProcessError(NULL, KIN_ILL_INPUT, "KINSOL", "KINSetFuncNormTol", MSG_BAD_FNORMTOL);
    return(KIN_ILL_INPUT);
  }

  if (fnormtol == ZERO) {
    uround = kin_mem->kin_uround;
    kin_mem->kin_fnormtol = RPowerR(uround,ONETHIRD);
  } else {
    kin_mem->kin_fnormtol = fnormtol;
  }

  return(KIN_SUCCESS);
}
开发者ID:A1kmm,项目名称:modml-solver,代码行数:26,代码来源:kinsol_io.c


示例15: KINSetRelErrFunc

int KINSetRelErrFunc(void *kinmem, realtype relfunc)
{
  KINMem kin_mem;
  realtype uround;

  if (kinmem == NULL) {
    KINProcessError(NULL, KIN_MEM_NULL, "KINSOL", "KINSetRelErrFunc", MSG_NO_MEM);
    return(KIN_MEM_NULL);
  }

  kin_mem = (KINMem) kinmem;

  if (relfunc < ZERO) {
    KINProcessError(NULL, KIN_ILL_INPUT, "KINSOL", "KINSetRelErrFunc", MSG_BAD_RELFUNC);
    return(KIN_ILL_INPUT);
  }

  if (relfunc == ZERO) {
    uround = kin_mem->kin_uround;
    kin_mem->kin_sqrt_relfunc = RSqrt(uround);
  } else {
    kin_mem->kin_sqrt_relfunc = RSqrt(relfunc);
  }

  return(KIN_SUCCESS);
}
开发者ID:A1kmm,项目名称:modml-solver,代码行数:26,代码来源:kinsol_io.c


示例16: KINSetResMonParams

int KINSetResMonParams(void *kinmem, realtype omegamin, realtype omegamax)
{
  KINMem kin_mem;

  if (kinmem == NULL) {
    KINProcessError(NULL, KIN_MEM_NULL, "KINSOL", "KINSetResMonParams", MSG_NO_MEM);
    return(KIN_MEM_NULL);
  }

  kin_mem = (KINMem) kinmem;

  /* check omegamin */

  if (omegamin < ZERO) {
    KINProcessError(NULL, KIN_ILL_INPUT, "KINSOL", "KINSetResMonParams", MSG_BAD_OMEGA);
    return(KIN_ILL_INPUT);
  }

  if (omegamin == ZERO) 
    kin_mem->kin_omega_min = OMEGA_MIN;
  else
    kin_mem->kin_omega_min = omegamin;

  /* check omegamax */

  if (omegamax < ZERO) {
    KINProcessError(NULL, KIN_ILL_INPUT, "KINSOL", "KINSetResMonParams", MSG_BAD_OMEGA);
    return(KIN_ILL_INPUT);
  }

  if (omegamax == ZERO) {

    if (kin_mem->kin_omega_min > OMEGA_MAX) {
      KINProcessError(NULL, KIN_ILL_INPUT, "KINSOL", "KINSetResMonParams", MSG_BAD_OMEGA);
      return(KIN_ILL_INPUT);
    }
    else kin_mem->kin_omega_max = OMEGA_MAX;

  } else {

    if (kin_mem->kin_omega_min > omegamax) {
      KINProcessError(NULL, KIN_ILL_INPUT, "KINSOL", "KINSetResMonParams", MSG_BAD_OMEGA);
      return(KIN_ILL_INPUT);
    }
    else kin_mem->kin_omega_max = omegamax;

  }

  return(KIN_SUCCESS);
}
开发者ID:A1kmm,项目名称:modml-solver,代码行数:50,代码来源:kinsol_io.c


示例17: KINBBDPrecSetup

static int KINBBDPrecSetup(N_Vector uu, N_Vector uscale,
                           N_Vector fval, N_Vector fscale, 
                           void *bbd_data,
                           N_Vector vtemp1, N_Vector vtemp2)
{
  KBBDPrecData pdata;
  KINMem kin_mem;
  int retval;
  long int ier;

  pdata = (KBBDPrecData) bbd_data;

  kin_mem = (KINMem) pdata->kin_mem;

  /* call KBBDDQJac for a new jacobian and store in PP */

  SetToZero(PP);
  retval = KBBDDQJac(pdata, uu, uscale, vtemp1, vtemp2, vtemp3);
  if (retval != 0) {
    KINProcessError(kin_mem, -1, "KINBBDPRE", "KINBBDPrecSetup", MSGBBD_FUNC_FAILED);
    return(-1);
  }

  nge += (1 + SUNMIN(mldq+mudq+1, Nlocal));

  /* do LU factorization of P in place (in PP) */

  ier = BandGBTRF(PP, lpivots);

  /* return 0 if the LU was complete, else return 1 */

  if (ier > 0) return(1);
  else return(0);
}
开发者ID:luca-heltai,项目名称:sundials,代码行数:34,代码来源:kinsol_bbdpre.c


示例18: KINSetConstraints

int KINSetConstraints(void *kinmem, N_Vector constraints)
{
  KINMem kin_mem;
  realtype temptest;

  if (kinmem == NULL) {
    KINProcessError(NULL, KIN_MEM_NULL, "KINSOL", "KINSetConstraints", MSG_NO_MEM);
    return(KIN_MEM_NULL);
  }

  kin_mem = (KINMem) kinmem;

  if (constraints == NULL) {
    if (kin_mem->kin_constraintsSet) {
      N_VDestroy(kin_mem->kin_constraints);
      lrw -= lrw1;
      liw -= liw1;
    }
    kin_mem->kin_constraintsSet = FALSE;
    return(KIN_SUCCESS);
  }

  /* Check the constraints vector */

  temptest = N_VMaxNorm(constraints);
  if (temptest > TWOPT5){ 
    KINProcessError(NULL, KIN_ILL_INPUT, "KINSOL", "KINSetConstraints", MSG_BAD_CONSTRAINTS);
    return(KIN_ILL_INPUT); 
  }

  if (!kin_mem->kin_constraintsSet) {
    kin_mem->kin_constraints = NULL;
    kin_mem->kin_constraints = N_VClone(constraints);
    lrw += lrw1;
    liw += liw1;
    kin_mem->kin_constraintsSet = TRUE;
  }

  /* Load the constraint vector */

  N_VScale(ONE, constraints, kin_mem->kin_constraints);

  return(KIN_SUCCESS);
}
开发者ID:AidanRocke,项目名称:CelegansNeuromechanicalGaitModulation,代码行数:44,代码来源:kinsol_io.c


示例19: KINSetPrintLevel

int KINSetPrintLevel(void *kinmem, int printfl)
{
  KINMem kin_mem;

  if (kinmem == NULL) {
    KINProcessError(NULL, KIN_MEM_NULL, "KINSOL", "KINSetPrintLevel", MSG_NO_MEM);
    return(KIN_MEM_NULL);
  }

  kin_mem = (KINMem) kinmem;

  if ((printfl < 0) || (printfl > 3)) {
    KINProcessError(NULL, KIN_ILL_INPUT, "KINSOL", "KINSetPrintLevel", MSG_BAD_PRINTFL);
    return(KIN_ILL_INPUT);
  }

  kin_mem->kin_printfl = printfl;

  return(KIN_SUCCESS);
}
开发者ID:A1kmm,项目名称:modml-solver,代码行数:20,代码来源:kinsol_io.c


示例20: KINSetSysFunc

int KINSetSysFunc(void *kinmem, KINSysFn func)
{
  KINMem kin_mem;

  if (kinmem == NULL) {
    KINProcessError(NULL, KIN_MEM_NULL, "KINSOL", "KINSetSysFunc", MSG_NO_MEM);
    return(KIN_MEM_NULL);
  }

  kin_mem = (KINMem) kinmem;

  if (func == NULL) {
    KINProcessError(NULL, KIN_ILL_INPUT, "KINSOL", "KINSetSysFunc", MSG_FUNC_NULL);
    return(KIN_ILL_INPUT);
  }

  kin_mem->kin_func = func;

  return(KIN_SUCCESS);
}
开发者ID:A1kmm,项目名称:modml-solver,代码行数:20,代码来源:kinsol_io.c



注:本文中的KINProcessError函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ KIcon函数代码示例发布时间:2022-05-30
下一篇:
C++ KILE_DEBUG函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap