G+Smo  25.01.0
Geometry + Simulation Modules
 
Loading...
Searching...
No Matches
gsL2Projection.h
Go to the documentation of this file.
1
15#pragma once
16
18
19namespace gismo {
20
26template <class T>
28{
29
30protected:
31 typedef gsExprAssembler<>::geometryMap geometryMap;
32 typedef gsExprAssembler<>::space space;
33 typedef gsExprAssembler<>::solution solution;
34 typedef gsExprAssembler<>::element element;
35
51 static T _project( const gsMultiBasis<T> & integrationBasis,
52 const gsFunctionSet<T> & projectionBasis,
53 const gsFunctionSet<T> & geometryMap,
54 const gsFunctionSet<T> & sourceFunction,
55 gsMatrix<T> & coefs,
56 const gsOptionList & options);
57
58
59public:
60
70 static T project( const gsMultiBasis<T> & projectionBasis,
71 const gsMultiPatch<T> & geometryMap,
72 gsMatrix<T> & coefs,
73 const gsOptionList & options = gsOptionList())
74 {
75 return _project(projectionBasis, projectionBasis, geometryMap, geometryMap, coefs, options);
76 }
77
88 static T project( const gsMultiBasis<T> & integrationBasis,
89 const gsFunctionSet<T>& projectionBasis,
90 const gsMultiPatch<T> & geometryMap,
91 gsMatrix<T> & coefs,
92 const gsOptionList & options = gsOptionList())
93 {
94 return _project(integrationBasis, projectionBasis, geometryMap, geometryMap, coefs, options);
95 }
96
106 static T project( const gsBasis<T> & projectionBasis,
107 const gsGeometry<T> & geometryMap,
108 gsMatrix<T> & coefs,
109 const gsOptionList & options = gsOptionList())
110 {
111 gsMultiBasis<T> basis(projectionBasis);
112 gsMultiPatch<T> geometry(geometryMap);
113 return _project(basis, basis, geometry, geometry, coefs, options);
114
115 }
116
127 static T project( const gsBasis<T> & projectionBasis,
128 const gsBasis<T> & integrationBasis,
129 const gsGeometry<T> & geometryMap,
130 gsMatrix<T> & coefs,
131 const gsOptionList & options = gsOptionList())
132 {
133 gsMultiBasis<T> basis(projectionBasis);
134 gsMultiBasis<T> intbasis(integrationBasis);
135 gsMultiPatch<T> geometry(geometryMap);
136 return _project(intbasis, basis, geometry, geometry, coefs, options);
137 }
138
149 static T project( const gsMultiBasis<T> & projectionBasis,
150 const gsMultiPatch<T> & geometryMap,
151 const gsFunctionSet<T> & sourceFunction,
152 gsMatrix<T> & coefs,
153 const gsOptionList & options = gsOptionList())
154 {
155 return _project(projectionBasis, projectionBasis, geometryMap, sourceFunction, coefs, options);
156 }
157
169 static T project( const gsFunctionSet<T> & projectionBasis,
170 const gsMultiBasis<T> & integrationBasis,
171 const gsMultiPatch<T> & geometryMap,
172 const gsFunctionSet<T> & sourceFunction,
173 gsMatrix<T> & coefs,
174 const gsOptionList & options = gsOptionList())
175 {
176 return _project(integrationBasis, projectionBasis, geometryMap, sourceFunction, coefs, options);
177 }
178
189 static T project( const gsBasis<T> & projectionBasis,
190 const gsGeometry<T> & geometryMap,
191 const gsFunction<T> & sourceFunction,
192 gsMatrix<T> & coefs,
193 const gsOptionList & options = gsOptionList())
194 {
195 gsMultiBasis<T> basis(projectionBasis);
196 gsMultiPatch<T> geometry(geometryMap);
197 return _project(basis, basis, geometry, sourceFunction, coefs, options);
198 }
199
211 static T project( const gsBasis<T> & projectionBasis,
212 const gsBasis<T> & integrationBasis,
213 const gsGeometry<T> & geometryMap,
214 const gsFunction<T> & sourceFunction,
215 gsMatrix<T> & coefs,
216 const gsOptionList & options = gsOptionList())
217 {
218 gsMultiBasis<T> basis(projectionBasis);
219 gsMultiBasis<T> intbasis(integrationBasis);
220 gsMultiPatch<T> geometry(geometryMap);
221 return _project(intbasis, basis, geometry, sourceFunction, coefs, options);
222 }
223
234 GISMO_DEPRECATED
235 static T projectGeometry( const gsBasis<T> & basis,
236 const gsGeometry<T> & geometry,
237 gsMatrix<T> & result);
238
249 GISMO_DEPRECATED
250 static T projectGeometry( const gsMultiBasis<T> & basis,
251 const gsFunctionSet<T> & geometry,
252 gsMatrix<T> & result);
253
264 GISMO_DEPRECATED
265 static T projectGeometry( const gsMultiBasis<T> & basis,
266 const gsFunctionSet<T> & geometry,
267 gsMultiPatch<T> & result);
268
280 GISMO_DEPRECATED
281 static T projectGeometry( const gsMultiBasis<T> & intbasis,
282 const gsMappedBasis<2,T> & basis,
283 const gsFunctionSet<T> & geometry,
284 gsMatrix<T> & result);
285
296 GISMO_DEPRECATED
297 static T projectFunction( const gsMultiBasis<T> & basis,
298 const gsFunctionSet<T> & source,
299 const gsMultiPatch<T> & geometry,
300 gsMatrix<T> & result);
301
312 GISMO_DEPRECATED
313 static T projectFunction( const gsMultiBasis<T> & basis,
314 const gsFunctionSet<T> & source,
315 const gsMultiPatch<T> & geometry,
316 gsMultiPatch<T> & result);
317
329 GISMO_DEPRECATED
330 static T projectFunction( const gsMultiBasis<T> & intbasis,
331 const gsMappedBasis<2,T>& basis,
332 const gsFunctionSet<T> & source,
333 const gsMultiPatch<T> & geometry,
334 gsMatrix<T> & result);
335
346 GISMO_DEPRECATED
347 static T projectGeometryBoundaries( const gsMultiBasis<T> & basis,
348 const gsMultiPatch<T> & geometry,
349 gsMultiPatch<T> & result);
350
351
363 GISMO_DEPRECATED
364 static T projectGeometryPenalty( const gsMultiBasis<T> & basis,
365 const gsMultiPatch<T> & geometry,
366 gsMultiPatch<T> & result,
367 T penalty = 1e3);
368
369
370}; //struct
371
372} // gismo
373
374#ifndef GISMO_BUILD_LIB
375#include GISMO_HPP_HEADER(gsL2Projection.hpp)
376#endif
Definition gsExpressions.h:973
A basis represents a family of scalar basis functions defined over a common parameter domain.
Definition gsBasis.h:79
gsExprHelper< T >::geometryMap geometryMap
Geometry map type.
Definition gsExprAssembler.h:65
gsExprHelper< T >::element element
Current element.
Definition gsExprAssembler.h:64
expr::gsFeSolution< T > solution
Solution type.
Definition gsExprAssembler.h:68
Interface for the set of functions defined on a domain (the total number of functions in the set equa...
Definition gsFunctionSet.h:219
A function from a n-dimensional domain to an m-dimensional image.
Definition gsFunction.h:60
Abstract base class representing a geometry map.
Definition gsGeometry.h:93
A matrix with arbitrary coefficient type and fixed or dynamic size.
Definition gsMatrix.h:41
Holds a set of patch-wise bases and their topology information.
Definition gsMultiBasis.h:37
Container class for a set of geometry patches and their topology, that is, the interface connections ...
Definition gsMultiPatch.h:100
Class which holds a list of parameters/options, and provides easy access to them.
Definition gsOptionList.h:33
Generic expressions matrix assembly.
The G+Smo namespace, containing all definitions for the library.
Class that performs an L2 projection.
Definition gsL2Projection.h:28
static GISMO_DEPRECATED T projectFunction(const gsMultiBasis< T > &basis, const gsFunctionSet< T > &source, const gsMultiPatch< T > &geometry, gsMatrix< T > &result)
Projects a function on a basis.
Definition gsL2Projection.hpp:229
static T _project(const gsMultiBasis< T > &integrationBasis, const gsFunctionSet< T > &projectionBasis, const gsFunctionSet< T > &geometryMap, const gsFunctionSet< T > &sourceFunction, gsMatrix< T > &coefs, const gsOptionList &options)
Projects a source function onto a projection basis using a geometry map.
Definition gsL2Projection.hpp:23
static GISMO_DEPRECATED T projectGeometry(const gsBasis< T > &basis, const gsGeometry< T > &geometry, gsMatrix< T > &result)
Projects a source geometry onto basis and returns it in result.
Definition gsL2Projection.hpp:74
static T project(const gsFunctionSet< T > &projectionBasis, const gsMultiBasis< T > &integrationBasis, const gsMultiPatch< T > &geometryMap, const gsFunctionSet< T > &sourceFunction, gsMatrix< T > &coefs, const gsOptionList &options=gsOptionList())
Project a function onto a basis.
Definition gsL2Projection.h:169
static T project(const gsMultiBasis< T > &projectionBasis, const gsMultiPatch< T > &geometryMap, gsMatrix< T > &coefs, const gsOptionList &options=gsOptionList())
Project a geometry onto a basis (multi-patch)
Definition gsL2Projection.h:70
static T project(const gsBasis< T > &projectionBasis, const gsBasis< T > &integrationBasis, const gsGeometry< T > &geometryMap, const gsFunction< T > &sourceFunction, gsMatrix< T > &coefs, const gsOptionList &options=gsOptionList())
Project a function onto a basis.
Definition gsL2Projection.h:211
static T project(const gsBasis< T > &projectionBasis, const gsGeometry< T > &geometryMap, gsMatrix< T > &coefs, const gsOptionList &options=gsOptionList())
Project a geometry onto a basis (single patch)
Definition gsL2Projection.h:106
static T project(const gsBasis< T > &projectionBasis, const gsBasis< T > &integrationBasis, const gsGeometry< T > &geometryMap, gsMatrix< T > &coefs, const gsOptionList &options=gsOptionList())
Project a geometry onto a basis (single patch)
Definition gsL2Projection.h:127
static T project(const gsMultiBasis< T > &projectionBasis, const gsMultiPatch< T > &geometryMap, const gsFunctionSet< T > &sourceFunction, gsMatrix< T > &coefs, const gsOptionList &options=gsOptionList())
Project a function onto a basis.
Definition gsL2Projection.h:149
static GISMO_DEPRECATED T projectGeometryBoundaries(const gsMultiBasis< T > &basis, const gsMultiPatch< T > &geometry, gsMultiPatch< T > &result)
Projects a source geometry onto basis and returns it in result. Fixes the boundaries.
Definition gsL2Projection.hpp:286
static T project(const gsBasis< T > &projectionBasis, const gsGeometry< T > &geometryMap, const gsFunction< T > &sourceFunction, gsMatrix< T > &coefs, const gsOptionList &options=gsOptionList())
Project a function onto a basis.
Definition gsL2Projection.h:189
static T project(const gsMultiBasis< T > &integrationBasis, const gsFunctionSet< T > &projectionBasis, const gsMultiPatch< T > &geometryMap, gsMatrix< T > &coefs, const gsOptionList &options=gsOptionList())
Project a geometry onto a basis (multi-patch)
Definition gsL2Projection.h:88
static GISMO_DEPRECATED T projectGeometryPenalty(const gsMultiBasis< T > &basis, const gsMultiPatch< T > &geometry, gsMultiPatch< T > &result, T penalty=1e3)
Projects a source geometry onto basis and returns it in result. Penalizes interfaces and boundaries.
Definition gsL2Projection.hpp:330