LifeV
|
FSIMonolithic.hpp pure virtual class containing the core methods of the FSIMonolithic FSI solver. More...
#include <FSIMonolithic.hpp>
Typedefs | |
typedef FSIOperator | super_Type |
typedef FSIOperator::fluid_Type::matrix_Type | matrix_Type |
typedef std::shared_ptr< matrix_Type > | matrixPtr_Type |
typedef super_Type::solution_Type | solution_Type |
typedef super_Type::solutionPtr_Type | solutionPtr_Type |
typedef MonolithicBlock | prec_Type |
typedef std::shared_ptr< prec_Type > | precPtr_Type |
typedef MonolithicBlockMatrix | blockMatrix_Type |
typedef std::shared_ptr< blockMatrix_Type > | blockMatrixPtr_Type |
typedef FactorySingleton< Factory< FSIMonolithic, std::string > > | factory_Type |
typedef SolverAztecOO | solver_Type |
typedef MatrixEpetraStructured< Real > | matrixBlock_Type |
typedef MatrixEpetraStructuredView< Real > | matrixBlockView_Type |
typedef std::shared_ptr< matrixBlock_Type > | matrixBlockPtr_Type |
Constructors, Destructor | |
FSIMonolithic () | |
~FSIMonolithic () | |
Public Setup Methods | |
void | setupFEspace () |
create FEspace More... | |
virtual void | setupDOF (void) |
sets the interface map between the fluid and solid meshes (non scalable, do not use for massively parallel simulations) More... | |
void | setupDOF (meshFilter_Type &filterMesh) |
reads the interface map between the fluid and solid meshes from file. More... | |
virtual void | setupSystem () |
sets the parameters from data file More... | |
virtual void | setup (const GetPot &dataFile) |
stores the data file into a member More... | |
virtual void | setupFluidSolid () |
builds the global Epetra map More... | |
virtual void | setupFluidSolid (UInt const fluxes) |
builds the global Epetra map More... | |
Public Methods | |
void | monolithicToInterface (vector_Type &lambdaSolid, const vector_Type &sol) |
Transfers a vector to the interface. More... | |
void | monolithicToX (const vector_Type &disp, vector_Type &dispFluid, MapEpetra &map, UInt offset=(UInt) 0) |
Transfers a vector to a subdomain. More... | |
void | buildSystem () |
builds the constant part of the monolithic matrix More... | |
void | mergeBCHandlers () |
Merges the flux boundary conditions into the fluid BCHandler. More... | |
void | computeFluidNormals (vector_Type &normals) |
Computes the normals to the fluid domain. More... | |
virtual void | evalResidual (vector_Type &res, const vector_Type &sol, const UInt iter)=0 |
Evaluates the nonlinear residual. More... | |
virtual void | solveJac (vector_Type &muk, const vector_Type &res, const Real linearRelTol) |
solves the Jacobian system More... | |
virtual void | updateSystem () |
updates the meshmotion, advances of a time step More... | |
void | enableStressComputation (UInt flag) |
activates the computation of the wall stress on the boundary with a specified flag. More... | |
vectorPtr_Type | computeStress () |
Computes the stress on the coupling boundary (the traction vector) More... | |
Set Methods | |
precPtr_Type & | precPtrView () |
returns a non-const pointer to the preconditioner. Can be used either as a setter or a getter. More... | |
blockMatrixPtr_Type & | operatorPtrView () |
returns a non-const pointer to the preconditioner. Can be used either as a setter or a getter. More... | |
virtual void | setSolidBC (const fluidBchandlerPtr_Type &bc_solid) |
sets the solid BCHandle More... | |
void | setFluidBC (const fluidBchandlerPtr_Type &bc_fluid) |
initializes the solution by reference (through a shared_ptr) More... | |
UInt | dimInterface () const |
get the total dimension of the FS interface More... | |
UInt | offset () const |
Returns true if CE of FI methods are used, false otherwise (GCE) More... | |
void | exportSolidDisplacement (vector_Type &solidDisplacement) |
Get the solid displacement from the solution. More... | |
void | exportSolidVelocity (vector_Type &solidVelocity) |
Get the solid velocity. More... | |
void | exportSolidAcceleration (vector_Type &solidAcceleration) |
Get the solid accelration. More... | |
void | exportFluidVelocity (vector_Type &fluidVelocity) |
Export the fluid velocity by copying it to an external vector. More... | |
void | exportFluidPressure (vector_Type &fluidPressure) |
Export the fluid pressure by copying it to an external vector. More... | |
void | exportFluidVelocityAndPressure (vector_Type &fluidVelocityAndPressure) |
Gets the fluid and pressure. More... | |
virtual std::shared_ptr< MapEpetra > & | couplingVariableMap () |
Returns the monolithic map. More... | |
virtual const vector_Type & | solution () const =0 |
get the solution vector More... | |
virtual void | updateSolution (const vector_Type &solution) |
Update the solution after NonLinearRichardson is called. More... | |
void | updateRHS () |
Updates the right hand side. More... | |
void | setVectorInStencils (const vectorPtr_Type &vel, const vectorPtr_Type &pressure, const vectorPtr_Type &solidDisp, const UInt iter) |
Set vectors for restart. More... | |
void | setFluidVectorInStencil (const vectorPtr_Type &vel, const vectorPtr_Type &pressure, const UInt iter) |
void | setSolidVectorInStencil (const vectorPtr_Type &solidDisp, const UInt iter) |
virtual void | setALEVectorInStencil (const vectorPtr_Type &fluidDisp, const UInt iter, const bool lastVector)=0 |
void | finalizeRestart () |
void | initializeMonolithicOperator (std::vector< vectorPtr_Type > u0, std::vector< vectorPtr_Type > ds0, std::vector< vectorPtr_Type > df0) |
Protected methods | |
virtual void | createOperator (std::string &operType)=0 |
pure virtual: creates the operator (either of type FSIMonolithicGI or FSIMonolithicGE) More... | |
void | iterateMonolithic (const vector_Type &rhs, vector_Type &step) |
solves the monolithic system, once a solver, a preconditioner and a rhs have been defined. More... | |
void | couplingRhs (vectorPtr_Type rhs) |
adds the part due to coupling to the rhs More... | |
void | evalResidual (const vector_Type &sol, const vectorPtr_Type &rhs, vector_Type &res, bool diagonalScaling=false) |
evaluates the linear residual More... | |
bool | recomputePrec () |
says if the preconditioner will be recomputed More... | |
void | updateSolidSystem (vectorPtr_Type &rhsFluidCoupling) |
updates the rhs of the solid block. More... | |
void | diagonalScale (vector_Type &rhs, matrixPtr_Type matrFull) |
scales matrix and rhs More... | |
void | solidInit (std::string const &dOrder) |
Constructs the solid FESpace. More... | |
void | variablesInit (std::string const &dOrder) |
Constructs the solid FESpace and initializes the coupling variables at the interface. More... | |
virtual void | setupBlockPrec () |
void | assembleSolidBlock (UInt iter, const vector_Type &solution) |
assembles the solid problem (the matrix and the rhs due to the time derivative) More... | |
void | assembleFluidBlock (UInt iter, const vector_Type &solution) |
assembles the fluid problem (the matrix and the rhs due to the time derivative) More... | |
void | checkIfChangedFluxBC (precPtr_Type oper) |
Checks if the flux bcs changed during the simulation, e.g. More... | |
Protected attributes | |
std::shared_ptr< MapEpetra > | M_monolithicMap |
std::shared_ptr< MapEpetra > | M_interfaceMap |
std::shared_ptr< vector_Type > | M_beta |
the solid interface map More... | |
std::shared_ptr< MonolithicBlockMatrix > | M_monolithicMatrix |
precPtr_Type | M_precPtr |
std::shared_ptr< vector_Type > | M_rhsFull |
fluidBchandlerPtr_Type | M_BCh_flux |
solidBchandlerPtr_Type | M_BChWS |
BCFunctionRobin | M_bcfWs |
UInt | M_offset |
UInt | M_solidAndFluidDim |
FSIOperator::fluid_Type::matrixPtr_Type | M_fluidBlock |
matrixPtr_Type | M_solidBlockPrec |
matrixPtr_Type | M_robinCoupling |
matrixPtr_Type | M_boundaryMass |
std::shared_ptr< solver_Type > | M_linearSolver |
std::shared_ptr< vector_Type > | M_numerationInterface |
std::vector< fluidBchandlerPtr_Type > | M_BChs |
std::vector< std::shared_ptr< FESpace< mesh_Type, MapEpetra > > > | M_FESpaces |
bool | M_diagonalScale |
bool | M_reusePrec |
bool | M_resetPrec |
Int | M_maxIterSolver |
bool | M_restarts |
Private attributes | |
operator , where P is the preconditioner and A is the monolithic matrix | |
std::shared_ptr< ComposedOperator< Epetra_Operator > > | M_preconditionedSymmetrizedMatrix |
std::shared_ptr< vector_Type > | M_stress |
UInt | M_fluxes |
std::vector< bcName_Type > | M_BCFluxNames |
std::vector< UInt > | M_fluxOffset |
FSIMonolithic.hpp pure virtual class containing the core methods of the FSIMonolithic FSI solver.
Class handling the monolithic solver for FSI problems. The block structure of the matrix can be if the time discretization at hand is the Geometry-Explicit one (implemented in monolithicGE.hpp), or if the time discretization at hand is the Geometry-Implicit one (implemented in monolithicGI.hpp), where represents the solid block, the fluid block, the harmonic extension block, while the extra diagonal blocks represent the coupling. The implementation of the stress continuity coupling condition is obtained by means of an augmented formulation. Different possible preconditioners are implemented. The flag semiImplicit in the data file is used to distinguish between the GCE and CE (with quasi Newton) time discretizations. Exact Newton method and full implicit time discretization are implemented in the FSIMonolithicGI class.
Definition at line 102 of file FSIMonolithic.hpp.
typedef FSIOperator super_Type |
Definition at line 109 of file FSIMonolithic.hpp.
Definition at line 110 of file FSIMonolithic.hpp.
typedef std::shared_ptr<matrix_Type> matrixPtr_Type |
Definition at line 111 of file FSIMonolithic.hpp.
Definition at line 112 of file FSIMonolithic.hpp.
Definition at line 113 of file FSIMonolithic.hpp.
typedef MonolithicBlock prec_Type |
Definition at line 114 of file FSIMonolithic.hpp.
typedef std::shared_ptr<prec_Type> precPtr_Type |
Definition at line 115 of file FSIMonolithic.hpp.
Definition at line 116 of file FSIMonolithic.hpp.
typedef std::shared_ptr<blockMatrix_Type> blockMatrixPtr_Type |
Definition at line 117 of file FSIMonolithic.hpp.
typedef FactorySingleton< Factory< FSIMonolithic, std::string > > factory_Type |
Definition at line 118 of file FSIMonolithic.hpp.
typedef SolverAztecOO solver_Type |
Definition at line 119 of file FSIMonolithic.hpp.
typedef MatrixEpetraStructured<Real> matrixBlock_Type |
Definition at line 122 of file FSIMonolithic.hpp.
Definition at line 123 of file FSIMonolithic.hpp.
typedef std::shared_ptr<matrixBlock_Type> matrixBlockPtr_Type |
Definition at line 124 of file FSIMonolithic.hpp.
FSIMonolithic | ( | ) |
Definition at line 40 of file FSIMonolithic.cpp.
~FSIMonolithic | ( | ) |
Definition at line 69 of file FSIMonolithic.cpp.
|
virtual |
|
virtual |
sets the interface map between the fluid and solid meshes (non scalable, do not use for massively parallel simulations)
Reimplemented from FSIOperator.
Reimplemented in FSIMonolithicGE.
Definition at line 90 of file FSIMonolithic.cpp.
|
virtual |
reads the interface map between the fluid and solid meshes from file.
Reimplemented from FSIOperator.
Definition at line 117 of file FSIMonolithic.cpp.
|
virtual |
sets the parameters from data file
Calls the setup of the fluid problem and the setUp method.
Reimplemented from FSIOperator.
Reimplemented in FSIMonolithicGE.
Definition at line 124 of file FSIMonolithic.cpp.
|
virtual |
stores the data file into a member
setup method for the FSIMonolithic solver sets some parameters specific to the FSIMonolithic class
Reimplemented in FSIMonolithicGI.
Definition at line 131 of file FSIMonolithic.cpp.
|
virtual |
builds the global Epetra map
assigns each mesh partition to the corresponding processor, builds the monolithic map
Reimplemented from FSIOperator.
Definition at line 155 of file FSIMonolithic.cpp.
|
virtual |
builds the global Epetra map
assigns each mesh partition to the corresponding processor, builds the monolithic map with a number of fluxes specified from input
Reimplemented from FSIOperator.
Reimplemented in FSIMonolithicGI, and FSIMonolithicGE.
Definition at line 172 of file FSIMonolithic.cpp.
void monolithicToInterface | ( | vector_Type & | lambdaSolid, |
const vector_Type & | sol | ||
) |
Transfers a vector to the interface.
restricts a vector with a monolithic map on the solid interface map
lambdaSolid | vector on the solid interface |
disp | monolithic vector |
Definition at line 211 of file FSIMonolithic.cpp.
void monolithicToX | ( | const vector_Type & | disp, |
vector_Type & | dispFluid, | ||
MapEpetra & | map, | ||
UInt | offset = (UInt) 0 |
||
) |
Transfers a vector to a subdomain.
restricts a vector with a monolithic map on another map that must have a sequential numbering (not the interface map)
disp | monolithic vector |
dispFluid | vector on the fluid domain |
map | MapEpetra of the part of vector that we want to transfer |
offset | offset for the monolithic vector (also alpplied to the input map) |
Definition at line 234 of file FSIMonolithic.cpp.
|
virtual |
builds the constant part of the monolithic matrix
Reimplemented from FSIOperator.
Definition at line 248 of file FSIMonolithic.cpp.
|
inline |
Merges the flux boundary conditions into the fluid BCHandler.
two separate BCHandlers are initially created for the flux-type boundary conditions, these are later merged with the fluid BCHandler automatically, using this method
Definition at line 222 of file FSIMonolithic.hpp.
void computeFluidNormals | ( | vector_Type & | normals | ) |
Computes the normals to the fluid domain.
Computes the normals to the fluid domain in the nodes. It is an example of how to use the boundary conditions methods to compute the normal field on a surface.
Definition at line 297 of file FSIMonolithic.cpp.
|
pure virtual |
Evaluates the nonlinear residual.
This class is pure virtual, it depends on which type of monolithic solver is used
res | output |
_sol | monolithic solution |
iter | current NonLinearRichardson (Newton) iteration |
Implements FSIOperator.
Implemented in FSIMonolithicGE, and FSIMonolithicGI.
|
virtual |
solves the Jacobian system
muk | output, solution at the current Newton step |
res | nonlinear residual |
linearRelTol | not used |
The preconditioner type is usually an algebraic additive Schwarz. The following values assigned to the field DDBlockPrec in the data file correspond to different variants:
Only for the FSIMonolithic Geometry Explicit:
Only for the Geometry Implicit:
Implements FSIOperator.
Definition at line 309 of file FSIMonolithic.cpp.
|
virtual |
updates the meshmotion, advances of a time step
_sol | solution |
Reimplemented from FSIOperator.
Reimplemented in FSIMonolithicGE.
Definition at line 329 of file FSIMonolithic.cpp.
void enableStressComputation | ( | UInt | flag | ) |
activates the computation of the wall stress on the boundary with a specified flag.
Notice that the specified flag must be in the coupling fluid-structure interface
Definition at line 817 of file FSIMonolithic.cpp.
FSIMonolithic::vectorPtr_Type computeStress | ( | ) |
Computes the stress on the coupling boundary (the traction vector)
Definition at line 827 of file FSIMonolithic.cpp.
|
inline |
returns a non-const pointer to the preconditioner. Can be used either as a setter or a getter.
Definition at line 317 of file FSIMonolithic.hpp.
|
inline |
returns a non-const pointer to the preconditioner. Can be used either as a setter or a getter.
Definition at line 323 of file FSIMonolithic.hpp.
|
inlinevirtual |
sets the solid BCHandle
Definition at line 331 of file FSIMonolithic.hpp.
|
inlinevirtual |
initializes the solution by reference (through a shared_ptr)
sol | input pointer |
Reimplemented from FSIOperator.
Definition at line 342 of file FSIMonolithic.hpp.
|
inline |
get the total dimension of the FS interface
Definition at line 366 of file FSIMonolithic.hpp.
|
inline |
Returns true if CE of FI methods are used, false otherwise (GCE)
Returns the offset assigned to the solid block
Definition at line 375 of file FSIMonolithic.hpp.
|
inlinevirtual |
Get the solid displacement from the solution.
solidDisplacement | input vector |
Reimplemented from FSIOperator.
Definition at line 384 of file FSIMonolithic.hpp.
|
inlinevirtual |
Get the solid velocity.
fills an input vector with the solid displacement from the solution.
solidVelocity | input vector (output solid velocity) |
Reimplemented from FSIOperator.
Definition at line 395 of file FSIMonolithic.hpp.
|
inlinevirtual |
Get the solid accelration.
fills an input vector with the solid displacement from the solution.
solidVelocity | input vector (output solid acceleration) |
Reimplemented from FSIOperator.
Definition at line 406 of file FSIMonolithic.hpp.
|
inlinevirtual |
Export the fluid velocity by copying it to an external vector.
fluidVelocity | vector to be filled with the fluid velocity |
Reimplemented from FSIOperator.
Definition at line 416 of file FSIMonolithic.hpp.
|
inlinevirtual |
Export the fluid pressure by copying it to an external vector.
fluidPressure | vector to be filled with the fluid pressure |
Reimplemented from FSIOperator.
Definition at line 425 of file FSIMonolithic.hpp.
|
inlinevirtual |
Gets the fluid and pressure.
fills an input vector with the fluid and pressure from the solution M_un. It performs a trilinos import. Thus it works also for the velocity, depending on the map of the input vector
fluidVelocityandPressure | input vector |
Reimplemented from FSIOperator.
Definition at line 436 of file FSIMonolithic.hpp.
|
inlinevirtual |
Returns the monolithic map.
Reimplemented from FSIOperator.
Definition at line 442 of file FSIMonolithic.hpp.
|
pure virtual |
get the solution vector
Reimplemented from FSIOperator.
|
inlinevirtual |
Update the solution after NonLinearRichardson is called.
Here it is used also to update the velocity for the post-processing.
Reimplemented from FSIOperator.
Reimplemented in FSIMonolithicGE, and FSIMonolithicGI.
Definition at line 454 of file FSIMonolithic.hpp.
|
virtual |
Updates the right hand side.
Adds to the rhs the fluid time discretization terms
Reimplemented from FSIOperator.
Definition at line 791 of file FSIMonolithic.cpp.
|
virtual |
Set vectors for restart.
Set vectors for restart
Reimplemented from FSIOperator.
Definition at line 482 of file FSIMonolithic.cpp.
|
virtual |
Reimplemented from FSIOperator.
Definition at line 494 of file FSIMonolithic.cpp.
|
virtual |
Reimplemented from FSIOperator.
Definition at line 519 of file FSIMonolithic.cpp.
|
pure virtual |
Reimplemented from FSIOperator.
Implemented in FSIMonolithicGI, and FSIMonolithicGE.
|
virtual |
Reimplemented from FSIOperator.
Definition at line 541 of file FSIMonolithic.cpp.
|
virtual |
Reimplemented from FSIOperator.
Definition at line 561 of file FSIMonolithic.cpp.
|
protectedpure virtual |
pure virtual: creates the operator (either of type FSIMonolithicGI or FSIMonolithicGE)
Implemented in FSIMonolithicGI, and FSIMonolithicGE.
|
protected |
solves the monolithic system, once a solver, a preconditioner and a rhs have been defined.
Definition at line 341 of file FSIMonolithic.cpp.
|
protected |
adds the part due to coupling to the rhs
rhs | right hand side |
un | current solution |
Definition at line 372 of file FSIMonolithic.cpp.
|
protected |
evaluates the linear residual
sol | solution vector |
rhs | right-hand side |
res | the output residual |
diagonalScaling | flag stating wether to perform diagonal scaling |
Definition at line 403 of file FSIMonolithic.cpp.
|
inlineprotected |
says if the preconditioner will be recomputed
Definition at line 525 of file FSIMonolithic.hpp.
|
protected |
updates the rhs of the solid block.
Definition at line 455 of file FSIMonolithic.cpp.
|
protected |
scales matrix and rhs
rhs | the output rhs |
matrFull | the output matrix |
Definition at line 601 of file FSIMonolithic.cpp.
|
protected |
Constructs the solid FESpace.
Creates the solid FESpace with an unpartitioned mesh, necessary step to create the dof interconnections at the interface. The solid FESpace will be reset in variablesInit using the partitioned mesh.export If the interface map is created offline this method is never called.
dOrder | discretization order |
|
protectedvirtual |
Constructs the solid FESpace and initializes the coupling variables at the interface.
If the mesh is partitioned online the previous FESpace constructed with the unpartitioned mesh is discarded and replaced with one using a partitioned mesh.
Reimplemented from FSIOperator.
Definition at line 613 of file FSIMonolithic.cpp.
|
protectedvirtual |
Reimplemented in FSIMonolithicGI.
Definition at line 631 of file FSIMonolithic.cpp.
|
protected |
assembles the solid problem (the matrix and the rhs due to the time derivative)
Definition at line 675 of file FSIMonolithic.cpp.
|
protected |
assembles the fluid problem (the matrix and the rhs due to the time derivative)
Definition at line 754 of file FSIMonolithic.cpp.
|
protected |
Checks if the flux bcs changed during the simulation, e.g.
if a flux b.c. has been changed to Natural (this can be useful when modeling valves) When the fluxes bcs changed a '1' is added in the line corresponding to the Lagrange multiplier. This method must be called for both operator and preconditioner
Definition at line 858 of file FSIMonolithic.cpp.
|
protected |
Definition at line 587 of file FSIMonolithic.hpp.
|
protected |
Definition at line 588 of file FSIMonolithic.hpp.
|
protected |
the solid interface map
Definition at line 589 of file FSIMonolithic.hpp.
|
protected |
Definition at line 590 of file FSIMonolithic.hpp.
|
protected |
Definition at line 591 of file FSIMonolithic.hpp.
|
protected |
Definition at line 592 of file FSIMonolithic.hpp.
|
protected |
Definition at line 594 of file FSIMonolithic.hpp.
|
protected |
Definition at line 595 of file FSIMonolithic.hpp.
|
protected |
Definition at line 596 of file FSIMonolithic.hpp.
|
protected |
Definition at line 597 of file FSIMonolithic.hpp.
|
protected |
Definition at line 598 of file FSIMonolithic.hpp.
|
protected |
Definition at line 599 of file FSIMonolithic.hpp.
|
protected |
Definition at line 600 of file FSIMonolithic.hpp.
|
protected |
Definition at line 601 of file FSIMonolithic.hpp.
|
protected |
Definition at line 602 of file FSIMonolithic.hpp.
|
protected |
Definition at line 603 of file FSIMonolithic.hpp.
|
protected |
Definition at line 604 of file FSIMonolithic.hpp.
|
protected |
Definition at line 605 of file FSIMonolithic.hpp.
Definition at line 606 of file FSIMonolithic.hpp.
|
protected |
Definition at line 607 of file FSIMonolithic.hpp.
|
protected |
Definition at line 608 of file FSIMonolithic.hpp.
|
protected |
Definition at line 609 of file FSIMonolithic.hpp.
|
protected |
Definition at line 610 of file FSIMonolithic.hpp.
|
protected |
Definition at line 611 of file FSIMonolithic.hpp.
|
private |
Definition at line 618 of file FSIMonolithic.hpp.
|
private |
Definition at line 619 of file FSIMonolithic.hpp.
|
private |
Definition at line 620 of file FSIMonolithic.hpp.
|
private |
Definition at line 621 of file FSIMonolithic.hpp.
|
private |
Definition at line 622 of file FSIMonolithic.hpp.