LifeV
FastAssemblerNS Class Reference

#include <FastAssemblerNS.hpp>

+ Collaboration diagram for FastAssemblerNS:

Public Types

typedef RegionMesh< LinearTetramesh_Type
 
typedef std::shared_ptr< mesh_TypemeshPtr_Type
 
typedef VectorEpetra vector_Type
 
typedef std::shared_ptr< vector_TypevectorPtr_Type
 
typedef MatrixEpetra< Realmatrix_Type
 
typedef std::shared_ptr< matrix_TypematrixPtr_Type
 
typedef Epetra_Comm comm_Type
 
typedef std::shared_ptr< comm_TypecommPtr_Type
 
typedef QuadratureRule qr_Type
 
typedef std::shared_ptr< qr_TypeqrPtr_Type
 
typedef FESpace< mesh_Type, MapEpetrafespace_Type
 
typedef std::shared_ptr< fespace_TypefespacePtr_Type
 

Public Member Functions

 FastAssemblerNS (const meshPtr_Type &mesh, const commPtr_Type &comm, const ReferenceFE *refFE_velocity, const ReferenceFE *refFE_pressure, const fespacePtr_Type &fespace_velocity, const fespacePtr_Type &fespace_pressure, const qr_Type *qr)
 Constructor. More...
 
 ~FastAssemblerNS ()
 Destructor. More...
 

Private Attributes

meshPtr_Type M_mesh
 
commPtr_Type M_comm
 
int M_numElements
 
int M_numScalarDofs
 
doubleM_detJacobian
 
double *** M_invJacobian
 
double ** M_phi_velocity
 
double ** M_phi_pressure
 
double *** M_dphi_velocity
 
double *** M_dphi_pressure
 
double **** M_d2phi_velocity
 
double ** M_elements_velocity
 
double ** M_elements_pressure
 
const qr_TypeM_qr
 
const ReferenceFEM_referenceFE_velocity
 
const ReferenceFEM_referenceFE_pressure
 
const std::shared_ptr< FESpace< mesh_Type, MapEpetra > > M_fespace_velocity
 
const std::shared_ptr< FESpace< mesh_Type, MapEpetra > > M_fespace_pressure
 
double *** M_vals_00
 
double *** M_vals_01
 
double *** M_vals_10
 
double *** M_vals_11
 
double ***** M_vals_supg
 
double **** M_vals_supg_01
 
double **** M_vals_supg_10
 
int ** M_rows_velocity
 
int ** M_rows_pressure
 
int ** M_cols_velocity
 
int ** M_cols_pressure
 
int ** M_rows_tmp
 
int ** M_cols_tmp
 
bool M_useSUPG
 
double *** M_G
 
double ** M_g
 
double ** M_Tau_M
 
double ** M_Tau_C
 
double ** M_Tau_M_hat
 
double M_density
 
double M_viscosity
 
double M_timestep
 
double M_orderBDF
 
double M_C_I
 
double M_alpha
 

Methods

void setConstants_NavierStokes (const Real &density, const Real &viscosity, const Real &timestep, const Real &orderBDF, const Real &C_I)
 Set physical parameters for NS. More...
 
void setConstants_NavierStokes (const Real &density, const Real &viscosity, const Real &timestep, const Real &orderBDF, const Real &C_I, const Real &alpha)
 Set physical parameters for NS. More...
 
void allocateSpace (CurrentFE *current_fe_velocity, const bool &use_supg)
 Allocate space for members before the assembly. More...
 
void assemble_constant_terms (matrixPtr_Type &mass, matrixPtr_Type &stiffness, matrixPtr_Type &grad, matrixPtr_Type &div)
 Assemble constant terms NS. More...
 
void assembleConvective (matrixPtr_Type &matrix, const vector_Type &u_h)
 FE Assembly of NS constant terms (no scaling by coefficients like viscosity) More...
 
void jacobianNS (matrixPtr_Type &matrix, const vector_Type &u_h)
 FE Assembly of NS nonlinear term. More...
 
void assemble_supg_terms (matrixPtr_Type &block00, matrixPtr_Type &block01, matrixPtr_Type &block10, matrixPtr_Type &block11, const vector_Type &u_h)
 Assemble SUPG terms. More...
 
void supg_FI_FSI_terms (matrixPtr_Type &block00, matrixPtr_Type &block01, matrixPtr_Type &block10, matrixPtr_Type &block11, const vector_Type &beta_km1, const vector_Type &u_km1, const vector_Type &p_km1, const vector_Type &u_bdf)
 Assemble SUPG terms fully implicit for FSI. More...
 
void vmsles_semi_implicit_terms (matrixPtr_Type &block00, matrixPtr_Type &block01, matrixPtr_Type &block10, matrixPtr_Type &block11, const std::vector< std::vector< VectorSmall< 3 >>> &fine_scale, const vector_Type &u_extr)
 Assemble VMSLES terms. More...
 
void vmsles_semi_implicit_termsP1P1 (matrixPtr_Type &block00, matrixPtr_Type &block01, matrixPtr_Type &block10, matrixPtr_Type &block11, const std::vector< std::vector< VectorSmall< 3 >>> &fine_scale, const vector_Type &u_extr)
 Assemble VMSLES terms when using P1-P1 for the fluid. More...
 
void updateGeoQuantities (CurrentFE *current_fe)
 Assemble SUPG terms fully implicit for FSI. More...
 
void setAlpha (const Real &alpha)
 Set alpha. More...
 
void setTimeStep (const Real &timestep)
 Set time step. More...
 

Detailed Description

Definition at line 67 of file FastAssemblerNS.hpp.

Member Typedef Documentation

◆ mesh_Type

Definition at line 71 of file FastAssemblerNS.hpp.

◆ meshPtr_Type

typedef std::shared_ptr<mesh_Type> meshPtr_Type

Definition at line 72 of file FastAssemblerNS.hpp.

◆ vector_Type

Definition at line 74 of file FastAssemblerNS.hpp.

◆ vectorPtr_Type

typedef std::shared_ptr<vector_Type> vectorPtr_Type

Definition at line 75 of file FastAssemblerNS.hpp.

◆ matrix_Type

Definition at line 77 of file FastAssemblerNS.hpp.

◆ matrixPtr_Type

typedef std::shared_ptr<matrix_Type> matrixPtr_Type

Definition at line 78 of file FastAssemblerNS.hpp.

◆ comm_Type

typedef Epetra_Comm comm_Type

Definition at line 80 of file FastAssemblerNS.hpp.

◆ commPtr_Type

typedef std::shared_ptr< comm_Type > commPtr_Type

Definition at line 81 of file FastAssemblerNS.hpp.

◆ qr_Type

Definition at line 83 of file FastAssemblerNS.hpp.

◆ qrPtr_Type

typedef std::shared_ptr< qr_Type > qrPtr_Type

Definition at line 84 of file FastAssemblerNS.hpp.

◆ fespace_Type

Definition at line 86 of file FastAssemblerNS.hpp.

◆ fespacePtr_Type

typedef std::shared_ptr<fespace_Type> fespacePtr_Type

Definition at line 87 of file FastAssemblerNS.hpp.

Constructor & Destructor Documentation

◆ FastAssemblerNS()

FastAssemblerNS ( const meshPtr_Type mesh,
const commPtr_Type comm,
const ReferenceFE refFE_velocity,
const ReferenceFE refFE_pressure,
const fespacePtr_Type fespace_velocity,
const fespacePtr_Type fespace_pressure,
const qr_Type qr 
)

Constructor.

Parameters
mesh- input mesh
comm- communicator
refFE_velocity- reference FE space velocity
refFE_pressure- reference FE space pressure
fespace_velocity-
fespace_pressure-
qr- quadrature rule to be used for the integration

Definition at line 15 of file FastAssemblerNS.cpp.

◆ ~FastAssemblerNS()

Destructor.

Definition at line 31 of file FastAssemblerNS.cpp.

Member Function Documentation

◆ setConstants_NavierStokes() [1/2]

void setConstants_NavierStokes ( const Real density,
const Real viscosity,
const Real timestep,
const Real orderBDF,
const Real C_I 
)

Set physical parameters for NS.

Parameters
density- density of the fluid
viscosity- viscosity of the fluid
timestep- timestep for the simulation
orderBDF- order time integrator BDF
C_I- is 30 for P1 and 60 for P2

Definition at line 264 of file FastAssemblerNS.cpp.

◆ setConstants_NavierStokes() [2/2]

void setConstants_NavierStokes ( const Real density,
const Real viscosity,
const Real timestep,
const Real orderBDF,
const Real C_I,
const Real alpha 
)

Set physical parameters for NS.

Parameters
density- density of the fluid
viscosity- viscosity of the fluid
timestep- timestep for the simulation
orderBDF- order time integrator BDF
C_I- is 30 for P1 and 60 for P2
alpha- coefficient BDF in front of u_{n+1}

Definition at line 274 of file FastAssemblerNS.cpp.

◆ allocateSpace()

void allocateSpace ( CurrentFE current_fe_velocity,
const bool &  use_supg 
)

Allocate space for members before the assembly.

Parameters
current_fe_velocity- current FE space velocity

Definition at line 323 of file FastAssemblerNS.cpp.

◆ assemble_constant_terms()

void assemble_constant_terms ( matrixPtr_Type mass,
matrixPtr_Type stiffness,
matrixPtr_Type grad,
matrixPtr_Type div 
)

Assemble constant terms NS.

Parameters
mass- mass matrix
stiffness- stiffness matrix
grad- block01
div- block10

Definition at line 1064 of file FastAssemblerNS.cpp.

◆ assembleConvective()

void assembleConvective ( matrixPtr_Type matrix,
const vector_Type u_h 
)

FE Assembly of NS constant terms (no scaling by coefficients like viscosity)

Parameters
matrix- global matrix
u_h- velocity vector

Definition at line 1330 of file FastAssemblerNS.cpp.

◆ jacobianNS()

void jacobianNS ( matrixPtr_Type matrix,
const vector_Type u_h 
)

FE Assembly of NS nonlinear term.

Parameters
matrix- matrix
u_h- velocity vector previous Newton step

Definition at line 1444 of file FastAssemblerNS.cpp.

◆ assemble_supg_terms()

void assemble_supg_terms ( matrixPtr_Type block00,
matrixPtr_Type block01,
matrixPtr_Type block10,
matrixPtr_Type block11,
const vector_Type u_h 
)

Assemble SUPG terms.

Parameters
block00- block00 stabilization
block01- block01 stabilization
block10- block10 stabilization
block11- block11 stabilization

Definition at line 754 of file FastAssemblerNS.cpp.

◆ supg_FI_FSI_terms()

void supg_FI_FSI_terms ( matrixPtr_Type block00,
matrixPtr_Type block01,
matrixPtr_Type block10,
matrixPtr_Type block11,
const vector_Type beta_km1,
const vector_Type u_km1,
const vector_Type p_km1,
const vector_Type u_bdf 
)

Assemble SUPG terms fully implicit for FSI.

Parameters
block00- block00 stabilization
block01- block01 stabilization
block10- block10 stabilization
block11- block11 stabilization
beta_km1- vector: fluid_velocity - ale_velocity
u_km1- velocity previous Newton step
p_km1- pressure previous Newton step
u_bdf- vector time discretization fluid velocity

Definition at line 1614 of file FastAssemblerNS.cpp.

◆ vmsles_semi_implicit_terms()

void vmsles_semi_implicit_terms ( matrixPtr_Type block00,
matrixPtr_Type block01,
matrixPtr_Type block10,
matrixPtr_Type block11,
const std::vector< std::vector< VectorSmall< 3 >>> &  fine_scale,
const vector_Type u_extr 
)

Assemble VMSLES terms.

Parameters
block00- block00 stabilization
block01- block01 stabilization
block10- block10 stabilization
block11- block11 stabilization
fine_scale- fine scale vector
u_extr- velocity extrapolated

Definition at line 2166 of file FastAssemblerNS.cpp.

◆ vmsles_semi_implicit_termsP1P1()

void vmsles_semi_implicit_termsP1P1 ( matrixPtr_Type block00,
matrixPtr_Type block01,
matrixPtr_Type block10,
matrixPtr_Type block11,
const std::vector< std::vector< VectorSmall< 3 >>> &  fine_scale,
const vector_Type u_extr 
)

Assemble VMSLES terms when using P1-P1 for the fluid.

Parameters
block00- block00 stabilization
block01- block01 stabilization
block10- block10 stabilization
block11- block11 stabilization
fine_scale- fine scale vector
u_extr- velocity extrapolated

Definition at line 2753 of file FastAssemblerNS.cpp.

◆ updateGeoQuantities()

void updateGeoQuantities ( CurrentFE current_fe)

Assemble SUPG terms fully implicit for FSI.

Parameters
current_fe_velocity- current FE needed to update geom quantities (for FSI when moving mesh)

Definition at line 285 of file FastAssemblerNS.cpp.

◆ setAlpha()

void setAlpha ( const Real alpha)
inline

Set alpha.

Parameters
alpha- time advance coefficient

Definition at line 234 of file FastAssemblerNS.hpp.

◆ setTimeStep()

void setTimeStep ( const Real timestep)
inline

Set time step.

Parameters
timestep- time step of the simulation

Definition at line 241 of file FastAssemblerNS.hpp.

Field Documentation

◆ M_mesh

meshPtr_Type M_mesh
private

Definition at line 241 of file FastAssemblerNS.hpp.

◆ M_comm

commPtr_Type M_comm
private

Definition at line 248 of file FastAssemblerNS.hpp.

◆ M_numElements

int M_numElements
private

Definition at line 250 of file FastAssemblerNS.hpp.

◆ M_numScalarDofs

int M_numScalarDofs
private

Definition at line 251 of file FastAssemblerNS.hpp.

◆ M_detJacobian

double* M_detJacobian
private

Definition at line 253 of file FastAssemblerNS.hpp.

◆ M_invJacobian

double*** M_invJacobian
private

Definition at line 254 of file FastAssemblerNS.hpp.

◆ M_phi_velocity

double** M_phi_velocity
private

Definition at line 256 of file FastAssemblerNS.hpp.

◆ M_phi_pressure

double** M_phi_pressure
private

Definition at line 257 of file FastAssemblerNS.hpp.

◆ M_dphi_velocity

double*** M_dphi_velocity
private

Definition at line 258 of file FastAssemblerNS.hpp.

◆ M_dphi_pressure

double*** M_dphi_pressure
private

Definition at line 259 of file FastAssemblerNS.hpp.

◆ M_d2phi_velocity

double**** M_d2phi_velocity
private

Definition at line 260 of file FastAssemblerNS.hpp.

◆ M_elements_velocity

double** M_elements_velocity
private

Definition at line 261 of file FastAssemblerNS.hpp.

◆ M_elements_pressure

double** M_elements_pressure
private

Definition at line 262 of file FastAssemblerNS.hpp.

◆ M_qr

const qr_Type* M_qr
private

Definition at line 264 of file FastAssemblerNS.hpp.

◆ M_referenceFE_velocity

const ReferenceFE* M_referenceFE_velocity
private

Definition at line 265 of file FastAssemblerNS.hpp.

◆ M_referenceFE_pressure

const ReferenceFE* M_referenceFE_pressure
private

Definition at line 266 of file FastAssemblerNS.hpp.

◆ M_fespace_velocity

const std::shared_ptr<FESpace<mesh_Type, MapEpetra> > M_fespace_velocity
private

Definition at line 267 of file FastAssemblerNS.hpp.

◆ M_fespace_pressure

const std::shared_ptr<FESpace<mesh_Type, MapEpetra> > M_fespace_pressure
private

Definition at line 268 of file FastAssemblerNS.hpp.

◆ M_vals_00

double*** M_vals_00
private

Definition at line 270 of file FastAssemblerNS.hpp.

◆ M_vals_01

double*** M_vals_01
private

Definition at line 271 of file FastAssemblerNS.hpp.

◆ M_vals_10

double*** M_vals_10
private

Definition at line 272 of file FastAssemblerNS.hpp.

◆ M_vals_11

double*** M_vals_11
private

Definition at line 273 of file FastAssemblerNS.hpp.

◆ M_vals_supg

double***** M_vals_supg
private

Definition at line 274 of file FastAssemblerNS.hpp.

◆ M_vals_supg_01

double**** M_vals_supg_01
private

Definition at line 275 of file FastAssemblerNS.hpp.

◆ M_vals_supg_10

double**** M_vals_supg_10
private

Definition at line 276 of file FastAssemblerNS.hpp.

◆ M_rows_velocity

int** M_rows_velocity
private

Definition at line 277 of file FastAssemblerNS.hpp.

◆ M_rows_pressure

int** M_rows_pressure
private

Definition at line 278 of file FastAssemblerNS.hpp.

◆ M_cols_velocity

int** M_cols_velocity
private

Definition at line 279 of file FastAssemblerNS.hpp.

◆ M_cols_pressure

int** M_cols_pressure
private

Definition at line 280 of file FastAssemblerNS.hpp.

◆ M_rows_tmp

int** M_rows_tmp
private

Definition at line 281 of file FastAssemblerNS.hpp.

◆ M_cols_tmp

int** M_cols_tmp
private

Definition at line 282 of file FastAssemblerNS.hpp.

◆ M_useSUPG

bool M_useSUPG
private

Definition at line 284 of file FastAssemblerNS.hpp.

◆ M_G

double*** M_G
private

Definition at line 285 of file FastAssemblerNS.hpp.

◆ M_g

double** M_g
private

Definition at line 286 of file FastAssemblerNS.hpp.

◆ M_Tau_M

double** M_Tau_M
private

Definition at line 287 of file FastAssemblerNS.hpp.

◆ M_Tau_C

double** M_Tau_C
private

Definition at line 288 of file FastAssemblerNS.hpp.

◆ M_Tau_M_hat

double** M_Tau_M_hat
private

Definition at line 289 of file FastAssemblerNS.hpp.

◆ M_density

double M_density
private

Definition at line 291 of file FastAssemblerNS.hpp.

◆ M_viscosity

double M_viscosity
private

Definition at line 292 of file FastAssemblerNS.hpp.

◆ M_timestep

double M_timestep
private

Definition at line 293 of file FastAssemblerNS.hpp.

◆ M_orderBDF

double M_orderBDF
private

Definition at line 294 of file FastAssemblerNS.hpp.

◆ M_C_I

double M_C_I
private

Definition at line 295 of file FastAssemblerNS.hpp.

◆ M_alpha

double M_alpha
private

Definition at line 296 of file FastAssemblerNS.hpp.


The documentation for this class was generated from the following files: