29template<
class T,
int MatOrder>
39 using Base::m_assemblerPtr;
40 using Base::m_solution;
41 using Base::m_iterationNumber;
42 using Base::m_outFile;
43 using Base::m_fileOutput;
44 using Base::m_dispOutput;
67 virtual std::string
getName() {
return "gsINSSolver"; }
80template<
class T = real_t,
int MatOrder = RowMajor>
91 using Base::m_assemblerPtr;
92 using Base::m_solution;
93 using Base::m_iterationNumber;
107 m_params.options().setSwitch(
"unsteady",
false);
126 virtual std::string
getName() {
return "gsINSSolverSteady"; }
136template<
class T = real_t,
int MatOrder = RowMajor>
146 T m_time, m_timeStepSize;
147 T m_innerIter, m_avgPicardIter;
152 using Base::m_solution;
153 using Base::m_iterationNumber;
154 using Base::m_assemblerPtr;
155 using Base::m_params;
156 using Base::m_outFile;
157 using Base::m_fileOutput;
158 using Base::m_dispOutput;
169 m_params.options().setSwitch(
"unsteady",
true);
178 void plotCurrentTimeStep(std::ofstream& fileU, std::ofstream& fileP, std::string fileNameSuffix,
unsigned plotPts);
186 void solveWithAnimation(
const int totalIter,
const int iterStep, std::string fileNameSuffix =
"",
const T epsilon = 1e-3,
unsigned plotPts = 10000,
const int minIterations = 1);
202 T getSimulationTime()
const {
return m_time; }
208 virtual std::string
getName() {
return "gsINSSolverUnsteady"; }
215#ifndef GISMO_BUILD_LIB
216#include GISMO_HPP_HEADER(gsINSSolver.hpp)
A base class for all flow solvers in gsIncompressibleFlow.
Definition gsFlowSolverBase.h:27
virtual void initMembers()
Initialize all members.
Definition gsFlowSolverBase.hpp:20
A class that holds all parameters needed by the incompressible flow solver.
Definition gsFlowSolverParams.h:34
The steady incompressible Navier–Stokes assembler.
Definition gsINSAssembler.h:283
The unsteady incompressible Navier–Stokes assembler.
Definition gsINSAssembler.h:310
A base class for incompressible Navier-Stokes assemblers.
Definition gsINSAssembler.h:27
The steady incompressible Navier-Stokes solver.
Definition gsINSSolver.h:82
virtual void nextIteration()
Perform next iteration step.
Definition gsINSSolver.hpp:38
virtual gsINSAssemblerSteady< T, MatOrder > * getAssembler() const
Returns a pointer to the assembler.
Definition gsINSSolver.h:120
virtual std::string getName()
Retrurns the name of the class as a string.
Definition gsINSSolver.h:126
gsINSSolverSteady(gsFlowSolverParams< T > ¶ms)
Constructor.
Definition gsINSSolver.h:101
The unsteady incompressible Navier-Stokes solver.
Definition gsINSSolver.h:138
virtual void nextIteration()
Perform next iteration step.
Definition gsINSSolver.hpp:95
virtual void solveGeneralizedStokes(const int maxIterations, const T epsilon, const int minIterations=1)
Solve the generalized Stokes problem.
Definition gsINSSolver.h:189
gsINSAssemblerUnsteady< T, MatOrder > * getAssembler() const
Returns a pointer to the assembler.
Definition gsINSSolver.h:196
gsINSSolverUnsteady(gsFlowSolverParams< T > ¶ms)
Constructor.
Definition gsINSSolver.h:164
virtual std::string getName()
Retrurns the name of the class as a string.
Definition gsINSSolver.h:208
T getAvgPicardIterations() const
Returns the average number of Picard iterations per time step.
Definition gsINSSolver.h:205
virtual void initMembers()
Initialize all members.
Definition gsINSSolver.hpp:55
A base class for incompressible Navier-Stokes solvers.
Definition gsINSSolver.h:31
gsINSSolver(gsFlowSolverParams< T > ¶ms)
Constructor.
Definition gsINSSolver.h:50
virtual std::string getName()
Retrurns the name of the class as a string.
Definition gsINSSolver.h:67
virtual gsINSAssembler< T, MatOrder > * getAssembler() const
Returns a pointer to the assembler.
Definition gsINSSolver.h:70
virtual void solveStokes()
Compute the Stokes problem and save the solution into m_solution.
Definition gsINSSolver.hpp:19
This file contains the debugging and messaging system of G+Smo.
#define GISMO_NO_IMPLEMENTATION
Definition gsDebug.h:129
A class that holds all parameters needed by the incompressible flow solver.
This is the main header file that collects wrappers of Eigen for linear algebra.
The G+Smo namespace, containing all definitions for the library.