39 std::vector<gsMultiBasis<T> > m_bases;
45 std::vector<std::pair<int, boxSide> > m_bndIn, m_bndOut, m_bndWall;
56 : m_pde(pde), m_bases(bases)
58 m_assembOpt.dirStrategy = dirichlet::elimination;
59 m_assembOpt.dirValues = dirichlet::interpolation;
60 m_assembOpt.intStrategy = iFace::glue;
63 m_precOpt = gsINSPreconditioner<T, RowMajor>::defaultOptions();
80 opt.
addInt(
"nonlin.maxIt",
"Maximum number of Picard iterations in one time step", 10);
81 opt.
addReal(
"nonlin.tol",
"Stopping tolerance for Picard iteration", 1e-5);
84 opt.
addString(
"lin.solver",
"The type of linear system solver (direct / iter / petsc)",
"direct");
85 opt.
addString(
"lin.krylov",
"The Krylov subspace method from G+Smo/Eigen (for lin.solver = iter)",
"gmres");
86 opt.
addString(
"lin.precType",
"Preconditioner to be used with iterative linear solver",
"MSIMPLER_FdiagEqual");
87 opt.
addInt(
"lin.maxIt",
"Maximum number of iterations for linear solver (if iterative)", 200);
88 opt.
addReal(
"lin.tol",
"Stopping tolerance for linear solver (if iterative)", 1e-6);
92 opt.
addString(
"assemb.loop",
"EbE = element by element, RbR = row by row",
"EbE");
94 opt.
addSwitch(
"fillGlobalSyst",
"Fill the global linear systems from blocks",
true);
97 opt.
addSwitch(
"unsteady",
"Assemble the velocity mass matrix",
false);
98 opt.
addReal(
"timeStep",
"Time step size", 0.1);
101 opt.
addSwitch(
"fileOutput",
"Create an output file",
false);
102 opt.
addSwitch(
"quiet",
"Do not display output in terminal",
false);
103 opt.
addString(
"outFile",
"Name of the output file (or the full path to it)",
"");
106 opt.
addSwitch(
"parallel",
"Currently running in parallel",
false);
109 opt.
addInt(
"jac.npts",
"Number of points along a patch side (in each direction) for geometry jacobian check", 100);
110 opt.
addReal(
"jac.dist",
"Distance from boundary (in the parametric space) for geometry jacobian check", 1e-2);
111 opt.
addReal(
"jac.tol",
"Critical value of geometry jacobian to throw warning", 1e-4);
124 m_bases.front().getMapper(m_assembOpt.dirStrategy, m_assembOpt.intStrategy, m_pde.bc(), mappers.front(), 0);
125 m_bases.back().getMapper(m_assembOpt.dirStrategy, m_assembOpt.intStrategy, m_pde.bc(), mappers.back(), 1);
132 void setBndParts(std::vector<std::pair<int, boxSide> > bndIn, std::vector<std::pair<int, boxSide> > bndOut, std::vector<std::pair<int, boxSide> > bndWall)
155 std::vector<gsMultiBasis<T> >&
getBases() {
return m_bases; }
156 const std::vector<gsMultiBasis<T> >&
getBases()
const {
return m_bases; }
194 GISMO_ASSERT(m_isBndSet,
"Boundary parts are not set in gsFlowSolverParams, call setBndParts(...).");
201 GISMO_ASSERT(m_isBndSet,
"Boundary parts are not set in gsFlowSolverParams, call setBndParts(...).");
208 GISMO_ASSERT(m_isBndSet,
"Boundary parts are not set in gsFlowSolverParams, call setBndParts(...).");
Class containing a set of boundary conditions.
Definition gsBoundaryConditions.h:342
A class that holds all parameters needed by the incompressible flow solver.
Definition gsFlowSolverParams.h:34
void setBndParts(std::vector< std::pair< int, boxSide > > bndIn, std::vector< std::pair< int, boxSide > > bndOut, std::vector< std::pair< int, boxSide > > bndWall)
Set boundary parts (vectors of pairs [patch, side]).
Definition gsFlowSolverParams.h:132
void setOptions(const gsOptionList &opt)
Set INS solver options given in opt.
Definition gsFlowSolverParams.h:189
std::vector< std::pair< int, boxSide > > getBndIn()
Get vector of [patch, side] corresponding to the inflow boundary.
Definition gsFlowSolverParams.h:192
gsFlowSolverParams(const gsNavStokesPde< T > &pde, const std::vector< gsMultiBasis< T > > &bases)
Constructor of the object.
Definition gsFlowSolverParams.h:55
void setAssemblerOptions(const gsAssemblerOptions &opt)
Set assembler options given in opt.
Definition gsFlowSolverParams.h:167
std::vector< std::pair< int, boxSide > > getBndWall()
Get vector of [patch, side] corresponding to the solid wall boundary.
Definition gsFlowSolverParams.h:206
void setPrecOptions(const gsOptionList &opt)
Set preconditioner options given in opt.
Definition gsFlowSolverParams.h:178
const gsNavStokesPde< T > & getPde() const
Returns a const reference to the PDE.
Definition gsFlowSolverParams.h:145
const gsBoundaryConditions< T > & getBCs() const
Returns a const reference to the boundary conditions.
Definition gsFlowSolverParams.h:148
std::vector< gsMultiBasis< T > > & getBases()
Returns a reference to the discretization bases.
Definition gsFlowSolverParams.h:155
gsAssemblerOptions & assemblerOptions()
Returns a reference to the assembler option list.
Definition gsFlowSolverParams.h:163
std::vector< std::pair< int, boxSide > > getBndOut()
Get vector of [patch, side] corresponding to the outflow boundary.
Definition gsFlowSolverParams.h:199
gsOptionList & precOptions()
Returns a reference to the preconditioner option list.
Definition gsFlowSolverParams.h:174
gsOptionList & options()
Returns a reference to the INS solver option list.
Definition gsFlowSolverParams.h:185
void createDofMappers(std::vector< gsDofMapper > &mappers)
Creates DOF mappers for velocity and pressure.
Definition gsFlowSolverParams.h:120
static gsOptionList defaultOptions()
Returns a list of default options for the incompressible flow solver.
Definition gsFlowSolverParams.h:75
Holds a set of patch-wise bases and their topology information.
Definition gsMultiBasis.h:37
An incompressible Navier-Stokes PDE.
Definition gsNavStokesPde.h:33
Class which holds a list of parameters/options, and provides easy access to them.
Definition gsOptionList.h:33
void addInt(const std::string &label, const std::string &desc, const index_t &value)
Adds a option named label, with description desc and value value.
Definition gsOptionList.cpp:201
void addReal(const std::string &label, const std::string &desc, const Real &value)
Adds a option named label, with description desc and value value.
Definition gsOptionList.cpp:211
void addSwitch(const std::string &label, const std::string &desc, const bool &value)
Adds a option named label, with description desc and value value.
Definition gsOptionList.cpp:235
void addString(const std::string &label, const std::string &desc, const std::string &value)
Adds a option named label, with description desc and value value.
Definition gsOptionList.cpp:190
#define GISMO_ASSERT(cond, message)
Definition gsDebug.h:89
The G+Smo namespace, containing all definitions for the library.
Definition gsAssemblerOptions.h:243