G+Smo  25.01.0
Geometry + Simulation Modules
 
Loading...
Searching...
No Matches
gsPatchwiseFunction.h
Go to the documentation of this file.
1
14#pragma once
15
16#include <gsCore/gsFunction.h>
17
18namespace gismo
19{
20
31template <class T>
33{
34public:
35
36 virtual ~gsPatchwiseFunction() { }
37
38 GISMO_UPTR_FUNCTION_PURE(gsPatchwiseFunction, clone)
39
40 operator const gsFunction<T> & ()
41 {
42 return piece(0);
43 }
44
45public:
46
47 virtual const gsFunction<T> & piece(const index_t i) const = 0;
48
49 virtual index_t size() const = 0;
50
51public:
52
53 inline const gsFunction<T> & operator [] (const index_t i) const
54 {
55 return piece(i);
56 }
57
58 std::ostream &print(std::ostream &os) const
59 {
60 os << "Patch-wise function.\n";
61 return os;
62 }
63
64 friend std::ostream & operator<<(std::ostream &os, const gsPatchwiseFunction &pwf)
65 {
66 return pwf.print(os);
67 }
68};
69
70} // namespace gismo
71
Interface for the set of functions defined on a domain (the total number of functions in the set equa...
Definition gsFunctionSet.h:219
uPtr clone()
Clone methode. Produceds a deep copy inside a uPtr.
A function from a n-dimensional domain to an m-dimensional image.
Definition gsFunction.h:60
A function depending on an index i, typically referring to a patch/sub-domain.
Definition gsPatchwiseFunction.h:33
virtual index_t size() const =0
size
virtual const gsFunction< T > & piece(const index_t i) const =0
Returns the piece(s) of the function(s) at subdomain k.
std::ostream & print(std::ostream &os) const
Prints the object as a string.
Definition gsPatchwiseFunction.h:58
#define index_t
Definition gsConfig.h:32
Provides declaration of Function abstract interface.
The G+Smo namespace, containing all definitions for the library.