52 #ifndef FASTASSEMBLERNS_HPP 53 #define FASTASSEMBLERNS_HPP 55 #include <lifev/core/LifeV.hpp> 56 #include <lifev/core/mesh/RegionMesh.hpp> 57 #include <lifev/core/array/VectorEpetra.hpp> 58 #include <lifev/core/array/MatrixEpetra.hpp> 59 #include <lifev/core/fem/QuadratureRule.hpp> 60 #include <lifev/core/fem/ReferenceFE.hpp> 61 #include <lifev/core/fem/CurrentFE.hpp> 62 #include <lifev/core/fem/FESpace.hpp> 71 typedef RegionMesh< LinearTetra > mesh_Type;
72 typedef std::shared_ptr<mesh_Type> meshPtr_Type;
75 typedef std::shared_ptr<vector_Type> vectorPtr_Type;
78 typedef std::shared_ptr<matrix_Type> matrixPtr_Type;
80 typedef Epetra_Comm comm_Type;
81 typedef std::shared_ptr< comm_Type > commPtr_Type;
84 typedef std::shared_ptr< qr_Type > qrPtr_Type;
87 typedef std::shared_ptr<fespace_Type> fespacePtr_Type;
100 FastAssemblerNS(
const meshPtr_Type& mesh,
const commPtr_Type& comm,
102 const fespacePtr_Type& fespace_velocity,
const fespacePtr_Type& fespace_pressure,
119 void setConstants_NavierStokes(
const Real& density,
const Real& viscosity,
const Real& timestep,
const Real& orderBDF,
const Real& C_I );
130 void setConstants_NavierStokes(
const Real& density,
const Real& viscosity,
const Real& timestep,
const Real& orderBDF,
const Real& C_I,
const Real& alpha );
136 void allocateSpace(
CurrentFE* current_fe_velocity,
const bool& use_supg );
145 void assemble_constant_terms( matrixPtr_Type& mass, matrixPtr_Type& stiffness, matrixPtr_Type& grad, matrixPtr_Type& div );
152 void assembleConvective( matrixPtr_Type& matrix,
const vector_Type& u_h );
159 void jacobianNS( matrixPtr_Type& matrix,
const vector_Type& u_h );
168 void assemble_supg_terms( matrixPtr_Type& block00, matrixPtr_Type& block01, matrixPtr_Type& block10, matrixPtr_Type& block11,
const vector_Type& u_h );
181 void supg_FI_FSI_terms ( matrixPtr_Type& block00,
182 matrixPtr_Type& block01,
183 matrixPtr_Type& block10,
184 matrixPtr_Type& block11,
185 const vector_Type& beta_km1,
186 const vector_Type& u_km1,
187 const vector_Type& p_km1,
188 const vector_Type& u_bdf);
199 void vmsles_semi_implicit_terms ( matrixPtr_Type& block00,
200 matrixPtr_Type& block01,
201 matrixPtr_Type& block10,
202 matrixPtr_Type& block11,
203 const std::vector<std::vector<VectorSmall<3>>>& fine_scale,
204 const vector_Type& u_extr);
215 void vmsles_semi_implicit_termsP1P1 ( matrixPtr_Type& block00,
216 matrixPtr_Type& block01,
217 matrixPtr_Type& block10,
218 matrixPtr_Type& block11,
219 const std::vector<std::vector<VectorSmall<3>>>& fine_scale,
220 const vector_Type& u_extr);
227 void updateGeoQuantities (
CurrentFE* current_fe );
234 void setAlpha (
const Real& alpha ) { M_alpha = alpha; };
241 void setTimeStep (
const Real& timestep ) { M_timestep = timestep; };
253 double * M_detJacobian;
254 double *** M_invJacobian;
256 double ** M_phi_velocity;
257 double ** M_phi_pressure;
258 double *** M_dphi_velocity;
259 double *** M_dphi_pressure;
260 double **** M_d2phi_velocity;
261 double ** M_elements_velocity;
262 double ** M_elements_pressure;
267 const std::shared_ptr<FESpace<mesh_Type, MapEpetra>> M_fespace_velocity;
268 const std::shared_ptr<FESpace<mesh_Type, MapEpetra>> M_fespace_pressure;
274 double***** M_vals_supg;
275 double**** M_vals_supg_01;
276 double**** M_vals_supg_10;
277 int** M_rows_velocity;
278 int** M_rows_pressure;
279 int** M_cols_velocity;
280 int** M_cols_pressure;
289 double ** M_Tau_M_hat;
VectorEpetra - The Epetra Vector format Wrapper.
void importFromHDF5(std::string const &fileName, std::string const &matrixName="matrix")
Read a matrix from a HDF5 (.h5) file.
void updateInverseJacobian(const UInt &iQuadPt)
Epetra_Import const & importer()
Getter for the Epetra_Import.
double Real
Generic real data.
CurrentFE - A primordial class for the assembly of the local matrices/vectors retaining the values on...
The class for a reference Lagrangian finite element.
QuadratureRule - The basis class for storing and accessing quadrature rules.