Skip to content
Snippets Groups Projects
Commit 5feeabd1 authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

Clean up/comment nodal basis and elastic assembly

parent f46f3e1e
No related branches found
No related tags found
No related merge requests found
...@@ -162,20 +162,17 @@ int main() { ...@@ -162,20 +162,17 @@ int main() {
0); // zero overlap (whatever that is) 0); // zero overlap (whatever that is)
grid.globalRefine(refinements); grid.globalRefine(refinements);
// Set up nodal basis
typedef P1NodalBasis<GridType::LeafGridView, double> P1Basis; typedef P1NodalBasis<GridType::LeafGridView, double> P1Basis;
P1Basis const p1Basis(grid.leafView()); P1Basis const p1Basis(grid.leafView());
OperatorAssembler<P1Basis, P1Basis> const globalAssembler(p1Basis, p1Basis); // Assemble elastic force on the body
StVenantKirchhoffAssembler<GridType, P1Basis::LocalFiniteElement, StVenantKirchhoffAssembler<GridType, P1Basis::LocalFiniteElement,
P1Basis::LocalFiniteElement> const P1Basis::LocalFiniteElement> const
localStiffness(E, nu); localStiffness(E, nu);
OperatorType stiffnessMatrix; OperatorType stiffnessMatrix;
globalAssembler.assemble(localStiffness, stiffnessMatrix); OperatorAssembler<P1Basis, P1Basis>(p1Basis, p1Basis)
.assemble(localStiffness, stiffnessMatrix);
// Filled in some block
VectorType f(grid.size(grid.maxLevel(), dim));
Dune::BitSetVector<dim> ignoreNodes(grid.size(grid.maxLevel(), dim), false); Dune::BitSetVector<dim> ignoreNodes(grid.size(grid.maxLevel(), dim), false);
Dune::BitSetVector<1> neumannNodes(grid.size(grid.maxLevel(), dim), false); Dune::BitSetVector<1> neumannNodes(grid.size(grid.maxLevel(), dim), false);
...@@ -198,6 +195,7 @@ int main() { ...@@ -198,6 +195,7 @@ int main() {
normalStress.resize(grid.size(grid.maxLevel(), dim)); normalStress.resize(grid.size(grid.maxLevel(), dim));
std::fill(normalStress.begin(), normalStress.end(), 0.0); std::fill(normalStress.begin(), normalStress.end(), 0.0);
VectorType f(grid.size(grid.maxLevel(), dim));
assemble_neumann<GridType, SmallVector, P1Basis>(grid, p1Basis, assemble_neumann<GridType, SmallVector, P1Basis>(grid, p1Basis,
neumannNodes, f); neumannNodes, f);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment