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

Do not scale the density functions with the thickness to avoid confusion

parent 59603290
No related branches found
No related tags found
2 merge requests!118Correct the dimension of the rotation and the deformation in the...,!110Experiments with the sphere
# Master
- Do not scale the density functions with the thickness to avoid confusion
since some densities need to be scaled and some do not need to be scaled
with the thickness depending on the dimension of the grid, their direction
and their kind (Neumann or volume load).
- Fix bug in the `RealTuple::log` method: Calling `log(a,b)`returned `a-b`
instead of `b-a`.
......
......@@ -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 += (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 += (neumannValue[i] * value.r[i]) * quad[pt].weight() * integrationElement;
}
......@@ -544,7 +544,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] * deformationValue.globalCoordinates()[i]) * quad[pt].weight() * integrationElement;
energy += (neumannValue[i] * deformationValue.globalCoordinates()[i]) * quad[pt].weight() * integrationElement;
}
......
......@@ -332,7 +332,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 += (volumeLoadDensity[i] * value.r[i]) * quad[pt].weight() * integrationElement;
}
......@@ -365,7 +365,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 += (neumannValue[i] * value.r[i]) * quad[pt].weight() * integrationElement;
}
}
......
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