Commit fe01c4dd authored by Sander, Oliver's avatar Sander, Oliver
Browse files

Remove computation of the nodal weights

I don't see them used anywhere.
parent 27abd167
Pipeline #8799 passed with stage
in 3 minutes and 56 seconds
......@@ -25,7 +25,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>
......@@ -503,24 +502,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
//////////////////////////////////////////////////////////////
......@@ -533,6 +514,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;
......@@ -636,12 +618,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