LifeV
StructuralOperator< Mesh > Class Template Reference

#include <StructuralOperator.hpp>

+ Collaboration diagram for StructuralOperator< Mesh >:

Protected Member Functions

void applyBoundaryConditions (matrix_Type &matrix, vector_Type &rhs, bcHandler_Type &BCh, UInt offset=0)
 Apply boundary condition. More...
 
UInt dim () const
 
void setupMapMarkersVolumes (void)
 construct the map between the markers and the volumes More...
 

Protected Attributes

std::shared_ptr< data_TypeM_data
 Protected Members. More...
 
FESpacePtr_Type M_dispFESpace
 
ETFESpacePtr_Type M_dispETFESpace
 
std::shared_ptr< const DisplayerM_Displayer
 
Int M_me
 
std::shared_ptr< solver_TypeM_linearSolver
 data for solving tangent problem with aztec + preconditioner More...
 
basePrecPtr_Type M_preconditioner
 
std::shared_ptr< MatrixElementalM_elmatM
 Elementary matrices and vectors. More...
 
vectorPtr_Type M_disp
 linearized velocity More...
 
vectorPtr_Type M_rhs
 right hand side displacement More...
 
vectorPtr_Type M_rhsCopy
 
vectorPtr_Type M_residualCopy
 
vectorPtr_Type M_rhsNoBC
 right hand side More...
 
vectorPtr_Type M_bodyForceVector
 
std::shared_ptr< vector_TypeM_residual_d
 right hand side More...
 
std::ofstream M_out_iter
 files for lists of iterations and residuals per timestep More...
 
std::ofstream M_out_res
 
bcHandler_Type M_BCh
 BCHandler object. More...
 
std::shared_ptr< const MapEpetraM_localMap
 Map Epetra. More...
 
matrixPtr_Type M_massMatrix
 Matrix M: mass. More...
 
matrixPtr_Type M_systemMatrix
 Matrix Temp: Temporary matrix to compute residuals or rhs. More...
 
matrixPtr_Type M_jacobian
 Jacobian Matrix: Matrix to store the jacobian of the newton method. More...
 
UInt M_recur
 level of recursion for Aztec (has a sens with FSI coupling) More...
 
bool M_havingSource
 
sourceFunctorPtr_Type M_source
 
UInt M_offset
 
Real M_rescaleFactor
 
materialPtr_Type M_material
 Material class. More...
 
mapMarkerVolumesPtr_Type M_mapMarkersVolumes
 Map between markers and volumes on the mesh. More...
 
mapMarkerIndexesPtr_Type M_mapMarkersIndexes
 Map between markers and volumes on the mesh. More...
 
matrixSerialDensePtr_Type M_deformationF
 Elementary matrix for the tensor F. More...
 
vectorInvariants_Type M_invariants
 
timeAdvancePtr_Type M_timeAdvance
 

Type definitions

typedef Real(* function) (const Real &, const Real &, const Real &, const Real &, const ID &)
 
typedef std::function< Real(Real const &, Real const &, Real const &, Real const &, ID const &) > source_Type
 
typedef StructuralConstitutiveLaw< Mesh > material_Type
 
typedef std::shared_ptr< material_TypematerialPtr_Type
 
typedef BCHandler bcHandlerRaw_Type
 
typedef std::shared_ptr< bcHandlerRaw_TypebcHandler_Type
 
typedef LinearSolver solver_Type
 
typedef solver_Type::matrix_Type matrix_Type
 
typedef std::shared_ptr< matrix_TypematrixPtr_Type
 
typedef solver_Type::vector_Type vector_Type
 
typedef std::shared_ptr< vector_TypevectorPtr_Type
 
typedef vector_Type solution_Type
 
typedef std::shared_ptr< solution_TypesolutionPtr_Type
 
typedef StructuralConstitutiveLawData data_Type
 
typedef RegionMesh< LinearTetramesh_Type
 
typedef std::vector< mesh_Type::element_Type *> vectorVolumes_Type
 
typedef std::vector< UIntvectorIndexes_Type
 
typedef std::map< UInt, vectorVolumes_TypemapMarkerVolumes_Type
 
typedef std::map< UInt, vectorIndexes_TypemapMarkerIndexes_Type
 
typedef std::shared_ptr< mapMarkerVolumes_TypemapMarkerVolumesPtr_Type
 
typedef std::shared_ptr< mapMarkerIndexes_TypemapMarkerIndexesPtr_Type
 
typedef mapMarkerVolumes_Type::const_iterator mapIterator_Type
 
typedef mesh_Type::element_Type meshEntity_Type
 
typedef std::function< bool(const UInt, const UInt) > comparisonPolicy_Type
 
typedef MarkerSelector< meshEntity_Type, comparisonPolicy_TypemarkerSelector_Type
 
typedef std::unique_ptr< markerSelector_TypemarkerSelectorPtr_Type
 
typedef ETFESpace< RegionMesh< LinearTetra >, MapEpetra, 3, 3 > ETFESpace_Type
 
typedef std::shared_ptr< ETFESpace_TypeETFESpacePtr_Type
 
typedef FESpace< RegionMesh< LinearTetra >, MapEpetraFESpace_Type
 
typedef std::shared_ptr< FESpace_TypeFESpacePtr_Type
 
typedef LifeV::Preconditioner basePrec_Type
 
typedef std::shared_ptr< basePrec_TypebasePrecPtr_Type
 
typedef LifeV::PreconditionerIfpack precIfpack_Type
 
typedef std::shared_ptr< precIfpack_TypeprecIfpackPtr_Type
 
typedef LifeV::PreconditionerML precML_Type
 
typedef std::shared_ptr< precML_TypeprecMLPtr_Type
 
typedef TimeAdvance< vector_TypetimeAdvance_Type
 
typedef std::shared_ptr< timeAdvance_TypetimeAdvancePtr_Type
 
typedef Epetra_SerialDenseMatrix matrixSerialDense_Type
 
typedef std::shared_ptr< matrixSerialDense_TypematrixSerialDensePtr_Type
 
typedef std::vector< LifeV::RealvectorInvariants_Type
 
typedef std::shared_ptr< vectorInvariants_TypevectorInvariantsPtr_Type
 
typedef std::function< VectorSmall< 3 > Real const &, const Real &, const Real &, const Real &) > volumeForce_Type
 
typedef std::shared_ptr< volumeForce_TypevolumeForcePtr_Type
 
typedef sourceVectorialFunctor sourceFunctor_Type
 
typedef std::shared_ptr< sourceFunctor_TypesourceFunctorPtr_Type
 

Constructor & Destructor

 StructuralOperator ()
 
virtual ~StructuralOperator ()
 

Methods

void setup (std::shared_ptr< data_Type > data, const FESpacePtr_Type &dFESpace, const ETFESpacePtr_Type &dETFESpace, bcHandler_Type &BCh, std::shared_ptr< Epetra_Comm > &comm)
 Setup the created object of the class Venantkirchhof. More...
 
void setup (std::shared_ptr< data_Type > data, const FESpacePtr_Type &dFESpace, const ETFESpacePtr_Type &dETFESpace, std::shared_ptr< Epetra_Comm > &comm)
 
void setup (std::shared_ptr< data_Type > data, const FESpacePtr_Type &dFESpace, const ETFESpacePtr_Type &dETFESpace, std::shared_ptr< Epetra_Comm > &comm, const std::shared_ptr< const MapEpetra > &monolithicMap, UInt offset=0)
 
void updateSystem (void)
 Updates the system at the end of each time step. More...
 
void updateSystem (matrixPtr_Type &mat_stiff)
 Updates the system at the end of each time step when the matrix is passed from outside. More...
 
void updateRightHandSideWithBodyForce (const Real currentTime, const vector_Type &rhsTimeAdvance)
 Updates the system at the end of each time step given a source term. More...
 
void setRightHandSide (const vector_Type &rightHandSide)
 Updates the rhs at the start of each time step. More...
 
void computeRHSNoBC (void)
 Comuptes the right hand side in the updateSystem methods. More...
 
void buildSystem (const Real coefficient)
 Compute the mass matrix and it calls the method to build the linear part of the stiffness matrix of the material class. More...
 
void computeMassMatrix (const Real factor=1.)
 Compute the mass matrix and the linear part of the stiffness matrix. More...
 
void iterate (const bcHandler_Type &bch)
 Solve the non-linear system. More...
 
void iterateLin (bcHandler_Type &bch)
 Solve the linearized problem. Used in FSI segregated in ExactJacobian. More...
 
void showMe (std::ostream &c=std::cout) const
 Output. More...
 
void updateJacobian (const vector_Type &solution, matrixPtr_Type &jacobian)
 Update the Jacobian Matrix at each iteration of the nonLinearRichardson method. More...
 
void updateJacobian (const vector_Type &solution)
 Update the Jacobian Matrix at each iteration of the nonLinearRichardson method. More...
 
void solveJac (vector_Type &step, const vector_Type &residual, Real &linear_rel_tol)
 Solves the tangent problem for newton iterations. More...
 
void solveJacobian (vector_Type &step, const vector_Type &residual, Real &linear_rel_tol, bcHandler_Type &BCd)
 Solves the tangent problem with custom BC. More...
 
void evalResidual (vector_Type &residual, const vector_Type &solution, Int iter)
 Evaluates residual for newton interations. More...
 
void evalResidualDisplacement (const vector_Type &solution)
 Evaluates residual of the displacement for FSI problems. More...
 
void evalResidualDisplacementLin (const vector_Type &solution)
 Evaluates residual of the displacement in the Linearized problem of ExactJcobian. FSI problems. More...
 
void initialize (const function &d0)
 Sets the initial displacement, velocity, acceleration. More...
 
void initialize (vectorPtr_Type d0)
 Sets the initial displacement, velocity, acceleration. More...
 
void reduceSolution (Vector &displacement, Vector &velocity)
 Computes the velocity and acceleration vector at the n-th time step. More...
 
void computeMatrix (matrixPtr_Type &stiff, const vector_Type &sol, Real const &factor, const UInt iter)
 Multiply the mass matrix and the linear stiffness matrix by the rescaleFactor. More...
 
void jacobianDistribution (vectorPtr_Type displacement, vector_Type &jacobianDistribution)
 compute the value of the determinant of F in all the volumes of the mesh More...
 
void colorMesh (vector_Type &meshColors)
 compute the value of the determinant of F in all the volumes of the mesh More...
 
void computeCauchyStressTensor (const vectorPtr_Type disp, const QuadratureRule &evalQuad, vectorPtr_Type sigma_1, vectorPtr_Type sigma_2, vectorPtr_Type sigma_3)
 Compute the three columns of the Cauchy stress tensor. More...
 
void computePrincipalTensions (vectorPtr_Type sigma_1, vectorPtr_Type sigma_2, vectorPtr_Type sigma_3, vectorPtr_Type vectorEigenvalue)
 Compute the nodal principal tensions given the cauchy stress tensor. More...
 

Set Methods

void setBC (const bcHandler_Type &BCd)
 Setters Set the BCHandler object. More...
 
void setSourceTerm (source_Type const &)
 Set the source object. More...
 
void setSourceTerm (const volumeForcePtr_Type s)
 Set the source object. More...
 
void setHavingSourceTerm (const bool havingSource)
 Set the source object. More...
 
void setRecur (UInt recur)
 Set the recur parameter. More...
 
void setDataFromGetPot (const GetPot &dataFile)
 Set the data fields with the Getpot data file for preconditioners and solver. More...
 
void setTimeAdvance (const timeAdvancePtr_Type &timeAdvancePtr)
 
void constructPatchAreaVector (vector_Type &patchArea, const vector_Type &solution)
 constructPatchAreaVector: This method build the patch area vector used in the reconstruction process More...
 
void reconstructElementaryVector (VectorElemental &elVecSigma, vector_Type &patchArea, UInt nVol)
 reconstructElementaryVector: This method applies a reconstruction procedure on the elvec that is passed More...
 

Get Methods

MapEpetra const & map () const
 Getters Get the Epetramap. More...
 
Displayer const & displayer () const
 Get the Displayer object. More...
 
std::shared_ptr< const Displayer > const & displayerPtr () const
 
matrixPtr_Type const massMatrix () const
 Get the matrix containing the mass mtrix and the linear part of the stiffness matrix. More...
 
FESpace_TypedispFESpace ()
 Get the FESpace object. More...
 
ETFESpace_TypedispETFESpace ()
 Get the ETFESpace object. More...
 
bcHandler_Type const & bcHandler () const
 Get the bCHandler object. More...
 
vector_Typeresidual ()
 Get the residual. More...
 
const bool havingSourceTerm () const
 Get the source term. More...
 
vector_Typedisplacement ()
 Get the displacement. More...
 
vectorPtr_Type displacementPtr ()
 
vectorPtr_TyperhsWithoutBC ()
 Get the right hand sde without BC. More...
 
solver_TypelinearSolver ()
 
vector_TyperhsCopy ()
 Get the right hand. The member rhsCopy is used for Debug purposes! More...
 
vector_TyperesidualCopy ()
 
vector_TypebodyForce ()
 
std::shared_ptr< Epetra_Comm > const & comunicator () const
 Get the comunicator object. More...
 
Real rescaleFactor ()
 Get the rescaleFactor. More...
 
const UIntoffset () const
 
const materialPtr_Typematerial () const
 
void solidMatrix (matrixPtr_Type &)
 Do nothing in the linear case: the matrix remains constant. More...
 
Real thickness () const
 Get the thickness. More...
 
Real young (UInt material=1) const
 Get the Young modulus. More...
 
Real poisson (UInt material=1) const
 Get the Poisson coefficient. More...
 
Real rho () const
 Get the density. More...
 
const std::shared_ptr< data_Type > & data () const
 Get the data container. More...
 
void apply (const vector_Type &sol, vector_Type &res) const
 
mapMarkerVolumesPtr_Type mapMarkersVolumes () const
 Get the density. More...
 
mapMarkerIndexesPtr_Type mapMarkersIndexes () const
 Get the density. More...
 
const timeAdvancePtr_TypetimeAdvancePtr () const
 

Detailed Description

template<typename Mesh>
class LifeV::StructuralOperator< Mesh >

Definition at line 167 of file StructuralOperator.hpp.

Member Typedef Documentation

◆ function

typedef Real( * function) (const Real &, const Real &, const Real &, const Real &, const ID &)

Definition at line 173 of file StructuralOperator.hpp.

◆ source_Type

typedef std::function<Real ( Real const&, Real const&, Real const&, Real const&, ID const& ) > source_Type

Definition at line 174 of file StructuralOperator.hpp.

◆ material_Type

Definition at line 176 of file StructuralOperator.hpp.

◆ materialPtr_Type

typedef std::shared_ptr<material_Type> materialPtr_Type

Definition at line 177 of file StructuralOperator.hpp.

◆ bcHandlerRaw_Type

Definition at line 179 of file StructuralOperator.hpp.

◆ bcHandler_Type

typedef std::shared_ptr<bcHandlerRaw_Type> bcHandler_Type

Definition at line 180 of file StructuralOperator.hpp.

◆ solver_Type

Definition at line 182 of file StructuralOperator.hpp.

◆ matrix_Type

Definition at line 184 of file StructuralOperator.hpp.

◆ matrixPtr_Type

typedef std::shared_ptr<matrix_Type> matrixPtr_Type

Definition at line 185 of file StructuralOperator.hpp.

◆ vector_Type

Definition at line 186 of file StructuralOperator.hpp.

◆ vectorPtr_Type

typedef std::shared_ptr<vector_Type> vectorPtr_Type

Definition at line 187 of file StructuralOperator.hpp.

◆ solution_Type

Definition at line 188 of file StructuralOperator.hpp.

◆ solutionPtr_Type

typedef std::shared_ptr<solution_Type> solutionPtr_Type

Definition at line 189 of file StructuralOperator.hpp.

◆ data_Type

◆ mesh_Type

Definition at line 193 of file StructuralOperator.hpp.

◆ vectorVolumes_Type

Definition at line 194 of file StructuralOperator.hpp.

◆ vectorIndexes_Type

typedef std::vector< UInt > vectorIndexes_Type

Definition at line 195 of file StructuralOperator.hpp.

◆ mapMarkerVolumes_Type

Definition at line 197 of file StructuralOperator.hpp.

◆ mapMarkerIndexes_Type

Definition at line 198 of file StructuralOperator.hpp.

◆ mapMarkerVolumesPtr_Type

Definition at line 199 of file StructuralOperator.hpp.

◆ mapMarkerIndexesPtr_Type

Definition at line 200 of file StructuralOperator.hpp.

◆ mapIterator_Type

typedef mapMarkerVolumes_Type::const_iterator mapIterator_Type

Definition at line 201 of file StructuralOperator.hpp.

◆ meshEntity_Type

◆ comparisonPolicy_Type

typedef std::function<bool (const UInt, const UInt) > comparisonPolicy_Type

Definition at line 205 of file StructuralOperator.hpp.

◆ markerSelector_Type

◆ markerSelectorPtr_Type

typedef std::unique_ptr<markerSelector_Type> markerSelectorPtr_Type

Definition at line 208 of file StructuralOperator.hpp.

◆ ETFESpace_Type

Definition at line 210 of file StructuralOperator.hpp.

◆ ETFESpacePtr_Type

typedef std::shared_ptr<ETFESpace_Type> ETFESpacePtr_Type

Definition at line 211 of file StructuralOperator.hpp.

◆ FESpace_Type

◆ FESpacePtr_Type

typedef std::shared_ptr<FESpace_Type> FESpacePtr_Type

Definition at line 214 of file StructuralOperator.hpp.

◆ basePrec_Type

Definition at line 217 of file StructuralOperator.hpp.

◆ basePrecPtr_Type

typedef std::shared_ptr<basePrec_Type> basePrecPtr_Type

Definition at line 218 of file StructuralOperator.hpp.

◆ precIfpack_Type

◆ precIfpackPtr_Type

typedef std::shared_ptr<precIfpack_Type> precIfpackPtr_Type

Definition at line 220 of file StructuralOperator.hpp.

◆ precML_Type

Definition at line 221 of file StructuralOperator.hpp.

◆ precMLPtr_Type

typedef std::shared_ptr<precML_Type> precMLPtr_Type

Definition at line 222 of file StructuralOperator.hpp.

◆ timeAdvance_Type

Definition at line 225 of file StructuralOperator.hpp.

◆ timeAdvancePtr_Type

typedef std::shared_ptr< timeAdvance_Type > timeAdvancePtr_Type

Definition at line 226 of file StructuralOperator.hpp.

◆ matrixSerialDense_Type

typedef Epetra_SerialDenseMatrix matrixSerialDense_Type

Definition at line 228 of file StructuralOperator.hpp.

◆ matrixSerialDensePtr_Type

Definition at line 229 of file StructuralOperator.hpp.

◆ vectorInvariants_Type

typedef std::vector<LifeV::Real> vectorInvariants_Type

Definition at line 230 of file StructuralOperator.hpp.

◆ vectorInvariantsPtr_Type

Definition at line 232 of file StructuralOperator.hpp.

◆ volumeForce_Type

typedef std::function<VectorSmall<3> Real const&, const Real&, const Real&, const Real& ) > volumeForce_Type

Definition at line 236 of file StructuralOperator.hpp.

◆ volumeForcePtr_Type

typedef std::shared_ptr<volumeForce_Type> volumeForcePtr_Type

Definition at line 237 of file StructuralOperator.hpp.

◆ sourceFunctor_Type

◆ sourceFunctorPtr_Type

typedef std::shared_ptr<sourceFunctor_Type> sourceFunctorPtr_Type

Definition at line 239 of file StructuralOperator.hpp.

Constructor & Destructor Documentation

◆ StructuralOperator()

Definition at line 866 of file StructuralOperator.hpp.

◆ ~StructuralOperator()

virtual ~StructuralOperator ( )
inlinevirtual

Definition at line 248 of file StructuralOperator.hpp.

Member Function Documentation

◆ setup() [1/3]

void setup ( std::shared_ptr< data_Type data,
const FESpacePtr_Type dFESpace,
const ETFESpacePtr_Type dETFESpace,
bcHandler_Type BCh,
std::shared_ptr< Epetra_Comm > &  comm 
)

Setup the created object of the class Venantkirchhof.

Parameters
data_fileGetPot data file
refFEreference FE for the displacement
BChboundary conditions for the displacement
commthe Epetra Comunicator

Definition at line 906 of file StructuralOperator.hpp.

◆ setup() [2/3]

void setup ( std::shared_ptr< data_Type data,
const FESpacePtr_Type dFESpace,
const ETFESpacePtr_Type dETFESpace,
std::shared_ptr< Epetra_Comm > &  comm 
)
Parameters
data_fileGetPot data file
refFEreference FE for the displacement
commthe Epetra Comunicator

Definition at line 918 of file StructuralOperator.hpp.

◆ setup() [3/3]

void setup ( std::shared_ptr< data_Type data,
const FESpacePtr_Type dFESpace,
const ETFESpacePtr_Type dETFESpace,
std::shared_ptr< Epetra_Comm > &  comm,
const std::shared_ptr< const MapEpetra > &  monolithicMap,
UInt  offset = 0 
)
Parameters
data_fileGetPot data file
refFEreference FE for the displacement
commthe comunicator parameter
monolithicMapthe MapEpetra
offsetthe offset parameter

Definition at line 938 of file StructuralOperator.hpp.

◆ updateSystem() [1/2]

void updateSystem ( void  )

Updates the system at the end of each time step.

Definition at line 1027 of file StructuralOperator.hpp.

◆ updateSystem() [2/2]

void updateSystem ( matrixPtr_Type mat_stiff)

Updates the system at the end of each time step when the matrix is passed from outside.

Parameters
stiffstiffness matrix provided from outside

Definition at line 1033 of file StructuralOperator.hpp.

◆ updateRightHandSideWithBodyForce()

void updateRightHandSideWithBodyForce ( const Real  currentTime,
const vector_Type rhsTimeAdvance 
)

Updates the system at the end of each time step given a source term.

Parameters
rhsTimeAdvancethe portion of the rhs of the discrete equation which comes from TA.

Definition at line 1059 of file StructuralOperator.hpp.

◆ setRightHandSide()

void setRightHandSide ( const vector_Type rightHandSide)
inline

Updates the rhs at the start of each time step.

Parameters
rhssolid right hand side !

Definition at line 315 of file StructuralOperator.hpp.

◆ computeRHSNoBC()

void computeRHSNoBC ( void  )

Comuptes the right hand side in the updateSystem methods.

◆ buildSystem()

void buildSystem ( const Real  coefficient)

Compute the mass matrix and it calls the method to build the linear part of the stiffness matrix of the material class.

Definition at line 1082 of file StructuralOperator.hpp.

◆ computeMassMatrix()

void computeMassMatrix ( const Real  factor = 1.)

Compute the mass matrix and the linear part of the stiffness matrix.

Parameters
matrixthe matrix containing the mass matrix and the linear part of he stiffness matrix
rescalefactor for FSI problems

Number of displacement components

Definition at line 1098 of file StructuralOperator.hpp.

◆ iterate()

void iterate ( const bcHandler_Type bch)

Solve the non-linear system.

Parameters
bchBCHander object containing the boundary conditions

Definition at line 1156 of file StructuralOperator.hpp.

◆ iterateLin()

void iterateLin ( bcHandler_Type bch)

Solve the linearized problem. Used in FSI segregated in ExactJacobian.

Parameters
bchBCHander object containing the boundary conditions

Definition at line 1213 of file StructuralOperator.hpp.

◆ showMe()

void showMe ( std::ostream &  c = std::cout) const

Output.

Parameters
coutput file

Definition at line 1229 of file StructuralOperator.hpp.

◆ updateJacobian() [1/2]

void updateJacobian ( const vector_Type solution,
matrixPtr_Type jacobian 
)

Update the Jacobian Matrix at each iteration of the nonLinearRichardson method.

Parameters
solutionthe current solution at each iteration of the nonLinearRichardson method
jacobianthe Jacobian matrix that must be updated

Definition at line 1801 of file StructuralOperator.hpp.

◆ updateJacobian() [2/2]

void updateJacobian ( const vector_Type solution)

Update the Jacobian Matrix at each iteration of the nonLinearRichardson method.

Note: this method is used in FSIExactJacobian

Parameters
solutionthe current solution at each iteration of the nonLinearRichardson method

Definition at line 1831 of file StructuralOperator.hpp.

◆ solveJac()

void solveJac ( vector_Type step,
const vector_Type residual,
Real linear_rel_tol 
)

Solves the tangent problem for newton iterations.

Parameters
stepthe vector containing the solution of the sistem J*step=-Res
resthe vector conteining the residual
lin_res_tollinear_rel_tol send for the relative tolerance to the linear solver is therefore eta. eta is determined by the modified Eisenstat-Walker formula

Definition at line 1839 of file StructuralOperator.hpp.

◆ solveJacobian()

void solveJacobian ( vector_Type step,
const vector_Type residual,
Real linear_rel_tol,
bcHandler_Type BCd 
)

Solves the tangent problem with custom BC.

Parameters
stepthe vector containing the solution of the sistem J*step=-Res
resthe vector conteining the residual
lin_res_tollinear_rel_tol send for the relative tolerance to the linear solver is therefore eta. eta is determined by the modified Eisenstat-Walker formula
BCdBCHandler object containing the boundary condition

Definition at line 1849 of file StructuralOperator.hpp.

◆ evalResidual()

void evalResidual ( vector_Type residual,
const vector_Type solution,
Int  iter 
)

Evaluates residual for newton interations.

Parameters
resresidal vector that is update every time the method is called
solsolution vector from which the residual is computed
iteriteration of the nonLinearRichardson method

Definition at line 1620 of file StructuralOperator.hpp.

◆ evalResidualDisplacement()

void evalResidualDisplacement ( const vector_Type solution)

Evaluates residual of the displacement for FSI problems.

Parameters
sol,thecurrent displacement of he sturcture

Definition at line 1686 of file StructuralOperator.hpp.

◆ evalResidualDisplacementLin()

void evalResidualDisplacementLin ( const vector_Type solution)

Evaluates residual of the displacement in the Linearized problem of ExactJcobian. FSI problems.

Parameters
sol,thecurrent displacement of he sturcture

Definition at line 1710 of file StructuralOperator.hpp.

◆ initialize() [1/2]

void initialize ( const function d0)

Sets the initial displacement, velocity, acceleration.

Parameters
d0space function describing the initial displacement
w0space function describing the initial velocity
a0space function describing the initial acceleration

Definition at line 1734 of file StructuralOperator.hpp.

◆ initialize() [2/2]

void initialize ( vectorPtr_Type  d0)

Sets the initial displacement, velocity, acceleration.

Parameters
d0space function describing the initial displacement
w0empty vector
a0empty vector

Definition at line 1727 of file StructuralOperator.hpp.

◆ reduceSolution()

void reduceSolution ( Vector displacement,
Vector velocity 
)

Computes the velocity and acceleration vector at the n-th time step.

Reduce the complete solution to the solution on the pocessor with rank 0

Parameters
dispdisplacement solution
velvelocity solution

Definition at line 1741 of file StructuralOperator.hpp.

◆ computeMatrix()

void computeMatrix ( matrixPtr_Type stiff,
const vector_Type sol,
Real const &  factor,
const UInt  iter 
)

Multiply the mass matrix and the linear stiffness matrix by the rescaleFactor.

in the linear case the solid matrix is constant, thus it does not need to be recomputed.Update (in the case of nonlinear material) the solid matrix

Parameters
stiffstiffness matrix
solthe current solution
factorthe rescaleFactor

It is right to do globalAssemble() inside the M_material class

Definition at line 1238 of file StructuralOperator.hpp.

◆ jacobianDistribution()

void jacobianDistribution ( vectorPtr_Type  displacement,
vector_Type jacobianDistribution 
)

compute the value of the determinant of F in all the volumes of the mesh

Parameters
displacementthe solution at a certain time
Returns
the vector with the values for J

Definition at line 1265 of file StructuralOperator.hpp.

◆ colorMesh()

void colorMesh ( vector_Type meshColors)

compute the value of the determinant of F in all the volumes of the mesh

Parameters
displacementthe solution at a certain time
Returns
the vector with the values for J

Definition at line 1462 of file StructuralOperator.hpp.

◆ computeCauchyStressTensor()

void computeCauchyStressTensor ( const vectorPtr_Type  disp,
const QuadratureRule evalQuad,
vectorPtr_Type  sigma_1,
vectorPtr_Type  sigma_2,
vectorPtr_Type  sigma_3 
)

Compute the three columns of the Cauchy stress tensor.

Parameters
displacementat a certain time
Returns
fills the three columns

Definition at line 1502 of file StructuralOperator.hpp.

◆ computePrincipalTensions()

void computePrincipalTensions ( vectorPtr_Type  sigma_1,
vectorPtr_Type  sigma_2,
vectorPtr_Type  sigma_3,
vectorPtr_Type  vectorEigenvalue 
)

Compute the nodal principal tensions given the cauchy stress tensor.

Parameters
Thethree vectors of the three columns of the Cauchy stress tensor
Returns
fills the vector of the eigenvalues

Definition at line 1518 of file StructuralOperator.hpp.

◆ setBC()

void setBC ( const bcHandler_Type BCd)
inline

Setters Set the BCHandler object.

Definition at line 496 of file StructuralOperator.hpp.

◆ setSourceTerm() [1/2]

void setSourceTerm ( source_Type const &  )
inline

Set the source object.

Definition at line 506 of file StructuralOperator.hpp.

◆ setSourceTerm() [2/2]

void setSourceTerm ( const volumeForcePtr_Type  s)
inline

Set the source object.

Definition at line 512 of file StructuralOperator.hpp.

◆ setHavingSourceTerm()

void setHavingSourceTerm ( const bool  havingSource)
inline

Set the source object.

Definition at line 518 of file StructuralOperator.hpp.

◆ setRecur()

void setRecur ( UInt  recur)
inline

Set the recur parameter.

Definition at line 530 of file StructuralOperator.hpp.

◆ setDataFromGetPot()

void setDataFromGetPot ( const GetPot dataFile)

Set the data fields with the Getpot data file for preconditioners and solver.

Definition at line 1758 of file StructuralOperator.hpp.

◆ setTimeAdvance()

void setTimeAdvance ( const timeAdvancePtr_Type timeAdvancePtr)
inline

Definition at line 538 of file StructuralOperator.hpp.

◆ constructPatchAreaVector()

void constructPatchAreaVector ( vector_Type patchArea,
const vector_Type solution 
)

constructPatchAreaVector: This method build the patch area vector used in the reconstruction process

Parameters
NONE

Definition at line 1385 of file StructuralOperator.hpp.

◆ reconstructElementaryVector()

void reconstructElementaryVector ( VectorElemental elVecSigma,
vector_Type patchArea,
UInt  nVol 
)

reconstructElementaryVector: This method applies a reconstruction procedure on the elvec that is passed

Parameters
elvecTensVectorElemental over which the reconstruction is applied

Definition at line 1437 of file StructuralOperator.hpp.

◆ map()

MapEpetra const& map ( ) const
inline

Getters Get the Epetramap.

Definition at line 564 of file StructuralOperator.hpp.

◆ displayer()

Displayer const& displayer ( ) const
inline

Get the Displayer object.

Definition at line 570 of file StructuralOperator.hpp.

◆ displayerPtr()

std::shared_ptr<const Displayer> const& displayerPtr ( ) const
inline

Definition at line 575 of file StructuralOperator.hpp.

◆ massMatrix()

matrixPtr_Type const massMatrix ( ) const
inline

Get the matrix containing the mass mtrix and the linear part of the stiffness matrix.

Get the mass matrix

Definition at line 584 of file StructuralOperator.hpp.

◆ dispFESpace()

FESpace_Type& dispFESpace ( )
inline

Get the FESpace object.

Definition at line 590 of file StructuralOperator.hpp.

◆ dispETFESpace()

ETFESpace_Type& dispETFESpace ( )
inline

Get the ETFESpace object.

Definition at line 596 of file StructuralOperator.hpp.

◆ bcHandler()

bcHandler_Type const& bcHandler ( ) const
inline

Get the bCHandler object.

Definition at line 602 of file StructuralOperator.hpp.

◆ residual()

vector_Type& residual ( )
inline

Get the residual.

Definition at line 608 of file StructuralOperator.hpp.

◆ havingSourceTerm()

const bool havingSourceTerm ( ) const
inline

Get the source term.

Definition at line 614 of file StructuralOperator.hpp.

◆ displacement()

vector_Type& displacement ( )
inline

Get the displacement.

Definition at line 621 of file StructuralOperator.hpp.

◆ displacementPtr()

vectorPtr_Type displacementPtr ( )
inline

Definition at line 626 of file StructuralOperator.hpp.

◆ rhsWithoutBC()

vectorPtr_Type& rhsWithoutBC ( )
inline

Get the right hand sde without BC.

Definition at line 632 of file StructuralOperator.hpp.

◆ linearSolver()

solver_Type& linearSolver ( )
inline

Definition at line 637 of file StructuralOperator.hpp.

◆ rhsCopy()

vector_Type& rhsCopy ( )
inline

Get the right hand. The member rhsCopy is used for Debug purposes!

Definition at line 643 of file StructuralOperator.hpp.

◆ residualCopy()

vector_Type& residualCopy ( )
inline

Definition at line 647 of file StructuralOperator.hpp.

◆ bodyForce()

vector_Type& bodyForce ( )
inline

Definition at line 652 of file StructuralOperator.hpp.

◆ comunicator()

std::shared_ptr<Epetra_Comm> const& comunicator ( ) const
inline

Get the comunicator object.

Definition at line 658 of file StructuralOperator.hpp.

◆ rescaleFactor()

Real rescaleFactor ( )
inline

Get the rescaleFactor.

Definition at line 664 of file StructuralOperator.hpp.

◆ offset()

const UInt& offset ( ) const
inline

Get the offset parameter. It is taken into account when the boundary conditions are applied and the matrices are assembled.

Definition at line 672 of file StructuralOperator.hpp.

◆ material()

const materialPtr_Type& material ( ) const
inline

Get the offset parameter. It is taken into account when the boundary conditions are applied and the matrices are assembled.

Definition at line 680 of file StructuralOperator.hpp.

◆ solidMatrix()

void solidMatrix ( matrixPtr_Type )
inline

Do nothing in the linear case: the matrix remains constant.

Otherwise substitute the matrix with an updated oneGet the Solid Matrix

Definition at line 689 of file StructuralOperator.hpp.

◆ thickness()

Real thickness ( ) const
inline

Get the thickness.

Definition at line 695 of file StructuralOperator.hpp.

◆ young()

Real young ( UInt  material = 1) const
inline

Get the Young modulus.

Definition at line 701 of file StructuralOperator.hpp.

◆ poisson()

Real poisson ( UInt  material = 1) const
inline

Get the Poisson coefficient.

Definition at line 707 of file StructuralOperator.hpp.

◆ rho()

Real rho ( ) const
inline

Get the density.

Definition at line 713 of file StructuralOperator.hpp.

◆ data()

const std::shared_ptr<data_Type>& data ( ) const
inline

Get the data container.

Definition at line 719 of file StructuralOperator.hpp.

◆ apply()

void apply ( const vector_Type sol,
vector_Type res 
) const

Definition at line 1895 of file StructuralOperator.hpp.

◆ mapMarkersVolumes()

mapMarkerVolumesPtr_Type mapMarkersVolumes ( ) const
inline

Get the density.

Definition at line 727 of file StructuralOperator.hpp.

◆ mapMarkersIndexes()

mapMarkerIndexesPtr_Type mapMarkersIndexes ( ) const
inline

Get the density.

Definition at line 733 of file StructuralOperator.hpp.

◆ timeAdvancePtr()

const timeAdvancePtr_Type& timeAdvancePtr ( ) const
inline

Definition at line 738 of file StructuralOperator.hpp.

◆ applyBoundaryConditions()

void applyBoundaryConditions ( matrix_Type matrix,
vector_Type rhs,
bcHandler_Type BCh,
UInt  offset = 0 
)
protected

Apply boundary condition.

Parameters
matrixthe matrix of the system
rhsthe right hand side of the system
BChBCHandler object
offsetthe offset parameter

Definition at line 1903 of file StructuralOperator.hpp.

◆ dim()

UInt dim ( ) const
inlineprotected

Definition at line 760 of file StructuralOperator.hpp.

◆ setupMapMarkersVolumes()

void setupMapMarkersVolumes ( void  )
protected

construct the map between the markers and the volumes

Parameters
VOID
Returns
VOID

Definition at line 974 of file StructuralOperator.hpp.

Field Documentation

◆ M_data

std::shared_ptr<data_Type> M_data
protected

Protected Members.

Definition at line 776 of file StructuralOperator.hpp.

◆ M_dispFESpace

FESpacePtr_Type M_dispFESpace
protected

Definition at line 778 of file StructuralOperator.hpp.

◆ M_dispETFESpace

ETFESpacePtr_Type M_dispETFESpace
protected

Definition at line 780 of file StructuralOperator.hpp.

◆ M_Displayer

std::shared_ptr<const Displayer> M_Displayer
protected

Definition at line 782 of file StructuralOperator.hpp.

◆ M_me

Int M_me
protected

Definition at line 784 of file StructuralOperator.hpp.

◆ M_linearSolver

std::shared_ptr<solver_Type> M_linearSolver
protected

data for solving tangent problem with aztec + preconditioner

Definition at line 787 of file StructuralOperator.hpp.

◆ M_preconditioner

basePrecPtr_Type M_preconditioner
protected

Definition at line 788 of file StructuralOperator.hpp.

◆ M_elmatM

std::shared_ptr<MatrixElemental> M_elmatM
protected

Elementary matrices and vectors.

Definition at line 791 of file StructuralOperator.hpp.

◆ M_disp

vectorPtr_Type M_disp
protected

linearized velocity

Definition at line 794 of file StructuralOperator.hpp.

◆ M_rhs

vectorPtr_Type M_rhs
protected

right hand side displacement

Definition at line 797 of file StructuralOperator.hpp.

◆ M_rhsCopy

vectorPtr_Type M_rhsCopy
protected

Definition at line 799 of file StructuralOperator.hpp.

◆ M_residualCopy

vectorPtr_Type M_residualCopy
protected

Definition at line 800 of file StructuralOperator.hpp.

◆ M_rhsNoBC

vectorPtr_Type M_rhsNoBC
protected

right hand side

Definition at line 803 of file StructuralOperator.hpp.

◆ M_bodyForceVector

vectorPtr_Type M_bodyForceVector
protected

Definition at line 805 of file StructuralOperator.hpp.

◆ M_residual_d

std::shared_ptr<vector_Type> M_residual_d
protected

right hand side

residual

Definition at line 810 of file StructuralOperator.hpp.

◆ M_out_iter

std::ofstream M_out_iter
protected

files for lists of iterations and residuals per timestep

Definition at line 813 of file StructuralOperator.hpp.

◆ M_out_res

std::ofstream M_out_res
protected

Definition at line 814 of file StructuralOperator.hpp.

◆ M_BCh

bcHandler_Type M_BCh
protected

BCHandler object.

Definition at line 817 of file StructuralOperator.hpp.

◆ M_localMap

std::shared_ptr<const MapEpetra> M_localMap
protected

Map Epetra.

Definition at line 820 of file StructuralOperator.hpp.

◆ M_massMatrix

matrixPtr_Type M_massMatrix
protected

Matrix M: mass.

Definition at line 823 of file StructuralOperator.hpp.

◆ M_systemMatrix

matrixPtr_Type M_systemMatrix
protected

Matrix Temp: Temporary matrix to compute residuals or rhs.

Definition at line 826 of file StructuralOperator.hpp.

◆ M_jacobian

matrixPtr_Type M_jacobian
protected

Jacobian Matrix: Matrix to store the jacobian of the newton method.

Definition at line 830 of file StructuralOperator.hpp.

◆ M_recur

UInt M_recur
protected

level of recursion for Aztec (has a sens with FSI coupling)

Definition at line 834 of file StructuralOperator.hpp.

◆ M_havingSource

bool M_havingSource
protected

Definition at line 836 of file StructuralOperator.hpp.

◆ M_source

sourceFunctorPtr_Type M_source
protected

Definition at line 837 of file StructuralOperator.hpp.

◆ M_offset

UInt M_offset
protected

Definition at line 839 of file StructuralOperator.hpp.

◆ M_rescaleFactor

Real M_rescaleFactor
protected

Definition at line 840 of file StructuralOperator.hpp.

◆ M_material

materialPtr_Type M_material
protected

Material class.

Definition at line 845 of file StructuralOperator.hpp.

◆ M_mapMarkersVolumes

mapMarkerVolumesPtr_Type M_mapMarkersVolumes
protected

Map between markers and volumes on the mesh.

Definition at line 848 of file StructuralOperator.hpp.

◆ M_mapMarkersIndexes

mapMarkerIndexesPtr_Type M_mapMarkersIndexes
protected

Map between markers and volumes on the mesh.

Definition at line 851 of file StructuralOperator.hpp.

◆ M_deformationF

matrixSerialDensePtr_Type M_deformationF
protected

Elementary matrix for the tensor F.

Definition at line 854 of file StructuralOperator.hpp.

◆ M_invariants

vectorInvariants_Type M_invariants
protected

Definition at line 855 of file StructuralOperator.hpp.

◆ M_timeAdvance

timeAdvancePtr_Type M_timeAdvance
protected

Definition at line 858 of file StructuralOperator.hpp.


The documentation for this class was generated from the following file: