OpenFOAM logo
Open Source CFD Toolkit

constraint Class Template Reference

Collaboration diagram for constraint:

Collaboration graph
[legend]
List of all members.

template<class Type>
class Foam::constraint< Type >


Public Member Functions

 constraint (const label row, const Type value, const Type &fixedCmpts=pTraits< Type >::one)
 Construct from components.
template<template< class > class Matrix>
 constraint (const Matrix< Type > &, const label row, const Type value, const Type &fixedCmpts=pTraits< Type >::one)
 Construct from matrix and other components.
 constraint (const constraint &)
 Construct as copy.
 constraint (Istream &)
 Construct from Istream.
 ~constraint ()
label rowID () const
 Return matrix row ID.
Type value () const
 Return fixed value.
const Type & fixedComponents () const
 Return map of fixed components.
scalar diagCoeff () const
 Return diagonal coefficient.
Type source () const
 Return source.
const scalarField & upperCoeffsOwner () const
 Return off-diagonal coefficients.
const scalarField & upperCoeffsNeighbour () const
const scalarField & lowerCoeffsOwner () const
const scalarField & lowerCoeffsNeighbour () const
void combine (const constraint &)
 Combine with existing equation.
template<template< class > class Matrix>
void setMatrix (const Matrix< Type > &)
 Set matrix coefficients.
template<template< class > class Matrix>
void eliminateEquation (Matrix< Type > &) const
 Eliminate equation.
template<template< class > class Matrix>
void eliminateEquation (Matrix< Type > &, const direction, scalarField &) const
 Eliminate component equation with given direction and.
template<template< class > class Matrix>
void setSource (Matrix< Type > &) const
 Set source in eliminated equation.
template<template< class > class Matrix>
void setSourceDiag (Matrix< Type > &, const direction, scalarField &psiCmpt, scalarField &sourceCmpt) const
 Set source and diagonal in eliminated equation.
template<template< class > class Matrix>
void reconstructMatrix (Matrix< Type > &) const
 Reconstruct matrix coefficients.
void clearMatrix ()
 Clear matrix coefficients.
void operator= (const constraint< Type > &)
template<>
scalar componentOfValue (const scalar &v, const direction) const
template<>
void combine (const constraint< scalar > &e)

Static Public Member Functions

template<template< class > class Matrix>
void eliminateEquation (Matrix< Type > &, const label, const Type &)
 Eliminate equation.
template<template< class > class Matrix>
void setSource (Matrix< Type > &, const label, const Type &)
 Set source in eliminated equation.

Friends

Ostream & operator (Ostream &, const constraint< Type > &)

Constructor & Destructor Documentation

constraint (  const label  row,
const Type  value,
const Type &  fixedCmpts = pTraits< Type >::one
) 
 

Construct from components.

constraint (  const Matrix< Type > &  ,
const label  row,
const Type  value,
const Type &  fixedCmpts = pTraits< Type >::one
) 
 

Construct from matrix and other components.

constraint (  const constraint< Type > &   ) 
 

Construct as copy.

constraint (  Istream &   ) 
 

Construct from Istream.

~constraint (   ) 
 


Member Function Documentation

void clearMatrix (   ) 
 

Clear matrix coefficients.

void combine (  const constraint< scalar > &  e  ) 
 

void combine (  const constraint< Type > &   ) 
 

Combine with existing equation.

scalar componentOfValue (  const scalar &  v,
const   direction
)  const
 

scalar diagCoeff (   )  const
 

Return diagonal coefficient.

void eliminateEquation (  Matrix< Type > &  ,
const   direction,
scalarField & 
)  const
 

Eliminate component equation with given direction and.

component source

void eliminateEquation (  Matrix< Type > &   )  const
 

Eliminate equation.

void eliminateEquation (  Matrix< Type > &  ,
const   label,
const Type & 
)  [static]
 

Eliminate equation.

const Type& fixedComponents (   )  const [inline]
 

Return map of fixed components.

Definition at line 157 of file constraint.H.

References Foam::scalarField.

const scalarField& lowerCoeffsNeighbour (   )  const
 

const scalarField& lowerCoeffsOwner (   )  const
 

void operator= (  const constraint< Type > &   ) 
 

void reconstructMatrix (  Matrix< Type > &   )  const
 

Reconstruct matrix coefficients.

label rowID (   )  const [inline]
 

Return matrix row ID.

Definition at line 145 of file constraint.H.

void setMatrix (  const Matrix< Type > &   ) 
 

Set matrix coefficients.

void setSource (  Matrix< Type > &   )  const
 

Set source in eliminated equation.

void setSource (  Matrix< Type > &  ,
const   label,
const Type & 
)  [static]
 

Set source in eliminated equation.

void setSourceDiag (  Matrix< Type > &  ,
const   direction,
scalarField &  psiCmpt,
scalarField &  sourceCmpt
)  const
 

Set source and diagonal in eliminated equation.

Type source (   )  const
 

Return source.

const scalarField& upperCoeffsNeighbour (   )  const
 

const scalarField& upperCoeffsOwner (   )  const
 

Return off-diagonal coefficients.

Type value (   )  const [inline]
 

Return fixed value.

Definition at line 151 of file constraint.H.


Friends And Related Function Documentation

Ostream& operator (  Ostream &  ,
const constraint< Type > & 
)  [friend]
 


The documentation for this class was generated from the following file:
For further information go to www.openfoam.org