Skip to content
Snippets Groups Projects
Commit 353e29b5 authored by Oliver Sander's avatar Oliver Sander Committed by sander@PCPOOL.MI.FU-BERLIN.DE
Browse files

bugfix in computeEnergy()

[[Imported from SVN: r1086]]
parent 602eee75
No related branches found
No related tags found
No related merge requests found
...@@ -663,7 +663,7 @@ computeEnergy(const std::vector<Configuration>& sol) const ...@@ -663,7 +663,7 @@ computeEnergy(const std::vector<Configuration>& sol) const
FieldVector<double,blocksize> referenceStrain = getStrain(referenceConfiguration_, it, quadPos); FieldVector<double,blocksize> referenceStrain = getStrain(referenceConfiguration_, it, quadPos);
for (int i=0; i<3; i++) for (int i=0; i<3; i++)
energy += weight * 0.5 * A_[i] * (strain[i] - referenceStrain[i]) * (strain[i] * referenceStrain[i]); energy += weight * 0.5 * A_[i] * (strain[i] - referenceStrain[i]) * (strain[i] - referenceStrain[i]);
} }
...@@ -685,7 +685,7 @@ computeEnergy(const std::vector<Configuration>& sol) const ...@@ -685,7 +685,7 @@ computeEnergy(const std::vector<Configuration>& sol) const
// Part II: the bending and twisting energy // Part II: the bending and twisting energy
for (int i=0; i<3; i++) for (int i=0; i<3; i++)
energy += weight * 0.5 * K_[i] * (strain[i+3] - referenceStrain[i+3]) * (strain[i+3] * referenceStrain[i+3]); energy += weight * 0.5 * K_[i] * (strain[i+3] - referenceStrain[i+3]) * (strain[i+3] - referenceStrain[i+3]);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment