|
[Sponsors] |
February 10, 2016, 02:51 |
assign 0 to a List of scalarField
|
#1 |
Member
Join Date: Jul 2010
Posts: 55
Rep Power: 16 |
Hi All,
I am trying to modify the force functionObject (force.C). There I need to calculate an integral of scalar field over a surface. In force.H I defined the following line: Code:
List<Field<vector> > force_; List<Field<vector> > moment_; List<Field<scalar> > SubSurface_; Code:
force_[0] = vector::zero; force_[1] = vector::zero; force_[2] = vector::zero; moment_[0] = vector::zero; moment_[1] = vector::zero; moment_[2] = vector::zero; SubSurface_ = 0.0; Code:
subforces/subforces.C:757:19: error: no match for ‘operator=’ in ‘((Foam::subforces*)this)->Foam::subforces::SubSurface_ = 0.0’ subforces/subforces.C:757:19: note: candidates are: /media/Data/OpenFOAM/OpenFOAM-3.0.x/src/OpenFOAM/lnInclude/List.C:429:6: note: void Foam::List<T>::operator=(const Foam::UList<T>&) [with T = Foam::Field<double>] /media/Data/OpenFOAM/OpenFOAM-3.0.x/src/OpenFOAM/lnInclude/List.C:429:6: note: no known conversion for argument 1 from ‘double’ to ‘const Foam::UList<Foam::Field<double> >&’ /media/Data/OpenFOAM/OpenFOAM-3.0.x/src/OpenFOAM/lnInclude/List.C:461:6: note: void Foam::List<T>::operator=(const Foam::List<T>&) [with T = Foam::Field<double>] /media/Data/OpenFOAM/OpenFOAM-3.0.x/src/OpenFOAM/lnInclude/List.C:461:6: note: no known conversion for argument 1 from ‘double’ to ‘const Foam::List<Foam::Field<double> >&’ /media/Data/OpenFOAM/OpenFOAM-3.0.x/src/OpenFOAM/lnInclude/List.C:476:6: note: void Foam::List<T>::operator=(const Foam::SLList<T>&) [with T = Foam::Field<double>] /media/Data/OpenFOAM/OpenFOAM-3.0.x/src/OpenFOAM/lnInclude/List.C:476:6: note: no known conversion for argument 1 from ‘double’ to ‘const Foam::SLList<Foam::Field<double> >&’ /media/Data/OpenFOAM/OpenFOAM-3.0.x/src/OpenFOAM/lnInclude/List.C:504:6: note: void Foam::List<T>::operator=(const Foam::UIndirectList<T>&) [with T = Foam::Field<double>] /media/Data/OpenFOAM/OpenFOAM-3.0.x/src/OpenFOAM/lnInclude/List.C:504:6: note: no known conversion for argument 1 from ‘double’ to ‘const Foam::UIndirectList<Foam::Field<double> >&’ /media/Data/OpenFOAM/OpenFOAM-3.0.x/src/OpenFOAM/lnInclude/List.C:523:6: note: void Foam::List<T>::operator=(const Foam::BiIndirectList<T>&) [with T = Foam::Field<double>] /media/Data/OpenFOAM/OpenFOAM-3.0.x/src/OpenFOAM/lnInclude/List.C:523:6: note: no known conversion for argument 1 from ‘double’ to ‘const Foam::BiIndirectList<Foam::Field<double> >&’ /media/Data/OpenFOAM/OpenFOAM-3.0.x/src/OpenFOAM/lnInclude/ListI.H:140:13: note: void Foam::List<T>::operator=(const T&) [with T = Foam::Field<double>] /media/Data/OpenFOAM/OpenFOAM-3.0.x/src/OpenFOAM/lnInclude/ListI.H:140:13: note: no known conversion for argument 1 from ‘double’ to ‘const Foam::Field<double>&’ Code:
SubSurface_ = 0.0; Many thank in advance Ashkan |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] funkyDoCalc with OF2.3 massflow | NiFl | OpenFOAM Community Contributions | 14 | November 25, 2020 04:30 |
[Other] How to use finite area method in official OpenFOAM 2.2.0? | Detian Liu | OpenFOAM Meshing & Mesh Conversion | 4 | November 3, 2015 04:04 |
[foam-extend.org] problem when installing foam-extend-1.6 | Thomas pan | OpenFOAM Installation | 7 | September 9, 2015 22:53 |
[swak4Foam] build problem swak4Foam OF 2.2.0 | mcathela | OpenFOAM Community Contributions | 14 | April 23, 2013 14:59 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 18:51 |