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
77 ev.setIntegrationElements(mb);
78 auto G = ev.getMap(this->patches());
79 auto f1a = ev.getVariable(*m_fields);
80 auto f1b = ev.getVariable(*m_fields, G);
81 auto f2a = ev.getVariable(func);
82 auto f2b = ev.getVariable(func, G);
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);
bool m_parametric
True iff this is an isogeometric field.
Definition: gsField.h:297
T integral(const expr::_expr< E > &expr)
Calculates the integral of the expression expr on the whole integration domain.
Definition: gsExprEvaluator.h:154
gsFunctionSet< T >::Ptr m_fields
Vector containing "local fields" for each patch/subdomain.
Definition: gsField.h:286
#define GISMO_NO_IMPLEMENTATION
Definition: gsDebug.h:129
void setIntegrationElements(const gsMultiBasis< T > &mesh)
Sets the domain of integration.
Definition: gsExprEvaluator.h:110
A scalar of vector field defined on a m_parametric geometry.
Definition: gsField.h:54
T distanceH2(gsFunctionSet< T > const &func, bool isFunc_param=false) const
Definition: gsField.hpp:66
Generic expressions helper.
T distanceDG(gsFunctionSet< T > const &func, bool isFunc_param=false, int=1000) const
Definition: gsField.hpp:122
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
Generic expressions evaluator.
Holds a set of patch-wise bases and their topology information.
Definition: gsMultiBasis.h:36
Provides declaration of DomainIterator abstract interface.
Interface for the set of functions defined on a domain (the total number of functions in the set equa...
Definition: gsFuncData.h:23
Container class for a set of geometry patches and their topology, that is, the interface connections ...
Definition: gsMultiPatch.h:33
Generic evaluator of isogeometric expressions.
Definition: gsExprEvaluator.h:38
T distanceH1(gsFunctionSet< T > const &func, bool isFunc_param=false, int=1000) const
Definition: gsField.hpp:111
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
#define GISMO_UNUSED(x)
Definition: gsDebug.h:112
EIGEN_STRONG_INLINE meas_expr< T > meas(const gsGeometryMap< T > &G)
The measure of a geometry map.
Definition: gsExpressions.h:4555
geometryMap getMap(const gsMultiPatch< T > &mp)
Registers mp as an isogeometric geometry map and return a handle to it.
Definition: gsExprEvaluator.h:116