# CalculateLeftHandSide

From KratosWiki

(Difference between revisions)

(4 intermediate revisions by one user not shown) | |||

Line 1: | Line 1: | ||

void LinearElement::CalculateLeftHandSide(MatrixType& rLeftHandSideMatrix, ProcessInfo& rCurrentProcessInfo) | void LinearElement::CalculateLeftHandSide(MatrixType& rLeftHandSideMatrix, ProcessInfo& rCurrentProcessInfo) | ||

− | + | { | |

− | + | ||

bool CalculateStiffnessMatrixFlag = true; | bool CalculateStiffnessMatrixFlag = true; | ||

bool CalculateResidualVectorFlag = false; | bool CalculateResidualVectorFlag = false; | ||

Line 8: | Line 8: | ||

} | } | ||

+ | |||

+ | the other available function is | ||

+ | virtual void CalculateLeftHandSide(VectorType& rLeftHandSideVector, ProcessInfo& rCurrentProcessInfo) | ||

+ | { | ||

+ | if(rLeftHandSideVector.size()!=0) | ||

+ | rLeftHandSideVector.resize(0); | ||

+ | } | ||

+ | As it is clear in the first one [[LHS]] is a matrix and in the second one is a vector | ||

+ | |||

+ | |||

+ | [[Category:C++ Code]] |

## Latest revision as of 19:14, 1 November 2008

void LinearElement::CalculateLeftHandSide(MatrixType& rLeftHandSideMatrix, ProcessInfo& rCurrentProcessInfo) { bool CalculateStiffnessMatrixFlag = true; bool CalculateResidualVectorFlag = false; Vector temp = Vector(); CalculateAll(rLeftHandSideMatrix, temp, rCurrentProcessInfo, CalculateStiffnessMatrixFlag, CalculateResidualVectorFlag); }

the other available function is

virtual void CalculateLeftHandSide(VectorType& rLeftHandSideVector, ProcessInfo& rCurrentProcessInfo) { if(rLeftHandSideVector.size()!=0) rLeftHandSideVector.resize(0); }

As it is clear in the first one LHS is a matrix and in the second one is a vector