Page MenuHomec4science

Iterate.h
No OneTemporary

File Metadata

Created
Tue, May 21, 14:21

Iterate.h

/**
Support function for iterations.
\file Iterate.h
\copyright Copyright 2017. Tom de Geus. All rights reserved.
\license This project is released under the GNU Public License (GPLv3).
*/
#ifndef GOOSEFEM_ITERATE_H
#define GOOSEFEM_ITERATE_H
#include "config.h"
namespace GooseFEM {
namespace Iterate {
class StopList {
public:
// constructors
StopList(size_t n = 1);
// reset all residuals to infinity (and change the number of residuals to check)
void reset();
void reset(size_t n);
// update list of residuals, return true if all residuals are below the tolerance
bool stop(double res, double tol);
private:
// list with residuals
std::vector<double> m_res;
};
} // namespace Iterate
} // namespace GooseFEM
#include "Iterate.hpp"
#endif

Event Timeline