Skip to content
Snippets Groups Projects

PARMG cleanup, write out deformationfunction to a file, Continue the trustregionsolver with a smaller trustregion radius in case of an exception

Closed lisa_julia.nebel_at_tu-dresden.de requested to merge (removed):master into master
1 unresolved thread
Files
10
@@ -28,6 +28,9 @@ class FEAssembler {
@@ -28,6 +28,9 @@ class FEAssembler {
public:
public:
const Basis basis_;
const Basis basis_;
 
//! Partitions to assemble the Gradient and Hessian, is interiorBorder here, because when doing parallel calculations, the assembled matrix and gradient are treated as if they do not overlap
 
static constexpr auto paritionsOverlap = Dune::Partitions::interiorBorder;
 
protected:
protected:
LocalFEStiffness<GridView,
LocalFEStiffness<GridView,
@@ -70,7 +73,7 @@ getNeighborsPerVertex(Dune::MatrixIndexSet& nb) const
@@ -70,7 +73,7 @@ getNeighborsPerVertex(Dune::MatrixIndexSet& nb) const
nb.resize(n, n);
nb.resize(n, n);
for (const auto& element : elements(basis_.getGridView(), Dune::Partitions::interior))
for (const auto& element : elements(basis_.getGridView(), paritionsOverlap))
{
{
const typename Basis::LocalFiniteElement& lfe = basis_.getLocalFiniteElement(element);
const typename Basis::LocalFiniteElement& lfe = basis_.getLocalFiniteElement(element);
@@ -111,7 +114,7 @@ assembleGradientAndHessian(const VectorType& sol,
@@ -111,7 +114,7 @@ assembleGradientAndHessian(const VectorType& sol,
gradient.resize(sol.size());
gradient.resize(sol.size());
gradient = 0;
gradient = 0;
for (const auto& element : elements(basis_.getGridView(), Dune::Partitions::interior))
for (const auto& element : elements(basis_.getGridView(), paritionsOverlap))
{
{
const int numOfBaseFct = basis_.getLocalFiniteElement(element).localBasis().size();
const int numOfBaseFct = basis_.getLocalFiniteElement(element).localBasis().size();
@@ -159,7 +162,7 @@ computeEnergy(const VectorType& sol) const
@@ -159,7 +162,7 @@ computeEnergy(const VectorType& sol) const
DUNE_THROW(Dune::Exception, "Solution vector doesn't match the basis!");
DUNE_THROW(Dune::Exception, "Solution vector doesn't match the basis!");
// Loop over all elements
// Loop over all elements
for (const auto& element : elements(basis_.getGridView(), Dune::Partitions::interior))
for (const auto& element : elements(basis_.getGridView(), paritionsOverlap))
{
{
// Number of degrees of freedom on this element
// Number of degrees of freedom on this element
size_t nDofs = basis_.getLocalFiniteElement(element).localBasis().size();
size_t nDofs = basis_.getLocalFiniteElement(element).localBasis().size();
Loading