Cantera 2.6.0
Public Member Functions | Protected Attributes | List of all members
Domain1D Class Reference

Base class for one-dimensional domains. More...

#include <Domain1D.h>

Inheritance diagram for Domain1D:
[legend]
Collaboration diagram for Domain1D:
[legend]

Public Member Functions

 Domain1D (size_t nv=1, size_t points=1, double time=0.0)
 Constructor. More...
 
 Domain1D (const Domain1D &)=delete
 
Domain1Doperator= (const Domain1D &)=delete
 
int domainType ()
 Domain type flag. More...
 
size_t domainIndex ()
 The left-to-right location of this domain. More...
 
bool isConnector ()
 True if the domain is a connector domain. More...
 
const OneDimcontainer () const
 The container holding this domain. More...
 
void setContainer (OneDim *c, size_t index)
 Specify the container object for this domain, and the position of this domain in the list. More...
 
void setBandwidth (int bw=-1)
 Set the Jacobian bandwidth. See the discussion of method bandwidth(). More...
 
size_t bandwidth ()
 Set the Jacobian bandwidth for this domain. More...
 
virtual void init ()
 
virtual void setInitialState (doublereal *xlocal=0)
 
virtual void setState (size_t point, const doublereal *state, doublereal *x)
 
virtual void resetBadValues (double *xg)
 
virtual void resize (size_t nv, size_t np)
 
Refinerrefiner ()
 Return a reference to the grid refiner. More...
 
size_t nComponents () const
 Number of components at each grid point. More...
 
void checkComponentIndex (size_t n) const
 Check that the specified component index is in range. More...
 
void checkComponentArraySize (size_t nn) const
 Check that an array size is at least nComponents(). More...
 
size_t nPoints () const
 Number of grid points in this domain. More...
 
void checkPointIndex (size_t n) const
 Check that the specified point index is in range. More...
 
void checkPointArraySize (size_t nn) const
 Check that an array size is at least nPoints(). More...
 
virtual std::string componentName (size_t n) const
 Name of the nth component. May be overloaded. More...
 
void setComponentName (size_t n, const std::string &name)
 
virtual size_t componentIndex (const std::string &name) const
 index of component with name name. More...
 
void setBounds (size_t n, doublereal lower, doublereal upper)
 
void setTransientTolerances (doublereal rtol, doublereal atol, size_t n=npos)
 Set tolerances for time-stepping mode. More...
 
void setSteadyTolerances (doublereal rtol, doublereal atol, size_t n=npos)
 Set tolerances for steady-state mode. More...
 
doublereal rtol (size_t n)
 Relative tolerance of the nth component. More...
 
doublereal atol (size_t n)
 Absolute tolerance of the nth component. More...
 
double steady_rtol (size_t n)
 Steady relative tolerance of the nth component. More...
 
double steady_atol (size_t n)
 Steady absolute tolerance of the nth component. More...
 
double transient_rtol (size_t n)
 Transient relative tolerance of the nth component. More...
 
double transient_atol (size_t n)
 Transient absolute tolerance of the nth component. More...
 
doublereal upperBound (size_t n) const
 Upper bound on the nth component. More...
 
doublereal lowerBound (size_t n) const
 Lower bound on the nth component. More...
 
void initTimeInteg (doublereal dt, const doublereal *x0)
 Prepare to do time stepping with time step dt. More...
 
void setSteadyMode ()
 Prepare to solve the steady-state problem. More...
 
bool steady ()
 True if in steady-state mode. More...
 
bool transient ()
 True if not in steady-state mode. More...
 
void needJacUpdate ()
 
virtual void eval (size_t j, doublereal *x, doublereal *r, integer *mask, doublereal rdt=0.0)
 Evaluate the residual function at point j. More...
 
size_t index (size_t n, size_t j) const
 
doublereal value (const doublereal *x, size_t n, size_t j) const
 
virtual void setJac (MultiJac *jac)
 
virtual XML_Nodesave (XML_Node &o, const doublereal *const sol)
 Save the current solution for this domain into an XML_Node. More...
 
virtual void restore (const XML_Node &dom, doublereal *soln, int loglevel)
 Restore the solution for this domain from an XML_Node. More...
 
virtual AnyMap serialize (const double *soln) const
 Save the state of this domain as an AnyMap. More...
 
virtual void restore (const AnyMap &state, double *soln, int loglevel)
 Restore the solution for this domain from an AnyMap. More...
 
size_t size () const
 
void locate ()
 Find the index of the first grid point in this domain, and the start of its variables in the global solution vector. More...
 
virtual size_t loc (size_t j=0) const
 Location of the start of the local solution vector in the global solution vector,. More...
 
size_t firstPoint () const
 The index of the first (that is, left-most) grid point belonging to this domain. More...
 
size_t lastPoint () const
 The index of the last (that is, right-most) grid point belonging to this domain. More...
 
void linkLeft (Domain1D *left)
 Set the left neighbor to domain 'left. More...
 
void linkRight (Domain1D *right)
 Set the right neighbor to domain 'right.'. More...
 
void append (Domain1D *right)
 Append domain 'right' to this one, and update all links. More...
 
Domain1Dleft () const
 Return a pointer to the left neighbor. More...
 
Domain1Dright () const
 Return a pointer to the right neighbor. More...
 
double prevSoln (size_t n, size_t j) const
 Value of component n at point j in the previous solution. More...
 
void setID (const std::string &s)
 Specify an identifying tag for this domain. More...
 
std::string id () const
 
virtual void showSolution_s (std::ostream &s, const doublereal *x)
 
virtual void showSolution (const doublereal *x)
 Print the solution. More...
 
doublereal z (size_t jlocal) const
 
doublereal zmin () const
 
doublereal zmax () const
 
void setProfile (const std::string &name, double *values, double *soln)
 
vector_fpgrid ()
 
const vector_fpgrid () const
 
doublereal grid (size_t point) const
 
virtual void setupGrid (size_t n, const doublereal *z)
 called to set up initial grid, and after grid refinement More...
 
virtual void _getInitialSoln (doublereal *x)
 Writes some or all initial solution values into the global solution array, beginning at the location pointed to by x. More...
 
virtual doublereal initialValue (size_t n, size_t j)
 Initial value of solution component n at grid point j. More...
 
virtual void _finalize (const doublereal *x)
 In some cases, a domain may need to set parameters that depend on the initial solution estimate. More...
 
void forceFullUpdate (bool update)
 In some cases, for computational efficiency some properties (such as transport coefficients) may not be updated during Jacobian evaluations. More...
 

Protected Attributes

doublereal m_rdt
 
size_t m_nv
 
size_t m_points
 
vector_fp m_slast
 
vector_fp m_max
 
vector_fp m_min
 
vector_fp m_rtol_ss
 
vector_fp m_rtol_ts
 
vector_fp m_atol_ss
 
vector_fp m_atol_ts
 
vector_fp m_z
 
OneDimm_container
 
size_t m_index
 
int m_type
 
size_t m_iloc
 Starting location within the solution vector for unknowns that correspond to this domain. More...
 
size_t m_jstart
 
Domain1Dm_left
 
Domain1Dm_right
 
std::string m_id
 Identity tag for the domain. More...
 
std::unique_ptr< Refinerm_refiner
 
std::vector< std::string > m_name
 
int m_bw
 
bool m_force_full_update
 

Detailed Description

Base class for one-dimensional domains.

Definition at line 37 of file Domain1D.h.

Constructor & Destructor Documentation

◆ Domain1D()

Domain1D ( size_t  nv = 1,
size_t  points = 1,
double  time = 0.0 
)

Constructor.

Parameters
nvNumber of variables at each grid point.
pointsNumber of grid points.
time(unused)

Definition at line 21 of file Domain1D.cpp.

◆ ~Domain1D()

~Domain1D ( )
virtual

Definition at line 37 of file Domain1D.cpp.

Member Function Documentation

◆ domainType()

int domainType ( )
inline

◆ domainIndex()

size_t domainIndex ( )
inline

The left-to-right location of this domain.

Definition at line 58 of file Domain1D.h.

◆ isConnector()

bool isConnector ( )
inline

True if the domain is a connector domain.

Definition at line 63 of file Domain1D.h.

◆ container()

const OneDim & container ( ) const
inline

The container holding this domain.

Definition at line 68 of file Domain1D.h.

◆ setContainer()

void setContainer ( OneDim c,
size_t  index 
)
inline

Specify the container object for this domain, and the position of this domain in the list.

Definition at line 74 of file Domain1D.h.

Referenced by OneDim::addDomain().

◆ setBandwidth()

void setBandwidth ( int  bw = -1)
inline

Set the Jacobian bandwidth. See the discussion of method bandwidth().

Definition at line 80 of file Domain1D.h.

◆ bandwidth()

size_t bandwidth ( )
inline

Set the Jacobian bandwidth for this domain.

When class OneDim computes the bandwidth of the overall multi-domain problem (in OneDim::resize()), it calls this method for the bandwidth of each domain. If setBandwidth has not been called, then a negative bandwidth is returned, in which case OneDim assumes that this domain is dense – that is, at each point, all components depend on the value of all other components at that point. In this case, the bandwidth is bw = 2*nComponents() - 1. However, if this domain contains some components that are uncoupled from other components at the same point, then this default bandwidth may greatly overestimate the true bandwidth, with a substantial penalty in performance. For such domains, use method setBandwidth to specify the bandwidth before passing this domain to the Sim1D or OneDim constructor.

Definition at line 99 of file Domain1D.h.

Referenced by OneDim::resize().

◆ init()

virtual void init ( )
inlinevirtual

Initialize. This method is called by OneDim::init() for each domain once at the beginning of a simulation. Base class method does nothing, but may be overloaded.

Reimplemented in Boundary1D, Inlet1D, Empty1D, Symm1D, Outlet1D, OutletRes1D, Surf1D, and ReactingSurf1D.

Definition at line 108 of file Domain1D.h.

Referenced by OneDim::init().

◆ setInitialState()

virtual void setInitialState ( doublereal *  xlocal = 0)
inlinevirtual

Definition at line 110 of file Domain1D.h.

◆ setState()

virtual void setState ( size_t  point,
const doublereal *  state,
doublereal *  x 
)
inlinevirtual

Definition at line 111 of file Domain1D.h.

◆ resetBadValues()

virtual void resetBadValues ( double *  xg)
inlinevirtual

When called, this function should reset "bad" values in the state vector such as negative species concentrations. This function may be called after a failed solution attempt.

Reimplemented in ReactingSurf1D, and StFlow.

Definition at line 118 of file Domain1D.h.

◆ resize()

void resize ( size_t  nv,
size_t  np 
)
virtual

Resize the domain to have nv components and np grid points. This method is virtual so that subclasses can perform other actions required to resize the domain.

Reimplemented in IonFlow, and StFlow.

Definition at line 41 of file Domain1D.cpp.

References Domain1D::locate().

Referenced by StFlow::resize(), Sim1D::restore(), Outlet1D::restore(), OutletRes1D::restore(), Surf1D::restore(), ReactingSurf1D::restore(), Domain1D::setupGrid(), and StFlow::StFlow().

◆ refiner()

Refiner & refiner ( )
inline

◆ nComponents()

size_t nComponents ( ) const
inline

◆ checkComponentIndex()

void checkComponentIndex ( size_t  n) const
inline

Check that the specified component index is in range.

Throws an exception if n is greater than nComponents()-1

Definition at line 139 of file Domain1D.h.

◆ checkComponentArraySize()

void checkComponentArraySize ( size_t  nn) const
inline

Check that an array size is at least nComponents().

Throws an exception if nn is less than nComponents(). Used before calls which take an array pointer.

Definition at line 148 of file Domain1D.h.

◆ nPoints()

size_t nPoints ( ) const
inline

◆ checkPointIndex()

void checkPointIndex ( size_t  n) const
inline

Check that the specified point index is in range.

Throws an exception if n is greater than nPoints()-1

Definition at line 161 of file Domain1D.h.

◆ checkPointArraySize()

void checkPointArraySize ( size_t  nn) const
inline

Check that an array size is at least nPoints().

Throws an exception if nn is less than nPoints(). Used before calls which take an array pointer.

Definition at line 170 of file Domain1D.h.

◆ componentName()

std::string componentName ( size_t  n) const
virtual

Name of the nth component. May be overloaded.

Reimplemented in ReactingSurf1D, and StFlow.

Definition at line 64 of file Domain1D.cpp.

Referenced by OneDim::component(), Domain1D::componentIndex(), Domain1D::restore(), Domain1D::serialize(), Sim1D::setInitialGuess(), Domain1D::showSolution(), and MultiNewton::step().

◆ setComponentName()

void setComponentName ( size_t  n,
const std::string &  name 
)
inline

Definition at line 179 of file Domain1D.h.

◆ componentIndex()

size_t componentIndex ( const std::string &  name) const
virtual

index of component with name name.

Reimplemented in StFlow.

Definition at line 73 of file Domain1D.cpp.

References Domain1D::componentName(), and Domain1D::nComponents().

◆ setBounds()

void setBounds ( size_t  n,
doublereal  lower,
doublereal  upper 
)
inline

Definition at line 186 of file Domain1D.h.

◆ setTransientTolerances()

void setTransientTolerances ( doublereal  rtol,
doublereal  atol,
size_t  n = npos 
)

Set tolerances for time-stepping mode.

Parameters
rtolRelative tolerance
atolAbsolute tolerance
ncomponent index these tolerances apply to. If set to -1 (the default), these tolerances will be applied to all solution components.

Definition at line 84 of file Domain1D.cpp.

References Domain1D::atol(), Cantera::npos, and Domain1D::rtol().

◆ setSteadyTolerances()

void setSteadyTolerances ( doublereal  rtol,
doublereal  atol,
size_t  n = npos 
)

Set tolerances for steady-state mode.

Parameters
rtolRelative tolerance
atolAbsolute tolerance
ncomponent index these tolerances apply to. If set to -1 (the default), these tolerances will be applied to all solution components.

Definition at line 97 of file Domain1D.cpp.

References Domain1D::atol(), Cantera::npos, and Domain1D::rtol().

◆ rtol()

doublereal rtol ( size_t  n)
inline

Relative tolerance of the nth component.

Definition at line 212 of file Domain1D.h.

Referenced by Domain1D::setSteadyTolerances(), and Domain1D::setTransientTolerances().

◆ atol()

doublereal atol ( size_t  n)
inline

Absolute tolerance of the nth component.

Definition at line 217 of file Domain1D.h.

Referenced by Domain1D::setSteadyTolerances(), and Domain1D::setTransientTolerances().

◆ steady_rtol()

double steady_rtol ( size_t  n)
inline

Steady relative tolerance of the nth component.

Definition at line 222 of file Domain1D.h.

◆ steady_atol()

double steady_atol ( size_t  n)
inline

Steady absolute tolerance of the nth component.

Definition at line 227 of file Domain1D.h.

◆ transient_rtol()

double transient_rtol ( size_t  n)
inline

Transient relative tolerance of the nth component.

Definition at line 232 of file Domain1D.h.

◆ transient_atol()

double transient_atol ( size_t  n)
inline

Transient absolute tolerance of the nth component.

Definition at line 237 of file Domain1D.h.

◆ upperBound()

doublereal upperBound ( size_t  n) const
inline

Upper bound on the nth component.

Definition at line 242 of file Domain1D.h.

◆ lowerBound()

doublereal lowerBound ( size_t  n) const
inline

Lower bound on the nth component.

Definition at line 247 of file Domain1D.h.

◆ initTimeInteg()

void initTimeInteg ( doublereal  dt,
const doublereal *  x0 
)
inline

Prepare to do time stepping with time step dt.

Copy the internally-stored solution at the last time step to array x0.

Definition at line 255 of file Domain1D.h.

References Domain1D::loc().

Referenced by OneDim::initTimeInteg().

◆ setSteadyMode()

void setSteadyMode ( )
inline

Prepare to solve the steady-state problem.

Set the internally-stored reciprocal of the time step to 0.0

Definition at line 264 of file Domain1D.h.

Referenced by OneDim::setSteadyMode().

◆ steady()

bool steady ( )
inline

True if in steady-state mode.

Definition at line 269 of file Domain1D.h.

◆ transient()

bool transient ( )
inline

True if not in steady-state mode.

Definition at line 274 of file Domain1D.h.

◆ needJacUpdate()

void needJacUpdate ( )

Set this if something has changed in the governing equations (for example, the value of a constant has been changed, so that the last-computed Jacobian is no longer valid.

Definition at line 110 of file Domain1D.cpp.

References OneDim::jacobian(), OneDim::saveStats(), and MultiJac::setAge().

Referenced by OutletRes1D::setMoleFractions(), and Inlet1D::setSpreadRate().

◆ eval()

virtual void eval ( size_t  j,
doublereal *  x,
doublereal *  r,
integer *  mask,
doublereal  rdt = 0.0 
)
inlinevirtual

Evaluate the residual function at point j.

If j == npos, evaluate the residual function at all points.

This function must be implemented in classes derived from Domain1D.

Parameters
jGrid point at which to update the residual
[in]xState vector
[out]rresidual vector
[out]maskBoolean mask indicating whether each solution component has a time derivative (1) or not (0).
[in]rdtReciprocal of the timestep (rdt=0 implies steady- state.)

Reimplemented in StFlow, Inlet1D, Empty1D, Symm1D, Outlet1D, OutletRes1D, Surf1D, and ReactingSurf1D.

Definition at line 298 of file Domain1D.h.

◆ index()

size_t index ( size_t  n,
size_t  j 
) const
inline

Definition at line 303 of file Domain1D.h.

◆ value()

doublereal value ( const doublereal *  x,
size_t  n,
size_t  j 
) const
inline

Definition at line 306 of file Domain1D.h.

◆ setJac()

virtual void setJac ( MultiJac jac)
inlinevirtual

Definition at line 310 of file Domain1D.h.

◆ save()

XML_Node & save ( XML_Node o,
const doublereal *const  sol 
)
virtual

Save the current solution for this domain into an XML_Node.

Base class version of the general domain1D save function. Derived classes should call the base class method in addition to saving their own data.

Parameters
oXML_Node to save the solution to.
solCurrent value of the solution vector. The object will pick out which part of the solution vector pertains to this object.
Returns
XML_Node created to represent this domain
Deprecated:
The XML output format is deprecated and will be removed in Cantera 3.0.

Reimplemented in Inlet1D, Empty1D, Symm1D, Outlet1D, OutletRes1D, Surf1D, ReactingSurf1D, and StFlow.

Definition at line 118 of file Domain1D.cpp.

References XML_Node::addAttribute(), Cantera::addFloatArray(), Domain1D::nComponents(), and Domain1D::nPoints().

Referenced by Outlet1D::save(), OutletRes1D::save(), Surf1D::save(), ReactingSurf1D::save(), and StFlow::save().

◆ restore() [1/2]

void restore ( const XML_Node dom,
doublereal *  soln,
int  loglevel 
)
virtual

Restore the solution for this domain from an XML_Node.

Base class version of the general Domain1D restore function. Derived classes should call the base class method in addition to restoring their own data.

Parameters
domXML_Node for this domain
solnCurrent value of the solution vector, local to this object.
loglevel0 to suppress all output; 1 to show warnings; 2 for verbose output
Deprecated:
The XML input format is deprecated and will be removed in Cantera 3.0.

Reimplemented in Inlet1D, Empty1D, Symm1D, Outlet1D, OutletRes1D, Surf1D, ReactingSurf1D, and StFlow.

Definition at line 131 of file Domain1D.cpp.

References XML_Node::getChildren(), Cantera::getFloatArray(), Domain1D::nComponents(), and Cantera::warn_user().

Referenced by Sim1D::restore(), Outlet1D::restore(), OutletRes1D::restore(), Surf1D::restore(), ReactingSurf1D::restore(), and StFlow::restore().

◆ serialize()

AnyMap serialize ( const double *  soln) const
virtual

Save the state of this domain as an AnyMap.

Parameters
solnlocal solution vector for this domain

Reimplemented in Inlet1D, Empty1D, Symm1D, Outlet1D, OutletRes1D, Surf1D, ReactingSurf1D, and StFlow.

Definition at line 172 of file Domain1D.cpp.

References Domain1D::componentName(), Domain1D::nComponents(), and Domain1D::nPoints().

Referenced by Outlet1D::serialize(), OutletRes1D::serialize(), Surf1D::serialize(), ReactingSurf1D::serialize(), and StFlow::serialize().

◆ restore() [2/2]

void restore ( const AnyMap state,
double *  soln,
int  loglevel 
)
virtual

Restore the solution for this domain from an AnyMap.

Parameters
[in]stateAnyMap defining the state of this domain
[out]solnValue of the solution vector, local to this domain
[in]loglevel0 to suppress all output; 1 to show warnings; 2 for verbose output

Reimplemented in Inlet1D, OutletRes1D, Surf1D, ReactingSurf1D, and StFlow.

Definition at line 199 of file Domain1D.cpp.

References Domain1D::componentName(), AnyValue::hasKey(), AnyMap::hasKey(), Domain1D::nComponents(), and Cantera::warn_user().

◆ size()

size_t size ( ) const
inline

Definition at line 359 of file Domain1D.h.

◆ locate()

void locate ( )

Find the index of the first grid point in this domain, and the start of its variables in the global solution vector.

Definition at line 231 of file Domain1D.cpp.

References Domain1D::lastPoint(), Domain1D::loc(), Domain1D::locate(), and Domain1D::m_iloc.

Referenced by Domain1D::linkLeft(), Domain1D::locate(), and Domain1D::resize().

◆ loc()

virtual size_t loc ( size_t  j = 0) const
inlinevirtual

◆ firstPoint()

size_t firstPoint ( ) const
inline

The index of the first (that is, left-most) grid point belonging to this domain.

Definition at line 381 of file Domain1D.h.

Referenced by StFlow::eval(), Outlet1D::eval(), OutletRes1D::eval(), Surf1D::eval(), and ReactingSurf1D::eval().

◆ lastPoint()

size_t lastPoint ( ) const
inline

The index of the last (that is, right-most) grid point belonging to this domain.

Definition at line 389 of file Domain1D.h.

Referenced by StFlow::eval(), Outlet1D::eval(), OutletRes1D::eval(), Surf1D::eval(), ReactingSurf1D::eval(), and Domain1D::locate().

◆ linkLeft()

void linkLeft ( Domain1D left)
inline

Set the left neighbor to domain 'left.

' Method 'locate' is called to update the global positions of this domain and all those to its right.

Definition at line 397 of file Domain1D.h.

References Domain1D::left(), and Domain1D::locate().

Referenced by Domain1D::append().

◆ linkRight()

void linkRight ( Domain1D right)
inline

Set the right neighbor to domain 'right.'.

Definition at line 403 of file Domain1D.h.

References Domain1D::right().

Referenced by Domain1D::append().

◆ append()

void append ( Domain1D right)
inline

Append domain 'right' to this one, and update all links.

Definition at line 408 of file Domain1D.h.

References Domain1D::linkLeft(), Domain1D::linkRight(), and Domain1D::right().

◆ left()

Domain1D * left ( ) const
inline

Return a pointer to the left neighbor.

Definition at line 414 of file Domain1D.h.

Referenced by Domain1D::linkLeft(), and OneDim::pointDomain().

◆ right()

Domain1D * right ( ) const
inline

Return a pointer to the right neighbor.

Definition at line 419 of file Domain1D.h.

Referenced by Domain1D::append(), OneDim::init(), OneDim::initTimeInteg(), Domain1D::linkRight(), and OneDim::setSteadyMode().

◆ prevSoln()

double prevSoln ( size_t  n,
size_t  j 
) const
inline

Value of component n at point j in the previous solution.

Definition at line 424 of file Domain1D.h.

Referenced by ReactingSurf1D::eval().

◆ setID()

void setID ( const std::string &  s)
inline

Specify an identifying tag for this domain.

Definition at line 429 of file Domain1D.h.

References Domain1D::m_id.

◆ id()

std::string id ( ) const
inline

Definition at line 433 of file Domain1D.h.

◆ showSolution_s()

virtual void showSolution_s ( std::ostream &  s,
const doublereal *  x 
)
inlinevirtual

Definition at line 441 of file Domain1D.h.

◆ showSolution()

void showSolution ( const doublereal *  x)
virtual

Print the solution.

Reimplemented in Inlet1D, Empty1D, OutletRes1D, Surf1D, ReactingSurf1D, and StFlow.

Definition at line 261 of file Domain1D.cpp.

References Domain1D::componentName(), and Cantera::writelog().

Referenced by StFlow::showSolution().

◆ z()

doublereal z ( size_t  jlocal) const
inline

Definition at line 446 of file Domain1D.h.

◆ zmin()

doublereal zmin ( ) const
inline

Definition at line 449 of file Domain1D.h.

◆ zmax()

doublereal zmax ( ) const
inline

Definition at line 452 of file Domain1D.h.

◆ setProfile()

void setProfile ( const std::string &  name,
double *  values,
double *  soln 
)

Definition at line 297 of file Domain1D.cpp.

◆ grid() [1/3]

vector_fp & grid ( )
inline

Definition at line 458 of file Domain1D.h.

◆ grid() [2/3]

const vector_fp & grid ( ) const
inline

Definition at line 461 of file Domain1D.h.

◆ grid() [3/3]

doublereal grid ( size_t  point) const
inline

Definition at line 464 of file Domain1D.h.

◆ setupGrid()

void setupGrid ( size_t  n,
const doublereal *  z 
)
virtual

called to set up initial grid, and after grid refinement

Reimplemented in Boundary1D, and StFlow.

Definition at line 251 of file Domain1D.cpp.

References Domain1D::resize().

Referenced by Sim1D::refine(), and Sim1D::restoreSteadySolution().

◆ _getInitialSoln()

void _getInitialSoln ( doublereal *  x)
virtual

Writes some or all initial solution values into the global solution array, beginning at the location pointed to by x.

This method is called by the Sim1D constructor, and allows default values or ones that have been set locally prior to installing this domain into the container to be written to the global solution vector.

Reimplemented in ReactingSurf1D, and StFlow.

Definition at line 310 of file Domain1D.cpp.

References Domain1D::initialValue().

Referenced by Sim1D::Sim1D().

◆ initialValue()

doublereal initialValue ( size_t  n,
size_t  j 
)
virtual

Initial value of solution component n at grid point j.

Definition at line 319 of file Domain1D.cpp.

Referenced by Domain1D::_getInitialSoln().

◆ _finalize()

virtual void _finalize ( const doublereal *  x)
inlinevirtual

In some cases, a domain may need to set parameters that depend on the initial solution estimate.

In such cases, the parameters may be set in method _finalize. This method is called just before the Newton solver is called, and the x array is guaranteed to be the local solution vector for this domain that will be used as the initial guess. If no such parameters need to be set, then method _finalize does not need to be overloaded.

Reimplemented in ReactingSurf1D, IonFlow, and StFlow.

Definition at line 491 of file Domain1D.h.

Referenced by Sim1D::finalize().

◆ forceFullUpdate()

void forceFullUpdate ( bool  update)
inline

In some cases, for computational efficiency some properties (such as transport coefficients) may not be updated during Jacobian evaluations.

Set this to true to force these properties to be udpated even while calculating Jacobian elements.

Definition at line 499 of file Domain1D.h.

Member Data Documentation

◆ m_rdt

doublereal m_rdt
protected

Definition at line 504 of file Domain1D.h.

◆ m_nv

size_t m_nv
protected

Definition at line 505 of file Domain1D.h.

◆ m_points

size_t m_points
protected

Definition at line 506 of file Domain1D.h.

◆ m_slast

vector_fp m_slast
protected

Definition at line 507 of file Domain1D.h.

◆ m_max

vector_fp m_max
protected

Definition at line 508 of file Domain1D.h.

◆ m_min

vector_fp m_min
protected

Definition at line 509 of file Domain1D.h.

◆ m_rtol_ss

vector_fp m_rtol_ss
protected

Definition at line 510 of file Domain1D.h.

◆ m_rtol_ts

vector_fp m_rtol_ts
protected

Definition at line 510 of file Domain1D.h.

◆ m_atol_ss

vector_fp m_atol_ss
protected

Definition at line 511 of file Domain1D.h.

◆ m_atol_ts

vector_fp m_atol_ts
protected

Definition at line 511 of file Domain1D.h.

◆ m_z

vector_fp m_z
protected

Definition at line 512 of file Domain1D.h.

◆ m_container

OneDim* m_container
protected

Definition at line 513 of file Domain1D.h.

◆ m_index

size_t m_index
protected

Definition at line 514 of file Domain1D.h.

◆ m_type

int m_type
protected

Definition at line 515 of file Domain1D.h.

◆ m_iloc

size_t m_iloc
protected

Starting location within the solution vector for unknowns that correspond to this domain.

Remember there may be multiple domains associated with this problem

Definition at line 522 of file Domain1D.h.

Referenced by Domain1D::loc(), and Domain1D::locate().

◆ m_jstart

size_t m_jstart
protected

Definition at line 524 of file Domain1D.h.

◆ m_left

Domain1D* m_left
protected

Definition at line 526 of file Domain1D.h.

◆ m_right

Domain1D * m_right
protected

Definition at line 526 of file Domain1D.h.

◆ m_id

std::string m_id
protected

Identity tag for the domain.

Definition at line 529 of file Domain1D.h.

Referenced by Domain1D::setID().

◆ m_refiner

std::unique_ptr<Refiner> m_refiner
protected

Definition at line 530 of file Domain1D.h.

◆ m_name

std::vector<std::string> m_name
protected

Definition at line 531 of file Domain1D.h.

◆ m_bw

int m_bw
protected

Definition at line 532 of file Domain1D.h.

◆ m_force_full_update

bool m_force_full_update
protected

Definition at line 533 of file Domain1D.h.


The documentation for this class was generated from the following files: