Seismo-VLAB  1.3
An Open-Source Finite Element Software for Meso-Scale Simulations
Linear Class Reference

Class for solving a linear system in just one-step; therefore, no-iteration or convergence test is performed. More...

#include <Linear.hpp>

Inheritance diagram for Linear:
Collaboration diagram for Linear:

Public Member Functions

 Linear (std::unique_ptr< LinearSystem > &solver, std::shared_ptr< Mesh > &mesh, double tol=1E-6, double ldFactor=1.00, unsigned int nIters=1)
 Creates a Linear object. More...
 
 ~Linear ()
 Destroys this Linear object. More...
 
bool ComputeNewIncrement (std::shared_ptr< Mesh > &mesh, unsigned int i=0)
 Computes a new incremental solution. More...
 
const Eigen::VectorXd & GetDisplacementIncrement ()
 Gets the displacement increment. More...
 
void SetLoadFactor (double factor)
 Set the load factor. More...
 
void SetIntegrator (std::shared_ptr< Integrator > &integrator)
 Sets the integrator for this algorithm. More...
 
- Public Member Functions inherited from Algorithm
 Algorithm (const std::shared_ptr< Mesh > &mesh, unsigned int flag=1, double NormFactor=1.0)
 Creates a Algorithm object. More...
 
virtual ~Algorithm ()=0
 Destroys this Algorithm object. More...
 
void ReverseStatesIncrements (std::shared_ptr< Mesh > &mesh)
 Reverse the incremental state variables to its pervious converged one in the mesh. More...
 
void UpdateStatesIncrements (std::shared_ptr< Mesh > &mesh, const Eigen::VectorXd &dU)
 Update the incremental state variables in the mesh. More...
 
void ReducedParallelResidual (const Eigen::VectorXd &Feff, double &Residual)
 Construct the residual vector force from each processor. More...
 
double ComputeConvergence (const Eigen::VectorXd &Force, const Eigen::VectorXd &Delta, const Eigen::VectorXd &delta, unsigned int k)
 Computes convergence tests for this algorithm. More...
 

Protected Attributes

double Tolerance
 Convergence tolerance. More...
 
double LoadFactor
 Incremental load factor. More...
 
unsigned int nMaxIterations
 Maximum allowed number of iterations. More...
 
Eigen::VectorXd dU
 Incremental displacement. More...
 
std::unique_ptr< LinearSystemtheSolver
 The linear system solver. More...
 
std::shared_ptr< IntegratortheIntegrator
 The time-domain integrator. More...
 
- Protected Attributes inherited from Algorithm
Eigen::SparseMatrix< double > Total2FreeMatrix
 Operator that enforced restrain/constraint. More...
 

Detailed Description

Class for solving a linear system in just one-step; therefore, no-iteration or convergence test is performed.

See also
Algorithm.hpp Integrator.hpp

Constructor & Destructor Documentation

◆ Linear()

Linear::Linear ( std::unique_ptr< LinearSystem > &  solver,
std::shared_ptr< Mesh > &  mesh,
double  tol = 1E-6,
double  ldFactor = 1.00,
unsigned int  nIters = 1 
)

Creates a Linear object.

Parameters
solverPointer to the LinearSystem solver to be employed.
meshPointer to the Mesh container to extract Node and Element.
tolThe tolerance for which the solution is assumed to converge.
ldFactorThe incremental load factor for external loads.
nItersThe number of maximum itertions for convergence.
Note
More details can be found at Linear.
See also
Linear::Tolerance, Linear::LoadFactor, Linear::nMaxIterations.

◆ ~Linear()

Linear::~Linear ( )

Destroys this Linear object.

Member Function Documentation

◆ ComputeNewIncrement()

bool Linear::ComputeNewIncrement ( std::shared_ptr< Mesh > &  mesh,
unsigned int  i = 0 
)
virtual

Computes a new incremental solution.

Parameters
meshThe finite element Mesh object.
iThe time step number to be solved.
Returns
Whether or not the algorithm was successful.
Note
More details can be found at Linear.

Implements Algorithm.

◆ GetDisplacementIncrement()

const Eigen::VectorXd& Linear::GetDisplacementIncrement ( )
virtual

Gets the displacement increment.

Returns
The incremental displacement vector.
Note
More details can be found at Linear.

Implements Algorithm.

◆ SetIntegrator()

void Linear::SetIntegrator ( std::shared_ptr< Integrator > &  integrator)
virtual

Sets the integrator for this algorithm.

Parameters
integratorPointer to the Integrator to obtain the effective stiffness and force.

Implements Algorithm.

◆ SetLoadFactor()

void Linear::SetLoadFactor ( double  factor)
virtual

Set the load factor.

Parameters
factorThe incremental load factor.

Implements Algorithm.

Member Data Documentation

◆ dU

Eigen::VectorXd Linear::dU
protected

Incremental displacement.

◆ LoadFactor

double Linear::LoadFactor
protected

Incremental load factor.

◆ nMaxIterations

unsigned int Linear::nMaxIterations
protected

Maximum allowed number of iterations.

◆ theIntegrator

std::shared_ptr<Integrator> Linear::theIntegrator
protected

The time-domain integrator.

◆ theSolver

std::unique_ptr<LinearSystem> Linear::theSolver
protected

The linear system solver.

◆ Tolerance

double Linear::Tolerance
protected

Convergence tolerance.