32 auto G = ev.
getMap(this->patches());
37 if (m_parametric && isFunc_param)
return math::sqrt( ev.
integral((f1a-f2a).sqNorm() * meas(G)) );
38 if (m_parametric)
return math::sqrt( ev.
integral((f1a-f2b).sqNorm() * meas(G)) );
39 if (isFunc_param)
return math::sqrt( ev.
integral((f1b-f2a).sqNorm() * meas(G)) );
40 return math::sqrt( ev.
integral((f1b-f2b).sqNorm() * meas(G)) );
51 auto G = ev.
getMap(this->patches());
56 if (m_parametric && isFunc_param)
57 return math::sqrt(ev.
integral( ( igrad(f1a,G) - igrad(f2a,G)).sqNorm()*meas(G) ) );
59 return math::sqrt(ev.
integral( ( igrad(f1a,G) - igrad(f2b)).sqNorm()*meas(G) ) );
61 return math::sqrt(ev.
integral( ( igrad(f1b) - igrad(f2a,G)).sqNorm()*meas(G) ) );
62 return math::sqrt(ev.
integral( ( igrad(f1b) - igrad(f2b)).sqNorm()*meas(G) ) );
67 bool isFunc_param)
const
78 auto G = ev.
getMap(this->patches());
84 if (m_parametric && isFunc_param)
85 return math::sqrt(ev.
integral( ( ihess(f1a,G) - ihess(f2a,G)).sqNorm()*meas(G) ) );
87 return math::sqrt(ev.
integral( (ihess(f1a,G) - ihess(f2b)).sqNorm()*meas(G) ) );
89 return math::sqrt(ev.
integral( ( ihess(f1b) - ihess(f2a,G)).sqNorm()*meas(G) ) );
90 return math::sqrt(ev.
integral( ( ihess(f1b) - ihess(f2b)).sqNorm()*meas(G) ) );
107 return distanceL2(func, mb, isFunc_param, numEvals);
118 return distanceH1(func, mb, isFunc_param);
Generic evaluator of isogeometric expressions.
Definition gsExprEvaluator.h:39
void setIntegrationElements(const gsMultiBasis< T > &mesh)
Sets the domain of integration.
Definition gsExprEvaluator.h:110
T integral(const expr::_expr< E > &expr)
Calculates the integral of the expression expr on the whole integration domain.
Definition gsExprEvaluator.h:154
variable getVariable(const gsFunctionSet< T > &func, index_t dim=1)
Registers func as a variable and returns a handle to it.
Definition gsExprEvaluator.h:124
geometryMap getMap(const gsMultiPatch< T > &mp)
Registers mp as an isogeometric geometry map and return a handle to it.
Definition gsExprEvaluator.h:116
A scalar of vector field defined on a m_parametric geometry.
Definition gsField.h:55
gsFunctionSet< T >::Ptr m_fields
Vector containing "local fields" for each patch/subdomain.
Definition gsField.h:286
T distanceH1(gsFunctionSet< T > const &func, bool isFunc_param=false, int=1000) const
Definition gsField.hpp:111
bool m_parametric
True iff this is an isogeometric field.
Definition gsField.h:297
T distanceDG(gsFunctionSet< T > const &func, bool isFunc_param=false, int=1000) const
Definition gsField.hpp:122
T distanceL2(gsField< T > const &field, int numEvals=1000) const
Computes the L2-distance between the two fields, on the physical domain.
Definition gsField.hpp:94
T distanceH2(gsFunctionSet< T > const &func, bool isFunc_param=false) const
Definition gsField.hpp:66
Interface for the set of functions defined on a domain (the total number of functions in the set equa...
Definition gsFunctionSet.h:219
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
#define GISMO_NO_IMPLEMENTATION
Definition gsDebug.h:129
#define GISMO_UNUSED(x)
Definition gsDebug.h:112
Provides declaration of DomainIterator abstract interface.
Generic expressions evaluator.
Generic expressions helper.
The G+Smo namespace, containing all definitions for the library.