Skip to content
Snippets Groups Projects
Commit 522f9cb2 authored by Lisa Julia Nebel's avatar Lisa Julia Nebel
Browse files

Correct the sign of the Neumann and volume forces to make it consistent...

Correct the sign of the Neumann and volume forces to make it consistent throughout dune-gfe and dune-elasticity

In the energy file, the energies are *added*.
The Neumann and volume forces get the correct sign in the actual program file by mulitplying with (-homotopyParameter).
parent 62454631
No related branches found
No related tags found
1 merge request!84Correct the sign of the Neumann and volume forces to make it consistent...
......@@ -371,7 +371,7 @@ energy(const typename Basis::LocalView& localView,
// Only translational dofs are affected by the volume load
for (size_t i=0; i<volumeLoadDensity.size(); i++)
energy -= thickness_ * (volumeLoadDensity[i] * value.r[i]) * quad[pt].weight() * integrationElement;
energy += thickness_ * (volumeLoadDensity[i] * value.r[i]) * quad[pt].weight() * integrationElement;
}
......@@ -405,7 +405,7 @@ energy(const typename Basis::LocalView& localView,
// Only translational dofs are affected by the Neumann force
for (size_t i=0; i<neumannValue.size(); i++)
energy -= thickness_ * (neumannValue[i] * value.r[i]) * quad[pt].weight() * integrationElement;
energy += thickness_ * (neumannValue[i] * value.r[i]) * quad[pt].weight() * integrationElement;
}
......
......@@ -334,7 +334,7 @@ energy(const typename Basis::LocalView& localView,
// Only translational dofs are affected by the volume load
for (size_t i=0; i<volumeLoadDensity.size(); i++)
energy -= thickness_ * (volumeLoadDensity[i] * value.r[i]) * quad[pt].weight() * integrationElement;
energy += thickness_ * (volumeLoadDensity[i] * value.r[i]) * quad[pt].weight() * integrationElement;
}
......@@ -367,7 +367,7 @@ energy(const typename Basis::LocalView& localView,
// Only translational dofs are affected by the Neumann force
for (size_t i=0; i<neumannValue.size(); i++)
energy -= thickness_ * (neumannValue[i] * value.r[i]) * quad[pt].weight() * integrationElement;
energy += thickness_ * (neumannValue[i] * value.r[i]) * quad[pt].weight() * integrationElement;
}
}
......
......@@ -398,7 +398,7 @@ int main (int argc, char *argv[]) try
auto neumannFunction = [&]( FieldVector<double,dimworld> ) {
auto nV = neumannValues;
nV *= homotopyParameter;
nV *= (-homotopyParameter);
return nV;
};
......@@ -408,7 +408,7 @@ int main (int argc, char *argv[]) try
auto volumeLoad = [&]( FieldVector<double,dimworld>) {
auto vL = volumeLoadValues;
vL *= homotopyParameter;
vL *= (-homotopyParameter);
return vL;
};
......
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