IFEM  90A354
GlobalIntegral.h
Go to the documentation of this file.
1 // $Id$
2 //==============================================================================
12 //==============================================================================
13 
14 #ifndef _GLOBAL_INTEGRAL_H
15 #define _GLOBAL_INTEGRAL_H
16 
17 #include <vector>
18 #include <cstddef>
19 
20 class LocalIntegral;
21 struct Property;
22 
23 
29 {
30 public:
34  virtual ~GlobalIntegral() {}
35 
37  virtual void initialize(char) {}
39  virtual bool finalize(bool) { return true; }
40 
42  virtual bool assemble(const LocalIntegral*, int) { return true; }
43 
45  virtual bool threadSafe() const { return false; }
46 
48  virtual bool haveContributions(size_t, const std::vector<Property>&) const
49  { return true; }
50 };
51 
52 #endif
Abstract base class representing a system level integrated quantity.
Definition: GlobalIntegral.h:29
virtual bool haveContributions(size_t, const std::vector< Property > &) const
Returns false if no contributions from a specified patch.
Definition: GlobalIntegral.h:48
virtual void initialize(char)
Initializes the integrated quantity to zero.
Definition: GlobalIntegral.h:37
GlobalIntegral()
The default constructor.
Definition: GlobalIntegral.h:32
virtual bool assemble(const LocalIntegral *, int)
Adds a LocalIntegral object into a corresponding global object.
Definition: GlobalIntegral.h:42
virtual bool threadSafe() const
Returns true if all elements can be assembled in parallel.
Definition: GlobalIntegral.h:45
virtual bool finalize(bool)
Finalizes the integrated quantity after element assembly.
Definition: GlobalIntegral.h:39
virtual ~GlobalIntegral()
Empty destructor.
Definition: GlobalIntegral.h:34
Abstract base class representing an element level integrated quantity.
Definition: LocalIntegral.h:25
Struct for representing a distributed physical property.
Definition: Property.h:26