KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
List of all members
Kratos::JacobianEmulator< TSpace > Class Template Reference

Jacobian emulator. More...

#include <mvqn_recursive_convergence_accelerator.hpp>

Collaboration diagram for Kratos::JacobianEmulator< TSpace >:

Public Types

Type Definitions
typedef std::unique_ptr< JacobianEmulator< TSpace > > Pointer
 
typedef TSpace::VectorType VectorType
 
typedef TSpace::VectorPointerType VectorPointerType
 
typedef TSpace::MatrixType MatrixType
 
typedef TSpace::MatrixPointerType MatrixPointerType
 

Public Member Functions

Life Cycle
 JacobianEmulator (Pointer &&OldJacobianEmulatorPointer)
 
 JacobianEmulator (Pointer &&OldJacobianEmulatorPointer, const unsigned int EmulatorBufferSize)
 
 JacobianEmulator ()
 
 JacobianEmulator (const JacobianEmulator &rOther)
 
virtual ~JacobianEmulator ()
 
Operations
void ApplyJacobian (const VectorPointerType pWorkVector, VectorPointerType pProjectedVector)
 
bool AppendDataColumns (const VectorType &rNewColV, const VectorType &rNewColW, const double AbsCutOff=1e-8)
 
bool DropAndAppendDataColumns (const VectorType &rNewColV, const VectorType &rNewColW, const double AbsCutOffEps=1e-8)
 
std::size_t GetNumberOfDataCols () const
 Get the Number Of Data Cols object This function returns the number of data columns stored. Since the data columns is assumed (and must be) the same in both observation matrices, it is computed using V matrix. More...
 
std::size_t GetResidualSize () const
 Get the Residual Size object This function returns the interface residual size. Since the residual size is assumed (and must be) the same in every column for both observation matrices, it is computed using the first column of V matrix. More...
 

Detailed Description

template<class TSpace>
class Kratos::JacobianEmulator< TSpace >

Jacobian emulator.

Member Typedef Documentation

◆ MatrixPointerType

template<class TSpace >
typedef TSpace::MatrixPointerType Kratos::JacobianEmulator< TSpace >::MatrixPointerType

◆ MatrixType

template<class TSpace >
typedef TSpace::MatrixType Kratos::JacobianEmulator< TSpace >::MatrixType

◆ Pointer

template<class TSpace >
typedef std::unique_ptr< JacobianEmulator<TSpace> > Kratos::JacobianEmulator< TSpace >::Pointer

◆ VectorPointerType

template<class TSpace >
typedef TSpace::VectorPointerType Kratos::JacobianEmulator< TSpace >::VectorPointerType

◆ VectorType

template<class TSpace >
typedef TSpace::VectorType Kratos::JacobianEmulator< TSpace >::VectorType

Constructor & Destructor Documentation

◆ JacobianEmulator() [1/4]

template<class TSpace >
Kratos::JacobianEmulator< TSpace >::JacobianEmulator ( Pointer &&  OldJacobianEmulatorPointer)
inline

Old Jacobian pointer constructor. The inverse Jacobian emulator will use information from the previous Jacobian

◆ JacobianEmulator() [2/4]

template<class TSpace >
Kratos::JacobianEmulator< TSpace >::JacobianEmulator ( Pointer &&  OldJacobianEmulatorPointer,
const unsigned int  EmulatorBufferSize 
)
inline

Old Jacobian pointer constructor with recursive previous Jacobian deleting. The inverse Jacobian emulator will use information from the previous Jacobian

◆ JacobianEmulator() [3/4]

template<class TSpace >
Kratos::JacobianEmulator< TSpace >::JacobianEmulator ( )
inline

Empty constructor. The Jacobian emulator will consider minus the identity matrix as previous Jacobian

◆ JacobianEmulator() [4/4]

template<class TSpace >
Kratos::JacobianEmulator< TSpace >::JacobianEmulator ( const JacobianEmulator< TSpace > &  rOther)
inline

Copy Constructor.

◆ ~JacobianEmulator()

template<class TSpace >
virtual Kratos::JacobianEmulator< TSpace >::~JacobianEmulator ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ AppendDataColumns()

template<class TSpace >
bool Kratos::JacobianEmulator< TSpace >::AppendDataColumns ( const VectorType rNewColV,
const VectorType rNewColW,
const double  AbsCutOff = 1e-8 
)
inline

Appends a two new columns to the observation matrices V and W Then, it checks if the new information columns are linear dependent to the existent ones by computing a QR decomposition and checking the diagonal coefficients of matrix R. If any value is less than the stablished threshold criterion, it is assume that the related column is close to be linear deppendent and is dropped.

Parameters
rNewColVnew column to be appended to V observation matrix
rNewColWnew column to be appended to W observation matrix
AbsCutOffEpsepsilon value for the absolut cut-off criteria
Returns
Returns true if the columns have been added

◆ ApplyJacobian()

template<class TSpace >
void Kratos::JacobianEmulator< TSpace >::ApplyJacobian ( const VectorPointerType  pWorkVector,
VectorPointerType  pProjectedVector 
)
inline

Projects the approximated inverse Jacobian onto a vector

Parameters
rWorkVectorVector in where the inverse Jacobian is to be projected
rProjectedVectorProjected vector output

◆ DropAndAppendDataColumns()

template<class TSpace >
bool Kratos::JacobianEmulator< TSpace >::DropAndAppendDataColumns ( const VectorType rNewColV,
const VectorType rNewColW,
const double  AbsCutOffEps = 1e-8 
)
inline

Calls the AppendDataColumns() method to add the new data columns to the observation matrices (provided that the new data columns are not linear dependent to the previous data). Then, if the information has been added, the oldest column is dropped to avoid the number of data columns become larger than the problem size.

Parameters
rNewColVnew column to be appended to V observation matrix
rNewColWnew column to be appended to W observation matrix
CutOffEpsepsilon value for the cut-off criteria

◆ GetNumberOfDataCols()

template<class TSpace >
std::size_t Kratos::JacobianEmulator< TSpace >::GetNumberOfDataCols ( ) const
inline

Get the Number Of Data Cols object This function returns the number of data columns stored. Since the data columns is assumed (and must be) the same in both observation matrices, it is computed using V matrix.

Returns
std::size_t number of data columns

◆ GetResidualSize()

template<class TSpace >
std::size_t Kratos::JacobianEmulator< TSpace >::GetResidualSize ( ) const
inline

Get the Residual Size object This function returns the interface residual size. Since the residual size is assumed (and must be) the same in every column for both observation matrices, it is computed using the first column of V matrix.

Returns
std::size_t residual size

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