// ============================================================================ // == == // == AMDiS - Adaptive multidimensional simulations == // == == // ============================================================================ // == == // == crystal growth group == // == == // == Stiftung caesar == // == Ludwig-Erhard-Allee 2 == // == 53175 Bonn == // == germany == // == == // ============================================================================ // == == // == http://www.caesar.de/cg/AMDiS == // == == // ============================================================================ /** \file RobinBC.h */ #ifndef AMDIS_ROBINBC_H #define AMDIS_ROBINBC_H #include "BoundaryCondition.h" #include "AbstractFunction.h" #include "DOFMatrix.h" namespace AMDiS { class SurfaceOperator; // ============================================================================ // ===== class RobinBC ======================================================== // ============================================================================ /** * \ingroup Assembler * * \brief * Sub class of BoundaryCondition. Implements Robin and Neumann boundary conditions. * The flux in normal direction is given by \f$j = j_0 + \alpha u\f$ where * \f$j_0 \f$ and \f$alpha \f$ are functions evaluated at world coordinates * and \f$u \f$ is the problem solution. */ class RobinBC : public BoundaryCondition { public: /** \brief * Constructor. \f$j \f$ and \f$alpha \f$ are given as AbstractFunction * objects. */ RobinBC(BoundaryType type, AbstractFunction > *j, AbstractFunction > *alpha, FiniteElemSpace *rowFESpace, FiniteElemSpace *colFESpace = NULL); /** \brief * Constructor. \f$j \f$ and \f$alpha \f$ are given as DOFVectors. */ RobinBC(BoundaryType type, DOFVectorBase *j, DOFVectorBase *alpha, FiniteElemSpace *rowFESpace, FiniteElemSpace *colFESpace = NULL); /** \brief * Constructor. \f$j \f$ and \f$alpha \f$ are given as Operator objects. */ RobinBC(BoundaryType type, Operator* jOp, Operator* alphaOp, FiniteElemSpace *rowFESpace, FiniteElemSpace *colFESpace = NULL); /** \brief * Implements BoundaryCondition::fillBoundaryCondition(); */ virtual void fillBoundaryCondition(DOFMatrix* matrix, ElInfo* elInfo, const DegreeOfFreedom* dofIndices, const BoundaryType* localBound, int nBasFcts); /** \brief * Implements BoundaryCondition::fillBoundaryCondition(); */ virtual void fillBoundaryCondition(DOFVectorBase* vector, ElInfo* elInfo, const DegreeOfFreedom* dofIndices, const BoundaryType* localBound, int nBasFcts); /** \brief * Implements BoundaryCondition::boundResidual(); */ virtual double boundResidual(ElInfo *elInfo, DOFMatrix *matrix, const DOFVectorBase *dv); protected: /** \brief * Surface operators for each element side for the Neumann part. */ DimVec* neumannOperators; /** \brief * Surface operators for each element side for the Robin part. */ DimVec* robinOperators; VectorOfFixVecs >**coords; }; class NeumannBC : public RobinBC { public: NeumannBC(BoundaryType type, AbstractFunction > *j, FiniteElemSpace *rowFESpace, FiniteElemSpace *colFESpace = NULL) : RobinBC(type, j, NULL, rowFESpace, colFESpace) {}; }; } #endif