G+Smo  24.08.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gsBiharmonicPde.h
Go to the documentation of this file.
1 
15 #pragma once
16 
17 #include <gsPde/gsPde.h>
18 
19 namespace gismo
20 {
21 
46 template<class T>
47 class gsBiharmonicPde : public gsPde<T>
48 {
49 protected:
50  gsBiharmonicPde( ) { }
51  using gsPde<T>::m_domain;
52 public:
55  const gsMultiPatch<T> &domain,
56  const gsBoundaryConditions<T> &bc1,
57  const gsBoundaryConditions<T> &bc2,
58  const gsPiecewiseFunction<T> &rhs
59  )
60  : gsPde<T>(domain,bc1), m_rhs(rhs), m_boundary_conditions_second(bc2)
61  {
62  m_unknownDim.setOnes(1);
63  }
64 
65 
66  ~gsBiharmonicPde( )
67  { }
68 
72  virtual int numRhs() const
73  {
74  return m_rhs.piece(0).targetDim();
75  }
76 
77  const gsFunction<T> * rhs() const { return &m_rhs.piece(0); }
78 
79  const gsBoundaryConditions<T> & bcFirstKind() const {return this->bc();}
80 
81  const gsBoundaryConditions<T> & bcSecondKind() const {return m_boundary_conditions_second;}
82 
83  gsBoundaryConditions<T> &boundaryConditionsSecond() {return m_boundary_conditions_second;}
84 
85  const gsBoundaryConditions<T> &boundaryConditionsSecond() const {return m_boundary_conditions_second;}
86 
88  std::ostream &print(std::ostream &os) const
89  {
90  os<<"Biharmonic's equation -\u0394^2 u = f , with:\n";
91  os<<"Source function f= "<< m_rhs.piece(0) <<".\n";
92  return os;
93  }
94 protected:
96 
100 }; // class gsBiharmonicPde
101 
102 } // namespace gismo
gsMultiPatch< T > & domain()
Returns a reference to the Pde domain.
Definition: gsPde.h:66
Abstract class representing a PDE (partial differential equation).
Definition: gsPde.h:43
virtual int numRhs() const
gives the number of rhs functions of the PDEs
Definition: gsBiharmonicPde.h:72
A function from a n-dimensional domain to an m-dimensional image.
Definition: gsFunction.h:59
Base class of descriptions of a PDE problem.
A Biharmonic PDE.
Definition: gsBiharmonicPde.h:47
Container class for a set of geometry patches and their topology, that is, the interface connections ...
Definition: gsMultiPatch.h:33
gsBiharmonicPde(const gsMultiPatch< T > &domain, const gsBoundaryConditions< T > &bc1, const gsBoundaryConditions< T > &bc2, const gsPiecewiseFunction< T > &rhs)
Constructor.
Definition: gsBiharmonicPde.h:54
Class containing a set of boundary conditions.
Definition: gsBoundaryConditions.h:341
std::ostream & print(std::ostream &os) const
Prints the object as a string.
Definition: gsBiharmonicPde.h:88
A function depending on an index i, typically referring to a patch/sub-domain. On each patch a differ...
Definition: gsPiecewiseFunction.h:28
gsBoundaryConditions< T > m_boundary_conditions_second
Boundary conditions of the second kind.
Definition: gsBiharmonicPde.h:99
gsVector< unsigned > m_unknownDim
Description of the unknown fields: for each one the target dimension.
Definition: gsPde.h:162