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::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver > Class Template Reference

#include <global_rom_builder_and_solver.h>

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

Public Member Functions

Life cycle
 GlobalROMBuilderAndSolver (typename TLinearSolver::Pointer pNewLinearSystemSolver, Parameters ThisParameters)
 
 GlobalROMBuilderAndSolver (typename TLinearSolver::Pointer pNewLinearSystemSolver)
 
 ~GlobalROMBuilderAndSolver ()=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. More...
 
- Public Member Functions inherited from Kratos::ResidualBasedBlockBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >
 ResidualBasedBlockBuilderAndSolver ()
 Default constructor. More...
 
 ResidualBasedBlockBuilderAndSolver (typename TLinearSolver::Pointer pNewLinearSystemSolver, Parameters ThisParameters)
 Default constructor. (with parameters) More...
 
 ResidualBasedBlockBuilderAndSolver (typename TLinearSolver::Pointer pNewLinearSystemSolver)
 Default constructor. More...
 
 ~ResidualBasedBlockBuilderAndSolver () override
 
TSparseSpace::MatrixType & GetConstraintRelationMatrix () override
 This method returns constraint relation (T) matrix. More...
 
TSparseSpace::VectorType & GetConstraintConstantVector () override
 This method returns constraint constant vector. More...
 
double GetScaleFactor ()
 Retrieves the current scale factor. This function returns the current scale factor value. More...
 
void SetScaleFactor (const double ScaleFactor)
 Sets the scale factor. This function sets a new value for the scale factor. More...
 
 KRATOS_DEFINE_LOCAL_FLAG (SILENT_WARNINGS)
 Definition of the flags. More...
 
 KRATOS_CLASS_POINTER_DEFINITION (ResidualBasedBlockBuilderAndSolver)
 Definition of the pointer. More...
 
void BuildLHS (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &rA) override
 Function to perform the building of the LHS. More...
 
void BuildLHS_CompleteOnFreeRows (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &A) override
 Build 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...
 
void SystemSolve (TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb) override
 This is a call to the linear system solver. More...
 
virtual void SystemSolveWithPhysics (TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb, ModelPart &rModelPart)
 This is a call to the linear system solver (taking into account some physical particularities of the problem) More...
 
void InternalSystemSolveWithPhysics (TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb, ModelPart &rModelPart)
 This is a call to the linear system solver (taking into account some physical particularities of the problem) More...
 
void BuildAndSolveLinearizedOnPreviousIteration (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb, const bool MoveMesh) override
 Function to perform the building and solving phase at the same time Linearizing with the database at the old iteration. More...
 
void BuildRHSAndSolve (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb) override
 Corresponds to the previews, but the System's matrix is considered already built and only the RHS is built again. More...
 
void BuildRHS (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemVectorType &b) override
 Function to perform the build of the RHS. More...
 
void CalculateReactions (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &A, TSystemVectorType &Dx, TSystemVectorType &b) override
 It computes the reactions of the system. More...
 
void ApplyDirichletConditions (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb) override
 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...
 
void ApplyRHSConstraints (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemVectorType &rb) override
 Applies the constraints with master-slave relation matrix (RHS only) More...
 
void ApplyConstraints (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &rA, TSystemVectorType &rb) override
 Applies the constraints with master-slave relation matrix. More...
 
void Clear () override
 This function is intended to be called at the end of the solution step to clean up memory storage not needed. More...
 
int Check (ModelPart &rModelPart) override
 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...
 
- 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...
 
 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_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 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 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...
 

Protected Attributes

Protected member variables
SizeType mNodalDofs
 
std::unordered_map< Kratos::VariableData::KeyType, Matrix::size_typemMapPhi
 
ElementsArrayType mSelectedElements
 
ConditionsArrayType mSelectedConditions
 
bool mHromSimulation = false
 
bool mHromWeightsInitialized = false
 
bool mRightRomBasisInitialized = false
 
- Protected Attributes inherited from Kratos::ResidualBasedBlockBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >
TSystemMatrixType mT
 
TSystemVectorType mConstantVector
 This is matrix containing the global relation for the constraints. More...
 
std::vector< IndexTypemSlaveIds
 This is vector containing the rigid movement of the constraint. More...
 
std::vector< IndexTypemMasterIds
 The equation ids of the slaves. More...
 
std::unordered_set< IndexTypemInactiveSlaveDofs
 The equation ids of the master. More...
 
double mScaleFactor = 1.0
 The set containing the inactive slave dofs. More...
 
SCALING_DIAGONAL mScalingDiagonal = SCALING_DIAGONAL::CONSIDER_MAX_DIAGONAL
 The manually set scale factor. More...
 
Flags mOptions
 We identify the scaling considered for the dirichlet dofs. More...
 
- 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

This struct is used in the component wise calculation only is defined here and is used to declare a member variable in the component wise builder and solver private pointers can only be accessed by means of set and get functions this allows to set and not copy the Element_Variables and Condition_Variables which will be asked and set by another strategy object

using SizeType = std::size_t
 
using IndexType = std::size_t
 
using ClassType = GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >
 The definition of the current class. More...
 
using BaseBuilderAndSolverType = BuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >
 Definition of the classes from the base class. More...
 
using BaseType = ResidualBasedBlockBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >
 
using TSchemeType = typename BaseBuilderAndSolverType::TSchemeType
 
using DofsArrayType = typename BaseBuilderAndSolverType::DofsArrayType
 
using TSystemMatrixType = typename BaseBuilderAndSolverType::TSystemMatrixType
 
using TSystemVectorType = typename BaseBuilderAndSolverType::TSystemVectorType
 
using LocalSystemVectorType = typename BaseBuilderAndSolverType::LocalSystemVectorType
 
using LocalSystemMatrixType = typename BaseBuilderAndSolverType::LocalSystemMatrixType
 
using TSystemMatrixPointerType = typename BaseBuilderAndSolverType::TSystemMatrixPointerType
 
using TSystemVectorPointerType = typename BaseBuilderAndSolverType::TSystemVectorPointerType
 
using ElementsArrayType = typename BaseBuilderAndSolverType::ElementsArrayType
 
using ConditionsArrayType = typename BaseBuilderAndSolverType::ConditionsArrayType
 
using MasterSlaveConstraintContainerType = typename ModelPart::MasterSlaveConstraintContainerType
 Additional definitions. More...
 
using EquationIdVectorType = typename Element::EquationIdVectorType
 
using DofsVectorType = typename Element::DofsVectorType
 
using CompressedMatrixType = boost::numeric::ublas::compressed_matrix< double >
 
using RomSystemMatrixType = LocalSystemMatrixType
 
using RomSystemVectorType = LocalSystemVectorType
 
using EigenDynamicMatrix = Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor >
 
using EigenDynamicVector = Eigen::Matrix< double, Eigen::Dynamic, 1 >
 
using EigenSparseMatrix = Eigen::SparseMatrix< double, Eigen::RowMajor, int >
 
using DofType = typename Node::DofType
 DoF types definition. More...
 
using DofPointerType = typename DofType::Pointer
 
using DofQueue = moodycamel::ConcurrentQueue< DofType::Pointer >
 
 KRATOS_CLASS_POINTER_DEFINITION (GlobalROMBuilderAndSolver)
 

Operations

BaseBuilderAndSolverType::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 SetUpSystem (ModelPart &rModelPart) override
 Organises the dofset in order to speed up the building phase. More...
 
SizeType GetNumberOfROMModes () const noexcept
 
bool GetMonotonicityPreservingFlag () const noexcept
 
void ProjectToFineBasis (const TSystemVectorType &rRomUnkowns, const ModelPart &rModelPart, TSystemVectorType &rDx) const
 
void BuildRightROMBasis (const ModelPart &rModelPart, Matrix &rPhiGlobal)
 
void MonotonicityPreserving (TSystemMatrixType &rA, TSystemVectorType &rB)
 
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...
 
static std::string Name ()
 

Protected operations

void AssignSettings (const Parameters ThisParameters) override
 This method assigns settings to member variables. More...
 
void InitializeHROMWeights (ModelPart &rModelPart)
 
virtual void BuildAndProjectROM (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &rA, TSystemVectorType &rb, TSystemVectorType &rDx)
 
void Build (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &A, TSystemVectorType &b) override
 Function to perform the build of the LHS and RHS multiplied by its corresponding hrom weight. More...
 
virtual void ProjectROM (ModelPart &rModelPart, TSystemMatrixType &rA, TSystemVectorType &rb)
 
virtual void SolveROM (ModelPart &rModelPart, EigenDynamicMatrix &rEigenRomA, EigenDynamicVector &rEigenRomB, TSystemVectorType &rDx)
 
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)
 

Additional Inherited Members

- Public Types inherited from Kratos::ResidualBasedBlockBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >
typedef BuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver > BaseType
 Definition of the base class. More...
 
typedef ResidualBasedBlockBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver > ClassType
 The definition of the current class. More...
 
typedef std::size_t SizeType
 
typedef std::size_t IndexType
 
typedef BaseType::TSchemeType TSchemeType
 Definition of the classes from the base class. More...
 
typedef BaseType::TDataType TDataType
 
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::NodesArrayType NodesArrayType
 
typedef BaseType::ElementsArrayType ElementsArrayType
 
typedef BaseType::ConditionsArrayType ConditionsArrayType
 
typedef PointerVectorSet< Element, IndexedObjectElementsContainerType
 Additional definitions. More...
 
typedef Element::EquationIdVectorType EquationIdVectorType
 
typedef Element::DofsVectorType DofsVectorType
 
typedef boost::numeric::ublas::compressed_matrix< doubleCompressedMatrixType
 
typedef Node NodeType
 DoF types definition. More...
 
typedef NodeType::DofType DofType
 
typedef DofType::Pointer DofPointerType
 
- 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::ResidualBasedBlockBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >
static std::string Name ()
 Returns the name of the class as used in the settings (snake_case format) More...
 
- 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::ResidualBasedBlockBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >
void BuildRHSNoDirichlet (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemVectorType &b)
 
virtual void ConstructMasterSlaveConstraintsStructure (ModelPart &rModelPart)
 
virtual void BuildMasterSlaveConstraints (ModelPart &rModelPart)
 
virtual void ConstructMatrixStructure (typename TSchemeType::Pointer pScheme, TSystemMatrixType &A, ModelPart &rModelPart)
 
void Assemble (TSystemMatrixType &A, TSystemVectorType &b, const LocalSystemMatrixType &LHS_Contribution, const LocalSystemVectorType &RHS_Contribution, Element::EquationIdVectorType &EquationId)
 
void AssembleLHS (TSystemMatrixType &rA, const LocalSystemMatrixType &rLHSContribution, Element::EquationIdVectorType &rEquationId)
 
void AssembleRHS (TSystemVectorType &b, LocalSystemVectorType &RHS_Contribution, Element::EquationIdVectorType &EquationId)
 
void AssembleRowContribution (TSystemMatrixType &A, const Matrix &Alocal, const unsigned int i, const unsigned int i_local, Element::EquationIdVectorType &EquationId)
 
- 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...
 

Member Typedef Documentation

◆ BaseBuilderAndSolverType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
using Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::BaseBuilderAndSolverType = BuilderAndSolver<TSparseSpace, TDenseSpace, TLinearSolver>

Definition of the classes from the base class.

◆ BaseType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
using Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::BaseType = ResidualBasedBlockBuilderAndSolver<TSparseSpace, TDenseSpace, TLinearSolver>

◆ ClassType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
using Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::ClassType = GlobalROMBuilderAndSolver<TSparseSpace, TDenseSpace, TLinearSolver>

The definition of the current class.

◆ CompressedMatrixType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
using Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::CompressedMatrixType = boost::numeric::ublas::compressed_matrix<double>

◆ ConditionsArrayType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
using Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::ConditionsArrayType = typename BaseBuilderAndSolverType::ConditionsArrayType

◆ DofPointerType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
using Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::DofPointerType = typename DofType::Pointer

◆ DofQueue

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
using Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::DofQueue = moodycamel::ConcurrentQueue<DofType::Pointer>

◆ DofsArrayType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
using Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::DofsArrayType = typename BaseBuilderAndSolverType::DofsArrayType

◆ DofsVectorType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
using Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::DofsVectorType = typename Element::DofsVectorType

◆ DofType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
using Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::DofType = typename Node::DofType

DoF types definition.

◆ EigenDynamicMatrix

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
using Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::EigenDynamicMatrix = Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>

◆ EigenDynamicVector

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
using Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::EigenDynamicVector = Eigen::Matrix<double, Eigen::Dynamic, 1>

◆ EigenSparseMatrix

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
using Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::EigenSparseMatrix = Eigen::SparseMatrix<double, Eigen::RowMajor, int>

◆ ElementsArrayType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
using Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::ElementsArrayType = typename BaseBuilderAndSolverType::ElementsArrayType

◆ EquationIdVectorType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
using Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::EquationIdVectorType = typename Element::EquationIdVectorType

◆ IndexType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
using Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::IndexType = std::size_t

◆ LocalSystemMatrixType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
using Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::LocalSystemMatrixType = typename BaseBuilderAndSolverType::LocalSystemMatrixType

◆ LocalSystemVectorType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
using Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::LocalSystemVectorType = typename BaseBuilderAndSolverType::LocalSystemVectorType

◆ MasterSlaveConstraintContainerType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
using Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::MasterSlaveConstraintContainerType = typename ModelPart::MasterSlaveConstraintContainerType

Additional definitions.

◆ RomSystemMatrixType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
using Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::RomSystemMatrixType = LocalSystemMatrixType

◆ RomSystemVectorType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
using Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::RomSystemVectorType = LocalSystemVectorType

◆ SizeType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
using Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::SizeType = std::size_t

◆ TSchemeType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
using Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::TSchemeType = typename BaseBuilderAndSolverType::TSchemeType

◆ TSystemMatrixPointerType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
using Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::TSystemMatrixPointerType = typename BaseBuilderAndSolverType::TSystemMatrixPointerType

◆ TSystemMatrixType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
using Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::TSystemMatrixType = typename BaseBuilderAndSolverType::TSystemMatrixType

◆ TSystemVectorPointerType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
using Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::TSystemVectorPointerType = typename BaseBuilderAndSolverType::TSystemVectorPointerType

◆ TSystemVectorType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
using Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::TSystemVectorType = typename BaseBuilderAndSolverType::TSystemVectorType

Constructor & Destructor Documentation

◆ GlobalROMBuilderAndSolver() [1/2]

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

◆ GlobalROMBuilderAndSolver() [2/2]

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

◆ ~GlobalROMBuilderAndSolver()

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

Member Function Documentation

◆ AssignSettings()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::GlobalROMBuilderAndSolver< 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::ResidualBasedBlockBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.

Reimplemented in Kratos::LeastSquaresPetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.

◆ Build()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::Build ( typename TSchemeType::Pointer  pScheme,
ModelPart rModelPart,
TSystemMatrixType A,
TSystemVectorType b 
)
inlineoverrideprotectedvirtual

Function to perform the build of the LHS and RHS multiplied by its corresponding hrom weight.

Parameters
pSchemeThe integration scheme considered
rModelPartThe model part of the problem to solve
AThe LHS matrix
bThe RHS vector

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

◆ BuildAndProjectROM()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
virtual void Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::BuildAndProjectROM ( typename TSchemeType::Pointer  pScheme,
ModelPart rModelPart,
TSystemMatrixType rA,
TSystemVectorType rb,
TSystemVectorType rDx 
)
inlineprotectedvirtual

◆ BuildAndSolve()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::BuildAndSolve ( typename TSchemeType::Pointer  pScheme,
ModelPart rModelPart,
TSystemMatrixType A,
TSystemVectorType Dx,
TSystemVectorType b 
)
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 integration scheme considered
rModelPartThe model part of the problem to solve
AThe LHS matrix
DxThe Unknowns vector
bThe RHS vector

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

Reimplemented in Kratos::LeastSquaresPetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.

◆ BuildRightROMBasis()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::BuildRightROMBasis ( const ModelPart rModelPart,
Matrix rPhiGlobal 
)
inline

◆ Create()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
BaseBuilderAndSolverType::Pointer Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::Create ( typename TLinearSolver::Pointer  pNewLinearSystemSolver,
Parameters  ThisParameters 
) const
inlineoverridevirtual

Create method.

Parameters
pNewLinearSystemSolverThe linear solver for the system of equations
ThisParametersThe configuration parameters

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

◆ ExtractDofSet()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
static DofQueue Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::ExtractDofSet ( typename TSchemeType::Pointer  pScheme,
ModelPart rModelPart 
)
inlinestaticprotected

◆ GetDefaultParameters()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
Parameters Kratos::GlobalROMBuilderAndSolver< 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::ResidualBasedBlockBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.

Reimplemented in Kratos::LeastSquaresPetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.

◆ GetMonotonicityPreservingFlag()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
bool Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::GetMonotonicityPreservingFlag ( ) const
inlinenoexcept

◆ GetNumberOfROMModes()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
SizeType Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::GetNumberOfROMModes ( ) const
inlinenoexcept

◆ Info()

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

◆ InitializeHROMWeights()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::InitializeHROMWeights ( ModelPart rModelPart)
inlineprotected

◆ InitializeSolutionStep()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
virtual void Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::InitializeSolutionStep ( ModelPart rModelPart,
TSystemMatrixType rA,
TSystemVectorType rDx,
TSystemVectorType rb 
)
inlineoverridevirtual

It applies certain operations at the system of equations at the beginning of the solution step.

Parameters
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 >.

◆ KRATOS_CLASS_POINTER_DEFINITION()

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

◆ MonotonicityPreserving()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::MonotonicityPreserving ( TSystemMatrixType rA,
TSystemVectorType rB 
)
inline

◆ Name()

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

◆ PrintData()

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

◆ PrintInfo()

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

◆ ProjectROM()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
virtual void Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::ProjectROM ( ModelPart rModelPart,
TSystemMatrixType rA,
TSystemVectorType rb 
)
inlineprotectedvirtual

Projects the reduced system of equations

Reimplemented in Kratos::GlobalPetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.

◆ ProjectToFineBasis()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::ProjectToFineBasis ( const TSystemVectorType rRomUnkowns,
const ModelPart rModelPart,
TSystemVectorType rDx 
) const
inline

◆ ResizeAndInitializeVectors()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::ResizeAndInitializeVectors ( typename TSchemeType::Pointer  pScheme,
TSystemMatrixPointerType pA,
TSystemVectorPointerType pDx,
TSystemVectorPointerType pb,
ModelPart rModelPart 
)
inlineoverridevirtual

This method initializes and resizes the system of equations.

Parameters
pSchemeThe pointer to the integration scheme
rModelPartThe model part to compute
pAThe pointer to LHS matrix of the system of equations
pDxThe pointer to vector of unknowns
pbThe pointer to RHS vector of the system of equations

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

◆ ResizeIfNeeded()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
template<typename TMatrix >
static void Kratos::GlobalROMBuilderAndSolver< 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::GlobalROMBuilderAndSolver< 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 integration scheme considered
rModelPartThe model part of the problem to solve

Here we declare three sets.

  • The global set: Contains all the DoF of the system
  • The slave set: The DoF that are not going to be solved, due to MPC formulation

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

Reimplemented in Kratos::LeastSquaresPetrovGalerkinROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.

◆ SetUpSystem()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::SetUpSystem ( ModelPart rModelPart)
inlineoverridevirtual

Organises the dofset in order to speed up the building phase.

Parameters
rModelPartThe model part of the problem to solve

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

◆ SolveROM()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
virtual void Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::SolveROM ( ModelPart rModelPart,
EigenDynamicMatrix rEigenRomA,
EigenDynamicVector rEigenRomB,
TSystemVectorType rDx 
)
inlineprotectedvirtual

Solves reduced system of equations and broadcasts it

◆ SortAndRemoveDuplicateDofs()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
static DofsArrayType Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::SortAndRemoveDuplicateDofs ( DofQueue rDofQueue)
inlinestaticprotected

Member Data Documentation

◆ mHromSimulation

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
bool Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::mHromSimulation = false
protected

◆ mHromWeightsInitialized

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
bool Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::mHromWeightsInitialized = false
protected

◆ mMapPhi

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
std::unordered_map<Kratos::VariableData::KeyType, Matrix::size_type> Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::mMapPhi
protected

◆ mNodalDofs

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
SizeType Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::mNodalDofs
protected

◆ mRightRomBasisInitialized

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
bool Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::mRightRomBasisInitialized = false
protected

◆ mSelectedConditions

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
ConditionsArrayType Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::mSelectedConditions
protected

◆ mSelectedElements

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
ElementsArrayType Kratos::GlobalROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::mSelectedElements
protected

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