DOLFIN
DOLFIN C++ interface
Public Member Functions | List of all members
dolfin::Progress Class Reference

#include <Progress.h>

Public Member Functions

 Progress (std::string title, unsigned int n)
 
 Progress (std::string title)
 
 ~Progress ()
 Destructor.
 
void operator= (double p)
 
void operator++ (int)
 Increment progress.
 

Detailed Description

This class provides a simple way to create and update progress bars during a computation.

A progress bar may be used either in an iteration with a known number
of steps:
Progress p("Iterating...", n);
for (int i = 0; i < n; i++)
{
...
p++;
}
or in an iteration with an unknown number of steps:
Progress p("Iterating...");
while (t < T)
{
...
p = t / T;
}

Constructor & Destructor Documentation

◆ Progress() [1/2]

Progress::Progress ( std::string  title,
unsigned int  n 
)

Create progress bar with a known number of steps

Parameters
title(std::string) The title.
n(unsigned int) Number of steps.

◆ Progress() [2/2]

Progress::Progress ( std::string  title)

Create progress bar with an unknown number of steps

Parameters
title(std::string) The title.

Member Function Documentation

◆ operator=()

void Progress::operator= ( double  p)

Set current position

Parameters
p(double) The position.

The documentation for this class was generated from the following files: