Skip to content
Snippets Groups Projects
Commit 888262c8 authored by Jonathan Youett's avatar Jonathan Youett
Browse files

Rename member from A/f to A_/f_ and make compile

parent 8ef2dcbc
No related branches found
No related tags found
No related merge requests found
...@@ -10,17 +10,17 @@ void NonlinearElasticityProblem<VectorType, MatrixType, Basis>::assembleQP(const ...@@ -10,17 +10,17 @@ void NonlinearElasticityProblem<VectorType, MatrixType, Basis>::assembleQP(const
const Basis& basis = material_->basis(); const Basis& basis = material_->basis();
GridFunctionPtr displace = std::make_shared<BasisGridFunction<Basis,VectorType> >(basis,iterate);A GridFunctionPtr displace = std::make_shared<BasisGridFunction<Basis,VectorType> >(basis,iterate);
// assemble quadratic term // assemble quadratic term
OperatorAssembler<Basis,Basis> globalAssembler(basis,basis); OperatorAssembler<Basis,Basis> globalAssembler(basis,basis);
globalAssembler.assemble(material_->secondDerivative(displace), A); globalAssembler.assemble(material_->secondDerivative(displace), A_);
// assemble linear term // assemble linear term
FunctionalAssembler<Basis> funcAssembler(basis); FunctionalAssembler<Basis> funcAssembler(basis);
funcAssembler.assemble(material_->firstDerivative(displace), f); funcAssembler.assemble(material_->firstDerivative(displace), f_);
f -= *extForces_; f_ -= *extForces_;
f *= -1; f_ *= -1;
} }
template <class VectorType, class MatrixType, class Basis> template <class VectorType, class MatrixType, class Basis>
...@@ -94,11 +94,11 @@ typename VectorType::field_type NonlinearElasticityProblem<VectorType,MatrixType ...@@ -94,11 +94,11 @@ typename VectorType::field_type NonlinearElasticityProblem<VectorType,MatrixType
template <class VectorType, class MatrixType, class Basis> template <class VectorType, class MatrixType, class Basis>
typename VectorType::field_type NonlinearElasticityProblem<VectorType,MatrixType, Basis>::modelDecrease(const VectorType& correction) const typename VectorType::field_type NonlinearElasticityProblem<VectorType,MatrixType, Basis>::modelDecrease(const VectorType& correction) const
{ {
// the model decrease is simply <f,corr> - 0.5 <corr, H corr> // the model decrease is simply -<f,corr> - 0.5 <corr, H corr>
VectorType tmp(correction.size()); VectorType tmp(correction.size());
A.mv(correction, tmp); A_.mv(correction, tmp);
return (f*correction) - 0.5 * (correction*tmp); return (f_*correction) - 0.5 * (correction*tmp);
} }
......
...@@ -44,9 +44,9 @@ public: ...@@ -44,9 +44,9 @@ public:
field_type modelDecrease(const VectorType& correction) const; field_type modelDecrease(const VectorType& correction) const;
//! The quadratic part //! The quadratic part
MatrixType A; MatrixType A_;
//! The linear functional //! The linear functional
VectorType f; VectorType f_;
private: private:
//! The involved materials //! The involved materials
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment