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

A scheme for dynamic adjoint equations, using Bossak time integration. More...

#include <residual_based_adjoint_bossak_scheme.h>

Inheritance diagram for Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >:
Collaboration diagram for Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >:

Classes

struct  BossakConstants
 

Public Member Functions

Life Cycle
 ResidualBasedAdjointBossakScheme (Parameters Settings, AdjointResponseFunction::Pointer pResponseFunction)
 Constructor. More...
 
 ~ResidualBasedAdjointBossakScheme () override
 Destructor. More...
 
Operations
int Check (const ModelPart &rModelPart) const 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...
 
void Initialize (ModelPart &rModelPart) override
 This is the place to initialize the Scheme. More...
 
void InitializeSolutionStep (ModelPart &rModelPart, SystemMatrixType &rA, SystemVectorType &rDx, SystemVectorType &rb) override
 Function called once at the beginning of each solution step. More...
 
void FinalizeSolutionStep (ModelPart &rModelPart, SystemMatrixType &rA, SystemVectorType &rDx, SystemVectorType &rb) override
 Function called once at the end of a solution step, after convergence is reached if an iterative process is needed. More...
 
void Update (ModelPart &rModelPart, DofsArrayType &rDofSet, SystemMatrixType &rA, SystemVectorType &rDx, SystemVectorType &rb) override
 Performing the update of the solution. More...
 
void CalculateSystemContributions (Element &rCurrentElement, LocalSystemMatrixType &rLHS_Contribution, LocalSystemVectorType &rRHS_Contribution, Element::EquationIdVectorType &rEquationId, const ProcessInfo &rCurrentProcessInfo) override
 This function is designed to be called in the builder and solver to introduce the selected time integration scheme. More...
 
void CalculateLHSContribution (Element &rCurrentElement, LocalSystemMatrixType &rLHS_Contribution, Element::EquationIdVectorType &rEquationId, const ProcessInfo &rCurrentProcessInfo) override
 This function is designed to calculate just the LHS contribution. More...
 
void CalculateSystemContributions (Condition &rCurrentCondition, LocalSystemMatrixType &rLHS_Contribution, LocalSystemVectorType &rRHS_Contribution, Condition::EquationIdVectorType &rEquationId, const ProcessInfo &rCurrentProcessInfo) override
 Functions totally analogous to the precedent but applied to the "condition" objects. More...
 
void CalculateLHSContribution (Condition &rCurrentCondition, LocalSystemMatrixType &rLHS_Contribution, Condition::EquationIdVectorType &rEquationId, const ProcessInfo &rCurrentProcessInfo) override
 Functions totally analogous to the precedent but applied to the "condition" objects. More...
 
void Clear () override
 Liberate internal storage. More...
 
Input and output
std::string Info () const override
 Turn back information as a string. More...
 
void PrintInfo (std::ostream &rOStream) const override
 Print information about this object. More...
 
void PrintData (std::ostream &rOStream) const override
 Print object's data. More...
 
- Public Member Functions inherited from Kratos::Scheme< TSparseSpace, TDenseSpace >
 Scheme ()
 Default Constructor. More...
 
 Scheme (Parameters ThisParameters)
 Constructor with Parameters. More...
 
 Scheme (Scheme &rOther)
 
virtual ~Scheme ()
 
 KRATOS_CLASS_POINTER_DEFINITION (Scheme)
 Pointer definition of Scheme. More...
 
virtual ClassType::Pointer Create (Parameters ThisParameters) const
 Create method. More...
 
virtual Pointer Clone ()
 Clone method. More...
 
bool SchemeIsInitialized ()
 This method returns if the scheme is initialized. More...
 
void SetSchemeIsInitialized (bool SchemeIsInitializedFlag=true)
 This method sets if the elements have been initialized or not (true by default) More...
 
bool ElementsAreInitialized ()
 This method returns if the elements are initialized. More...
 
void SetElementsAreInitialized (bool ElementsAreInitializedFlag=true)
 This method sets if the elements have been initialized or not (true by default) More...
 
bool ConditionsAreInitialized ()
 This method returns if the conditions are initialized. More...
 
void SetConditionsAreInitialized (bool ConditionsAreInitializedFlag=true)
 This method sets if the conditions have been initialized or not (true by default) More...
 
virtual void InitializeElements (ModelPart &rModelPart)
 This is the place to initialize the elements. More...
 
virtual void InitializeConditions (ModelPart &rModelPart)
 This is the place to initialize the conditions. More...
 
virtual void InitializeNonLinIteration (ModelPart &rModelPart, TSystemMatrixType &A, TSystemVectorType &Dx, TSystemVectorType &b)
 unction to be called when it is needed to initialize an iteration. It is designed to be called at the beginning of each non linear iteration More...
 
virtual void FinalizeNonLinIteration (ModelPart &rModelPart, TSystemMatrixType &A, TSystemVectorType &Dx, TSystemVectorType &b)
 Function to be called when it is needed to finalize an iteration. It is designed to be called at the end of each non linear iteration. More...
 
virtual void Predict (ModelPart &rModelPart, DofsArrayType &rDofSet, TSystemMatrixType &A, TSystemVectorType &Dx, TSystemVectorType &b)
 Performing the prediction of the solution. More...
 
virtual void CalculateOutputData (ModelPart &rModelPart, DofsArrayType &rDofSet, TSystemMatrixType &A, TSystemVectorType &Dx, TSystemVectorType &b)
 Functions to be called to prepare the data needed for the output of results. More...
 
virtual void CleanOutputData ()
 Functions that cleans the results data. More...
 
virtual void Clean ()
 This function is intended to be called at the end of the solution step to clean up memory storage not needed after the end of the solution step. More...
 
virtual int Check (ModelPart &rModelPart)
 
virtual void CalculateRHSContribution (Element &rElement, LocalSystemVectorType &RHS_Contribution, Element::EquationIdVectorType &rEquationIdVector, const ProcessInfo &rCurrentProcessInfo)
 This function is designed to calculate just the RHS contribution. More...
 
virtual void CalculateRHSContribution (Condition &rCondition, LocalSystemVectorType &RHS_Contribution, Element::EquationIdVectorType &rEquationIdVector, const ProcessInfo &rCurrentProcessInfo)
 Functions totally analogous to the precedent but applied to the "condition" objects. More...
 
virtual void EquationId (const Element &rElement, Element::EquationIdVectorType &rEquationId, const ProcessInfo &rCurrentProcessInfo)
 This method gets the eqaution id corresponding to the current element. More...
 
virtual void EquationId (const Condition &rCondition, Element::EquationIdVectorType &rEquationId, const ProcessInfo &rCurrentProcessInfo)
 Functions totally analogous to the precedent but applied to the "condition" objects. More...
 
virtual void GetDofList (const Element &rElement, Element::DofsVectorType &rDofList, const ProcessInfo &rCurrentProcessInfo)
 Function that returns the list of Degrees of freedom to be assembled in the system for a Given element. More...
 
virtual void GetDofList (const Condition &rCondition, Element::DofsVectorType &rDofList, const ProcessInfo &rCurrentProcessInfo)
 Function that returns the list of Degrees of freedom to be assembled in the system for a Given condition. More...
 
virtual Parameters GetDefaultParameters () const
 This method provides the defaults parameters to avoid conflicts between the different constructors. More...
 

Protected Member Functions

Protected Operations
virtual void CalculateGradientContributions (Element &rElement, LocalSystemMatrixType &rLHS_Contribution, LocalSystemVectorType &rRHS_Contribution, const ProcessInfo &rCurrentProcessInfo)
 
virtual void CalculateGradientContributions (Condition &rCondition, LocalSystemMatrixType &rLHS_Contribution, LocalSystemVectorType &rRHS_Contribution, const ProcessInfo &rCurrentProcessInfo)
 
virtual void CalculateFirstDerivativeContributions (Element &rElement, LocalSystemMatrixType &rLHS_Contribution, LocalSystemVectorType &rRHS_Contribution, const ProcessInfo &rCurrentProcessInfo)
 
virtual void CalculateFirstDerivativeContributions (Condition &rCondition, LocalSystemMatrixType &rLHS_Contribution, LocalSystemVectorType &rRHS_Contribution, const ProcessInfo &rCurrentProcessInfo)
 
virtual void CalculateSecondDerivativeContributions (Element &rElement, LocalSystemMatrixType &rLHS_Contribution, LocalSystemVectorType &rRHS_Contribution, const ProcessInfo &rCurrentProcessInfo)
 
virtual void CalculateSecondDerivativeContributions (Condition &rCondition, LocalSystemMatrixType &rLHS_Contribution, LocalSystemVectorType &rRHS_Contribution, const ProcessInfo &rCurrentProcessInfo)
 
virtual void CalculateResidualLocalContributions (Element &rCurrentElement, LocalSystemMatrixType &rLHS_Contribution, LocalSystemVectorType &rRHS_Contribution, const ProcessInfo &rCurrentProcessInfo)
 Calculates elemental residual. More...
 
virtual void CalculateResidualLocalContributions (Condition &rCurrentCondition, LocalSystemMatrixType &rLHS_Contribution, LocalSystemVectorType &rRHS_Contribution, const ProcessInfo &rCurrentProcessInfo)
 Calculates condition residual. More...
 
virtual void CalculateTimeSchemeContributions (Element &rElement, LocalSystemVectorType &rAdjointTimeSchemeValues2, LocalSystemVectorType &rAdjointTimeSchemeValues3, AdjointResponseFunction &rAdjointResponseFunction, const BossakConstants &rBossakConstants, const ProcessInfo &rCurrentProcessInfo)
 Calculate time scheme contributions from elements. More...
 
virtual void CalculateTimeSchemeContributions (Condition &rCondition, LocalSystemVectorType &rAdjointTimeSchemeValues2, LocalSystemVectorType &rAdjointTimeSchemeValues3, AdjointResponseFunction &rAdjointResponseFunction, const BossakConstants &rBossakConstants, const ProcessInfo &rCurrentProcessInfo)
 Calculates time scheme contributions from conditions. More...
 
virtual void CalculateAuxiliaryVariableContributions (Element &rElement, LocalSystemVectorType &rAdjointAuxiliaryValues, AdjointResponseFunction &rAdjointResponseFunction, const BossakConstants &rBossakConstants, const ProcessInfo &rCurrentProcessInfo)
 Calculates auxiliary variable contributions from elements. More...
 
virtual void CalculateAuxiliaryVariableContributions (Condition &rCondition, LocalSystemVectorType &rAdjointAuxiliaryValues, AdjointResponseFunction &rAdjointResponseFunction, const BossakConstants &rBossakConstants, const ProcessInfo &rCurrentProcessInfo)
 Calculates auxiliary contributions from conditions. More...
 
virtual void CheckAndResizeThreadStorage (unsigned SystemSize)
 
- Protected Member Functions inherited from Kratos::Scheme< TSparseSpace, TDenseSpace >
virtual Parameters ValidateAndAssignParameters (Parameters ThisParameters, const Parameters DefaultParameters) const
 This method validate and assign default parameters. More...
 
virtual void AssignSettings (const Parameters ThisParameters)
 This method assigns settings to member variables. More...
 

Protected Attributes

Protected member Variables
AdjointResponseFunction::Pointer mpResponseFunction
 
BossakConstants mBossak
 
std::vector< LocalSystemMatrixTypemLeftHandSide
 
std::vector< LocalSystemVectorTypemResponseGradient
 
std::vector< LocalSystemMatrixTypemFirstDerivsLHS
 
std::vector< LocalSystemVectorTypemFirstDerivsResponseGradient
 
std::vector< LocalSystemMatrixTypemSecondDerivsLHS
 
std::vector< LocalSystemVectorTypemSecondDerivsResponseGradient
 
std::vector< LocalSystemVectorTypemAdjointValuesVector
 
std::vector< std::vector< IndirectScalar< double > > > mAdjointIndirectVector2
 
std::vector< std::vector< IndirectScalar< double > > > mAdjointIndirectVector3
 
std::vector< std::vector< IndirectScalar< double > > > mAuxAdjointIndirectVector1
 
- Protected Attributes inherited from Kratos::Scheme< TSparseSpace, TDenseSpace >
bool mSchemeIsInitialized
 
bool mElementsAreInitialized
 Flag to be used in controlling if the Scheme has been initialized or not. More...
 
bool mConditionsAreInitialized
 Flag taking in account if the elements were initialized correctly or not. More...
 

Type Definitions

typedef Scheme< TSparseSpace, TDenseSpace > BaseType
 
typedef BaseType::TSystemMatrixType SystemMatrixType
 
typedef BaseType::TSystemVectorType SystemVectorType
 
typedef BaseType::LocalSystemVectorType LocalSystemVectorType
 
typedef BaseType::LocalSystemMatrixType LocalSystemMatrixType
 
typedef BaseType::DofsArrayType DofsArrayType
 
 KRATOS_CLASS_POINTER_DEFINITION (ResidualBasedAdjointBossakScheme)
 

Additional Inherited Members

- Public Types inherited from Kratos::Scheme< TSparseSpace, TDenseSpace >
using ClassType = Scheme< TSparseSpace, TDenseSpace >
 The definition of the current class. More...
 
using TDataType = typename TSparseSpace::DataType
 Data type definition. More...
 
using TSystemMatrixType = typename TSparseSpace::MatrixType
 Matrix type definition. More...
 
using TSystemVectorType = typename TSparseSpace::VectorType
 Vector type definition. More...
 
using LocalSystemMatrixType = typename TDenseSpace::MatrixType
 Local system matrix type definition. More...
 
using LocalSystemVectorType = typename TDenseSpace::VectorType
 Local system vector type definition. More...
 
using TDofType = Dof< double >
 DoF type definition. More...
 
using DofsArrayType = ModelPart::DofsArrayType
 DoF array type definition. More...
 
using ElementsArrayType = ModelPart::ElementsContainerType
 Elements containers definition. More...
 
using ConditionsArrayType = ModelPart::ConditionsContainerType
 Conditions containers definition. More...
 
- Static Public Member Functions inherited from Kratos::Scheme< TSparseSpace, TDenseSpace >
static std::string Name ()
 Returns the name of the class as used in the settings (snake_case format) More...
 

Detailed Description

template<class TSparseSpace, class TDenseSpace>
class Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >

A scheme for dynamic adjoint equations, using Bossak time integration.

It can be used for either first- or second-order time derivatives. Elements and conditions must provide a specialization of AdjointExtensions via their data value container, which allows the scheme to operate independently of the variable arrangements in the element or condition.

Member Typedef Documentation

◆ BaseType

template<class TSparseSpace , class TDenseSpace >
typedef Scheme<TSparseSpace, TDenseSpace> Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::BaseType

◆ DofsArrayType

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

◆ LocalSystemMatrixType

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

◆ LocalSystemVectorType

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

◆ SystemMatrixType

template<class TSparseSpace , class TDenseSpace >
typedef BaseType::TSystemMatrixType Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::SystemMatrixType

◆ SystemVectorType

template<class TSparseSpace , class TDenseSpace >
typedef BaseType::TSystemVectorType Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::SystemVectorType

Constructor & Destructor Documentation

◆ ResidualBasedAdjointBossakScheme()

template<class TSparseSpace , class TDenseSpace >
Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::ResidualBasedAdjointBossakScheme ( Parameters  Settings,
AdjointResponseFunction::Pointer  pResponseFunction 
)
inline

Constructor.

◆ ~ResidualBasedAdjointBossakScheme()

template<class TSparseSpace , class TDenseSpace >
Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::~ResidualBasedAdjointBossakScheme ( )
inlineoverride

Destructor.

Member Function Documentation

◆ CalculateAuxiliaryVariableContributions() [1/2]

template<class TSparseSpace , class TDenseSpace >
virtual void Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::CalculateAuxiliaryVariableContributions ( Condition rCondition,
LocalSystemVectorType rAdjointAuxiliaryValues,
AdjointResponseFunction rAdjointResponseFunction,
const BossakConstants rBossakConstants,
const ProcessInfo rCurrentProcessInfo 
)
inlineprotectedvirtual

Calculates auxiliary contributions from conditions.

Parameters
rCondition
rAdjointAuxiliaryValues
rCurrentProcessInfo

◆ CalculateAuxiliaryVariableContributions() [2/2]

template<class TSparseSpace , class TDenseSpace >
virtual void Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::CalculateAuxiliaryVariableContributions ( Element rElement,
LocalSystemVectorType rAdjointAuxiliaryValues,
AdjointResponseFunction rAdjointResponseFunction,
const BossakConstants rBossakConstants,
const ProcessInfo rCurrentProcessInfo 
)
inlineprotectedvirtual

Calculates auxiliary variable contributions from elements.

Parameters
rElement
rAdjointAuxiliaryValues
rCurrentProcessInfo

◆ CalculateFirstDerivativeContributions() [1/2]

template<class TSparseSpace , class TDenseSpace >
virtual void Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::CalculateFirstDerivativeContributions ( Condition rCondition,
LocalSystemMatrixType rLHS_Contribution,
LocalSystemVectorType rRHS_Contribution,
const ProcessInfo rCurrentProcessInfo 
)
inlineprotectedvirtual

◆ CalculateFirstDerivativeContributions() [2/2]

template<class TSparseSpace , class TDenseSpace >
virtual void Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::CalculateFirstDerivativeContributions ( Element rElement,
LocalSystemMatrixType rLHS_Contribution,
LocalSystemVectorType rRHS_Contribution,
const ProcessInfo rCurrentProcessInfo 
)
inlineprotectedvirtual

◆ CalculateGradientContributions() [1/2]

template<class TSparseSpace , class TDenseSpace >
virtual void Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::CalculateGradientContributions ( Condition rCondition,
LocalSystemMatrixType rLHS_Contribution,
LocalSystemVectorType rRHS_Contribution,
const ProcessInfo rCurrentProcessInfo 
)
inlineprotectedvirtual

◆ CalculateGradientContributions() [2/2]

template<class TSparseSpace , class TDenseSpace >
virtual void Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::CalculateGradientContributions ( Element rElement,
LocalSystemMatrixType rLHS_Contribution,
LocalSystemVectorType rRHS_Contribution,
const ProcessInfo rCurrentProcessInfo 
)
inlineprotectedvirtual

◆ CalculateLHSContribution() [1/2]

template<class TSparseSpace , class TDenseSpace >
void Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::CalculateLHSContribution ( Condition rCondition,
LocalSystemMatrixType LHS_Contribution,
Condition::EquationIdVectorType rEquationIdVector,
const ProcessInfo rCurrentProcessInfo 
)
inlineoverridevirtual

Functions totally analogous to the precedent but applied to the "condition" objects.

Parameters
rConditionThe condition to compute
LHS_ContributionThe RHS vector contribution
rEquationIdVectorThe ID's of the condition degrees of freedom
rCurrentProcessInfoThe current process info instance

Reimplemented from Kratos::Scheme< TSparseSpace, TDenseSpace >.

◆ CalculateLHSContribution() [2/2]

template<class TSparseSpace , class TDenseSpace >
void Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::CalculateLHSContribution ( Element rElement,
LocalSystemMatrixType LHS_Contribution,
Element::EquationIdVectorType rEquationIdVector,
const ProcessInfo rCurrentProcessInfo 
)
inlineoverridevirtual

This function is designed to calculate just the LHS contribution.

Parameters
rElementThe element to compute
LHS_ContributionThe RHS vector contribution
rEquationIdVectorThe ID's of the element degrees of freedom
rCurrentProcessInfoThe current process info instance

Reimplemented from Kratos::Scheme< TSparseSpace, TDenseSpace >.

◆ CalculateResidualLocalContributions() [1/2]

template<class TSparseSpace , class TDenseSpace >
virtual void Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::CalculateResidualLocalContributions ( Condition rCurrentCondition,
LocalSystemMatrixType rLHS_Contribution,
LocalSystemVectorType rRHS_Contribution,
const ProcessInfo rCurrentProcessInfo 
)
inlineprotectedvirtual

Calculates condition residual.

[ \underline{F} = \underline{F} - \mathbf{\underline{K}}\underline{\lambda}_1 ]

Parameters
rCurrentConditionCurrent condition
rLHS_ContributionLeft hand side matrix (i.e. $\mathbf{\underline{K}}$)
rRHS_ContributionRight hand side vector (i.e. $\underline{F}$)
rCurrentProcessInfoCurrent process info

◆ CalculateResidualLocalContributions() [2/2]

template<class TSparseSpace , class TDenseSpace >
virtual void Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::CalculateResidualLocalContributions ( Element rCurrentElement,
LocalSystemMatrixType rLHS_Contribution,
LocalSystemVectorType rRHS_Contribution,
const ProcessInfo rCurrentProcessInfo 
)
inlineprotectedvirtual

Calculates elemental residual.

[ \underline{F} = \underline{F} - \mathbf{\underline{K}}\underline{\lambda}_1 ]

Parameters
rCurrentElementCurrent element
rLHS_ContributionLeft hand side matrix (i.e. $\mathbf{\underline{K}}$)
rRHS_ContributionRight hand side vector (i.e. $\underline{F}$)
rCurrentProcessInfoCurrent process info

◆ CalculateSecondDerivativeContributions() [1/2]

template<class TSparseSpace , class TDenseSpace >
virtual void Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::CalculateSecondDerivativeContributions ( Condition rCondition,
LocalSystemMatrixType rLHS_Contribution,
LocalSystemVectorType rRHS_Contribution,
const ProcessInfo rCurrentProcessInfo 
)
inlineprotectedvirtual

◆ CalculateSecondDerivativeContributions() [2/2]

template<class TSparseSpace , class TDenseSpace >
virtual void Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::CalculateSecondDerivativeContributions ( Element rElement,
LocalSystemMatrixType rLHS_Contribution,
LocalSystemVectorType rRHS_Contribution,
const ProcessInfo rCurrentProcessInfo 
)
inlineprotectedvirtual

◆ CalculateSystemContributions() [1/2]

template<class TSparseSpace , class TDenseSpace >
void Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::CalculateSystemContributions ( Condition rCondition,
LocalSystemMatrixType LHS_Contribution,
LocalSystemVectorType RHS_Contribution,
Condition::EquationIdVectorType rEquationIdVector,
const ProcessInfo rCurrentProcessInfo 
)
inlineoverridevirtual

Functions totally analogous to the precedent but applied to the "condition" objects.

Parameters
rConditionThe condition to compute
LHS_ContributionThe LHS matrix contribution
RHS_ContributionThe RHS vector contribution
rEquationIdVectorThe ID's of the condition degrees of freedom
rCurrentProcessInfoThe current process info instance

Reimplemented from Kratos::Scheme< TSparseSpace, TDenseSpace >.

◆ CalculateSystemContributions() [2/2]

template<class TSparseSpace , class TDenseSpace >
void Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::CalculateSystemContributions ( Element rElement,
LocalSystemMatrixType LHS_Contribution,
LocalSystemVectorType RHS_Contribution,
Element::EquationIdVectorType rEquationIdVector,
const ProcessInfo rCurrentProcessInfo 
)
inlineoverridevirtual

This function is designed to be called in the builder and solver to introduce the selected time integration scheme.

It "asks" the matrix needed to the element and performs the operations needed to introduce the selected time integration scheme. This function calculates at the same time the contribution to the LHS and to the RHS of the system

Parameters
rElementThe element to compute
LHS_ContributionThe LHS matrix contribution
RHS_ContributionThe RHS vector contribution
rEquationIdVectorThe ID's of the element degrees of freedom
rCurrentProcessInfoThe current process info instance

Reimplemented from Kratos::Scheme< TSparseSpace, TDenseSpace >.

◆ CalculateTimeSchemeContributions() [1/2]

template<class TSparseSpace , class TDenseSpace >
virtual void Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::CalculateTimeSchemeContributions ( Condition rCondition,
LocalSystemVectorType rAdjointTimeSchemeValues2,
LocalSystemVectorType rAdjointTimeSchemeValues3,
AdjointResponseFunction rAdjointResponseFunction,
const BossakConstants rBossakConstants,
const ProcessInfo rCurrentProcessInfo 
)
inlineprotectedvirtual

Calculates time scheme contributions from conditions.

Parameters
rCondition
rAdjointTimeSchemeValues2
rAdjointTimeSchemeValues3
rCurrentProcessInfo

◆ CalculateTimeSchemeContributions() [2/2]

template<class TSparseSpace , class TDenseSpace >
virtual void Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::CalculateTimeSchemeContributions ( Element rElement,
LocalSystemVectorType rAdjointTimeSchemeValues2,
LocalSystemVectorType rAdjointTimeSchemeValues3,
AdjointResponseFunction rAdjointResponseFunction,
const BossakConstants rBossakConstants,
const ProcessInfo rCurrentProcessInfo 
)
inlineprotectedvirtual

Calculate time scheme contributions from elements.

Parameters
rElement
rAdjointTimeSchemeValues2
rAdjointTimeSchemeValues3
rCurrentProcessInfo

◆ Check()

template<class TSparseSpace , class TDenseSpace >
int Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::Check ( const ModelPart rModelPart) const
inlineoverridevirtual

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.

Checks can be "expensive" as the function is designed

Parameters
rModelPartThe model part of the problem to solve
Returns
0 all OK, 1 otherwise

Reimplemented from Kratos::Scheme< TSparseSpace, TDenseSpace >.

◆ CheckAndResizeThreadStorage()

template<class TSparseSpace , class TDenseSpace >
virtual void Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::CheckAndResizeThreadStorage ( unsigned  SystemSize)
inlineprotectedvirtual

◆ Clear()

template<class TSparseSpace , class TDenseSpace >
void Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::Clear ( )
inlineoverridevirtual

Liberate internal storage.

Warning
Must be implemented in the derived classes

Reimplemented from Kratos::Scheme< TSparseSpace, TDenseSpace >.

◆ FinalizeSolutionStep()

template<class TSparseSpace , class TDenseSpace >
void Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::FinalizeSolutionStep ( ModelPart rModelPart,
SystemMatrixType A,
SystemVectorType Dx,
SystemVectorType b 
)
inlineoverridevirtual

Function called once at the end of a solution step, after convergence is reached if an iterative process is needed.

Parameters
rModelPartThe model part of the problem to solve
ALHS matrix
DxIncremental update of primary variables
bRHS Vector

Reimplemented from Kratos::Scheme< TSparseSpace, TDenseSpace >.

◆ Info()

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

Turn back information as a string.

Reimplemented from Kratos::Scheme< TSparseSpace, TDenseSpace >.

Reimplemented in Kratos::VelocityBossakAdjointScheme< TSparseSpace, TDenseSpace >.

◆ Initialize()

template<class TSparseSpace , class TDenseSpace >
void Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::Initialize ( ModelPart rModelPart)
inlineoverridevirtual

This is the place to initialize the Scheme.

This is intended to be called just once when the strategy is initialized

Parameters
rModelPartThe model part of the problem to solve

Reimplemented from Kratos::Scheme< TSparseSpace, TDenseSpace >.

Reimplemented in Kratos::VelocityBossakAdjointScheme< TSparseSpace, TDenseSpace >.

◆ InitializeSolutionStep()

template<class TSparseSpace , class TDenseSpace >
void Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::InitializeSolutionStep ( ModelPart rModelPart,
SystemMatrixType A,
SystemVectorType Dx,
SystemVectorType b 
)
inlineoverridevirtual

Function called once at the beginning of each solution step.

The basic operations to be carried in there are the following:

  • managing variables to be kept constant over the time step (for example time-Scheme constants depending on the actual time step)
    Parameters
    rModelPartThe model part of the problem to solve
    ALHS matrix
    DxIncremental update of primary variables
    bRHS Vector

Reimplemented from Kratos::Scheme< TSparseSpace, TDenseSpace >.

◆ KRATOS_CLASS_POINTER_DEFINITION()

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

◆ PrintData()

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

Print object's data.

Reimplemented from Kratos::Scheme< TSparseSpace, TDenseSpace >.

◆ PrintInfo()

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

Print information about this object.

Reimplemented from Kratos::Scheme< TSparseSpace, TDenseSpace >.

◆ Update()

template<class TSparseSpace , class TDenseSpace >
void Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::Update ( ModelPart rModelPart,
DofsArrayType rDofSet,
SystemMatrixType A,
SystemVectorType Dx,
SystemVectorType b 
)
inlineoverridevirtual

Performing the update of the solution.

Warning
Must be defined in derived classes
Parameters
rModelPartThe model part of the problem to solve
rDofSetSet of all primary variables
ALHS matrix
DxIncremental update of primary variables
bRHS Vector

Reimplemented from Kratos::Scheme< TSparseSpace, TDenseSpace >.

Member Data Documentation

◆ mAdjointIndirectVector2

template<class TSparseSpace , class TDenseSpace >
std::vector<std::vector<IndirectScalar<double> > > Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::mAdjointIndirectVector2
protected

◆ mAdjointIndirectVector3

template<class TSparseSpace , class TDenseSpace >
std::vector<std::vector<IndirectScalar<double> > > Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::mAdjointIndirectVector3
protected

◆ mAdjointValuesVector

template<class TSparseSpace , class TDenseSpace >
std::vector<LocalSystemVectorType> Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::mAdjointValuesVector
protected

◆ mAuxAdjointIndirectVector1

template<class TSparseSpace , class TDenseSpace >
std::vector<std::vector<IndirectScalar<double> > > Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::mAuxAdjointIndirectVector1
protected

◆ mBossak

template<class TSparseSpace , class TDenseSpace >
BossakConstants Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::mBossak
protected

◆ mFirstDerivsLHS

template<class TSparseSpace , class TDenseSpace >
std::vector<LocalSystemMatrixType> Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::mFirstDerivsLHS
protected

◆ mFirstDerivsResponseGradient

template<class TSparseSpace , class TDenseSpace >
std::vector<LocalSystemVectorType> Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::mFirstDerivsResponseGradient
protected

◆ mLeftHandSide

template<class TSparseSpace , class TDenseSpace >
std::vector<LocalSystemMatrixType> Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::mLeftHandSide
protected

◆ mpResponseFunction

template<class TSparseSpace , class TDenseSpace >
AdjointResponseFunction::Pointer Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::mpResponseFunction
protected

◆ mResponseGradient

template<class TSparseSpace , class TDenseSpace >
std::vector<LocalSystemVectorType> Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::mResponseGradient
protected

◆ mSecondDerivsLHS

template<class TSparseSpace , class TDenseSpace >
std::vector<LocalSystemMatrixType> Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::mSecondDerivsLHS
protected

◆ mSecondDerivsResponseGradient

template<class TSparseSpace , class TDenseSpace >
std::vector<LocalSystemVectorType> Kratos::ResidualBasedAdjointBossakScheme< TSparseSpace, TDenseSpace >::mSecondDerivsResponseGradient
protected

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