LifeV
AssemblyElemental.hpp File Reference

File containing the procedures for the local assembly of the differential operators. More...

+ Include dependency graph for AssemblyElemental.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 LifeV
 Default Physical Solver.
 
 LifeV::AssemblyElemental
 

Functions

void mass (MatrixElemental &localMass, const CurrentFE &massCFE, const Real &coefficient, const UInt &fieldDim)
 Elementary mass for constant mass coefficient. More...
 
template<typename localVector >
void weightedMass (MatrixElemental &localMass, const CurrentFE &massCFE, const Real &coefficient, const localVector &localValues, const UInt &fieldDim)
 Elementary weighted mass for constant mass coefficient. More...
 
void stiffness (MatrixElemental &localStiff, const CurrentFE &stiffCFE, const Real &coefficient, const UInt &fieldDim)
 Elementary stiffness for constant coefficient. More...
 
template<typename localVector , typename globalVector >
void interpolate (localVector &localValues, const CurrentFE &interpCFE, const UInt &spaceDim, const DOF &betaDof, const UInt &elementID, const globalVector &beta)
 Interpolation procedure. More...
 
template<typename localVector , typename globalVector >
void interpolateGradient (localVector &localGradient, const CurrentFE &interpCFE, const UInt &spaceDim, const DOF &betaDof, const UInt &elementID, const globalVector &beta)
 Interpolation of the gradient. More...
 
template<typename localVector , typename globalVector >
void interpolateDivergence (localVector &localDivergence, const CurrentFE &interpCFE, const DOF &betaDof, const UInt &elementID, const globalVector &beta)
 Interpolation of the divergence. More...
 
template<typename localVector >
void massDivW (MatrixElemental &localMass, const CurrentFE &massCFE, const Real &coefficient, const localVector &localValues, const UInt &fieldDim)
 
template<typename localVector >
void advection (MatrixElemental &localAdv, const CurrentFE &advCFE, const Real &coefficient, const localVector &localValues, const UInt &fieldDim)
 Elementary advection u v. More...
 
void advectionNewton (Real coef, VectorElemental &vel, MatrixElemental &elmat, const CurrentFE &fe, int iblock, int jblock)
 Assemble the term $ \int_\Omega \phi_j\cdot\mathbf{u}\phi_i$. More...
 
template<typename localTensor >
void symmetrizedAdvection (MatrixElemental &localAdv, const CurrentFE &advCFE, const Real &coefficient, const localTensor &localGradient, const UInt &fieldDim)
 Elementary advection, term u v. More...
 
void grad (MatrixElemental &elmat, const CurrentFE &uCFE, const CurrentFE &pCFE, const UInt &fieldDim)
 
void divergence (MatrixElemental &elmat, const CurrentFE &uCFE, const CurrentFE &pCFE, const UInt &fieldDim, const Real &coefficient)
 
void stiffStrain (MatrixElemental &localStiff, const CurrentFE &stiffCFE, const Real &coefficient, const UInt &fieldDim)
 
void bodyForces (VectorElemental &localForce, const CurrentFE &massRhsCFE, const function_Type &fun, const Real &t, const UInt &fieldDim)
 
void grad (const int icoor, const VectorElemental &vec_loc, MatrixElemental &elmat, const CurrentFE &fe1, const CurrentFE &fe2, int iblock, int jblock)
 Convective term with a local vector coefficient (useful for Navier-Stokes problem) More...
 
void grad (const int icoor, const VectorElemental &vec_loc, MatrixElemental &elmat, const CurrentFE &fe1, const CurrentFE &fe2, const CurrentFE &fe3, int iblock=0, int jblock=0)
 Convective term with a local vector coefficient (useful for Navier-Stokes problem+adv-diff) More...
 
void grad (const int &icoor, const std::vector< Real > &localVector, MatrixElemental &elmat, const CurrentFE &currentFE1, const CurrentFE &currentFE2, const int &iblock=0, const int &jblock=0)
 Conective term with a local vector given by quadrature node. More...
 
void grad_ss (const int icoor, const VectorElemental &vec_loc, MatrixElemental &elmat, const CurrentFE &fe1, const CurrentFE &fe2, int iblock=0, int jblock=0)
 Convective term with a local vector coefficient for Navier-Stokes problem in Skew-Symmetric form. More...
 
void stiff_sd (Real coef, const VectorElemental &vec_loc, MatrixElemental &elmat, const CurrentFE &fe, const CurrentFE &fe2, int iblock=0, int jblock=0, int nb=1)
 StreamLine Diffusion. More...
 
template<typename UsrFct >
void source (const UsrFct &fct, VectorElemental &elvec, const CurrentFE &fe, int iblock=0)
 source $ \int fct \phi_i $ More...
 
template<typename UsrFct >
void source (const UsrFct &fct, VectorElemental &elvec, const CurrentFE &fe, Real t, int iblock=0)
 source $ \int fct(t) \phi_i$ More...
 
void source (Real coef, VectorElemental &f, VectorElemental &elvec, const CurrentFE &fe, int fblock, int eblock)
 
void source_fhn (Real coef_f, Real coef_a, VectorElemental &u, VectorElemental &elvec, const CurrentFE &fe, int fblock, int eblock)
 
void source_advection (const Real &coefficient, const VectorElemental &beta_loc, const VectorElemental &uk_loc, VectorElemental &elvec, const CurrentFE &fe)
 $(beta\cdot\nabla u^k, v )$ More...
 

Public typedefs

typedef boost::numeric::ublas::matrix< Real > Matrix
 
typedef boost::numeric::ublas::zero_matrix< Real > ZeroMatrix
 

Public typedefs

typedef std::function< const Real(const Real &, const Real &, const Real &, const Real &, const ID &) > function_Type
 Use the portable syntax of the boost function. More...
 

Operators for classical finite elements

void mass (Real coef, MatrixElemental &elmat, const CurrentFE &fe, int iblock=0, int jblock=0)
 coef(t,x,y,z,u) More...
 
void mass (Real coef, MatrixElemental &elmat, const CurrentFE &fe, int iblock, int jblock, UInt nb)
 
void mass (const std::vector< Real > &qpt_coef, MatrixElemental &elmat, const CurrentFE &fe, int iblock, int jblock, UInt nb)
 Mass term with coefficients given for each quadrature point. More...
 
void stiff (Real coef, MatrixElemental &elmat, const CurrentFE &fe, int iblock, int jblock)
 
void stiff (Real coef, Real(*fct)(Real, Real, Real), MatrixElemental &elmat, const CurrentFE &fe, int iblock, int jblock)
 
void stiff (Real coef, MatrixElemental &elmat, const CurrentFE &fe, int iblock, int jblock, int nb)
 
void stiff (const std::vector< Real > &qpt_coef, MatrixElemental &elmat, const CurrentFE &fe, int iblock, int jblock, int nb)
 Stiff term with coefficient given for each quadrature node. More...
 
void stiff_curl (Real coef, MatrixElemental &elmat, const CurrentFE &fe, int iblock, int jblock, int)
 
void stiff_strain (Real coef, MatrixElemental &elmat, const CurrentFE &fe)
 $ coef \cdot ( e(u) , e(v) )$ More...
 
void stiff_div (Real coef, MatrixElemental &elmat, const CurrentFE &fe)
 $ coef \cdot ( div u , div v )$ More...
 
void stiff_dergradbis (Real coef, const VectorElemental &uk_loc, MatrixElemental &elmat, const CurrentFE &fe)
 $ coef \cdot ( [\nabla u^k]^T \nabla u : \nabla v )$ More...
 
void stiff_dergrad (Real coef, const VectorElemental &uk_loc, MatrixElemental &elmat, const CurrentFE &fe)
 $ coef \cdot ( [\nabla u]^T \nabla u^k + [\nabla u^k]^T \nabla u : \nabla v )$ for Newton on St-Venant More...
 
void stiff_derdiv (Real coef, const VectorElemental &uk_loc, MatrixElemental &elmat, const CurrentFE &fe)
 $ coef \cdot ( trace { [\nabla u^k]^T \nabla u }, \nabla\cdot v ) $ for Newton on St-Venant More...
 
void stiff_divgrad (Real coef, const VectorElemental &uk_loc, MatrixElemental &elmat, const CurrentFE &fe)
 
void stiff_divgrad_2 (Real coef, const VectorElemental &uk_loc, MatrixElemental &elmat, const CurrentFE &fe)
 
void stiff_gradgrad (Real coef, const VectorElemental &uk_loc, MatrixElemental &elmat, const CurrentFE &fe)
 
void stiff_gradgrad_2 (Real coef, const VectorElemental &uk_loc, MatrixElemental &elmat, const CurrentFE &fe)
 
void stiff_dergrad_gradbis (Real coef, const VectorElemental &uk_loc, MatrixElemental &elmat, const CurrentFE &fe)
 
void stiff_dergrad_gradbis_2 (Real coef, const VectorElemental &uk_loc, MatrixElemental &elmat, const CurrentFE &fe)
 
void stiff_dergrad_gradbis_Tr (Real coef, const VectorElemental &uk_loc, MatrixElemental &elmat, const CurrentFE &fe)
 
void stiff_dergrad_gradbis_Tr_2 (Real coef, const VectorElemental &uk_loc, MatrixElemental &elmat, const CurrentFE &fe)
 
void stiff_gradgradTr_gradbis (Real coef, const VectorElemental &uk_loc, MatrixElemental &elmat, const CurrentFE &fe)
 
void stiff_gradgradTr_gradbis_2 (Real coef, const VectorElemental &uk_loc, MatrixElemental &elmat, const CurrentFE &fe)
 
void stiff_gradgradTr_gradbis_3 (Real coef, const VectorElemental &uk_loc, MatrixElemental &elmat, const CurrentFE &fe)
 
void grad (const int icoor, Real coef, MatrixElemental &elmat, const CurrentFE &fe_u, const CurrentFE &fe_p, int iblock, int jblock)
 
void div (const int icoor, Real coef, MatrixElemental &elmat, const CurrentFE &fe_u, const CurrentFE &fe_p, int iblock, int jblock)
 
void grad_div (Real coef_grad, Real coef_div, MatrixElemental &elmat, const CurrentFE &fe_u, const CurrentFE &fe_p, int block_pres)
 
template<typename UsrFct >
void advection (Real coef, const UsrFct &beta, MatrixElemental &elmat, const CurrentFE &fe, int iblock, int jblock, int nb, Real t=0.)
 
void stab_stokes (Real visc, Real coef_stab, MatrixElemental &elmat, const CurrentFE &fe, int block_pres)
 
void advection (Real coef, VectorElemental &vel, MatrixElemental &elmat, const CurrentFE &fe, int iblock, int jblock, int nb)
 
void source (Real constant, VectorElemental &elvec, const CurrentFE &fe, int iblock)
 
void source (Real constant, VectorElemental &elvec, const CurrentFE &fe, Real t, int iblock)
 
void source_divuq (Real alpha, VectorElemental &uLoc, VectorElemental &elvec, const CurrentFE &fe_u, const CurrentFE &fe_p, int iblock)
 
void source_gradpv (Real alpha, VectorElemental &pLoc, VectorElemental &elvec, const CurrentFE &fe_p, const CurrentFE &fe_u, int iblock)
 
void source_mass (const std::vector< Real > &constant, VectorElemental &elvec, const CurrentFE &currentFe, const int &iblock)
 Assembly for the source term $ \int c v $ where $c$ is a given by the values in the quadrature nodes. More...
 
void source_stiff (const std::vector< Real > &constant, VectorElemental &elvec, const CurrentFE &currentFe, const int &iblock)
 Assembly for the source term $ \int \nabla c \cdot \nabla v $ where $c$ is a given by the values in the quadrature nodes. More...
 

Elementary operations for the interior penalty stabilization

void ipstab_grad (const Real coef, MatrixElemental &elmat, const CurrentFE &fe1, const CurrentFE &fe2, const CurrentFEManifold &bdfe, int iblock=0, int jblock=0)
 $ coef < \nabla p1, \nabla q2 >$ More...
 
void ipstab_grad (const Real coef, MatrixElemental &elmat, const CurrentFE &fe1, const CurrentFE &fe2, const CurrentFEManifold &bdfe, int iblock, int jblock, int nb)
 $ coef < \nabla u1, \nabla v2 >$ More...
 
void ipstab_div (const Real coef, MatrixElemental &elmat, const CurrentFE &fe1, const CurrentFE &fe2, const CurrentFEManifold &bdfe, int iblock=0, int jblock=0)
 $ coef < \nabla\cdot u1, \nabla\cdot v2 >$ More...
 
void ipstab_bgrad (const Real coef, MatrixElemental &elmat, const CurrentFE &fe1, const CurrentFE &fe2, const VectorElemental &beta, const CurrentFEManifold &bdfe, int iblock, int jblock, int nb)
 $ coef < \beta1 . \nabla u1, \beta2 . \nabla v2 >$ More...
 
void ipstab_bagrad (const Real coef, MatrixElemental &elmat, const CurrentFE &fe1, const CurrentFE &fe2, const VectorElemental &beta, const CurrentFEManifold &bdfe, int iblock=0, int jblock=0)
 $ coef < |\beta . n|^2 / |\beta| \nabla p1, \nabla q2 >$ More...
 
void ipstab_bagrad (const Real coef, MatrixElemental &elmat, const CurrentFE &fe1, const CurrentFE &fe2, const CurrentFE &fe3, const VectorElemental &beta, const CurrentFEManifold &bdfe, int iblock=0, int jblock=0)
 $ coef < |\beta\cdot n| \nabla p1, \nabla q2 >$ p1 lives in fe1 q2 lives in fe2 beta lives in fe3 More...
 

Shape derivative terms for Newton FSI

void source_mass1 (Real coef, const VectorElemental &uk_loc, const VectorElemental &wk_loc, const VectorElemental &convect_loc, const VectorElemental &d_loc, VectorElemental &elvec, const CurrentFE &fe)
 $ coef \cdot ( \nabla (-w^k):[I\nabla\cdot d - (\nabla d)^T] u^k + convect^T[I\nabla\cdot d - (\nabla d)^T] (\nabla u^k)^T , v ) $ for Newton FSI More...
 
void source_mass2 (Real coef, const VectorElemental &uk_loc, const VectorElemental &dw_loc, VectorElemental &elvec, const CurrentFE &fe)
 $coef \cdot ( \nabla u^k dw, v )$ for Newton FSI More...
 
void source_mass3 (Real coef, const VectorElemental &un_loc, const VectorElemental &uk_loc, const VectorElemental &d_loc, VectorElemental &elvec, const CurrentFE &fe)
 
void source_stress (Real coef, Real mu, const VectorElemental &uk_loc, const VectorElemental &pk_loc, const VectorElemental &d_loc, VectorElemental &elvec, const CurrentFE &fe_u, const CurrentFE &fe_p)
 $coef \cdot ( [-p^k I + 2\mu e(u^k)] [I\nabla\cdot d - (\nabla d)^T] , \nabla v )$ for Newton FSI More...
 
void source_stress2 (Real coef, const VectorElemental &uk_loc, const VectorElemental &d_loc, VectorElemental &elvec, const CurrentFE &fe_u)
 $+ \mu ( \nabla u^k \nabla d + [\nabla d]^T[\nabla u^k]^T : \nabla v )$ More...
 
void shape_terms ( Real coef, Real mu, const VectorElemental &un_loc, const VectorElemental &uk_loc, const VectorElemental &wk_loc, const VectorElemental &convect_loc, const VectorElemental &pk_loc, MatrixElemental &elmat, const CurrentFE &fe, const CurrentFE &fe_p, ID mmDim, MatrixElemental &, int iblock=0, bool wImplicit=false, Real alpha=0., std::shared_ptr< MatrixElemental > elmat_convect=std::shared_ptr< MatrixElemental >())
 Shape terms for the CE system in FSI Newton. More...
 
void source_press (Real coef, const VectorElemental &uk_loc, MatrixElemental &elmat, const CurrentFE &fe_u, const CurrentFE &fe_p, ID mmDim, int iblock=0)
 $coef * ( (\nabla u^k):[I\nabla\cdot d - (\nabla d)^T] , q )$ for Newton FSI More...
 
void source_press (Real coef, const VectorElemental &uk_loc, const VectorElemental &d_loc, VectorElemental &elvec, const CurrentFE &fe_u, const CurrentFE &fe_p, int iblock=0)
 $coef * ( (\nabla u^k):[I\nabla\cdot d - (\nabla d)^T] , q )$ for Newton FSI More...
 
void source_press2 (Real coef, const VectorElemental &p_loc, const VectorElemental &d_loc, VectorElemental &elvec, const CurrentFE &fe, int iblock)
 

Mass matrix

void mass_divw (Real coef, const VectorElemental &w_loc, MatrixElemental &elmat, const CurrentFE &fe, int iblock, int jblock, UInt nb)
 
void mass_divw (const std::vector< Real > &coef, const VectorElemental &w_loc, MatrixElemental &elmat, const CurrentFE &fe, int iblock, int jblock, UInt nb)
 Idem mass_divw , but with coefficient given by quadrature node. More...
 
void mass_gradu (Real coef, const VectorElemental &u0_loc, MatrixElemental &elmat, const CurrentFE &fe)
 

Cholesky

void choldc (KNM< Real > &a, KN< Real > &p)
 
void cholsl (KNM< Real > &a, KN< Real > &p, KN< Real > &b, KN< Real > &x)
 

Operators for H(div) finite elements

void grad_Hdiv (Real coef, MatrixElemental &elmat, const CurrentFE &dualFE, const CurrentFE &primalFE, int iblock, int jblock)
 
void div_Hdiv (Real coef, MatrixElemental &elmat, const CurrentFE &dualFE, const CurrentFE &primalFE, int iblock, int jblock)
 
void TP_VdotN_Hdiv (Real coef, MatrixElemental &elmat, const ReferenceFEHybrid &hybridFE, const ReferenceFEHybrid &dualDotNFE, int iblock, int jblock)
 
void TP_TP_Hdiv (Real coef, MatrixElemental &elmat, const ReferenceFEHybrid &hybridFE, int iblock, int jblock)
 
void mass_Hdiv (Real coef, MatrixElemental &elmat, const CurrentFE &dualFE, int iblock, int jblock)
 
void mass_Hdiv (Matrix const &Invperm, MatrixElemental &elmat, const CurrentFE &dualFE, int iblock, int jblock)
 
void mass_Hdiv (Real(*InvpermFun)(const Real &, const Real &, const Real &), MatrixElemental &elmat, const CurrentFE &dualFE, int iblock, int jblock)
 
void source_Hdiv (const Vector &source, VectorElemental &elvec, const CurrentFE &dualFE, int iblock)
 

Detailed Description

File containing the procedures for the local assembly of the differential operators.

Contributor:
Samuel Quinodoz samue.nosp@m.l.qu.nosp@m.inodo.nosp@m.z@ep.nosp@m.fl.ch Samuel Quinodoz samue.nosp@m.l.qu.nosp@m.inodo.nosp@m.z@ep.nosp@m.fl.ch

To delete: L. 195 : stiff_curl L. 271 : grad_div L. 326 : stab_stokes L. 434 : grad_ss L. 493 : source_fhn L. 617 : choldc L. 618 : cholsl

Definition in file AssemblyElemental.hpp.