View Issue Details

IDProjectCategoryView StatusLast Update
0000911OpenFOAMBugpublic2013-07-04 09:55
Reporteruser19Assigned Tohenry  
PrioritynormalSeverityminorReproducibilityN/A
Status resolvedResolutionfixed 
Summary0000911: cmptMultiply() and cmptDivide() for dimensioned arguments declared but never defined
DescriptionThe template functions cmptMultiply() and cmptDivide for dimensioned arguments are declared in dimensionedType.H but never actually defined in dimensionedType.C.
TagsNo tags attached.

Activities

user19

2013-07-04 06:09

 

0001-FIX-Add-implementations-of-cmpt-Multiply-Divide-for-.patch (1,679 bytes)   
From 76cb9be3afbc5495ee60c1259651ad8275eb7f44 Mon Sep 17 00:00:00 2001
From: Michael Wild <themiwi@users.sourceforge.net>
Date: Thu, 4 Jul 2013 07:06:05 +0200
Subject: [PATCH] FIX: Add implementations of cmpt{Multiply,Divide} for
 dimensioned arguments

Fixes http://www.openfoam.org/mantisbt/view.php?id=911.

Signed-off-by: Michael Wild <themiwi@users.sourceforge.net>
---
 .../dimensionedType/dimensionedType.C              | 32 ++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/src/OpenFOAM/dimensionedTypes/dimensionedType/dimensionedType.C b/src/OpenFOAM/dimensionedTypes/dimensionedType/dimensionedType.C
index b78fbed..1fc286a 100644
--- a/src/OpenFOAM/dimensionedTypes/dimensionedType/dimensionedType.C
+++ b/src/OpenFOAM/dimensionedTypes/dimensionedType/dimensionedType.C
@@ -437,6 +437,38 @@ dimensioned<scalar> mag(const dimensioned<Type>& dt)
 
 
 template<class Type>
+dimensioned<Type> cmptMultiply
+(
+    const dimensioned<Type>& dt1,
+    const dimensioned<Type>& dt2
+)
+{
+    return dimensioned<Type>
+    (
+        "cmptMultiply(" + dt1.name() + ',' + dt2.name() + ')',
+        cmptMultiply(dt1.dimensions(), dt2.dimensions()),
+        cmptMultiply(dt1.value(), dt2.value())
+    );
+}
+
+
+template<class Type>
+dimensioned<Type> cmptDivide
+(
+    const dimensioned<Type>& dt1,
+    const dimensioned<Type>& dt2
+)
+{
+    return dimensioned<Type>
+    (
+        "cmptDivide(" + dt1.name() + ',' + dt2.name() + ')',
+        cmptDivide(dt1.dimensions(), dt2.dimensions()),
+        cmptDivide(dt1.value(), dt2.value())
+    );
+}
+
+
+template<class Type>
 dimensioned<Type> max
 (
     const dimensioned<Type>& dt1,
-- 
1.8.1.2

henry

2013-07-04 09:55

manager   ~0002304

Resolved by commit 119dd43520b61ef7d4c2b4a3c027779ff0526ac1

Issue History

Date Modified Username Field Change
2013-07-04 06:08 user19 New Issue
2013-07-04 06:09 user19 File Added: 0001-FIX-Add-implementations-of-cmpt-Multiply-Divide-for-.patch
2013-07-04 09:55 henry Note Added: 0002304
2013-07-04 09:55 henry Status new => resolved
2013-07-04 09:55 henry Resolution open => fixed
2013-07-04 09:55 henry Assigned To => henry