DiscretizationType Class Reference

#include <DiscretizationType.hpp>

List of all members.

Public Types

enum  Family { fem, spectral, unknown }
typedef std::vector
< ConstReferenceCounting
< ScalarDiscretizationTypeBase > > 
ScalarDiscretizationTypeList

Public Member Functions

Family getFamily () const
size_t number () const
const
ScalarDiscretizationTypeBase
operator[] (const size_t &i) const
void add (ConstReferenceCounting< ScalarDiscretizationTypeBase > type)
 DiscretizationType ()
 DiscretizationType (const DiscretizationType &d)
 ~DiscretizationType ()

Private Member Functions

Family __componentFamily (const size_t &i) const

Private Attributes

ScalarDiscretizationTypeList __types

Friends

std::ostream & operator<< (std::ostream &os, const DiscretizationType &discretization)


Detailed Description

Definition at line 37 of file DiscretizationType.hpp.


Member Typedef Documentation

Definition at line 47 of file DiscretizationType.hpp.


Member Enumeration Documentation

Enumerator:
fem 
spectral 
unknown 

Definition at line 40 of file DiscretizationType.hpp.

00040               {
00041     fem,
00042     spectral,
00043     unknown
00044   };


Constructor & Destructor Documentation

DiscretizationType::DiscretizationType (  )  [inline]

Constructor

Definition at line 140 of file DiscretizationType.hpp.

00141   {
00142     ;
00143   }

DiscretizationType::DiscretizationType ( const DiscretizationType d  )  [inline]

Copy constructor

Parameters:
d originale discretization type

Definition at line 150 of file DiscretizationType.hpp.

00151     : __types(d.__types)
00152   {
00153     ;
00154   }

DiscretizationType::~DiscretizationType (  )  [inline]

Destructor

Definition at line 160 of file DiscretizationType.hpp.

00161   {
00162     ;
00163   }


Member Function Documentation

Family DiscretizationType::__componentFamily ( const size_t &  i  )  const [inline, private]

Family DiscretizationType::getFamily (  )  const [inline]

Returns the family of the discretization type

Returns:
the family

Definition at line 90 of file DiscretizationType.hpp.

References __componentFamily(), __types, and unknown.

Referenced by SolverExpression::execute().

00091   {
00092     Family family = this->__componentFamily(0);
00093 
00094     for (size_t i=1; i<__types.size(); ++i) {
00095       if (family != this->__componentFamily(i)) {
00096         return unknown;
00097       }
00098     }
00099 
00100     return family;
00101   }

Here is the call graph for this function:

size_t DiscretizationType::number (  )  const [inline]

Gets the number of discretizations in the list

Returns:
__types.size()

Definition at line 108 of file DiscretizationType.hpp.

References __types.

Referenced by SpectralLegendreDiscretizationNonConform::_getQuadratureDegree(), DegreeOfFreedomSetBuilder::DegreeOfFreedomSetBuilder(), and SolverExpression::execute().

00109   {
00110     return __types.size();
00111   }

const ScalarDiscretizationTypeBase& DiscretizationType::operator[] ( const size_t &  i  )  const [inline]

Read-only access to the type of the i th type of discretization

Parameters:
i number of the discretized variable
Returns:
__types[i]

Definition at line 120 of file DiscretizationType.hpp.

References __types, and ASSERT.

00121   {
00122     ASSERT(i<__types.size());
00123     return *(__types[i]);
00124   }

void DiscretizationType::add ( ConstReferenceCounting< ScalarDiscretizationTypeBase type  )  [inline]

Adds a type to the list of types

Parameters:
type type to add

Definition at line 131 of file DiscretizationType.hpp.

References __types.

Referenced by SpectralFEMPreconditioner::Internal::__solveFEM(), and SolverExpression::execute().

00132   {
00133     __types.push_back(type);
00134   }


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const DiscretizationType discretization 
) [friend]

Definition at line 52 of file DiscretizationType.hpp.

00054   {
00055     os << ScalarDiscretizationTypeBase::name(discretization.__types[0]->type());
00056     for (size_t i=1; i<discretization.__types.size(); ++i) {
00057       os << ',' << ScalarDiscretizationTypeBase::name(discretization.__types[i]->type());
00058     }
00059     return os;
00060   }


Member Data Documentation

Types of discretization

Definition at line 50 of file DiscretizationType.hpp.

Referenced by __componentFamily(), add(), getFamily(), number(), and operator[]().


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

Generated on Wed Nov 19 00:05:46 2008 for FreeFEM3D (aka ff3d) by  doxygen 1.5.6