Skip to content

Commit

Permalink
fixes from Taruns Review
Browse files Browse the repository at this point in the history
  • Loading branch information
henrij22 committed Jul 18, 2024
1 parent 390f2e1 commit a2fa763
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ SPDX-License-Identifier: LGPL-3.0-or-later
- The assembler bindings now also accept affordances and `DBCOption`, and they are also renamed to simply `matrix`, `vector`
and `scalar`.
- The assemblers also export the binding functions to bind the assemblers.
- 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))
- 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))

## Release v0.4 (Ganymede)

Expand Down
12 changes: 6 additions & 6 deletions docs/website/01_framework/dirichletBCs.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,25 @@ The interface of `#!cpp Ikarus::DirichletValues` is represented by the following
Ikarus::DirichletValues dirichletValues2(basis); // (1)!
void fixBoundaryDOFs(f); // (2)!
void fixDOFs(f); // (3)!
void setSingleDOF(i, bool flag); // (4)!
void setSingleDOF(i, flag); // (4)!
const auto& basis() const; // (5)!
bool isConstrained(std::size_t i) const; // (6)!
bool isConstrained(i) const; // (6)!
auto fixedDOFsize() const; // (7)!
auto size() const ; // (8)!
auto reset(); // (9)!
```
1. Create class by inserting a global basis, [@sander2020dune] Chapter 10.
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.
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.
degrees of freedom and the usual arguments of `Dune::Functions::forEachBoundaryDOF`, as defined on page 388 of the Dune
[@sander2020dune] book.
3. A more general version of `fixBoundaryDOFs`. Here, a functor is to be provided that accepts a basis and the corresponding boolean
3. A more general version of `fixBoundaryDOFs`. Here, a functor is to be provided that accepts a basis and the corresponding Boolean
4. A function that helps to fix or unfix the $i$-th degree of freedom
vector considering the Dirichlet degrees of freedom.
5. Returns the underlying basis.
6. Indicates whether the degree of freedom `i` is fixed.
6. Indicates whether the degree of freedom $i$ is fixed.
7. Returns the number of fixed degrees of freedom.
8. Returns the number of all dirichlet degrees of freedom.
8. Returns the number of all Dirichlet degrees of freedom.
9. Resets the whole container
\bibliography
2 changes: 1 addition & 1 deletion ikarus/python/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ dune_python_add_test(
NAME
pydirichletvalues
SCRIPT
testdirichletvalues.py
dirichletvaluetest.py
WORKING_DIRECTORY
${CMAKE_CURRENT_SOURCE_DIR}
LABELS
Expand Down
File renamed without changes.
6 changes: 4 additions & 2 deletions ikarus/utils/dirichletvalues.hh
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ public:
f(dirichletFlagsBackend_, localIndex, localView, intersection);
};
Dune::Functions::forEachBoundaryDOF(subspaceBasis(basis_, std::forward<TreePath>(treePath)), lambda);
} else {
static_assert(Dune::AlwaysFalse<F>(), "fixBoundaryDOFs: A function with this signature is not supported");
}
}

Expand All @@ -104,7 +106,7 @@ public:
}

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

/**
* \brief Fixes (set boolean value to true) a specific degree of freedom
* \brief Fixes or unfixes (set boolean value to true or flase) a specific degree of freedom

Check failure on line 121 in ikarus/utils/dirichletvalues.hh

View workflow job for this annotation

GitHub Actions / Check for spelling errors

flase ==> false, flake, flame, flare, flash, flask
*
* \param i An index indicating the DOF number to be fixed
* \param flag Boolean indicating whether the DOF should fixed or not
Expand Down

0 comments on commit a2fa763

Please sign in to comment.