#include <LSProblem.H>
Public Member Functions | |
~LSProblem () | |
LSProblem (const int &a_degreeP, const bool &a_useConstraints) | |
LSProblem (const int &a_orderAccuracy, const int &a_degreeP, const bool &a_useConstraints, const IndexTM< Real, dim > &a_normal) | |
int | invertNormalEq (const Vector< Real > &a_rhs, Vector< Real > &a_residual) |
int | getDegree () |
int | getOrderAccuracy () |
void | getMatrix (Real **a_matrix) |
void | getRhs (Vector< Real > &a_rhs) |
void | getUnknowns (Vector< Real > &a_unknown) |
void | monoMaxMin (Real &a_maxVal, Real &a_minVal, const IndexTM< int, dim > &a_mono, const IFData< dim > &a_IFData) |
void | computeBounds (const IndexTM< Real, dim > &a_dx, const CutCellMoments< dim > &a_ccm) |
void | print (ostream &a_out) const |
void | outputMatrix () const |
void | outputRhs () const |
void | outputUnknowns () const |
void | outputBounds () const |
const LocPthMoment & | getLocMonomialMapDegreeP () const |
const PthMomentLoc & | getMonomialLocMapDegreeP () const |
const PthMomentLoc & | getMonomialLocMapDegreePLess1 () const |
Real | getUnknown (int loc) |
int | getNumberDegP () |
int | getNumberDegPLess1 () |
int | numActiveBounds () const |
void | setRhs (const Vector< Real > &a_rhs) |
void | setMatrix () |
void | momentBounds (Real &a_lobnd, Real &a_hibnd, const IvDim &a_mono, const IFData< dim > &a_ifData) |
void | differentiate (int &a_coeff, IvDim &a_Dmono, int &a_idir, const IvDim &a_mono) |
int | nChooseR (int a_n, int a_r) |
void | fillMap (PthMomentLoc &a_monoLoc, LocPthMoment &a_locMono, const int &a_degree) |
int | numMonomials (const int &a_monoDegree) |
int | factorial (const int &a_n, const int &a_m=0) |
void | allocArray (const int &a_rows, const int &a_cols, Real **&a_A) |
void | freeArray (const int &a_rows, const int &a_cols, Real **&a_A) |
Public Attributes | |
int | m_order |
int | m_degreeP |
int | m_numActiveBounds |
bool | m_useConstraints |
IndexTM< Real, dim > | m_normal |
PthMomentLoc | m_monoLocP |
LocPthMoment | m_locMonoP |
int | m_numP |
PthMomentLoc | m_monoLocPLess1 |
LocPthMoment | m_locMonoPLess1 |
int | m_numPLess1 |
Real ** | m_matrix |
Vector< Real > | m_unknowns |
Vector< Real > | m_rhs |
Vector< Real > | m_lowerBound |
Vector< Real > | m_upperBound |
Private Types | |
typedef IndexTM< int, dim > | IvDim |
typedef map< IvDim, int > | PthMomentLoc |
typedef map< int, IvDim > | LocPthMoment |
typedef map<IvDim,int > LSProblem< dim >::PthMomentLoc [private] |
typedef map<int,IvDim> LSProblem< dim >::LocPthMoment [private] |
LSProblem< dim >::LSProblem | ( | const int & | a_degreeP, | |
const bool & | a_useConstraints | |||
) | [inline] |
References LSProblem< dim >::fillMap(), LSProblem< dim >::m_degreeP, LSProblem< dim >::m_locMonoP, LSProblem< dim >::m_locMonoPLess1, LSProblem< dim >::m_matrix, LSProblem< dim >::m_monoLocP, LSProblem< dim >::m_monoLocPLess1, LSProblem< dim >::m_numP, LSProblem< dim >::m_numPLess1, and LSProblem< dim >::numMonomials().
LSProblem< dim >::LSProblem | ( | const int & | a_orderAccuracy, | |
const int & | a_degreeP, | |||
const bool & | a_useConstraints, | |||
const IndexTM< Real, dim > & | a_normal | |||
) | [inline] |
References dim, LSProblem< dim >::fillMap(), LSProblem< dim >::m_degreeP, LSProblem< dim >::m_locMonoP, LSProblem< dim >::m_locMonoPLess1, LSProblem< dim >::m_lowerBound, LSProblem< dim >::m_monoLocP, LSProblem< dim >::m_monoLocPLess1, LSProblem< dim >::m_numP, LSProblem< dim >::m_numPLess1, LSProblem< dim >::m_rhs, LSProblem< dim >::m_unknowns, LSProblem< dim >::m_upperBound, LSProblem< dim >::numMonomials(), and LSProblem< dim >::setMatrix().
int LSProblem< dim >::invertNormalEq | ( | const Vector< Real > & | a_rhs, | |
Vector< Real > & | a_residual | |||
) | [inline] |
References Abs(), dim, MayDay::Error(), ConstrainedLS::INCONSISTENT_BOUNDS, LSquares::LeastSquares(), LSProblem< dim >::m_lowerBound, LSProblem< dim >::m_matrix, LSProblem< dim >::m_numActiveBounds, LSProblem< dim >::m_numP, LSProblem< dim >::m_numPLess1, LSProblem< dim >::m_rhs, LSProblem< dim >::m_unknowns, LSProblem< dim >::m_upperBound, LSProblem< dim >::m_useConstraints, ConstrainedLS::numberActiveConstraints(), pout(), Vector< T >::resize(), ConstrainedLS::SINGULAR, ConstrainedLS::solveBoundConstrained(), ConstrainedLS::SUCCESS, ConstrainedLS::UNCONVERGED, and ConstrainedLS::UNDERDETERMINED.
Referenced by ComputeCutCellMoments< dim >::computeMoments(), and MinimalCCCM< dim >::computeMomentsRecursively().
References LSProblem< dim >::m_degreeP.
References LSProblem< dim >::m_order.
void LSProblem< dim >::monoMaxMin | ( | Real & | a_maxVal, | |
Real & | a_minVal, | |||
const IndexTM< int, dim > & | a_mono, | |||
const IFData< dim > & | a_IFData | |||
) | [inline] |
References dim, IFData< dim >::m_cellCenterCoord, IFData< dim >::m_cornerSigns, IFData< dim >::m_localCoord, and POW().
Referenced by LSProblem< dim >::computeBounds().
void LSProblem< dim >::computeBounds | ( | const IndexTM< Real, dim > & | a_dx, | |
const CutCellMoments< dim > & | a_ccm | |||
) | [inline] |
References dim, LSProblem< dim >::m_degreeP, CutCellMoments< dim >::m_EBmoments, CutCellMoments< dim >::m_IFData, LSProblem< dim >::m_lowerBound, CutCellMoments< dim >::m_moments, LSProblem< dim >::m_monoLocPLess1, LSProblem< dim >::m_numP, LSProblem< dim >::m_upperBound, Max(), LSProblem< dim >::momentBounds(), LSProblem< dim >::monoMaxMin(), IndexTM< T, N >::sum(), and IndexTM< T, N >::Zero.
Referenced by ComputeCutCellMoments< dim >::computeMoments().
References dim, LSProblem< dim >::m_degreeP, LSProblem< dim >::m_locMonoP, LSProblem< dim >::m_locMonoPLess1, LSProblem< dim >::m_monoLocP, LSProblem< dim >::m_monoLocPLess1, LSProblem< dim >::outputBounds(), LSProblem< dim >::outputMatrix(), LSProblem< dim >::outputRhs(), and LSProblem< dim >::outputUnknowns().
Referenced by ComputeCutCellMoments< dim >::computeMoments(), MinimalCCCM< dim >::computeMomentsRecursively(), and operator<<().
References dim, LSProblem< dim >::m_locMonoP, LSProblem< dim >::m_locMonoPLess1, LSProblem< dim >::m_matrix, and pout().
Referenced by LSProblem< dim >::print().
References LSProblem< dim >::m_lowerBound, LSProblem< dim >::m_unknowns, LSProblem< dim >::m_upperBound, LSProblem< dim >::m_useConstraints, and pout().
Referenced by LSProblem< dim >::print().
const LocPthMoment& LSProblem< dim >::getLocMonomialMapDegreeP | ( | ) | const [inline] |
References LSProblem< dim >::m_locMonoP.
Referenced by MinimalCCCM< dim >::computeRhs(), and ComputeCutCellMoments< dim >::computeRhs().
const PthMomentLoc& LSProblem< dim >::getMonomialLocMapDegreeP | ( | ) | const [inline] |
const PthMomentLoc& LSProblem< dim >::getMonomialLocMapDegreePLess1 | ( | ) | const [inline] |
References LSProblem< dim >::m_unknowns.
Referenced by ComputeCutCellMoments< dim >::computeMoments(), and MinimalCCCM< dim >::computeMomentsRecursively().
References LSProblem< dim >::m_numPLess1.
References LSProblem< dim >::m_numActiveBounds.
Referenced by ComputeCutCellMoments< dim >::computeMoments().
References MayDay::Abort(), LSProblem< dim >::allocArray(), LSProblem< dim >::differentiate(), dim, LARGEINTVAL, LSProblem< dim >::m_matrix, LSProblem< dim >::m_monoLocP, LSProblem< dim >::m_monoLocPLess1, LSProblem< dim >::m_normal, LSProblem< dim >::m_numP, and LSProblem< dim >::m_numPLess1.
Referenced by LSProblem< dim >::LSProblem().
void LSProblem< dim >::momentBounds | ( | Real & | a_lobnd, | |
Real & | a_hibnd, | |||
const IvDim & | a_mono, | |||
const IFData< dim > & | a_ifData | |||
) | [inline] |
References dim, IFData< dim >::m_cellCenterCoord, IFData< dim >::m_cornerSigns, IFData< dim >::m_localCoord, and POW().
Referenced by LSProblem< dim >::computeBounds().
void LSProblem< dim >::fillMap | ( | PthMomentLoc & | a_monoLoc, | |
LocPthMoment & | a_locMono, | |||
const int & | a_degree | |||
) | [inline] |
References generateMultiIndices(), and Vector< T >::size().
Referenced by LSProblem< dim >::LSProblem().
References dim, LSProblem< dim >::factorial(), and LARGEINTVAL.
Referenced by LSProblem< dim >::LSProblem().
void LSProblem< dim >::allocArray | ( | const int & | a_rows, | |
const int & | a_cols, | |||
Real **& | a_A | |||
) | [inline] |
Referenced by LSProblem< dim >::setMatrix().
void LSProblem< dim >::freeArray | ( | const int & | a_rows, | |
const int & | a_cols, | |||
Real **& | a_A | |||
) | [inline] |
Referenced by LSProblem< dim >::~LSProblem().
Referenced by LSProblem< dim >::getOrderAccuracy().
int LSProblem< dim >::m_numActiveBounds |
Referenced by LSProblem< dim >::invertNormalEq(), and LSProblem< dim >::numActiveBounds().
bool LSProblem< dim >::m_useConstraints |
Referenced by LSProblem< dim >::invertNormalEq(), and LSProblem< dim >::outputBounds().
Referenced by LSProblem< dim >::setMatrix().
PthMomentLoc LSProblem< dim >::m_monoLocP |
LocPthMoment LSProblem< dim >::m_locMonoP |
PthMomentLoc LSProblem< dim >::m_monoLocPLess1 |
LocPthMoment LSProblem< dim >::m_locMonoPLess1 |
Referenced by LSProblem< dim >::LSProblem(), LSProblem< dim >::outputMatrix(), and LSProblem< dim >::print().
int LSProblem< dim >::m_numPLess1 |
Vector<Real> LSProblem< dim >::m_unknowns |
Referenced by LSProblem< dim >::invertNormalEq(), LSProblem< dim >::LSProblem(), and LSProblem< dim >::outputRhs().
Vector<Real> LSProblem< dim >::m_lowerBound |
Vector<Real> LSProblem< dim >::m_upperBound |