Chombo + EB + MF
3.2
|
#include <ComputeCutCellMoments.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 |
|
private |
|
private |
LSProblem< dim >::LSProblem | ( | const int & | a_degreeP, |
const bool & | a_useConstraints | ||
) |
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 | ||
) |
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(), Vector< T >::resize(), and LSProblem< dim >::setMatrix().
int LSProblem< dim >::invertNormalEq | ( | const Vector< Real > & | a_rhs, |
Vector< Real > & | a_residual | ||
) |
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 >::computeBounds(), LSProblem< dim >::getMatrix(), LSProblem< dim >::getRhs(), LSProblem< dim >::getUnknowns(), LSProblem< dim >::m_order, LSProblem< dim >::monoMaxMin(), LSProblem< dim >::outputBounds(), LSProblem< dim >::outputMatrix(), LSProblem< dim >::outputRhs(), LSProblem< dim >::outputUnknowns(), and LSProblem< dim >::print().
Referenced by LSProblem< dim >::getOrderAccuracy().
Referenced by LSProblem< dim >::getOrderAccuracy().
Referenced by LSProblem< dim >::getOrderAccuracy().
void LSProblem< dim >::monoMaxMin | ( | Real & | a_maxVal, |
Real & | a_minVal, | ||
const IndexTM< int, dim > & | a_mono, | ||
const IFData< dim > & | a_IFData | ||
) |
References dim, IFData< dim >::m_cellCenterCoord, IFData< dim >::m_cornerSigns, IFData< dim >::m_localCoord, and POW().
Referenced by LSProblem< dim >::getOrderAccuracy().
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(), LSProblem< dim >::getOrderAccuracy(), and operator<<().
References dim, LSProblem< dim >::m_locMonoP, LSProblem< dim >::m_locMonoPLess1, LSProblem< dim >::m_matrix, and pout().
Referenced by LSProblem< dim >::getOrderAccuracy(), and LSProblem< dim >::print().
References LSProblem< dim >::m_rhs, pout(), and Vector< T >::size().
Referenced by LSProblem< dim >::getOrderAccuracy(), and LSProblem< dim >::print().
References LSProblem< dim >::m_unknowns, pout(), and Vector< T >::size().
Referenced by LSProblem< dim >::getOrderAccuracy(), and LSProblem< dim >::print().
|
inline |
References LSProblem< dim >::m_locMonoP.
Referenced by MinimalCCCM< dim >::computeRhs(), and ComputeCutCellMoments< dim >::computeRhs().
|
inline |
|
inline |
References LSProblem< dim >::m_unknowns.
Referenced by ComputeCutCellMoments< dim >::computeMoments(), and MinimalCCCM< dim >::computeMomentsRecursively().
References LSProblem< dim >::m_numPLess1.
References LSProblem< dim >::allocArray(), LSProblem< dim >::differentiate(), LSProblem< dim >::factorial(), LSProblem< dim >::fillMap(), LSProblem< dim >::freeArray(), LSProblem< dim >::m_numActiveBounds, LSProblem< dim >::momentBounds(), LSProblem< dim >::nChooseR(), LSProblem< dim >::numMonomials(), LSProblem< dim >::setMatrix(), and LSProblem< dim >::setRhs().
Referenced by ComputeCutCellMoments< dim >::computeMoments().
Referenced by LSProblem< dim >::numActiveBounds().
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(), and LSProblem< dim >::numActiveBounds().
void LSProblem< dim >::momentBounds | ( | Real & | a_lobnd, |
Real & | a_hibnd, | ||
const IvDim & | a_mono, | ||
const IFData< dim > & | a_ifData | ||
) |
References dim, IFData< dim >::m_cellCenterCoord, IFData< dim >::m_cornerSigns, IFData< dim >::m_localCoord, and POW().
Referenced by LSProblem< dim >::numActiveBounds().
void LSProblem< dim >::differentiate | ( | int & | a_coeff, |
IvDim & | a_Dmono, | ||
int & | a_idir, | ||
const IvDim & | a_mono | ||
) |
References MayDay::Abort(), dim, and LARGEINTVAL.
Referenced by LSProblem< dim >::numActiveBounds(), and LSProblem< dim >::setMatrix().
Referenced by LSProblem< dim >::numActiveBounds().
void LSProblem< dim >::fillMap | ( | PthMomentLoc & | a_monoLoc, |
LocPthMoment & | a_locMono, | ||
const int & | a_degree | ||
) |
References generateMultiIndices(), and Vector< T >::size().
Referenced by LSProblem< dim >::LSProblem(), and LSProblem< dim >::numActiveBounds().
References dim, LSProblem< dim >::factorial(), and LARGEINTVAL.
Referenced by LSProblem< dim >::LSProblem(), and LSProblem< dim >::numActiveBounds().
References MayDay::Abort().
Referenced by LSProblem< dim >::numActiveBounds(), and LSProblem< dim >::numMonomials().
void LSProblem< dim >::allocArray | ( | const int & | a_rows, |
const int & | a_cols, | ||
Real **& | a_A | ||
) |
Referenced by LSProblem< dim >::numActiveBounds(), and LSProblem< dim >::setMatrix().
void LSProblem< dim >::freeArray | ( | const int & | a_rows, |
const int & | a_cols, | ||
Real **& | a_A | ||
) |
Referenced by LSProblem< dim >::numActiveBounds().
Referenced by LSProblem< dim >::getOrderAccuracy().
Referenced by LSProblem< dim >::getDegree(), LSProblem< dim >::LSProblem(), and LSProblem< dim >::print().
Referenced by LSProblem< dim >::invertNormalEq(), and LSProblem< dim >::numActiveBounds().
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().
Referenced by LSProblem< dim >::invertNormalEq(), LSProblem< dim >::LSProblem(), and LSProblem< dim >::outputRhs().