Diffpack Documentation


Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

FieldSummary Class Reference

summary of a field (max, min, points). More...

#include <FieldSummary.h>

Inheritance diagram for FieldSummary::

HandleId List of all members.

Public Methods

 FieldSummary ()
virtual ~FieldSummary ()
void attach (const FieldWithPtValues &f)
bool isAttached (const FieldWithPtValues &f) const
NUMT getMeanValue ()
NUMT getStDevValue ()
void init ()
void update (real time=DUMMY)
void writeHeadings (StringList &headings)
void writeResults (StringList &results)
void writeExtendedResults (MultipleReporter &report)
void print (Os os)

Public Attributes

String fieldname
NUMT max_value
NUMT min_value
int max_node
int min_node
Ptv(real) min_pt
Ptv(real) max_pt
real time_pt_max
real time_pt_min
real time_start
real time_stop
NUMT max_in_last_update
NUMT min_in_last_update

Protected Attributes

int nsamples
Handle(FieldWithPtValuesfield
NUMT mean_value
real stdev

Detailed Description

summary of a field (max, min, points).

NAME: FieldSummary - summary of a field (max, min, points)

DESCRIPTION:

The class collects information from fields at various time levels and computes a summary of the field during the simulation. In stochastic problems solved by Monte Carlo simulation, class "FieldSummary" is convenient for supplementing ordinary moments and probability density estimators for the solution field (in such problems the various realizations correspond to the time levels in this documentation).

The summary consists of 1) extremum values, 2) location of extremum values, 3) time level when extremum values occured, 4) mean value and 5) standard deviation. The latter two quantities are computed from all nodal values at all time levels.

The usage of the class is very simple. Prior to the computations, one calls the "attach" and "init" functions. Then at every time step (typically inside the "timeLoop" function or in "updateDataStructures" or "updateEstimators" type of functions) one calls "update", see the example below. When the simulation is over, the various extreme values, locations etc. are available as public data in the class. However, the main application of the class is probably when the multiple loop option of the menu system is active. The results are then often reported using a "MultipleReporter" class, and "FieldSummary" has two functions "writeHeadings" and "writeResults" which are particularly suited for summary reports in the "MultipleReporter" class. The former function fills an array of strings with suitable headings for a summary table, while the latter fills an array strings with the summary results.

In case of vector fields, the magnitudes of the vectors are first calculated and represented as a scalar field. The summary is then computed from this scalar field.

One must have a "FieldSummary" object for every field where summary information is desired.


Constructor & Destructor Documentation

FieldSummary::FieldSummary ( )
 

There is no constructor. The "attach" function must be called to attach a field to the object. The "init" function must thereafter be called.

FieldSummary::~FieldSummary ( ) [inline, virtual]
 


Member Function Documentation

void FieldSummary::attach ( const FieldWithPtValues & f ) [inline]
 

attaches a "FieldFE" or "FieldLattice" object to the class. This object is used every time "update" is called.

NUMT FieldSummary::getMeanValue ( )
 

NUMT FieldSummary::getStDevValue ( )
 

void FieldSummary::init ( )
 

must be called after "attach" and before any calls to "update".

bool FieldSummary::isAttached ( const FieldWithPtValues & f ) const
 

void FieldSummary::print ( Os os )
 

void FieldSummary::update ( real time = DUMMY )
 

updates the information of the object. The function is typically called at every time step where new field values are computed. In a stationary simulation it is called only once.

void FieldSummary::writeExtendedResults ( MultipleReporter & report )
 

void FieldSummary::writeHeadings ( StringList & headings )
 

void FieldSummary::writeResults ( StringList & results )
 


Member Data Documentation

Handle(FieldWithPtValues) FieldSummary::field [protected]
 

String FieldSummary::fieldname
 

NUMT FieldSummary::max_in_last_update
 

int FieldSummary::max_node
 

Ptv(real) FieldSummary::max_pt
 

NUMT FieldSummary::max_value
 

NUMT FieldSummary::mean_value [protected]
 

NUMT FieldSummary::min_in_last_update
 

int FieldSummary::min_node
 

Ptv(real) FieldSummary::min_pt
 

NUMT FieldSummary::min_value
 

int FieldSummary::nsamples [protected]
 

real FieldSummary::stdev [protected]
 

real FieldSummary::time_pt_max
 

real FieldSummary::time_pt_min
 

real FieldSummary::time_start
 

real FieldSummary::time_stop
 


The documentation for this class was generated from the following file:
Copyright © 2003 inuTech GmbH. All rights reserved.