11 #ifndef OOPS_ASSIMILATION_UPTRISOLVE_H_ 12 #define OOPS_ASSIMILATION_UPTRISOLVE_H_ 22 void UpTriSolve(
const std::vector <std::vector<double> > & H,
23 const std::vector <double> & rhs, std::vector <double> & sol,
26 for (
int iiter = dim - 1; iiter >= 0; iiter--) {
27 sol[iiter] = rhs[iiter];
28 for (
int jiter = iiter + 1; jiter < dim; jiter++) {
29 sol[iiter] -= H[jiter][iiter] * sol[jiter];
31 sol[iiter] *= 1/H[iiter][iiter];
36 #endif // OOPS_ASSIMILATION_UPTRISOLVE_H_ The namespace for the main oops code.
void UpTriSolve(const std::vector< std::vector< double > > &H, const std::vector< double > &rhs, std::vector< double > &sol, const int &dim)