*** empty log message ***
This commit is contained in:
parent
d2c8924533
commit
0db629dcd9
5 changed files with 26 additions and 6 deletions
|
|
@ -5,6 +5,6 @@
|
|||
#ifndef CT_INTEG_H_INCL
|
||||
#define CT_INTEG_H_INCL
|
||||
|
||||
#include "kernel/CVode.h"
|
||||
#include "kernel/Integrator.h"
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ using namespace std;
|
|||
#include <cvodes.h>
|
||||
#include <cvdense.h>
|
||||
#include <cvdiag.h>
|
||||
#include <cvband.h>
|
||||
#include <cvspgmr.h>
|
||||
#include <nvector.h>
|
||||
#include <nvector_serial.h>
|
||||
|
|
@ -107,7 +108,8 @@ namespace Cantera {
|
|||
m_abstolsens(1.0e-4),
|
||||
m_nabs(0),
|
||||
m_hmax(0.0),
|
||||
m_maxsteps(20000), m_np(0)
|
||||
m_maxsteps(20000), m_np(0),
|
||||
m_mupper(0), m_mlower(0)
|
||||
{
|
||||
//m_ropt.resize(OPT_SIZE,0.0);
|
||||
//m_iopt = new long[OPT_SIZE];
|
||||
|
|
@ -282,6 +284,12 @@ namespace Cantera {
|
|||
else if (m_type == GMRES) {
|
||||
CVSpgmr(m_cvode_mem, PREC_NONE, 0);
|
||||
}
|
||||
else if (m_type == BAND + NOJAC) {
|
||||
long int N = m_neq;
|
||||
long int nu = m_mupper;
|
||||
long int nl = m_mlower;
|
||||
CVBand(m_cvode_mem, N, nu, nl);
|
||||
}
|
||||
else {
|
||||
throw CVodesErr("unsupported option");
|
||||
}
|
||||
|
|
@ -343,6 +351,12 @@ namespace Cantera {
|
|||
else if (m_type == DIAG) {
|
||||
CVDiag(m_cvode_mem);
|
||||
}
|
||||
else if (m_type == BAND + NOJAC) {
|
||||
long int N = m_neq;
|
||||
long int nu = m_mupper;
|
||||
long int nl = m_mlower;
|
||||
CVBand(m_cvode_mem, N, nu, nl);
|
||||
}
|
||||
else if (m_type == GMRES) {
|
||||
CVSpgmr(m_cvode_mem, PREC_NONE, 0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,7 +71,10 @@ namespace Cantera {
|
|||
virtual void setMaxStepSize(double hmax);
|
||||
virtual void setMinStepSize(double hmin);
|
||||
virtual void setMaxSteps(int nmax);
|
||||
|
||||
virtual void setBandwidth(int N_Upper, int N_Lower) {
|
||||
m_mupper = N_Upper;
|
||||
m_mlower = N_Lower;
|
||||
}
|
||||
virtual int nSensParams() { return m_np; }
|
||||
virtual double sensitivity(int k, int p);
|
||||
|
||||
|
|
@ -97,7 +100,7 @@ namespace Cantera {
|
|||
FuncData* m_fdata;
|
||||
N_Vector* m_yS;
|
||||
int m_np;
|
||||
|
||||
int m_mupper, m_mlower;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
#define NOJAC 4
|
||||
#define JAC 8
|
||||
#define GMRES 16
|
||||
|
||||
#define BAND 32
|
||||
|
||||
namespace Cantera {
|
||||
|
||||
|
|
@ -160,6 +160,9 @@ namespace Cantera {
|
|||
virtual void setMaxSteps(int nmax)
|
||||
{ warn("setMaxStep"); }
|
||||
|
||||
virtual void setBandwidth(int N_Upper, int N_Lower)
|
||||
{ warn("setBandwidth"); }
|
||||
|
||||
virtual int nSensParams()
|
||||
{ warn("nSensParams()"); return 0; }
|
||||
|
||||
|
|
|
|||
|
|
@ -243,7 +243,7 @@ ENABLE_TPX='y'
|
|||
#
|
||||
# See: http://www.llnl.gov/CASC/sundials
|
||||
#
|
||||
USE_SUNDIALS=${USE_SUNDIALS:='n'}
|
||||
USE_SUNDIALS=${USE_SUNDIALS:='y'}
|
||||
SUNDIALS_HOME=${SUNDIALS_HOME:=/usr/local/sundials}
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue