59StokesFlow :: ~StokesFlow() { }
64 FluidModel :: initializeFrom(ir);
78 this->
velocityPressureField = std::make_unique<DofDistributedPrimaryField>(
this, 1, FT_VelocityPressure, 1);
88void StokesFlow :: solveYourselfAt(
TimeStep *tStep)
96 this->
meshqualityee = std::make_unique<MeshQualityErrorEstimator>( 1, d );
103 OOFEM_LOG_INFO(
"StokesFlow :: solveYourselfAt - Mesh deformation at %e\n", meshdeformation);
129 incrementOfSolution.
resize(neq);
133 externalForces.
resize(neq);
134 externalForces.
zero();
147 int currentIterations=0;
157 SparseNonLinearSystemNM :: rlm_total,
232 FluidModel :: updateYourself(tStep);
236int StokesFlow :: forceEquationNumbering(
int id)
238 int neq = FluidModel :: forceEquationNumbering(
id);
245double StokesFlow :: giveUnknownComponent(ValueModeType mode,
TimeStep *tStep,
Domain *d,
Dof *dof)
251double StokesFlow :: giveReynoldsNumber()
257int StokesFlow :: checkConsistency()
263 if (
dynamic_cast< FMElement *
>( elem.get() ) == NULL ) {
264 OOFEM_WARNING(
"Element %d has no FMElement base", elem->giveLabel());
269 return EngngModel :: checkConsistency();
272void StokesFlow :: updateInternalState(
TimeStep *tStep)
275 if ( domain->giveTopology() ) {
277 this->
ts = domain->giveTopology()->updateYourself(tStep);
280 for (
auto &elem : domain->giveElements() ) {
281 elem->updateInternalState(tStep);
293 FluidModel :: doStepOutput(tStep);
#define REGISTER_EngngModel(class)
TopologyDescription * giveTopology()
int giveNumberOfElements() const
Returns number of elements in domain.
std ::vector< std ::unique_ptr< Element > > & giveElements()
int giveNumberOfTimeStepWhenIcApply()
Returns the time step number, when initial conditions should apply.
problemScale giveProblemScale() const
Returns scale in multiscale simulation.
std ::vector< std ::unique_ptr< Domain > > domainList
List of problem domains.
virtual int giveNumberOfDomainEquations(int di, const UnknownNumberingScheme &num)
ExportModuleManager * giveExportModuleManager()
Returns receiver's export module manager.
std ::unique_ptr< TimeStep > previousStep
Previous time step.
int equationNumberingCompleted
Equation numbering completed flag.
MetaStep * giveCurrentMetaStep()
Returns current meta step.
int ndomains
Number of receiver domains.
Domain * giveDomain(int n)
std ::unique_ptr< TimeStep > currentStep
Current time step.
@ InternalForcesExchangeTag
void initMetaStepAttributes(MetaStep *mStep)
int updateSharedDofManagers(FloatArray &answer, const UnknownNumberingScheme &s, int ExchangeTag)
void assembleVector(FloatArray &answer, TimeStep *tStep, const VectorAssembler &va, ValueModeType mode, const UnknownNumberingScheme &s, Domain *domain, FloatArray *eNorms=NULL)
virtual void updateStabilizationCoeffs(TimeStep *tStep)
void zero()
Zeroes all coefficients of receiver.
FluidModel(int i, EngngModel *master)
virtual void zero()=0
Zeroes the receiver.
FloatArray eNorm
Element norm for nonlinear analysis (squared).
void updateSolution(FloatArray &solutionVector, TimeStep *tStep, Domain *d) override
TopologyState ts
Topology state, most notably used for determining if there is a need to remesh.
void updateMatrix(SparseMtrx &mat, TimeStep *tStep, Domain *d) override
std ::unique_ptr< SparseMtrx > stiffnessMatrix
double deltaT
Time increment read from input record.
LinSystSolverType solverType
Linear solver type.
SparseMtrxType sparseMtrxType
Sparse matrix type.
void updateInternalState(TimeStep *tStep)
std ::unique_ptr< MeshQualityErrorEstimator > meshqualityee
Used for determining if a new mesh must be created.
void updateInternalRHS(FloatArray &answer, TimeStep *tStep, Domain *d, FloatArray *eNorm) override
NumericalMethod * giveNumericalMethod(MetaStep *mStep) override
Returns reference to receiver's numerical method.
FloatArray internalForces
double maxdef
Maximum deformation allowed.
std ::unique_ptr< SparseNonLinearSystemNM > nMethod
Numerical method.
std ::unique_ptr< PrimaryField > velocityPressureField
Primary unknowns.
FloatArray solutionVector
int giveMetaStepNumber()
Returns receiver's meta step number.
ConvergedReason convergedReason
Status of solution step (Converged,.
int numberOfIterations
Number of itarations needed to achieve convergence.
int giveNumber()
Returns receiver's number.
virtual void replaceFEMesh()
virtual void doOutput(TimeStep *tStep)
#define _IFT_EngngModel_lstype
#define _IFT_EngngModel_smtype
#define OOFEM_WARNING(...)
#define OOFEM_LOG_INFO(...)
FloatArrayF< N > assemble(const FloatArrayF< M > &x, int const (&c)[M])
Assemble components into zero matrix.
@ SMT_PetscMtrx
PETSc library mtrx representation.
ClassFactory & classFactory
@ TS_NeedsRemeshing
Indicates that the topology has reached a need for remeshing, as the case with merging surfaces.
@ TS_OK
Indicates that everything is OK with respect to topology.
#define _IFT_StokesFlow_deltat