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

Move 1D boundary assembly into a block

parent 2b3173be
Branches
No related tags found
No related merge requests found
......@@ -158,17 +158,19 @@ int main() {
BoundaryPatch<GridType::LeafGridView> neumannBoundary(grid.leafView(),
neumannNodes);
std::vector<Dune::FieldVector<double, 1>> b;
ConstantFunction<SmallVector, Dune::FieldVector<double, 1>>
constantOneFunction(1);
NeumannBoundaryAssembler<GridType, Dune::FieldVector<double, 1>>
neumannBoundaryAssembler(constantOneFunction);
BoundaryFunctionalAssembler<P1Basis> boundaryFunctionalAssembler(
p1Basis, neumannBoundary);
boundaryFunctionalAssembler.assemble(
neumannBoundaryAssembler, b,
true); // resize the output vector and zero all of its entries
{ // constant 1D function
std::vector<Dune::FieldVector<double, 1>> b;
ConstantFunction<SmallVector, Dune::FieldVector<double, 1>>
constantOneFunction(1);
NeumannBoundaryAssembler<GridType, Dune::FieldVector<double, 1>>
neumannBoundaryAssembler(constantOneFunction);
BoundaryFunctionalAssembler<P1Basis> boundaryFunctionalAssembler(
p1Basis, neumannBoundary);
boundaryFunctionalAssembler.assemble(
neumannBoundaryAssembler, b,
true); // resize the output vector and zero all of its entries
}
}
{ // experiment with convex problems and the like
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment