[1D] Add maxPoints and maxGridPoints functions
This commit is contained in:
parent
4e1c45c2aa
commit
6acf755670
3 changed files with 24 additions and 0 deletions
|
|
@ -133,8 +133,21 @@ public:
|
|||
*/
|
||||
void setRefineCriteria(int dom = -1, doublereal ratio = 10.0,
|
||||
doublereal slope = 0.8, doublereal curve = 0.8, doublereal prune = -0.1);
|
||||
|
||||
/**
|
||||
* Set the maximum number of grid points in the domain. If dom >= 0,
|
||||
* then the settings apply only to the specified domain. If dom < 0,
|
||||
* the settings are applied to each domain. @see Refiner::setMaxPoints.
|
||||
*/
|
||||
void setMaxGridPoints(int dom = -1, int npoints = 300);
|
||||
|
||||
/**
|
||||
* Get the maximum number of grid points in this domain. @see Refiner::maxPoints
|
||||
*
|
||||
* @param dom domain number, beginning with 0 for the leftmost domain.
|
||||
*/
|
||||
size_t maxGridPoints(size_t dom);
|
||||
|
||||
//! Set the minimum grid spacing in the specified domain(s).
|
||||
/*!
|
||||
* @param dom Domain index. If dom == -1, the specified spacing is applied
|
||||
|
|
|
|||
|
|
@ -45,6 +45,11 @@ public:
|
|||
m_npmax = npmax;
|
||||
}
|
||||
|
||||
//! Returns the maximum number of points allowed in the domain
|
||||
size_t maxPoints() const {
|
||||
return m_npmax;
|
||||
}
|
||||
|
||||
//! Set the minimum allowable spacing between adjacent grid points [m].
|
||||
void setGridMin(double gridmin) {
|
||||
m_gridmin = gridmin;
|
||||
|
|
|
|||
|
|
@ -555,6 +555,12 @@ void Sim1D::setMaxGridPoints(int dom, int npoints)
|
|||
}
|
||||
}
|
||||
|
||||
size_t Sim1D::maxGridPoints(size_t dom)
|
||||
{
|
||||
Refiner& r = domain(dom).refiner();
|
||||
return r.maxPoints();
|
||||
}
|
||||
|
||||
doublereal Sim1D::jacobian(int i, int j)
|
||||
{
|
||||
return OneDim::jacobian().value(i,j);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue