FreePOOMA
2.4.1
|
Relations are a way to couple fields via expressions. More...
![]() |
Files | |
file | ConstantFaceBC.h |
Relation functor class setting all guard layers beyond a specified (logically) rectilinear mesh face to a constant value. | |
file | PeriodicFaceBC.h |
Updater setting all guard layers beyond a specified (logically) rectilinear mesh face to the value from the non-guard element symmetrically across the face (the face is defined at the last vertex). | |
file | PosReflectFaceBC.h |
Relation functor class setting all guard layers beyond a specified (logically) rectilinear mesh face to a positively reflected value. | |
file | RelationBases.h |
RelationRetargetBase & RelationBase: the base classes for all relations. | |
file | RelationGroups.h |
Functions supporting relation groups (undocumented). | |
file | RelationList.h |
manages a list of relations. | |
file | RelationListItem.h |
the ultimate base class for all relation objects. | |
file | Relations.h |
Relation basics. |
Relations are a way to couple fields via expressions.
That is, you define a relation of a Field A (LHS) to one or more Fields B, C, ... (RHS). Think of it as a definition like A := F(B, C, ...) where A gets updated using the relation F if one of the arguments to F has changed since the last read of A.
Relations are defined via Pooma::newRelation() which takes a relation functor as its first argument followed by the LHS and one or multiple RHS fields. Look at the Pooma::functionPtr and Pooma::memberPtr for how to supply global functions or class members as the relation function.
A relation functor needs to include a default constructor, a copy constructor with an extra LHS typed argument and an operator() for evaluation. An example would look like
struct MyFunctor { MyFunctor() {} MyFunctor(const MyFunctor&, const LHS&) {} void operator()(const LHS& lhs, const RHS1& rhs1, const RHS2& rhs2) { lhs.all() = (rhs1 + rhs2).all(); } };
and be initialized with Pooma::newRelation(MyFunctor(), lhs, rhs1, rhs2).
Usable predefined relations include boundary conditions of which the following are available: