G+Smo  24.08.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gsBasePde.h
Go to the documentation of this file.
1 
16 #pragma once
17 
18 #include <gsPde/gsPde.h>
20 
21 namespace gismo
22 {
23 
24 template<class T>
25 class gsBasePde : public gsPde<T>
26 {
27 
28 public:
29 
31  gsBasePde( ) { }
32 
34  gsBasePde(const gsMultiPatch<T> &domain,
35  const gsBoundaryConditions<T> &bc,
36  const gsPiecewiseFunction<T> &rhs)
37  : gsPde<T>(domain,bc), m_rhs(rhs)
38  {
39  m_unknownDim.setOnes(m_rhs.targetDim());
40  }
41 
45  virtual int numRhs() const { return 1; }
47  virtual std::ostream &print(std::ostream &os) const { return os; }
48  const gsFunction<T> * rhs() const { return &m_rhs.piece(0); }
49  virtual int numUnknowns() const {return m_rhs.targetDim();}
50 
51 protected:
52  using gsPde<T>::m_unknownDim;
53  gsPiecewiseFunction<T> m_rhs;
54 };
55 
56 } // namespace gismo
Base class of descriptions of a PDE problem.
Provides declaration of a gsPiecewiseFunction class.
gsVector< unsigned > m_unknownDim
Description of the unknown fields: for each one the target dimension.
Definition: gsPde.h:162