12 #ifndef MFEM_NAVIER_SOLVER_HPP
13 #define MFEM_NAVIER_SOLVER_HPP
15 #define NAVIER_VERSION 0.1
32 : attr(attr), coeff(coeff)
38 this->
attr = obj.attr;
41 this->
coeff = obj.coeff;
56 : attr(attr), coeff(coeff)
62 this->
attr = obj.attr;
65 this->
coeff = obj.coeff;
80 : attr(attr), coeff(coeff)
86 this->
attr = obj.attr;
89 this->
coeff = obj.coeff;
160 void Setup(
double dt);
184 void Step(
double &time,
double dt,
int cur_step,
bool provisional =
false);
246 bool assume_scalar =
false);
309 int copy_interior = 0);
390 Vector fn,
un,
un_next,
unm1,
unm2,
Nun,
Nunm1,
Nunm2,
Fext,
FText,
Lext,
420 std::vector<double>
dthist = {0.0, 0.0, 0.0};
ParBilinearForm * Mv_form
FiniteElementCollection * vfec_filter
VectorCoefficient * coeff
Container for a Dirichlet boundary condition of the velocity field.
Array< int > pres_ess_attr
void PrintTimingData()
Print timing summary of the solving routine.
void Orthogonalize(Vector &v)
Remove mean from a Vector.
Conjugate gradient method.
FiniteElementCollection * pfec
Pressure finite element collection.
void EliminateRHS(Operator &A, ConstrainedOperator &constrainedA, const Array< int > &ess_tdof_list, Vector &x, Vector &b, Vector &X, Vector &B, int copy_interior=0)
Eliminate essential BCs in an Operator and apply to RHS.
ParBilinearForm * Mv_form_lor
Container for a Dirichlet boundary condition of the pressure field.
Base class for vector Coefficients that optionally depend on time and space.
A coefficient that is constant across space and time.
void PrintInfo()
Print information about the Navier version.
void SetFilterAlpha(double a)
Set the interpolation filter parameter a.
FiniteElementCollection * pfec_lor
ConstantCoefficient nlcoeff
void SetMaxBDFOrder(int maxbdforder)
Set the maximum order to use for the BDF method.
Pointer to an Operator of a specified type.
void(const Vector &x, double t, Vector &u) VecFuncT
ParGridFunction un_filtered_gf
double(const Vector &x, double t) ScalarFuncT
ParLinearForm * FText_bdr_form
std::vector< PresDirichletBC_T > pres_dbcs
bool numerical_integ
Enable/disable numerical integration rules of forms.
Abstract parallel finite element space.
ConstantCoefficient H_lincoeff
ParLinearForm * g_bdr_form
Container for an acceleration term.
NavierSolver(ParMesh *mesh, int order, double kin_vis)
Initialize data structures, set FE space order and kinematic viscosity.
AccelTerm_T(Array< int > attr, VectorCoefficient *coeff)
PresDirichletBC_T(PresDirichletBC_T &&obj)
ParMixedBilinearForm * G_form
void Setup(double dt)
Initialize forms, solvers and preconditioners.
void MeanZero(ParGridFunction &v)
Remove the mean from a ParGridFunction.
VelDirichletBC_T(VelDirichletBC_T &&obj)
Array< int > vel_ess_attr
Array< int > vel_ess_tdof
bool partial_assembly
Enable/disable partial assembly of forms.
ConstantCoefficient Sp_coeff
The BoomerAMG solver in hypre.
void ComputeCurl3D(ParGridFunction &u, ParGridFunction &cu)
Compute for .
FiniteElementCollection * vfec
Velocity finite element collection.
double f(const Vector &xvec)
ParFiniteElementSpace * pfes_lor
InterpolationGridTransfer * vgt
double ComputeCFL(ParGridFunction &u, double dt)
Compute CFL.
ParGridFunction * GetCurrentPressure()
Return a pointer to the current pressure ParGridFunction.
ConstantCoefficient onecoeff
ParGridFunction un_next_gf
void SetCutoffModes(int c)
Set the number of modes to cut off in the interpolation filter.
std::vector< double > dthist
ParBilinearForm * Sp_form
void SetTimeIntegrationCoefficients(int step)
Update the EXTk/BDF time integration coefficient.
void EnablePA(bool pa)
Enable partial assembly for every operator.
ParBilinearForm * Sp_form_lor
void AddVelDirichletBC(VectorCoefficient *coeff, Array< int > &attr)
Add a Dirichlet boundary condition to the velocity field.
void ComputeCurl2D(ParGridFunction &u, ParGridFunction &cu, bool assume_scalar=false)
Compute for .
ParBilinearForm * H_form_lor
ParFiniteElementSpace * vfes
Velocity finite element space.
Transfer data between a coarse mesh and an embedded refined mesh using interpolation.
ParLinearForm * mass_lf
Linear form to compute the mass matrix in various subroutines.
Base class Coefficients that optionally depend on space and time. These are used by the BilinearFormI...
Collection of finite elements from the same family in multiple dimensions. This class is used to matc...
ParGridFunction * GetCurrentVelocity()
Return a pointer to the current velocity ParGridFunction.
std::vector< AccelTerm_T > accel_terms
OrthoSolver * SpInvOrthoPC
bool verbose
Enable/disable verbose output.
InterpolationGridTransfer * pgt
double kin_vis
Kinematic viscosity (dimensionless).
Array< int > pres_ess_tdof
std::vector< VelDirichletBC_T > vel_dbcs
VectorGridFunctionCoefficient * FText_gfcoeff
VectorCoefficient * coeff
void UpdateTimestepHistory(double dt)
Rotate entries in the time step and solution history arrays.
ParFiniteElementSpace * pfes
Pressure finite element space.
ParGridFunction un_NM1_gf
ParGridFunction * GetProvisionalVelocity()
Return a pointer to the provisional velocity ParGridFunction.
PresDirichletBC_T(Array< int > attr, Coefficient *coeff)
AccelTerm_T(AccelTerm_T &&obj)
ParMixedBilinearForm * D_form
Vector coefficient defined by a vector GridFunction.
void Step(double &time, double dt, int cur_step, bool provisional=false)
Compute solution at the next time step t+dt.
ParFiniteElementSpace * vfes_filter
ParGridFunction curlcurlu_gf
void AddPresDirichletBC(Coefficient *coeff, Array< int > &attr)
Add a Dirichlet boundary condition to the pressure field.
double u(const Vector &xvec)
Class for parallel grid function.
Square Operator for imposing essential boundary conditions using only the action, Mult()...
bool debug
Enable/disable debug output.
Class for parallel meshes.
Transient incompressible Navier Stokes solver in a split scheme formulation.
Solver wrapper which orthogonalizes the input and output vector.
ParMesh * pmesh
The parallel mesh.
void AddAccelTerm(VectorCoefficient *coeff, Array< int > &attr)
Add an acceleration term to the RHS of the equation.
int order
The order of the velocity and pressure space.
ConstantCoefficient H_bdfcoeff
VelDirichletBC_T(Array< int > attr, VectorCoefficient *coeff)