PDESystem Class Reference

#include <PDESystem.hpp>

Inheritance diagram for PDESystem:

Inheritance graph
[legend]
Collaboration diagram for PDESystem:

Collaboration graph
[legend]

List of all members.

Public Types

enum  Type { pde, variational }

Public Member Functions

void add (ReferenceCounting< PDEProblem > pdeProblem)
const PDEProblemoperator[] (const size_t &i) const
const ScalarFunctionBasesecondMember (const size_t &i) const
const BoundaryConditionSetboundaryConditionSet (const size_t &i) const
ReferenceCounting< Problemoperator* (const ConstReferenceCounting< ScalarFunctionBase > &c) const
size_t numberOfUnknown () const
size_t numberOfEquations () const
 PDESystem ()
 PDESystem (const size_t &dimension)
 PDESystem (const PDESystem &p)
 ~PDESystem ()
void setDomain (ReferenceCounting< Domain > omega)
const Problem::Typetype () const
std::string typeName () const
ConstReferenceCounting< Domaindomain () const

Private Attributes

std::vector
< ConstReferenceCounting
< PDEProblem > > 
__pdeProblems

Friends

std::ostream & operator<< (std::ostream &os, const PDESystem &pdeSystem)


Detailed Description

Definition at line 40 of file PDESystem.hpp.


Member Enumeration Documentation

enum Problem::Type [inherited]

Enumerator:
pde 
variational 

Definition at line 40 of file Problem.hpp.

00040             {
00041     pde,
00042     variational
00043   };


Constructor & Destructor Documentation

PDESystem::PDESystem (  )  [inline]

Constructor

Definition at line 157 of file PDESystem.hpp.

Referenced by operator*().

00158     : Problem(Problem::pde, 0)
00159   {
00160     ;
00161   }

PDESystem::PDESystem ( const size_t &  dimension  )  [inline]

Constructor

Parameters:
dimension dimension of the system

Definition at line 168 of file PDESystem.hpp.

References __pdeProblems.

00169     : Problem(Problem::pde, 0)
00170   {
00171     __pdeProblems.reserve(dimension);
00172   }

PDESystem::PDESystem ( const PDESystem p  )  [inline]

Copy constructor

Parameters:
p a given problem

Definition at line 179 of file PDESystem.hpp.

00180     : Problem(p),
00181       __pdeProblems(p.__pdeProblems)
00182   {
00183   }

PDESystem::~PDESystem (  )  [inline]

Destructor

Definition at line 189 of file PDESystem.hpp.

00190   {
00191     ;
00192   }


Member Function Documentation

void PDESystem::add ( ReferenceCounting< PDEProblem pdeProblem  )  [inline]

Adds a PDEProblem to the system

Parameters:
pdeProblem PDEProblem to add

Definition at line 53 of file PDESystem.hpp.

References __pdeProblems.

00054   {
00055     __pdeProblems.push_back(pdeProblem);
00056   }

const PDEProblem& PDESystem::operator[] ( const size_t &  i  )  const [inline]

read-only access to the ith equation of the problem

Parameters:
i number of the equation
Returns:
__pdeProblems[i]

Definition at line 66 of file PDESystem.hpp.

References __pdeProblems, and ASSERT.

00067   {
00068     ASSERT(i<__pdeProblems.size());
00069     return *(__pdeProblems[i]);
00070   }

const ScalarFunctionBase& PDESystem::secondMember ( const size_t &  i  )  const [inline]

Read-only access to the ith component of the second member

Parameters:
i number of the component
Returns:
the second member ith PDE

Definition at line 80 of file PDESystem.hpp.

References __pdeProblems.

Referenced by FEMDiscretization< Structured3DMesh, TypeOfDiscretization >::assembleSecondMember(), and FEMDiscretization< GivenMeshType, TypeOfDiscretization >::assembleSecondMember().

00081   {
00082     return *__pdeProblems[i]->pde().secondMember();
00083   }

const BoundaryConditionSet& PDESystem::boundaryConditionSet ( const size_t &  i  )  const [inline, virtual]

Read-only access to the ith boundary condition set

Parameters:
i the number of the unknown
Returns:
the ith PDEProblem's boundary condition set

Implements Problem.

Definition at line 93 of file PDESystem.hpp.

References __pdeProblems.

00094   {
00095     return __pdeProblems[i]->boundaryConditionSet();
00096   }

ReferenceCounting<Problem> PDESystem::operator* ( const ConstReferenceCounting< ScalarFunctionBase > &  c  )  const [inline, virtual]

"multiplies" a PDESystem by a coefficient

Parameters:
c the coefficient
Returns:
the new PDESystem

Implements Problem.

Definition at line 106 of file PDESystem.hpp.

References __pdeProblems, numberOfEquations(), and PDESystem().

00107   {
00108     PDESystem* newPDESystem = new PDESystem(*this);
00109 
00110     for (size_t i=0; i<this->numberOfEquations(); ++i) {
00111       (*newPDESystem).__pdeProblems[i] = (*__pdeProblems[i]) * c;
00112     }
00113     return newPDESystem;
00114   }

Here is the call graph for this function:

size_t PDESystem::numberOfUnknown (  )  const [inline, virtual]

Read-only access to the number of unknown

Returns:
number of unknown

Implements Problem.

Definition at line 121 of file PDESystem.hpp.

References __pdeProblems.

Referenced by FEMDiscretization< Structured3DMesh, TypeOfDiscretization >::assembleSecondMember(), and BoundaryMeshAssociation::BoundaryMeshAssociation().

00122   {
00123     return __pdeProblems.size();
00124   }

size_t PDESystem::numberOfEquations (  )  const [inline]

Read-only access to the number of equations

Returns:
the number of equations

Definition at line 131 of file PDESystem.hpp.

References __pdeProblems.

Referenced by DiscretizedOperators< FiniteElement::ElementaryMatrix >::DiscretizedOperators(), and operator*().

00132   {
00133     return __pdeProblems.size();
00134   }

void Problem::setDomain ( ReferenceCounting< Domain omega  )  [inline, inherited]

Sets the domain of computation

Parameters:
omega $\Omega$

Definition at line 58 of file Problem.hpp.

References Problem::__omega.

00059   {
00060     __omega = omega;
00061   }

const Problem::Type& Problem::type (  )  const [inline, inherited]

std::string Problem::typeName (  )  const [inline, inherited]

Definition at line 74 of file Problem.hpp.

References Problem::__type, Problem::pde, ErrorHandler::unexpected, and Problem::variational.

00075   {
00076     switch(__type) {
00077     case pde: {
00078       return "PDE";
00079     }
00080     case variational: {
00081       return "Variational";
00082     }
00083     default: {
00084       throw ErrorHandler(__FILE__,__LINE__,
00085                          "Unknown problem type name",
00086                          ErrorHandler::unexpected);
00087     }
00088     }
00089     return "";
00090   }

ConstReferenceCounting<Domain> Problem::domain (  )  const [inline, inherited]

Access to the domain of computation

Returns:
__omega

Definition at line 98 of file Problem.hpp.

References Problem::__omega.

00099   {
00100     return __omega;
00101   }


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const PDESystem pdeSystem 
) [friend]

Writes a PDESystem

Parameters:
os output stream
pdeSystem a PDE system
Returns:
os

Definition at line 145 of file PDESystem.hpp.

00146   {
00147     for(size_t i=0; i<pdeSystem.numberOfEquations(); ++i) {
00148       os << *(pdeSystem.__pdeProblems[i]) << '\n';
00149     }
00150     return os;
00151   }


Member Data Documentation


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

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