IFEM  90A354
Public Member Functions | Public Attributes | Private Attributes | List of all members
ElmNorm Class Reference

Class representing integrated norm quantities over an element. More...

#include <ElmNorm.h>

Inheritance diagram for ElmNorm:
Inheritance graph
[legend]
Collaboration diagram for ElmNorm:
Collaboration graph
[legend]

Public Member Functions

 ElmNorm (double *p, size_t n)
 The constructor assigns the internal pointer. More...
 
 ElmNorm (size_t n)
 Alternative constructor using the internal buffer buf. More...
 
virtual ~ElmNorm ()
 Empty destructor.
 
double & operator[] (size_t i)
 Indexing operator for assignment.
 
const double & operator[] (size_t i) const
 Indexing operator for referencing.
 
size_t size () const
 Returns the number of norm values.
 
bool externalStorage () const
 Returns whether the element norms are stored externally or not.
 
virtual void destruct ()
 Virtual destruction method to clean up after numerical integration. More...
 
- Public Member Functions inherited from LocalIntegral
virtual ~LocalIntegral ()
 Empty destructor.
 
virtual const LocalIntegralref () const
 Returns the LocalIntegral object to assemble into the global one.
 
void getSolution (size_t nsd, size_t nen, Matrix *u=nullptr, Matrix *v=nullptr, Matrix *a=nullptr, bool forceCurrent=false) const
 Extracts element solution vectors as nsd by nen matrices. More...
 

Public Attributes

Vectors psol
 Element-level projected solution vectors.
 
- Public Attributes inherited from LocalIntegral
Vectors vec
 Element-level primary solution vectors.
 

Private Attributes

RealArray buf
 Internal buffer used when element norms are not requested.
 
double * ptr
 Pointer to the actual norm values.
 
size_t nnv
 Number of norm values.
 

Additional Inherited Members

- Protected Member Functions inherited from LocalIntegral
 LocalIntegral ()
 The default constructor is protected to allow sub-classes only.
 

Detailed Description

Class representing integrated norm quantities over an element.

The class is essentially just a double array, but is derived from LocalIntegral such that it may be passed as argument to the Integrand::evalInt and Integrand::evalBou methods.

Constructor & Destructor Documentation

◆ ElmNorm() [1/2]

ElmNorm::ElmNorm ( double *  p,
size_t  n 
)
inline

The constructor assigns the internal pointer.

Parameters
[in]pPointer to element norm values
[in]nNumber of norm values

◆ ElmNorm() [2/2]

ElmNorm::ElmNorm ( size_t  n)
inlineexplicit

Alternative constructor using the internal buffer buf.

Parameters
[in]nNumber of norm values

This constructor is used when the element norms are not requested by the application, but are only used to assembly the global norms. To avoid the need for a global array of element norms in that case, an internal array is then used instead.

References buf, and ptr.

Member Function Documentation

◆ destruct()

virtual void ElmNorm::destruct ( )
inlinevirtual

Virtual destruction method to clean up after numerical integration.

Unless the internal buffer buf is used, these method only clears the two solution vector containers (to save memory). The object itself is then NOT deleted, since it might be used in a second integration loop over element boundaries, for instance.

Reimplemented from LocalIntegral.

References buf, psol, and LocalIntegral::vec.


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