37 #ifndef GETFEM_NAVIER_STOKES_H__
38 #define GETFEM_NAVIER_STOKES_H__
49 template<
typename MAT,
typename VECT>
56 "wrong qdim for the mesh_fem");
59 assem.set(
"u=data(#1);"
60 "t=comp(vGrad(#1).vBase(#1).vBase(#1));"
61 "M(#1, #1) += u(i).t(i,k,j,:,k,:,j);"
62 "M(#1, #1) += u(i).t(:,j,k,:,k,i,j);"
63 "M(#1, #1) += u(i).t(i,j,j,:,k,:,k)/2;"
64 "M(#1, #1) += u(i).t(:,k,k,:,j,i,j)/2;");
76 template<
typename VECT1,
typename VECT2>
83 "wrong qdim for the mesh_fem");
86 assem.set(
"u=data(#1);"
87 "t=comp(vBase(#1).vGrad(#1).vBase(#1));"
88 "V(#1) += u(i).u(j).t(i,k,j,k,l,:,l);"
89 "V(#1) += u(i).u(j).t(i,k,j,l,l,:,k)/2;");
92 assem.
push_vec(
const_cast<VECT1&
>(V));
Generic assembly of vectors, matrices.
void push_vec(VEC &v)
Add a new output vector.
void push_data(const VEC &d)
Add a new data (dense array)
void push_mat(const MAT &m)
Add a new output matrix (fake const version..)
void assembly(const mesh_region ®ion=mesh_region::all_convexes())
do the assembly on the specified region (boundary or set of convexes)
void push_mi(const mesh_im &im_)
Add a new mesh_im.
void push_mf(const mesh_fem &mf_)
Add a new mesh_fem.
Describe a finite element method linked to a mesh.
virtual dim_type get_qdim() const
Return the Q dimension.
const mesh & linked_mesh() const
Return a reference to the underlying mesh.
Describe an integration method linked to a mesh.
structure used to hold a set of convexes and/or convex faces.
static mesh_region all_convexes()
provide a default value for the mesh_region parameters of assembly procedures etc.
Generic assembly implementation.
void asm_navier_stokes_tgm(const MAT &M, const mesh_im &mim, const mesh_fem &mf, const VECT &U, const mesh_region &rg=mesh_region::all_convexes())
assembly of Tangent matrix for Navier-Stokes.
void asm_navier_stokes_rhs(const VECT1 &V, const mesh_im &mim, const mesh_fem &mf, const VECT2 &U, const mesh_region &rg=mesh_region::all_convexes())
assembly of right hand side for Navier-Stokes.
GEneric Tool for Finite Element Methods.