G+Smo  23.12.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gsMaterialMatrixIntegrateSingle< T, out > Class Template Reference

Detailed Description

template<class T, enum MaterialOutput out>
class gismo::gsMaterialMatrixIntegrateSingle< T, out >

This class serves as the integrator of material matrices, based on gsMaterialMatrixBase.

Template Parameters
TReal type
outOutput type (see MaterialOutput)
+ Inheritance diagram for gsMaterialMatrixIntegrateSingle< T, out >:
+ Collaboration diagram for gsMaterialMatrixIntegrateSingle< T, out >:

Public Types

typedef memory::shared_ptr
< gsFunction
Ptr
 Shared pointer for gsFunction.
 
typedef memory::unique_ptr
< gsFunction
uPtr
 Unique pointer for gsFunction.
 

Public Member Functions

gsMatrix< index_tactive (const gsMatrix< T > &u) const
 Returns the indices of active (nonzero) functions at points u, as a list of indices. More...
 
void active_into (const gsMatrix< T > &u, gsMatrix< index_t > &result) const
 Indices of active (non-zero) function(s) for each point. More...
 
const gsBasis< T > & basis (const index_t k) const
 Helper which casts and returns the k-th piece of this function set as a gsBasis.
 
uPtr clone ()
 Clone methode. Produceds a deep copy inside a uPtr.
 
virtual void compute (const gsMatrix< T > &in, gsFuncData< T > &out) const
 Computes function data. More...
 
virtual void computeMap (gsMapData< T > &InOut) const
 Computes map function data. More...
 
gsFuncCoordinate< T > coord (const index_t c) const
 Returns the scalar function giving the i-th coordinate of this function.
 
gsMatrix< T > deriv (const gsMatrix< T > &u) const
 Evaluate the derivatives,. More...
 
gsMatrix< T > deriv2 (const gsMatrix< T > &u) const
 Evaluates the second derivatives of active (i.e., non-zero) basis at points u. More...
 
virtual T distanceL2 (gsFunction< T > const &) const
 Computes the L2-distance between this function and the field and a function func.
 
short_t domainDim () const
 Domain dimension, always 2 for shells.
 
gsMatrix< T > eval (const gsMatrix< T > &u) const
 Evaluate the function,. More...
 
void eval_into (const gsMatrix< T > &u, gsMatrix< T > &result) const
 Implementation of eval_into, see gsFunction. More...
 
std::vector< gsMatrix< T > > evalAllDers (const gsMatrix< T > &u, int n) const
 Evaluate all derivatives upto order n,. More...
 
virtual void evalAllDers_into (const gsMatrix< T > &u, int n, std::vector< gsMatrix< T > > &result) const
 Evaluate the nonzero functions and their derivatives up to order n. If n is -1 then no computation is performed.
 
const gsFunction< T > & function (const index_t k) const
 Helper which casts and returns the k-th piece of this function set as a gsFunction.
 
 gsMaterialMatrixIntegrateSingle (index_t patch, gsMaterialMatrixBase< T > *materialMatrix, const gsFunctionSet< T > *deformed)
 Constructor.
 
 gsMaterialMatrixIntegrateSingle (index_t patch, gsMaterialMatrixBase< T > *materialMatrix, const gsFunctionSet< T > *undeformed, const gsFunctionSet< T > *deformed)
 Constructor.
 
virtual void invertPoints (const gsMatrix< T > &points, gsMatrix< T > &result, const T accuracy=1e-6, const bool useInitialPoint=false) const
 
int newtonRaphson (const gsVector< T > &value, gsVector< T > &arg, bool withSupport=true, const T accuracy=1e-6, int max_loop=100, T damping_factor=1) const
 
virtual index_t nPieces () const
 Number of pieces in the domain of definition.
 
virtual gsMatrix< T > parameterCenter () const
 Returns a "central" point inside inside the parameter domain.
 
gsMatrix< T > parameterCenter (const boxCorner &bc) const
 Get coordinates of the boxCorner bc in the parameter domain.
 
gsMatrix< T > parameterCenter (const boxSide &bs) const
 Get coordinates of the midpoint of the boxSide bs in the parameter domain.
 
virtual const gsFunctionpiece (const index_t k) const
 Returns the piece(s) of the function(s) at subdomain k.
 
virtual std::ostream & print (std::ostream &os) const
 Prints the object as a string.
 
void recoverPoints (gsMatrix< T > &xyz, gsMatrix< T > &uv, index_t k, const T accuracy=1e-6) const
 
index_t size () const
 size More...
 
short_t targetDim () const
 Target dimension. More...
 
Evaluation functions

These functions allow one to evaluate the function as well as its derivatives at one or more points in the parameter space. See also Evaluation members.

virtual void eval_component_into (const gsMatrix< T > &u, const index_t comp, gsMatrix< T > &result) const
 Evaluate the function for component comp in the target dimension at points u into result.
 
virtual void deriv_into (const gsMatrix< T > &u, gsMatrix< T > &result) const
 Evaluate derivatives of the function \(f:\mathbb{R}^n\rightarrow\mathbb{R}^m\) at points u into result. More...
 
virtual void jacobian_into (const gsMatrix< T > &u, gsMatrix< T > &result) const
 Computes for each point u a block of result containing the Jacobian matrix.
 
void div_into (const gsMatrix< T > &u, gsMatrix< T > &result) const
 Computes for each point u a block of result containing the divergence matrix.
 
gsMatrix< T > jacobian (const gsMatrix< T > &u) const
 
virtual void deriv2_into (const gsMatrix< T > &u, gsMatrix< T > &result) const
 Evaluate second derivatives of the function at points u into result. More...
 
virtual void hessian_into (const gsMatrix< T > &u, gsMatrix< T > &result, index_t coord=0) const
 
virtual gsMatrix< T > hessian (const gsMatrix< T > &u, index_t coord=0) const
 
virtual gsMatrix< T > laplacian (const gsMatrix< T > &u) const
 Evaluate the Laplacian at points u. More...
 

Protected Member Functions

gsMatrix< T > _eval (const gsMatrix< T > &u) const
 Integrateuates the base class in 3D, but on Z=0. More...
 
gsMatrix< T > _eval3D (const gsMatrix< T > &u, const gsMatrix< T > &Z) const
 Integrateuates the base class in 3D. More...
 
getMoment () const
 Gets the moment based on the output type. More...
 
void integrateZ_into (const gsMatrix< T > &u, const index_t moment, gsMatrix< T > &result) const
 Integrates through-thickness using Gauss integration. More...
 
void multiplyLinZ_into (const gsMatrix< T > &u, const index_t moment, gsMatrix< T > &result) const
 Uses the top and bottom parts of the thickness to compute the integral exactly. More...
 
void multiplyZ_into (const gsMatrix< T > &u, index_t moment, gsMatrix< T > &result) const
 Multiplies the evaluation at z=0 with 2.0/(moment+1) * Thalf^(moment + 1) More...
 
void setPatch (index_t p)
 Sets the patch index.
 

Private Member Functions

template<enum MaterialOutput _out>
std::enable_if< _out==MaterialOutput::VectorN||_out==MaterialOutput::VectorM,
gsMatrix< T > >::type 
eval3D_impl (const gsMatrix< T > &u, const gsMatrix< T > &Z) const
 Specialisation of eval3D for vectors.
 
template<enum MaterialOutput _out>
std::enable_if< _out==MaterialOutput::CauchyVectorN||_out==MaterialOutput::CauchyVectorM,
gsMatrix< T > >::type 
eval3D_impl (const gsMatrix< T > &u, const gsMatrix< T > &Z) const
 Specialisation of eval3D for vectors.
 
template<enum MaterialOutput _out>
std::enable_if< _out==MaterialOutput::MatrixA||_out==MaterialOutput::MatrixB||_out==MaterialOutput::MatrixC||_out==MaterialOutput::MatrixD,
gsMatrix< T > >::type 
eval3D_impl (const gsMatrix< T > &u, const gsMatrix< T > &Z) const
 Specialisation of eval3D for matrix.
 
template<enum MaterialOutput _out>
std::enable_if< _out==MaterialOutput::PStress||_out==MaterialOutput::PStressN||_out==MaterialOutput::PStressM,
gsMatrix< T > >::type 
eval3D_impl (const gsMatrix< T > &u, const gsMatrix< T > &Z) const
 Specialisation of eval3D for vectors.
 
template<enum MaterialOutput _out>
std::enable_if<!(_out==MaterialOutput::VectorN||_out==MaterialOutput::VectorM||_out==MaterialOutput::CauchyVectorN||_out==MaterialOutput::CauchyVectorM||_out==MaterialOutput::MatrixA||_out==MaterialOutput::MatrixB||_out==MaterialOutput::MatrixC||_out==MaterialOutput::MatrixD||_out==MaterialOutput::PStressN||_out==MaterialOutput::PStressM),
gsMatrix< T > >::type 
eval3D_impl (const gsMatrix< T > &u, const gsMatrix< T > &Z) const
 Specialisation of eval3D for other types.
 
template<enum MaterialOutput _out>
std::enable_if< _out==MaterialOutput::Density,
void >::type 
eval_into_impl (const gsMatrix< T > &u, gsMatrix< T > &result) const
 Specialisation of eval_into for densities.
 
template<enum MaterialOutput _out>
std::enable_if< _out==MaterialOutput::VectorN||_out==MaterialOutput::CauchyVectorN,
void >::type 
eval_into_impl (const gsMatrix< T > &u, gsMatrix< T > &result) const
 Specialisation of eval_into for the membrane stress tensor N.
 
template<enum MaterialOutput _out>
std::enable_if< _out==MaterialOutput::VectorM||_out==MaterialOutput::CauchyVectorM,
void >::type 
eval_into_impl (const gsMatrix< T > &u, gsMatrix< T > &result) const
 Specialisation of eval_into for the flexural stress tensor M.
 
template<enum MaterialOutput _out>
std::enable_if< _out==MaterialOutput::MatrixA||_out==MaterialOutput::MatrixB||_out==MaterialOutput::MatrixC||_out==MaterialOutput::MatrixD,
void >::type 
eval_into_impl (const gsMatrix< T > &u, gsMatrix< T > &result) const
 Specialisation of eval_into for the moments of the material matrices.
 
template<enum MaterialOutput _out>
std::enable_if< _out==MaterialOutput::PStressN||_out==MaterialOutput::PStressM,
void >::type 
eval_into_impl (const gsMatrix< T > &u, gsMatrix< T > &result) const
 Specialisation of eval_into for the membrane and flexural principle stresses.
 
template<enum MaterialOutput _out>
std::enable_if< _out==MaterialOutput::PStrainN||_out==MaterialOutput::PStrainM,
void >::type 
eval_into_impl (const gsMatrix< T > &u, gsMatrix< T > &result) const
 Specialisation of eval_into for the membrane and flexural principle stresses.
 
template<enum MaterialOutput _out>
std::enable_if< _out==MaterialOutput::Stretch,
void >::type 
eval_into_impl (const gsMatrix< T > &u, gsMatrix< T > &result) const
 Specialisation of eval_into for the stretches.
 
template<enum MaterialOutput _out>
std::enable_if< _out==MaterialOutput::StretchDir,
void >::type 
eval_into_impl (const gsMatrix< T > &u, gsMatrix< T > &result) const
 Specialisation of eval_into for the stretch directions.
 
template<enum MaterialOutput _out>
std::enable_if< _out==MaterialOutput::VectorN||_out==MaterialOutput::PStressN||_out==MaterialOutput::CauchyVectorN,
T >::type 
getMoment_impl () const
 Implementation of getMoment for MaterialOutput::VectorN; the moment is 0.
 
template<enum MaterialOutput _out>
std::enable_if< _out==MaterialOutput::VectorM||_out==MaterialOutput::PStressM||_out==MaterialOutput::CauchyVectorM,
T >::type 
getMoment_impl () const
 Implementation of getMoment for MaterialOutput::VectorM; the moment is 1.
 
template<enum MaterialOutput _out>
std::enable_if< _out==MaterialOutput::MatrixA,
T >::type 
getMoment_impl () const
 Implementation of getMoment for MaterialOutput::MatrixA; the moment is 0.
 
template<enum MaterialOutput _out>
std::enable_if< _out==MaterialOutput::MatrixB,
T >::type 
getMoment_impl () const
 Implementation of getMoment for MaterialOutput::MatrixB; the moment is 1.
 
template<enum MaterialOutput _out>
std::enable_if< _out==MaterialOutput::MatrixC,
T >::type 
getMoment_impl () const
 Implementation of getMoment for MaterialOutput::MatrixC; the moment is 1.
 
template<enum MaterialOutput _out>
std::enable_if< _out==MaterialOutput::MatrixD,
T >::type 
getMoment_impl () const
 Implementation of getMoment for MaterialOutput::MatrixD; the moment is 2.
 
template<enum MaterialOutput _out>
std::enable_if<!(_out==MaterialOutput::VectorN||_out==MaterialOutput::VectorM||_out==MaterialOutput::CauchyVectorN||_out==MaterialOutput::CauchyVectorM||_out==MaterialOutput::MatrixA||_out==MaterialOutput::MatrixB||_out==MaterialOutput::MatrixC||_out==MaterialOutput::MatrixD||_out==MaterialOutput::PStressN||_out==MaterialOutput::PStressM),
index_t >::type 
getMoment_impl () const
 Implementation of getMoment for MaterialOutput other than VectorN, VectorM, MatrixA, MatrixB, MatrixC, MatrixD, PStressN, PStressM.
 
template<enum MaterialOutput _out>
std::enable_if< _out==MaterialOutput::Density,
short_t >::type 
targetDim_impl () const
 Implementation of targetDim for densities.
 
template<enum MaterialOutput _out>
std::enable_if< _out==MaterialOutput::VectorN||_out==MaterialOutput::CauchyVectorN||_out==MaterialOutput::VectorM||_out==MaterialOutput::CauchyVectorM,
short_t >::type 
targetDim_impl () const
 Implementation of targetDim for stress tensors.
 
template<enum MaterialOutput _out>
std::enable_if< _out==MaterialOutput::MatrixA||_out==MaterialOutput::MatrixB||_out==MaterialOutput::MatrixC||_out==MaterialOutput::MatrixD,
short_t >::type 
targetDim_impl () const
 Implementation of targetDim for material tensors.
 
template<enum MaterialOutput _out>
std::enable_if< _out==MaterialOutput::PStressN||_out==MaterialOutput::PStressM||_out==MaterialOutput::PStrainN||_out==MaterialOutput::PStrainM,
short_t >::type 
targetDim_impl () const
 Implementation of targetDim for principal stress fields.
 
template<enum MaterialOutput _out>
std::enable_if< _out==MaterialOutput::Stretch,
short_t >::type 
targetDim_impl () const
 Implementation of targetDim for principal stretch fields.
 
template<enum MaterialOutput _out>
std::enable_if< _out==MaterialOutput::StretchDir,
short_t >::type 
targetDim_impl () const
 Implementation of targetDim for principal stress directions.
 

Member Function Documentation

gsMatrix< T > _eval ( const gsMatrix< T > &  u) const
protected

Integrateuates the base class in 3D, but on Z=0.

This function is primarily used in cases where the base class already integrates the material matrix or vectors

Parameters
[in]uThe evaluation points (in plane)
Returns
Matrix with results
gsMatrix< T > _eval3D ( const gsMatrix< T > &  u,
const gsMatrix< T > &  Z 
) const
protected

Integrateuates the base class in 3D.

Parameters
[in]uThe evaluation points (in plane)
[in]ZThe through-thickness coordinate
Returns
Matrix ordered over Z and over u within
gsMatrix<index_t> active ( const gsMatrix< T > &  u) const
inlineinherited

Returns the indices of active (nonzero) functions at points u, as a list of indices.

See Also
active_into()
void active_into ( const gsMatrix< T > &  u,
gsMatrix< index_t > &  result 
) const
inlinevirtualinherited

Indices of active (non-zero) function(s) for each point.

The columns are sorted in increasing order, if on a point there are less active then the number of rows in the result matrix (some other point has more actives) then the rest of the column is filled with 0s.

Parameters
u
result

Reimplemented from gsFunctionSet< T >.

void compute ( const gsMatrix< T > &  in,
gsFuncData< T > &  out 
) const
virtualinherited

Computes function data.

This function evaluates the functions and their derivatives at the points in and writes them in the corresponding fields of out. Which field to write (and what to compute) is controlled by the out.flags (see also gsFuncData).

The input points in are expected to be compatible with the implementation/representation of the function, i.e. they should be points inside the domain of definitition of the function

Parameters
[in]in
[out]out

Reimplemented in gsGeometry< T >, and gsConstantFunction< T >.

void computeMap ( gsMapData< T > &  InOut) const
virtualinherited

Computes map function data.

This function evaluates the functions and their derivatives at the points InOut.points and writes them in the corresponding fields of InOut. Which field to write (and what to compute) is controlled by the InOut.flags (see also gsMapData). This is intended for parametrizations only and it works on functions sets of cardinality 1 only.

Parameters
[in,out]InOut
gsMatrix< T > deriv ( const gsMatrix< T > &  u) const
inherited

Evaluate the derivatives,.

See Also
deriv_into()
gsMatrix< T > deriv2 ( const gsMatrix< T > &  u) const
inherited

Evaluates the second derivatives of active (i.e., non-zero) basis at points u.

See documentation for deriv2_into() (the one without input parameter coefs) for details.

See Also
deriv2_into()
Parameters
[in]uEvaluation points in columns.
Returns
For every column of u, a column containing the second derivatives. See documentation for deriv2_into() (the one without input parameter coefs) for details.
void deriv2_into ( const gsMatrix< T > &  u,
gsMatrix< T > &  result 
) const
virtualinherited

Evaluate second derivatives of the function at points u into result.

Let n be the dimension of the source space ( n = domainDim() ).
Let m be the dimension of the image/target space ( m = targetDim() ).
Let N denote the number of evaluation points.

Parameters
[in]ugsMatrix of size n x N, where each column of u represents one evaluation point.
[out]resultgsMatrix of size (S*m) x N, where S=n*(n+1)/2.
Each column in result corresponds to one point (i.e., one column in u)
and contains the following values (for n=3, m=3):
\( (\partial_{xx} f^{(1)}, \partial_{yy} f^{(1)}, \partial_{zz} f^{(1)}, \partial_{xy} f^{(1)}, \partial_{xz} f^{(1)}, \partial_{yz} f^{(1)}, \partial_{xx} f^{(2)},\ldots,\partial_{yz} f^{(3)} )^T\)
Warning
By default uses central finite differences with h=0.00001! One must override this function in derived classes to get proper results.

Reimplemented from gsFunctionSet< T >.

Reimplemented in gsGeometry< T >, gsFunctionExpr< T >, gsConstantFunction< T >, gsPreCICEFunction< T >, gsAffineFunction< T >, gsMappedSingleSpline< d, T >, gsGeometryTransform< T >, and gsFuncCoordinate< T >.

void deriv_into ( const gsMatrix< T > &  u,
gsMatrix< T > &  result 
) const
virtualinherited

Evaluate derivatives of the function \(f:\mathbb{R}^n\rightarrow\mathbb{R}^m\) at points u into result.

Let n be the dimension of the source space ( n = domainDim() ).
Let m be the dimension of the image/target space ( m = targetDim() ).
Let N denote the number of evaluation points.

Let \( f:\mathbb R^2 \rightarrow \mathbb R^3 \), i.e., \( f(x,y) = ( f^{(1)}(x,y), f^{(2)}(x,y), f^{(3)}(x,y) )^T\),
and let \( u = ( u_1, \ldots, u_N) = ( (x_1,y_1)^T, \ldots, (x_N, y_N)^T )\).
Then, result is of the form

\[ \left[ \begin{array}{cccc} \partial_x f^{(1)}(u_1) & \partial_x f^{(1)}(u_2) & \ldots & \partial_x f^{(1)}(u_N) \\ \partial_y f^{(1)}(u_1) & \partial_y f^{(1)}(u_2) & \ldots & \partial_y f^{(1)}(u_N) \\ \partial_x f^{(2)}(u_1) & \partial_x f^{(2)}(u_2) & \ldots & \partial_x f^{(2)}(u_N) \\ \partial_y f^{(2)}(u_1) & \partial_y f^{(2)}(u_2) & \ldots & \partial_x f^{(2)}(u_N) \\ \partial_x f^{(3)}(u_1) & \partial_x f^{(3)}(u_2) & \ldots & \partial_x f^{(3)}(u_N)\\ \partial_y f^{(3)}(u_1) & \partial_y f^{(3)}(u_2) & \ldots & \partial_y f^{(3)}(u_N) \end{array} \right] \]

Parameters
[in]ugsMatrix of size n x N, where each column of u represents one evaluation point.
[out]resultgsMatrix of size (n * m) x N. Each row of result corresponds to one component in the target space and contains the gradients for each evaluation point, as row vectors, one after the other (see above for details on the format).
Warning
By default, gsFunction uses central finite differences with h=0.00001! One must override this function in derived classes to get proper results.

Reimplemented from gsFunctionSet< T >.

Reimplemented in gsGeometry< T >, gsFunctionExpr< T >, gsConstantFunction< T >, gsPreCICEFunction< T >, gsAffineFunction< T >, gsMappedSingleSpline< d, T >, gsGeometrySlice< T >, gsSquaredDistance< T >, gsBasisFun< T >, gsGeometryTransform< T >, and gsFuncCoordinate< T >.

gsMatrix< T > eval ( const gsMatrix< T > &  u) const
inherited

Evaluate the function,.

See Also
eval_into()
void eval_into ( const gsMatrix< T > &  u,
gsMatrix< T > &  result 
) const
virtual

Implementation of eval_into, see gsFunction.

Non-parallel evaluation

Implements gsFunction< T >.

std::vector< gsMatrix< T > > evalAllDers ( const gsMatrix< T > &  u,
int  n 
) const
inherited

Evaluate all derivatives upto order n,.

See Also
evalAllDers_into
T getMoment ( ) const
inlineprotected

Gets the moment based on the output type.

for VectorN, the moment is 0 VectorM, the moment is 1 (unless MatIntegrated==Constant or MatIntegrated==Integrated) MatrixA, the moment is 0 MatrixB, the moment is 1 MatrixC, the moment is 1 MatrixD, the moment is 2 PStressN,the moment is 0 PStressM,the moment is 1

Returns
The moment.
virtual gsMatrix<T> hessian ( const gsMatrix< T > &  u,
index_t  coord = 0 
) const
inlinevirtualinherited

Evaluates the Hessian (matrix of second partial derivatives) of coordinate coord at points u.

void integrateZ_into ( const gsMatrix< T > &  u,
const index_t  moment,
gsMatrix< T > &  result 
) const
protected

Integrates through-thickness using Gauss integration.

Parameters
[in]uevaluation points (in plane)
[in]momentmoment to be taken
resultthe result
void invertPoints ( const gsMatrix< T > &  points,
gsMatrix< T > &  result,
const T  accuracy = 1e-6,
const bool  useInitialPoint = false 
) const
virtualinherited

Takes the physical points and computes the corresponding parameter values. If the point cannot be inverted (eg. is not part of the geometry) the corresponding parameter values will be undefined

gsMatrix< T > laplacian ( const gsMatrix< T > &  u) const
virtualinherited

Evaluate the Laplacian at points u.

By default uses central finite differences with h=0.00001

Reimplemented in gsFunctionExpr< T >.

void multiplyLinZ_into ( const gsMatrix< T > &  u,
const index_t  moment,
gsMatrix< T > &  result 
) const
protected

Uses the top and bottom parts of the thickness to compute the integral exactly.

This function assumes that the function \( h(z,...) \) to be integrated is of the form \( h(z,...) = f(...) + z g(...)\) (no higher-order terms!). This implies that \(f(...)\) is the even part and \(z g(...)\) is the odd part of h. Writing out the thickness integral for a moment \(\alpha\) gives:

\begin{eqnarray*} \int_{-t/2}^{t/2} z^\alpha h(z,...)\:\text{d}\z &= \int_{-t/2}^{t/2} z^\alpha f(...) + z^{\alpha+1} g(...)\:\text{d}\z \\ & = \frac{z^{\alpha+1}}{\alpha+1} f(...) + \frac{z^{\alpha+2}}{\alpha+2} g(...) \bigg\vert_{t/2}^{t/2} \\ & = \frac{z^{\alpha+1}}{\alpha+1} f(...) + \frac{z^{\alpha+1}}{\alpha+2} zg(...) \bigg\vert_{t/2}^{t/2} \\ & = \frac{1}{\alpha+1} \left[ \left(\frac{t}{2}\right)^{\alpha+1} - \left(-\frac{t}{2}\right)^{\alpha+1} \right]f(...) + \frac{1}{\alpha+2}\left[ \left(\frac{t}{2}\right)^{\alpha+2} - \left(-\frac{t}{2}\right)^{\alpha+2} \right] g(...) \bigg\vert_{t/2}^{t/2} \\ \end{eqnarray*}

From this we observe that for \(\alpha\) odd, the part of \(f\) contributes, whereas for \(\alpha\) even, the \(g\) part contributes. Remember our assumption on the form of \(h(z,...)\), then we can integrate this function by evaluating the following:

\begin{eqnarray*} \int_{-t/2}^{t/2} z^\alpha h(z,...)\:\text{d}\z = \begin{dcases} \frac{1}{\alpha+1} \left[ \left(\frac{t}{2}\right)^{\alpha+1} - \left(-\frac{t}{2}\right)^{\alpha+1} \right]h(...) & \text{} if $\alpha$ is odd} \\ \frac{1}{\alpha+2}\left[ \left(\frac{t}{2}\right)^{\alpha+1} - \left(-\frac{t}{2}\right)^{\alpha+1} \right] h(...) & \text{} if $\alpha$ is even} \end{dcases} \end{eqnarray*}

Parameters
[in]uevaluation points (in plane)
[in]momentmoment to be taken
resultthe result
void multiplyZ_into ( const gsMatrix< T > &  u,
index_t  moment,
gsMatrix< T > &  result 
) const
protected

Multiplies the evaluation at z=0 with 2.0/(moment+1) * Thalf^(moment + 1)

WARNING: Recommended use only for constant functions over thickness.

The function assumes that moments are handled inside the evaluation. For example, when we want to integrate \(f(z,...) = g(...) + zh(...)\) with different moments, then for moment 0, the function assumes that \(g(...)\) is evaluated, for moment 1, the function assumes that nothing is returned and for moment 2, it assumes that \(h\) is returned.

The function is equivalent to multiplyLinZ_into when moment = 2 here and moment = 1 in multiplyLinZ_into (given that the correct function is returned).

Parameters
[in]uevaluation points (in plane)
[in]momentmoment to be taken
resultthe result
int newtonRaphson ( const gsVector< T > &  value,
gsVector< T > &  arg,
bool  withSupport = true,
const T  accuracy = 1e-6,
int  max_loop = 100,
damping_factor = 1 
) const
inherited

Newton-Raphson method to find a solution of the equation f(arg) = value with starting vector arg. If the point cannot be inverted the corresponding parameter values will be undefined

void recoverPoints ( gsMatrix< T > &  xyz,
gsMatrix< T > &  uv,
index_t  k,
const T  accuracy = 1e-6 
) const
inherited

Recovers a point on the (geometry) together with its parameters uv, assuming that the k-th coordinate of the point xyz is not known (and has a random value as input argument).

index_t size ( ) const
inlinevirtualinherited

size

Warning
gsFunction and gsGeometry have size() == 1. This should not be confused with the size eg. of gsGeometry::basis(), which is the number of basis functions in the basis
Returns
the size of the function set: the total number of functions

Reimplemented from gsFunctionSet< T >.

Reimplemented in gsPiecewiseFunction< T >.

short_t targetDim ( ) const
inlinevirtual

Target dimension.

For a scalar (e.g. density) the target dimension is 1, for a vector (e.g. stress tensor in Voight notation) the target dimension is 3 and for a matrix (e.g. the material matrix) the target dimension is 9, which can be reshaped to a 3x3 matrix.

Returns
Returns the target dimension depending on the specified type (scalar, vector, matrix etc.)

Reimplemented from gsFunctionSet< T >.