MeshExpressionPeriodic Class Reference

#include <MeshExpression.hpp>

Inheritance diagram for MeshExpressionPeriodic:

Inheritance graph
[legend]
Collaboration diagram for MeshExpressionPeriodic:

Collaboration graph
[legend]

List of all members.

Public Types

typedef std::list< std::pair
< ReferenceCounting
< RealExpression >
, ReferenceCounting
< RealExpression > > > 
MappedReferencesList
enum  TypeOfMesh {
  extract, octree, periodic, read,
  simplify, surface, spectral, structured,
  tetrahedrize, tetrahedrizeDomain, transform, undefined,
  unstructured, variable
}
enum  Type {
  boolean, boundary, boundaryCondition, boundaryConditionList,
  domain, field, fieldlist, function,
  ifstreamexpression, integrated, integratedOperator, insideExpression,
  insideListExpression, istreamexpression, istreamExpressionList, linearExp,
  mesh, multiLinearExp, multiLinearExpSum, multiLinearForm,
  multiLinearFormSum, ofstreamexpression, option, ostreamexpression,
  ostreamExpressionList, pdeEquation, pdeOperator, pdeOperatorSum,
  pdeProblem, problem, real, scene,
  solver, solverOptions, string, subOption,
  subOptionList, testFunctionList, unknown, unknownList,
  variationalFormula, variationalBilinearOperator, variationalLinearOperator, variationalDirichlet,
  vector3
}

Public Member Functions

void execute ()
 MeshExpressionPeriodic (ReferenceCounting< MeshExpression > m, ReferenceCounting< MappedReferencesList > references)
 MeshExpressionPeriodic (const MeshExpressionPeriodic &m)
 ~MeshExpressionPeriodic ()
ConstReferenceCounting< Meshmesh () const
const MeshExpression::TypeOfMeshtypeOfMesh () const
const Expression::Typetype () const
 return the type.

Protected Member Functions

virtual std::istream & _get (std::istream &is)
 Read *this to the input is.

Static Protected Member Functions

static Expression::Type getType (ReferenceCounting< Expression > e1, ReferenceCounting< Expression > e2)

Protected Attributes

ConstReferenceCounting< Mesh__mesh

Private Member Functions

std::ostream & put (std::ostream &os) const
 Writes *this to the output os.

Private Attributes

ReferenceCounting< MeshExpression__inputMesh
ReferenceCounting
< MappedReferencesList
__mappedReferences

Friends

std::ostream & operator<< (std::ostream &os, const Expression &e)
 this function allows to output expressions.
std::istream & operator>> (std::istream &is, Expression &e)
 this function allows to read expressions from streams


Detailed Description

Definition at line 403 of file MeshExpression.hpp.


Member Typedef Documentation

Definition at line 409 of file MeshExpression.hpp.


Member Enumeration Documentation

enum MeshExpression::TypeOfMesh [inherited]

Enumerator:
extract 
octree 
periodic 
read 
simplify 
surface 
spectral 
structured 
tetrahedrize 
tetrahedrizeDomain 
transform 
undefined 
unstructured 
variable 

Definition at line 51 of file MeshExpression.hpp.

00051                   {
00052     extract,
00053     octree,
00054     periodic,
00055     read,
00056     simplify,
00057     surface,
00058     spectral,
00059     structured,
00060     tetrahedrize,
00061     tetrahedrizeDomain,
00062     transform,
00063     undefined,
00064     unstructured,
00065     variable
00066   };

enum Expression::Type [inherited]

Enumerator:
boolean 
boundary 
boundaryCondition 
boundaryConditionList 
domain 
field 
fieldlist 
function 
ifstreamexpression 
integrated 
integratedOperator 
insideExpression 
insideListExpression 
istreamexpression 
istreamExpressionList 
linearExp 
mesh 
multiLinearExp 
multiLinearExpSum 
multiLinearForm 
multiLinearFormSum 
ofstreamexpression 
option 
ostreamexpression 
ostreamExpressionList 
pdeEquation 
pdeOperator 
pdeOperatorSum 
pdeProblem 
problem 
real 
scene 
solver 
solverOptions 
string 
subOption 
subOptionList 
testFunctionList 
unknown 
unknownList 
variationalFormula 
variationalBilinearOperator 
variationalLinearOperator 
variationalDirichlet 
vector3 

Reimplemented in IFStreamExpression, OFStreamExpression, and UnknownExpression.

Definition at line 42 of file Expression.hpp.

00042              {
00043     boolean,
00044     boundary,
00045     boundaryCondition,
00046     boundaryConditionList,
00047 
00048     domain,
00049 
00050     field,
00051     fieldlist,
00052     function,
00053 
00054     ifstreamexpression,
00055     integrated,
00056     integratedOperator,
00057     insideExpression,
00058     insideListExpression,
00059     istreamexpression,
00060     istreamExpressionList,
00061 
00062     linearExp,
00063 
00064     mesh,
00065     multiLinearExp,
00066     multiLinearExpSum,
00067     multiLinearForm,
00068     multiLinearFormSum,
00069 
00070     ofstreamexpression,
00071     option,
00072     ostreamexpression,
00073     ostreamExpressionList,
00074 
00075     pdeEquation,
00076     pdeOperator,
00077     pdeOperatorSum,
00078     pdeProblem,
00079     problem,
00080 
00081     real,
00082 
00083     scene,
00084     solver,
00085     solverOptions,
00086     string,
00087     subOption,
00088     subOptionList,
00089 
00090     testFunctionList,
00091 
00092     unknown,
00093     unknownList,
00094 
00095     variationalFormula,
00096     variationalBilinearOperator,
00097     variationalLinearOperator,
00098     variationalDirichlet,
00099     vector3
00100   };


Constructor & Destructor Documentation

MeshExpressionPeriodic::MeshExpressionPeriodic ( ReferenceCounting< MeshExpression m,
ReferenceCounting< MappedReferencesList references 
)

Definition at line 828 of file MeshExpression.cpp.

00830   : MeshExpression(0,MeshExpression::periodic),
00831     __inputMesh(m),
00832     __mappedReferences(l)
00833 {
00834   ;
00835 }

MeshExpressionPeriodic::MeshExpressionPeriodic ( const MeshExpressionPeriodic m  ) 

Definition at line 838 of file MeshExpression.cpp.

00839   : MeshExpression(m),
00840     __inputMesh(m.__inputMesh),
00841     __mappedReferences(m.__mappedReferences)
00842 {
00843   ;
00844 }

MeshExpressionPeriodic::~MeshExpressionPeriodic (  ) 

Definition at line 847 of file MeshExpression.cpp.

00848 {
00849   ;
00850 }


Member Function Documentation

std::ostream& MeshExpressionPeriodic::put ( std::ostream &  os  )  const [inline, private, virtual]

Writes *this to the output os.

Implements Expression.

Definition at line 412 of file MeshExpression.hpp.

00413   {
00414     os << "periodic mesh";
00415     return os;
00416   }

void MeshExpressionPeriodic::execute (  )  [virtual]

Executes the expression.

Implements Expression.

Definition at line 798 of file MeshExpression.cpp.

References MeshExpression::__mesh, ErrorHandler::normal, and stringify().

00799 {
00800   (*__inputMesh).execute();
00801 
00802   MeshPeriodizer::ReferencesMapping referencesMapping;
00803 
00804   MappedReferencesList& mappedReferences = (*__mappedReferences);
00805   for (MappedReferencesList::iterator i = mappedReferences.begin();
00806        i != mappedReferences.end(); ++i) {
00807     (*(*i).first).execute();
00808     (*(*i).second).execute();
00809     const real_t first = (*(*i).first).realValue();
00810     const real_t second= (*(*i).second).realValue();
00811     if ((first != int(first)) or (second != int(second))) {
00812       throw ErrorHandler(__FILE__,__LINE__,
00813                          "invalid periodic references ("
00814                          +stringify(first)+"<->"+stringify(second)
00815                          +") You must give integers value",
00816                          ErrorHandler::normal);
00817     }
00818     referencesMapping.push_back(std::make_pair(static_cast<size_t>(first),
00819                                                static_cast<size_t>(second)));
00820   }
00821 
00822   MeshPeriodizer periodizer((*__inputMesh).mesh(), referencesMapping);
00823   periodizer.run();
00824   __mesh = periodizer.mesh();
00825 }

Here is the call graph for this function:

ConstReferenceCounting< Mesh > MeshExpression::mesh (  )  const [inherited]

const MeshExpression::TypeOfMesh& MeshExpression::typeOfMesh (  )  const [inline, inherited]

Definition at line 74 of file MeshExpression.hpp.

References MeshExpression::__typeOfMesh.

00075   {
00076     return __typeOfMesh;
00077   }

static Expression::Type Expression::getType ( ReferenceCounting< Expression e1,
ReferenceCounting< Expression e2 
) [inline, static, protected, inherited]

Traits conversion of types.

Todo:
IMPLEMENT IT.

Definition at line 112 of file Expression.hpp.

References Expression::real.

00114   {
00115     return Expression::real;
00116   }

virtual std::istream& Expression::_get ( std::istream &  is  )  [inline, protected, virtual, inherited]

Read *this to the input is.

Reimplemented in IStreamExpressionList, and RealExpressionVariable.

Definition at line 122 of file Expression.hpp.

References ErrorHandler::normal.

00123   {
00124     throw ErrorHandler(__FILE__,__LINE__,
00125                        "operator >> is not supported for this expression",
00126                        ErrorHandler::normal);
00127     return is;
00128   }

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

return the type.

Reimplemented in FunctionExpression.

Definition at line 132 of file Expression.hpp.

References Expression::__type.

Referenced by MeshExpressionExtract::execute().

00133   {
00134     return __type;
00135   }


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const Expression e 
) [friend, inherited]

this function allows to output expressions.

Definition at line 143 of file Expression.hpp.

00144   {
00145     return e.put(os);
00146   }

std::istream& operator>> ( std::istream &  is,
Expression e 
) [friend, inherited]

this function allows to read expressions from streams

Definition at line 149 of file Expression.hpp.

00150   {
00151     return e._get(is);
00152   }


Member Data Documentation

Definition at line 418 of file MeshExpression.hpp.

Definition at line 420 of file MeshExpression.hpp.


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

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