From 2bcbae122b141147e472bdbbad219c3571f71d0b Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Tue, 16 Oct 2018 12:44:24 +0200 Subject: Implement moving wall / velocity Dirichlet boundary condition Usable as both the inflow condition of the channel example and the top wall of a lid driven cavity. --- src/vector.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/vector.h') diff --git a/src/vector.h b/src/vector.h index 5e105c4..839707f 100644 --- a/src/vector.h +++ b/src/vector.h @@ -52,6 +52,11 @@ Vector operator*(T scalar, const Vector& v) { }; } +template +decltype(T{}*W{}) operator*(const Vector& a, const Vector& b) { + return a[0]*b[0] + a[1]*b[1]; +} + template Vector operator-(const Vector& a, const Vector& b) { return Vector{ -- cgit v1.2.3