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.
Classes | List of all members
Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver > Class Template Reference

Current class provides an implementation for PetrovGalerkinROM builder and solving operations. More...

#include <petrov_galerkin_rom_builder_and_solver.h>

Inheritance diagram for Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >:
Collaboration diagram for Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >:

Classes

struct  AssemblyTLS
 
struct  NonTrivialSumReduction
 

Public Member Functions

Life cycle
 PetrovGalerkinROMBuilderAndSolver (typename TLinearSolver::Pointer pNewLinearSystemSolver, Parameters ThisParameters)
 
 ~PetrovGalerkinROMBuilderAndSolver ()=default
 
Input and output
virtual std::string Info () const override
 Turn back information as a string. More...
 
virtual void PrintInfo (std::ostream &rOStream) const override
 Print information about this object. More...
 
virtual void PrintData (std::ostream &rOStream) const override
 Print object's data.GetNumberOfROMModes() More...
 
- Public Member Functions inherited from Kratos::ROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >
 ROMBuilderAndSolver (typename TLinearSolver::Pointer pNewLinearSystemSolver, Parameters ThisParameters)
 
 ROMBuilderAndSolver (typename TLinearSolver::Pointer pNewLinearSystemSolver)
 
 ~ROMBuilderAndSolver ()=default
 
 KRATOS_CLASS_POINTER_DEFINITION (ROMBuilderAndSolver)
 
BaseType::Pointer Create (typename TLinearSolver::Pointer pNewLinearSystemSolver, Parameters ThisParameters) const override
 Create method. More...
 
void SetUpDofSet (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart) override
 Builds the list of the DofSets involved in the problem by "asking" to each element and condition its Dofs. More...
 
void CalculateReactions (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb) override
 It computes the reactions of the system. More...
 
void SetUpSystem (ModelPart &rModelPart) override
 It organises the dofset in order to speed up the building phase. More...
 
SizeType GetNumberOfROMModes () const noexcept
 
void ProjectToFineBasis (const TSystemVectorType &rRomUnkowns, const ModelPart &rModelPart, TSystemVectorType &rDx) const
 
virtual void InitializeSolutionStep (ModelPart &rModelPart, TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb) override
 It applies certain operations at the system of equations at the beginning of the solution step. More...
 
void BuildAndSolve (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &A, TSystemVectorType &Dx, TSystemVectorType &b) override
 Function to perform the building and solving phase at the same time. More...
 
void ResizeAndInitializeVectors (typename TSchemeType::Pointer pScheme, TSystemMatrixPointerType &pA, TSystemVectorPointerType &pDx, TSystemVectorPointerType &pb, ModelPart &rModelPart) override
 This method initializes and resizes the system of equations. More...
 
Parameters GetDefaultParameters () const override
 This method provides the defaults parameters to avoid conflicts between the different constructors. More...
 
- Public Member Functions inherited from Kratos::BuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >
 BuilderAndSolver ()
 Default constructor. More...
 
 BuilderAndSolver (typename TLinearSolver::Pointer pNewLinearSystemSolver, Parameters ThisParameters)
 Default constructor with Parameters. More...
 
 BuilderAndSolver (typename TLinearSolver::Pointer pNewLinearSystemSolver)
 Default constructor. More...
 
virtual ~BuilderAndSolver ()
 
void SetEchoLevel (int Level)
 It sets the level of echo for the solving strategy. More...
 
int GetEchoLevel () const
 It returns the echo level. More...
 
virtual TSparseSpace::MatrixType & GetConstraintRelationMatrix ()
 This method returns constraint relation (T) matrix. More...
 
virtual TSparseSpace::VectorType & GetConstraintConstantVector ()
 This method returns constraint constant vector. More...
 
 KRATOS_CLASS_POINTER_DEFINITION (BuilderAndSolver)
 Pointer definition of BuilderAndSolver. More...
 
bool GetCalculateReactionsFlag () const
 This method returns the flag mCalculateReactionsFlag. More...
 
void SetCalculateReactionsFlag (bool flag)
 This method sets the flag mCalculateReactionsFlag. More...
 
bool GetDofSetIsInitializedFlag () const
 This method returns the flag mDofSetIsInitialized. More...
 
void SetDofSetIsInitializedFlag (bool DofSetIsInitialized)
 This method sets the flag mDofSetIsInitialized. More...
 
bool GetReshapeMatrixFlag () const
 This method returns the flag mReshapeMatrixFlag. More...
 
void SetReshapeMatrixFlag (bool ReshapeMatrixFlag)
 This method sets the flag mReshapeMatrixFlag. More...
 
unsigned int GetEquationSystemSize () const
 This method returns the value mEquationSystemSize. More...
 
TLinearSolver::Pointer GetLinearSystemSolver () const
 This method return the linear solver used. More...
 
void SetLinearSystemSolver (typename TLinearSolver::Pointer pLinearSystemSolver)
 This method sets the linear solver to be used. More...
 
virtual void BuildLHS (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &rA)
 Function to perform the building of the LHS, depending on the implementation chosen the size of the matrix could be equal to the total number of Dofs or to the number unrestrained dofs. More...
 
virtual void BuildRHS (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemVectorType &rb)
 Function to perform the build of the RHS. The vector could be sized as the total number of dofs or as the number of unrestrained ones. More...
 
virtual void Build (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &rA, TSystemVectorType &rb)
 equivalent (but generally faster) then performing BuildLHS and BuildRHS More...
 
virtual void BuildLHS_CompleteOnFreeRows (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &rA)
 It builds a rectangular matrix of size n*N where "n" is the number of unrestrained degrees of freedom and "N" is the total number of degrees of freedom involved. More...
 
virtual void BuildLHS_Complete (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &rA)
 It builds a matrix of size N*N where "N" is the total number of degrees of freedom involved. More...
 
virtual void SystemSolve (TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb)
 This is a call to the linear system solver. More...
 
virtual void BuildAndSolveLinearizedOnPreviousIteration (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb, const bool MoveMesh)
 Function to perform the building and solving phase at the same time Linearizing with the database at the old iteration. More...
 
virtual void BuildRHSAndSolve (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb)
 Corresponds to the previews, but the System's matrix is considered already built and only the RHS is built again. More...
 
virtual void ApplyDirichletConditions (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb)
 It applies the dirichlet conditions. This operation may be very heavy or completely unexpensive depending on the implementation chosen and on how the System Matrix is built. More...
 
virtual void ApplyDirichletConditions_LHS (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &rA, TSystemVectorType &rDx)
 The same of the precedent but affecting only the LHS. More...
 
virtual void ApplyDirichletConditions_RHS (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemVectorType &rDx, TSystemVectorType &rb)
 The same of the precedent but affecting only the RHS. More...
 
virtual void ApplyRHSConstraints (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemVectorType &rb)
 Applies the constraints with master-slave relation matrix (RHS only) More...
 
virtual void ApplyConstraints (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &rA, TSystemVectorType &rb)
 Applies the constraints with master-slave relation matrix. More...
 
virtual DofsArrayTypeGetDofSet ()
 It allows to get the list of Dofs from the element. More...
 
virtual const DofsArrayTypeGetDofSet () const
 It allows to get the list of Dofs from the element. More...
 
virtual void FinalizeSolutionStep (ModelPart &rModelPart, TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb)
 It applies certain operations at the system of equations at the end of the solution step. More...
 
virtual void Clear ()
 This function is intended to be called at the end of the solution step to clean up memory storage not needed. More...
 
virtual int Check (ModelPart &rModelPart)
 This function is designed to be called once to perform all the checks needed on the input provided. Checks can be "expensive" as the function is designed to catch user's errors. More...
 

Protected Attributes

Protected member variables
SizeType mNumberOfPetrovGalerkinRomModes
 
- Protected Attributes inherited from Kratos::ROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >
SizeType mNodalDofs
 
std::unordered_map< Kratos::VariableData::KeyType, Matrix::size_typemMapPhi
 
ElementsArrayType mSelectedElements
 
ConditionsArrayType mSelectedConditions
 
bool mHromSimulation = false
 
bool mHromWeightsInitialized = false
 
- Protected Attributes inherited from Kratos::BuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >
TLinearSolver::Pointer mpLinearSystemSolver = nullptr
 
DofsArrayType mDofSet
 Pointer to the linear solver. More...
 
bool mReshapeMatrixFlag = false
 The set containing the DoF of the system. More...
 
bool mDofSetIsInitialized = false
 If the matrix is reshaped each step. More...
 
bool mCalculateReactionsFlag = false
 Flag taking care if the dof set was initialized ot not. More...
 
unsigned int mEquationSystemSize
 Flag taking in account if it is needed or not to calculate the reactions. More...
 
int mEchoLevel = 0
 Number of degrees of freedom of the problem to be solve. More...
 
TSystemVectorPointerType mpReactionsVector
 

Type Definitions

typedef std::size_t SizeType
 
typedef std::size_t IndexType
 
typedef PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver > ClassType
 The definition of the current class. More...
 
typedef ROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver > BaseType
 Definition of the classes from the base class. More...
 
typedef BaseType::TSchemeType TSchemeType
 
typedef BaseType::DofsArrayType DofsArrayType
 
typedef BaseType::TSystemMatrixType TSystemMatrixType
 
typedef BaseType::TSystemVectorType TSystemVectorType
 
typedef BaseType::LocalSystemVectorType LocalSystemVectorType
 
typedef BaseType::LocalSystemMatrixType LocalSystemMatrixType
 
typedef BaseType::TSystemMatrixPointerType TSystemMatrixPointerType
 
typedef BaseType::TSystemVectorPointerType TSystemVectorPointerType
 
typedef BaseType::ElementsArrayType ElementsArrayType
 
typedef BaseType::ConditionsArrayType ConditionsArrayType
 
typedef ModelPart::MasterSlaveConstraintContainerType MasterSlaveConstraintContainerType
 Additional definitions. More...
 
typedef Element::EquationIdVectorType EquationIdVectorType
 
typedef Element::DofsVectorType DofsVectorType
 
typedef LocalSystemMatrixType RomSystemMatrixType
 
typedef LocalSystemVectorType RomSystemVectorType
 
typedef RomSystemMatrixType PetrovGalerkinSystemMatrixType
 
typedef RomSystemVectorType PetrovGalerkinSystemVectorType
 
typedef Node NodeType
 DoF types definition. More...
 
typedef NodeType::DofType DofType
 
typedef DofType::Pointer DofPointerType
 
typedef moodycamel::ConcurrentQueue< DofType::PointerDofQueue
 
 KRATOS_CLASS_POINTER_DEFINITION (PetrovGalerkinROMBuilderAndSolver)
 

Operations

void SetUpDofSet (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart) override
 Builds the list of the DofSets involved in the problem by "asking" to each element and condition its Dofs. More...
 
void BuildAndSolve (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &A, TSystemVectorType &Dx, TSystemVectorType &b) override
 Function to perform the building and solving phase at the same time. More...
 
Parameters GetDefaultParameters () const override
 This method provides the defaults parameters to avoid conflicts between the different constructors. More...
 
static std::string Name ()
 

Protected operations

void AssignSettings (const Parameters ThisParameters) override
 This method assigns settings to member variables. More...
 
void BuildROM (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, PetrovGalerkinSystemMatrixType &rA, PetrovGalerkinSystemVectorType &rb) override
 
void SolveROM (ModelPart &rModelPart, PetrovGalerkinSystemMatrixType &rA, PetrovGalerkinSystemVectorType &rb, TSystemVectorType &rDx) override
 
template<typename TMatrix >
static void ResizeIfNeeded (TMatrix &mat, const SizeType rows, const SizeType cols)
 

Additional Inherited Members

- Public Types inherited from Kratos::ROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >
typedef std::size_t SizeType
 
typedef std::size_t IndexType
 
typedef ROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver > ClassType
 The definition of the current class. More...
 
typedef BuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver > BaseType
 Definition of the classes from the base class. More...
 
typedef BaseType::TSchemeType TSchemeType
 
typedef BaseType::DofsArrayType DofsArrayType
 
typedef BaseType::TSystemMatrixType TSystemMatrixType
 
typedef BaseType::TSystemVectorType TSystemVectorType
 
typedef BaseType::LocalSystemVectorType LocalSystemVectorType
 
typedef BaseType::LocalSystemMatrixType LocalSystemMatrixType
 
typedef BaseType::TSystemMatrixPointerType TSystemMatrixPointerType
 
typedef BaseType::TSystemVectorPointerType TSystemVectorPointerType
 
typedef BaseType::ElementsArrayType ElementsArrayType
 
typedef BaseType::ConditionsArrayType ConditionsArrayType
 
typedef ModelPart::MasterSlaveConstraintContainerType MasterSlaveConstraintContainerType
 Additional definitions. More...
 
typedef Element::EquationIdVectorType EquationIdVectorType
 
typedef Element::DofsVectorType DofsVectorType
 
typedef boost::numeric::ublas::compressed_matrix< doubleCompressedMatrixType
 
typedef LocalSystemMatrixType RomSystemMatrixType
 
typedef LocalSystemVectorType RomSystemVectorType
 
typedef Node NodeType
 DoF types definition. More...
 
typedef NodeType::DofType DofType
 
typedef DofType::Pointer DofPointerType
 
typedef moodycamel::ConcurrentQueue< DofType::PointerDofQueue
 
- Public Types inherited from Kratos::BuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >
typedef BuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver > ClassType
 The definition of the current class. More...
 
typedef std::size_t SizeType
 Definition of the size type. More...
 
typedef std::size_t IndexType
 Definition of the index type. More...
 
typedef TSparseSpace::DataType TDataType
 Definition of the data type. More...
 
typedef TSparseSpace::MatrixType TSystemMatrixType
 Definition of the sparse matrix. More...
 
typedef TSparseSpace::VectorType TSystemVectorType
 Definition of the vector size. More...
 
typedef TSparseSpace::MatrixPointerType TSystemMatrixPointerType
 Definition of the pointer to the sparse matrix. More...
 
typedef TSparseSpace::VectorPointerType TSystemVectorPointerType
 Definition of the pointer to the vector. More...
 
typedef TDenseSpace::MatrixType LocalSystemMatrixType
 The local matrix definition. More...
 
typedef TDenseSpace::VectorType LocalSystemVectorType
 The local vector definition. More...
 
typedef Scheme< TSparseSpace, TDenseSpace > TSchemeType
 Definition of the scheme type. More...
 
typedef ModelPart::DofType TDofType
 Definition of the DoF class. More...
 
typedef ModelPart::DofsArrayType DofsArrayType
 Definition of the DoF array type. More...
 
typedef ModelPart::NodesContainerType NodesArrayType
 The containers of the entities. More...
 
typedef ModelPart::ElementsContainerType ElementsArrayType
 
typedef ModelPart::ConditionsContainerType ConditionsArrayType
 
typedef PointerVectorSet< Element, IndexedObjectElementsContainerType
 The definition of the element container type. More...
 
- Static Public Member Functions inherited from Kratos::ROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >
static std::string Name ()
 
- Static Public Member Functions inherited from Kratos::BuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >
static std::string Name ()
 Returns the name of the class as used in the settings (snake_case format) More...
 
- Protected Member Functions inherited from Kratos::ROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >
void BuildRHSNoDirichlet (ModelPart &rModelPart, TSystemVectorType &rb)
 
void AssignSettings (const Parameters ThisParameters) override
 This method assigns settings to member variables. More...
 
void InitializeHROMWeights (ModelPart &rModelPart)
 
virtual void BuildROM (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, RomSystemMatrixType &rA, RomSystemVectorType &rb)
 
virtual void SolveROM (ModelPart &rModelPart, RomSystemMatrixType &rA, RomSystemVectorType &rb, TSystemVectorType &rDx)
 
- Protected Member Functions inherited from Kratos::BuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >
virtual Parameters ValidateAndAssignParameters (Parameters ThisParameters, const Parameters DefaultParameters) const
 This method validate and assign default parameters. More...
 
- Static Protected Member Functions inherited from Kratos::ROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >
static DofQueue ExtractDofSet (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart)
 
static DofsArrayType SortAndRemoveDuplicateDofs (DofQueue &rDofQueue)
 
template<typename TMatrix >
static void ResizeIfNeeded (TMatrix &mat, const SizeType rows, const SizeType cols)
 

Detailed Description

template<class TSparseSpace, class TDenseSpace, class TLinearSolver>
class Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >

Current class provides an implementation for PetrovGalerkinROM builder and solving operations.

The RHS is constituted by the unbalanced loads (residual) and projected onto the ROM LEFT BASIS. The LHS is constituted by first multiplying the Jacobian or its approximation with the ROM RIGHT BASIS and then projecting it onto the ROM LEFT BASIS, yielding a rectangular system (ROM size) that is then solved using the QR decomposition. Degrees of freedom are reordered putting the restrained degrees of freedom at the end of the system ordered in reverse order with respect to the DofSet (as for the FOM). Imposition of the dirichlet conditions is naturally dealt with as the residual already contains this information (as for the FOM).

Template Parameters
TSparseSpaceThe sparse system considered
TDenseSpaceThe dense system considered
TLinearSolverThe linear solver considered
Author
SebastianAres

Member Typedef Documentation

◆ BaseType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef ROMBuilderAndSolver<TSparseSpace, TDenseSpace, TLinearSolver> Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::BaseType

Definition of the classes from the base class.

◆ ClassType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef PetrovGalerkinROMBuilderAndSolver<TSparseSpace, TDenseSpace, TLinearSolver> Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::ClassType

The definition of the current class.

◆ ConditionsArrayType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef BaseType::ConditionsArrayType Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::ConditionsArrayType

◆ DofPointerType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef DofType::Pointer Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::DofPointerType

◆ DofQueue

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef moodycamel::ConcurrentQueue<DofType::Pointer> Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::DofQueue

◆ DofsArrayType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef BaseType::DofsArrayType Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::DofsArrayType

◆ DofsVectorType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef Element::DofsVectorType Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::DofsVectorType

◆ DofType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef NodeType::DofType Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::DofType

◆ ElementsArrayType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef BaseType::ElementsArrayType Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::ElementsArrayType

◆ EquationIdVectorType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef Element::EquationIdVectorType Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::EquationIdVectorType

◆ IndexType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef std::size_t Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::IndexType

◆ LocalSystemMatrixType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef BaseType::LocalSystemMatrixType Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::LocalSystemMatrixType

◆ LocalSystemVectorType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef BaseType::LocalSystemVectorType Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::LocalSystemVectorType

◆ MasterSlaveConstraintContainerType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef ModelPart::MasterSlaveConstraintContainerType Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::MasterSlaveConstraintContainerType

Additional definitions.

◆ NodeType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef Node Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::NodeType

DoF types definition.

◆ PetrovGalerkinSystemMatrixType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef RomSystemMatrixType Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::PetrovGalerkinSystemMatrixType

◆ PetrovGalerkinSystemVectorType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef RomSystemVectorType Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::PetrovGalerkinSystemVectorType

◆ RomSystemMatrixType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef LocalSystemMatrixType Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::RomSystemMatrixType

◆ RomSystemVectorType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef LocalSystemVectorType Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::RomSystemVectorType

◆ SizeType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef std::size_t Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::SizeType

◆ TSchemeType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef BaseType::TSchemeType Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::TSchemeType

◆ TSystemMatrixPointerType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef BaseType::TSystemMatrixPointerType Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::TSystemMatrixPointerType

◆ TSystemMatrixType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef BaseType::TSystemMatrixType Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::TSystemMatrixType

◆ TSystemVectorPointerType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef BaseType::TSystemVectorPointerType Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::TSystemVectorPointerType

◆ TSystemVectorType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef BaseType::TSystemVectorType Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::TSystemVectorType

Constructor & Destructor Documentation

◆ PetrovGalerkinROMBuilderAndSolver()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::PetrovGalerkinROMBuilderAndSolver ( typename TLinearSolver::Pointer  pNewLinearSystemSolver,
Parameters  ThisParameters 
)
inlineexplicit

◆ ~PetrovGalerkinROMBuilderAndSolver()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::~PetrovGalerkinROMBuilderAndSolver ( )
default

Member Function Documentation

◆ AssignSettings()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::AssignSettings ( const Parameters  ThisParameters)
inlineoverrideprotectedvirtual

This method assigns settings to member variables.

Parameters
ThisParametersParameters that are assigned to the member variables

Reimplemented from Kratos::BuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.

◆ BuildAndSolve()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::BuildAndSolve ( typename TSchemeType::Pointer  pScheme,
ModelPart rModelPart,
TSystemMatrixType rA,
TSystemVectorType rDx,
TSystemVectorType rb 
)
inlineoverridevirtual

Function to perform the building and solving phase at the same time.

It is ideally the fastest and safer function to use when it is possible to solve just after building

Parameters
pSchemeThe pointer to the integration scheme
rModelPartThe model part to compute
rAThe LHS matrix of the system of equations
rDxThe vector of unknowns
rbThe RHS vector of the system of equations

Reimplemented from Kratos::BuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.

◆ BuildROM()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::BuildROM ( typename TSchemeType::Pointer  pScheme,
ModelPart rModelPart,
PetrovGalerkinSystemMatrixType rA,
PetrovGalerkinSystemVectorType rb 
)
inlineoverrideprotected

Builds the reduced system of equations on rank 0

◆ GetDefaultParameters()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
Parameters Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::GetDefaultParameters ( ) const
inlineoverridevirtual

This method provides the defaults parameters to avoid conflicts between the different constructors.

Returns
The default parameters

Reimplemented from Kratos::BuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.

◆ Info()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
virtual std::string Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::Info ( ) const
inlineoverridevirtual

Turn back information as a string.

Reimplemented from Kratos::ROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.

◆ KRATOS_CLASS_POINTER_DEFINITION()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::KRATOS_CLASS_POINTER_DEFINITION ( PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >  )

◆ Name()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
static std::string Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::Name ( )
inlinestatic

◆ PrintData()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
virtual void Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::PrintData ( std::ostream &  rOStream) const
inlineoverridevirtual

Print object's data.GetNumberOfROMModes()

Reimplemented from Kratos::ROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.

◆ PrintInfo()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
virtual void Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::PrintInfo ( std::ostream &  rOStream) const
inlineoverridevirtual

Print information about this object.

Reimplemented from Kratos::ROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.

◆ ResizeIfNeeded()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
template<typename TMatrix >
static void Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::ResizeIfNeeded ( TMatrix &  mat,
const SizeType  rows,
const SizeType  cols 
)
inlinestaticprotected

Resizes a Matrix if it's not the right size

◆ SetUpDofSet()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::SetUpDofSet ( typename TSchemeType::Pointer  pScheme,
ModelPart rModelPart 
)
inlineoverridevirtual

Builds the list of the DofSets involved in the problem by "asking" to each element and condition its Dofs.

The list of dofs is stores inside the BuilderAndSolver as it is closely connected to the way the matrix and RHS are built

Parameters
pSchemeThe pointer to the integration scheme
rModelPartThe model part to compute

Reimplemented from Kratos::BuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.

◆ SolveROM()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::SolveROM ( ModelPart rModelPart,
PetrovGalerkinSystemMatrixType rA,
PetrovGalerkinSystemVectorType rb,
TSystemVectorType rDx 
)
inlineoverrideprotected

Solves reduced system of equations and broadcasts it

Member Data Documentation

◆ mNumberOfPetrovGalerkinRomModes

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
SizeType Kratos::PetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::mNumberOfPetrovGalerkinRomModes
protected

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