Liebe Gitlab-Nutzerin, lieber Gitlab-Nutzer,
es ist nun möglich sich mittels des ZIH-Logins/LDAP an unserem Dienst anzumelden. Die Konten der externen Nutzer:innen sind über den Reiter "Standard" erreichbar.
 Praetorius, Simon committed Aug 02, 2013 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 /****************************************************************************** * * AMDiS - Adaptive multidimensional simulations * * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis * * Authors: * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. * * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * * * This file is part of AMDiS * * See also license.opensource.txt in the distribution. * ******************************************************************************/  Thomas Witkowski committed Dec 16, 2010 20 21   Peter Gottschling committed Feb 15, 2008 22 23 24 25 26 27 28 29  /** \file BoundaryCondition.h */ #ifndef AMDIS_BOUNDARYCONDITION_H #define AMDIS_BOUNDARYCONDITION_H #include "Boundary.h" #include "FiniteElemSpace.h"  Peter Gottschling committed Apr 28, 2009 30 #include "AMDiS_fwd.h"  Peter Gottschling committed Feb 15, 2008 31 32 33 34 35 36 37 38 39 40  namespace AMDiS { /** * \ingroup Assembler * * \brief * Sub class of BoundaryCondition. Local boundary conditions are filled * while mesh traversal. */  Thomas Witkowski committed May 07, 2009 41  class BoundaryCondition  Peter Gottschling committed Feb 15, 2008 42 43  { public:  Thomas Witkowski committed May 07, 2009 44  /// Constructor.  Peter Gottschling committed Feb 15, 2008 45  BoundaryCondition(BoundaryType type,  Thomas Witkowski committed May 31, 2010 46  const FiniteElemSpace *rowFeSpace_,  Praetorius, Simon committed Oct 23, 2013 47  const FiniteElemSpace *colFeSpace_ = nullptr)  Peter Gottschling committed Feb 15, 2008 48  : boundaryType(type),  Thomas Witkowski committed May 31, 2010 49 50  rowFeSpace(rowFeSpace_), colFeSpace(colFeSpace_)  Peter Gottschling committed Feb 15, 2008 51  {  Thomas Witkowski committed May 31, 2010 52 53  if (!colFeSpace) colFeSpace = rowFeSpace;  Thomas Witkowski committed May 07, 2009 54  }  Peter Gottschling committed Feb 15, 2008 55   Thomas Witkowski committed May 07, 2009 56  /// Returns \ref boundaryType.  Thomas Witkowski committed May 25, 2009 57 58  inline BoundaryType getBoundaryType() {  Thomas Witkowski committed May 07, 2009 59 60  return boundaryType; }  Peter Gottschling committed Feb 15, 2008 61   Thomas Witkowski committed May 31, 2010 62 63  /// Returns \ref rowFeSpace. inline const FiniteElemSpace *getRowFeSpace()  Thomas Witkowski committed May 25, 2009 64  {  Thomas Witkowski committed May 31, 2010 65  return rowFeSpace;  Thomas Witkowski committed May 07, 2009 66  }  Peter Gottschling committed Feb 15, 2008 67   Thomas Witkowski committed May 31, 2010 68 69  /// Returns \ref rowFeSpace. inline const FiniteElemSpace *getColFeSpace()  Thomas Witkowski committed May 25, 2009 70  {  Thomas Witkowski committed May 31, 2010 71  return colFeSpace;  Thomas Witkowski committed May 07, 2009 72  }  Peter Gottschling committed Feb 15, 2008 73   Thomas Witkowski committed May 07, 2009 74  virtual void initMatrix(DOFMatrix*) {}  Peter Gottschling committed Feb 15, 2008 75   Thomas Witkowski committed May 07, 2009 76  virtual void exitMatrix(DOFMatrix*) {}  Peter Gottschling committed Feb 15, 2008 77   Thomas Witkowski committed May 07, 2009 78  virtual void initVector(DOFVectorBase*) {}  Peter Gottschling committed Feb 15, 2008 79   Thomas Witkowski committed May 07, 2009 80  virtual void exitVector(DOFVectorBase*) {}  Peter Gottschling committed Feb 15, 2008 81   Thomas Witkowski committed May 07, 2009 82 83  /// Destructor. virtual ~BoundaryCondition() {}  Peter Gottschling committed Feb 15, 2008 84   85 86 87  /// Adds the local boundary condition for elInfo to object. /// The dofIndices and localBound as well as nBasFcts are determined by // the calling BoundaryManager.  Peter Gottschling committed Feb 15, 2008 88 89 90 91  virtual void fillBoundaryCondition(DOFMatrix *matrix, ElInfo *elInfo, const DegreeOfFreedom *dofIndices, const BoundaryType *localBound,  Thomas Witkowski committed May 07, 2009 92  int nBasFcts) {}  Peter Gottschling committed Feb 15, 2008 93   94 95 96  /// Adds the local boundary condition for elInfo to vector. /// The dofIndices and localBound as well as nBasFcts are determined by /// the calling BoundaryManager.  Peter Gottschling committed Feb 15, 2008 97 98 99 100  virtual void fillBoundaryCondition(DOFVectorBase *vector, ElInfo *elInfo, const DegreeOfFreedom *dofIndices, const BoundaryType *localBound,  Thomas Witkowski committed May 07, 2009 101  int nBasFcts) {}  Peter Gottschling committed Feb 15, 2008 102   Thomas Witkowski committed May 07, 2009 103  /// Returns the boundary residual for the given element. Called by estimator.  Peter Gottschling committed Feb 15, 2008 104 105  virtual double boundResidual(ElInfo *elInfo, DOFMatrix *matrix,  Thomas Witkowski committed May 07, 2009 106 107 108 109  const DOFVectorBase *dv) { return 0.0; }  Peter Gottschling committed Feb 15, 2008 110   111 112  /// Returns whether the condition must be treated as Dirichlet condition /// while assemblage.  Thomas Witkowski committed May 25, 2009 113 114  virtual bool isDirichlet() {  Thomas Witkowski committed May 07, 2009 115 116  return false; }  Peter Gottschling committed Feb 15, 2008 117   Thomas Witkowski committed Oct 14, 2009 118 119 120 121 122 123  /// Returns whether the boundary condition is a periodic condition or not. virtual bool isPeriodic() { return false; }  124 125 126 127 128 129  /// In some situations it may be required to set Dirichlet boundary /// conditions, but not to apply them to the matrix. This is for example the /// case, if the boundary condition is set to a couple matrix. Then, the /// boundary conditions must be applied to the couple matrix, but they are /// set to all matrices in this row (to ensure that there are no other /// element entries in the Dirichlet boundary condition rows).  Thomas Witkowski committed May 25, 2009 130 131 132 133 134  virtual bool applyBoundaryCondition() { return true; }  Peter Gottschling committed Feb 15, 2008 135  protected:  136 137 138  /// Speciefies for which parts of the boundary the condition holds. /// This id corresponds to the boundary numbers spcified in the /// macro file.  Peter Gottschling committed Feb 15, 2008 139 140  BoundaryType boundaryType;  Thomas Witkowski committed May 07, 2009 141  /// FiniteElemSpace for this BoundaryCondition.  Thomas Witkowski committed May 31, 2010 142  const FiniteElemSpace *rowFeSpace;  Peter Gottschling committed Feb 15, 2008 143   Thomas Witkowski committed May 07, 2009 144  /// FiniteElemSpace for this BoundaryCondition.  Thomas Witkowski committed May 31, 2010 145  const FiniteElemSpace *colFeSpace;  Peter Gottschling committed Feb 15, 2008 146 147 148 149 150  }; } #endif