Skip to content

Commit a2fa763

Browse files
committed
fixes from Taruns Review
1 parent 390f2e1 commit a2fa763

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ SPDX-License-Identifier: LGPL-3.0-or-later
4747
- The assembler bindings now also accept affordances and `DBCOption`, and they are also renamed to simply `matrix`, `vector`
4848
and `scalar`.
4949
- The assemblers also export the binding functions to bind the assemblers.
50-
- Rework Python Interface for `DirichletValues` plus adding support to easily fix boundary DOFs of subspacebasis in C++ and Python ([#305](https://github.com/ikarus-project/ikarus/pull/305))
50+
- Rework the Python Interface for `DirichletValues` plus add support to easily fix boundary DOFs of `Subspacebasis` in C++ and Python ([#305](https://github.com/ikarus-project/ikarus/pull/305))
5151

5252
## Release v0.4 (Ganymede)
5353

docs/website/01_framework/dirichletBCs.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,25 @@ The interface of `#!cpp Ikarus::DirichletValues` is represented by the following
2424
Ikarus::DirichletValues dirichletValues2(basis); // (1)!
2525
void fixBoundaryDOFs(f); // (2)!
2626
void fixDOFs(f); // (3)!
27-
void setSingleDOF(i, bool flag); // (4)!
27+
void setSingleDOF(i, flag); // (4)!
2828
const auto& basis() const; // (5)!
29-
bool isConstrained(std::size_t i) const; // (6)!
29+
bool isConstrained(i) const; // (6)!
3030
auto fixedDOFsize() const; // (7)!
3131
auto size() const ; // (8)!
3232
auto reset(); // (9)!
3333
```
3434
3535
1. Create class by inserting a global basis, [@sander2020dune] Chapter 10.
36-
2. Accepts a functor to fix boundary degrees of freedom. `f` is a functor that will be called with the boolean vector of fixed boundary.
36+
2. Accepts a functor to fix boundary degrees of freedom. `f` is a functor that will be called with the Boolean vector of fixed boundary.
3737
degrees of freedom and the usual arguments of `Dune::Functions::forEachBoundaryDOF`, as defined on page 388 of the Dune
3838
[@sander2020dune] book.
39-
3. A more general version of `fixBoundaryDOFs`. Here, a functor is to be provided that accepts a basis and the corresponding boolean
39+
3. A more general version of `fixBoundaryDOFs`. Here, a functor is to be provided that accepts a basis and the corresponding Boolean
4040
4. A function that helps to fix or unfix the $i$-th degree of freedom
4141
vector considering the Dirichlet degrees of freedom.
4242
5. Returns the underlying basis.
43-
6. Indicates whether the degree of freedom `i` is fixed.
43+
6. Indicates whether the degree of freedom $i$ is fixed.
4444
7. Returns the number of fixed degrees of freedom.
45-
8. Returns the number of all dirichlet degrees of freedom.
45+
8. Returns the number of all Dirichlet degrees of freedom.
4646
9. Resets the whole container
4747
4848
\bibliography

ikarus/python/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ dune_python_add_test(
3838
NAME
3939
pydirichletvalues
4040
SCRIPT
41-
testdirichletvalues.py
41+
dirichletvaluetest.py
4242
WORKING_DIRECTORY
4343
${CMAKE_CURRENT_SOURCE_DIR}
4444
LABELS

ikarus/utils/dirichletvalues.hh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ public:
8787
f(dirichletFlagsBackend_, localIndex, localView, intersection);
8888
};
8989
Dune::Functions::forEachBoundaryDOF(subspaceBasis(basis_, std::forward<TreePath>(treePath)), lambda);
90+
} else {
91+
static_assert(Dune::AlwaysFalse<F>(), "fixBoundaryDOFs: A function with this signature is not supported");
9092
}
9193
}
9294

@@ -104,7 +106,7 @@ public:
104106
}
105107

106108
/**
107-
* \brief Fixes (set boolean value to true) a specific degree of freedom
109+
* \brief Fixes and unfixes (set boolean value to true or false) a specific degree of freedom
108110
*
109111
* \param i An index indicating the DOF number to be fixed
110112
* \param flag Boolean indicating whether the DOF should fixed or not
@@ -116,7 +118,7 @@ public:
116118
}
117119

118120
/**
119-
* \brief Fixes (set boolean value to true) a specific degree of freedom
121+
* \brief Fixes or unfixes (set boolean value to true or flase) a specific degree of freedom
120122
*
121123
* \param i An index indicating the DOF number to be fixed
122124
* \param flag Boolean indicating whether the DOF should fixed or not

0 commit comments

Comments
 (0)