Class representing a map of diameters of elements of a given Space. More...

#include <diameter.hh>

Inheritance diagram for concepts::CellDiameter:
concepts::OutputOperator

Public Types

enum  type { LINE, PLANE, FIGURE }
 

Public Member Functions

 CellDiameter (const Cell &cell, const enum type typ, bool square=false)
 Constructor to compute diameter of type typ out of a Cell \cell. More...
 
template<class F >
 CellDiameter (const concepts::SpaceOnCells< F > &spc, const enum type typ, bool square=false)
 Constructor getting a Space of Elements, i.e. More...
 
const Real operator() (uint key) const
 

Protected Member Functions

virtual std::ostream & info (std::ostream &os) const
 Returns information in an output stream. More...
 

Private Member Functions

bool compute_ (const Cell1 *cell1, enum type typ)
 Computes the diameter out of given cell cell1 for requested type typ. More...
 
bool compute_ (const Cell2 *cell2, enum type typ)
 Computes the diameter out of given cell cell2 for requested type typ. More...
 
bool compute_ (const Cell3 *cell3, enum type typ)
 Computes the diameter out of given cell cell3 for requested type typ. More...
 
const std::string typeStr_ () const
 

Private Attributes

concepts::HashMap< Realdiam_
 
bool square_
 
enum type type_
 

Detailed Description

Class representing a map of diameters of elements of a given Space.

At the moment just Straight Elements have computable diameter. To go to general curvature elements, a convex hull algorithm is needed to compute the diameter, since the diameter of a solid set is the diameter of the convex hull of this set.

The Diameter implementation is motivated by the Paper

"An hp-finite element adaptive scheme to solve the poisson problem on curved domains" by M.G. Armentano, C. Padra, M. Scheble

edge size are not exactly but 3-Point approximated.

See also
geometry/testsuite/testDiameter.hh
Author
Robert Gruhlke, 2014

Definition at line 43 of file diameter.hh.

Member Enumeration Documentation

◆ type

Enumerator
LINE 
PLANE 
FIGURE 

Definition at line 48 of file diameter.hh.

Constructor & Destructor Documentation

◆ CellDiameter() [1/2]

template<class F >
concepts::CellDiameter::CellDiameter ( const concepts::SpaceOnCells< F > &  spc,
const enum type  typ,
bool  square = false 
)

Constructor getting a Space of Elements, i.e.

a hpAdaptiveSpace, TraceSpace, etc. creating a map of all element's keys to its diameter.

The constructor is downward compatible, e.g. a constructor call with a Space with 2D manifold cells and a enum call of 1D Manifold, creates a mapping of 1D manifolds to its diamters. This applicates when no lower dimensional Space is in hand, i.e. a TraceSpace for an AdaptiveSpace.

Parameters
spcSpace of 1D 2D or 3D ElementWithCells.
typtyp of the diameter to be computed
squaremarker that is set to true if all ElementWithCells are Squares (Cubes)

◆ CellDiameter() [2/2]

concepts::CellDiameter::CellDiameter ( const Cell cell,
const enum type  typ,
bool  square = false 
)

Constructor to compute diameter of type typ out of a Cell \cell.

If the Cell is squared or retangular one can use square set to true for faster evaluation.

Parameters
cellCell to use.
typenum to specificy which diameter type: edge, plane, etc.
squareflag to used with extra knowledge

Member Function Documentation

◆ compute_() [1/3]

bool concepts::CellDiameter::compute_ ( const Cell1 cell1,
enum type  typ 
)
private

Computes the diameter out of given cell cell1 for requested type typ.

Returns false if cell1 is null.

◆ compute_() [2/3]

bool concepts::CellDiameter::compute_ ( const Cell2 cell2,
enum type  typ 
)
private

Computes the diameter out of given cell cell2 for requested type typ.

Returns false if cell2 is null.

◆ compute_() [3/3]

bool concepts::CellDiameter::compute_ ( const Cell3 cell3,
enum type  typ 
)
private

Computes the diameter out of given cell cell3 for requested type typ.

Returns false if cell3 is null.

◆ info()

virtual std::ostream& concepts::CellDiameter::info ( std::ostream &  os) const
protectedvirtual

Returns information in an output stream.

Reimplemented from concepts::OutputOperator.

◆ operator()()

const Real concepts::CellDiameter::operator() ( uint  key) const

◆ typeStr_()

const std::string concepts::CellDiameter::typeStr_ ( ) const
private

Member Data Documentation

◆ diam_

concepts::HashMap<Real> concepts::CellDiameter::diam_
private

Definition at line 101 of file diameter.hh.

◆ square_

bool concepts::CellDiameter::square_
private

Definition at line 98 of file diameter.hh.

◆ type_

enum type concepts::CellDiameter::type_
private

Definition at line 93 of file diameter.hh.


The documentation for this class was generated from the following file:
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich