G+Smo  25.01.0
Geometry + Simulation Modules
 
Loading...
Searching...
No Matches
gsBiharmonicPde.h
Go to the documentation of this file.
1
15#pragma once
16
17#include <gsPde/gsPde.h>
18
19namespace gismo
20{
21
46template<class T>
47class gsBiharmonicPde : public gsPde<T>
48{
49protected:
50 gsBiharmonicPde( ) { }
51 using gsPde<T>::m_domain;
52public:
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
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 }
94protected:
95 using gsPde<T>::m_unknownDim;
96
100}; // class gsBiharmonicPde
101
102} // namespace gismo
A Biharmonic PDE.
Definition gsBiharmonicPde.h:48
virtual int numRhs() const
gives the number of rhs functions of the PDEs
Definition gsBiharmonicPde.h:72
gsBiharmonicPde(const gsMultiPatch< T > &domain, const gsBoundaryConditions< T > &bc1, const gsBoundaryConditions< T > &bc2, const gsPiecewiseFunction< T > &rhs)
Constructor.
Definition gsBiharmonicPde.h:54
gsBoundaryConditions< T > m_boundary_conditions_second
Boundary conditions of the second kind.
Definition gsBiharmonicPde.h:99
std::ostream & print(std::ostream &os) const
Prints the object as a string.
Definition gsBiharmonicPde.h:88
Class containing a set of boundary conditions.
Definition gsBoundaryConditions.h:342
A function from a n-dimensional domain to an m-dimensional image.
Definition gsFunction.h:60
Container class for a set of geometry patches and their topology, that is, the interface connections ...
Definition gsMultiPatch.h:100
Abstract class representing a PDE (partial differential equation).
Definition gsPde.h:44
gsMultiPatch< T > & domain()
Returns a reference to the Pde domain.
Definition gsPde.h:66
gsVector< unsigned > m_unknownDim
Description of the unknown fields: for each one the target dimension.
Definition gsPde.h:162
gsMultiPatch< T > m_domain
Computational domain.
Definition gsPde.h:165
A function depending on an index i, typically referring to a patch/sub-domain. On each patch a differ...
Definition gsPiecewiseFunction.h:29
Base class of descriptions of a PDE problem.
The G+Smo namespace, containing all definitions for the library.