Commit 52c585ff authored by Sander, Oliver's avatar Sander, Oliver
Browse files

Merge branch 'remove-unused-nodal-weights' into 'master'

Remove computation of the nodal weights

See merge request !55
parents a7a97ac9 fe01c4dd
Pipeline #8862 passed with stage
in 4 minutes and 3 seconds
......@@ -27,7 +27,6 @@
#include <dune/functions/functionspacebases/subspacebasis.hh>
#include <dune/functions/functionspacebases/interpolate.hh>
#include <dune/functions/functionspacebases/transformedindexbasis.hh>
#include <dune/functions/gridfunctions/analyticgridviewfunction.hh>
#include <dune/functions/gridfunctions/discreteglobalbasisfunction.hh>
#include <dune/fufem/functions/localbasisderivativefunction.hh>
......@@ -505,24 +504,6 @@ int main (int argc, char *argv[]) try
energyNormAssembler.assembleBulk(Fufem::istlMatrixBackend(energyNormMatrix),
localEnergyNormAssembler);
//////////////////////////////////////////////////////////////////////////////////
// Compute a vector that contains a the integrals over each shape function
//////////////////////////////////////////////////////////////////////////////////
auto scalarBasis = makeBasis(grid->leafGridView(), lagrange<1>());
using ScalarLocalFE = decltype(scalarBasis)::LocalView::Tree::FiniteElement;
auto constantOne = Functions::makeAnalyticGridViewFunction([](auto x){return 1.0;}, gridView);
auto nodalWeightsAssembler = Fufem::makeDuneFunctionsL2FunctionalAssembler<GridView,ScalarLocalFE>(constantOne,
QuadratureRuleKey(dim,0));
BlockVector<double> nodalWeights;
auto damageFunctionalAssembler = Fufem::DuneFunctionsFunctionalAssembler(scalarBasis);
damageFunctionalAssembler.assembleBulk(Functions::istlVectorBackend(nodalWeights),
nodalWeightsAssembler);
//////////////////////////////////////////////////////////////
// Create nonlinear coupling functional
//////////////////////////////////////////////////////////////
......@@ -535,6 +516,7 @@ int main (int argc, char *argv[]) try
static const std::size_t quadOrder=2;
// Infrastructure for precomputing things at each quadrature point
auto scalarBasis = makeBasis(grid->leafGridView(), lagrange<1>());
FracturePhasefields::GradientValueJetEvaluator<decltype(scalarBasis)> gradientValueJetEvaluator;
using SmallJet = decltype(gradientValueJetEvaluator)::Jet;
......@@ -642,12 +624,6 @@ int main (int argc, char *argv[]) try
} else
DUNE_THROW(Exception, "linearCorrection has to be 'geometricMultigrid'");
// Hack: for the time being, we need the nodal weights in a vector of the same type as all the other vectors.
// Otherwise, the dissipation functional implementation is not able to correctly restrict the entries.
Vector coefficients(x.size());
for (size_t i=0; i<nodalWeights.size(); i++)
coefficients[i] = nodalWeights[i];
// Define ignore
BitVector ignore;
ignore.resize(dirichletNodes.size());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment