|
[Sponsors] |
defining a protected variable blows the solution |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 27, 2016, 16:09 |
defining a protected variable blows the solution
|
#1 |
Senior Member
Mahdi Hosseinali
Join Date: Apr 2009
Location: NB, Canada
Posts: 273
Rep Power: 18 |
Hi,
I'm trying to develop a boundary condition based on the mappedField boundary condition that already exists. At the very first steps something happens that I can't comprehend it, if anyone can give me any clue I would appreciate it. After copying and renaming, I added a variable to the file mappedPatchFieldBase.H as: Code:
template<class Type> class mappedPatchFieldBase { protected: // Protected data //- Mapping engine const mappedPatchBase& mapper_; //- Underlying patch field const fvPatchField<Type>& patchField_; //- Name of field to sample word fieldName_; word fieldMeanName_; //this is cause of error!!!! //- If true adjust the mapped field to maintain average value average_ const bool setAverage_; //- Average value the mapped field is adjusted to maintain if // setAverage_ is set true const Type average_; //- Interpolation scheme to use for nearestcell mode word interpolationScheme_; Code:
#0 Foam::error::printStack(Foam::Ostream&) in "/usr/local/openfoam-3.0/OpenFOAM-v3.0+/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so" #1 Foam::sigSegv::sigHandler(int) in "/usr/local/openfoam-3.0/OpenFOAM-v3.0+/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so" #2 ? in "/lib64/libc.so.6" #3 std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) in "/usr/local/gcc-4.6.4/lib64/libstdc++.so.6" #4 Foam::mappedTurbFvPatchField<Foam::Vector<double> >::mappedTurbFvPatchField(Foam::mappedTurbFvPatchField<Foam::Vector<double> > const&, Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh> const&) in "/home/mahdih/OpenFOAM/mahdih-v3.0+/platforms/linux64GccDPInt32Opt/lib/libMyBCs.so" #5 Foam::mappedTurbFvPatchField<Foam::Vector<double> >::clone(Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh> const&) const in "/home/mahdih/OpenFOAM/mahdih-v3.0+/platforms/linux64GccDPInt32Opt/lib/libMyBCs.so" #6 Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::GeometricBoundaryField(Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField const&) in "/usr/local/openfoam-3.0/OpenFOAM-v3.0+/platforms/linux64GccDPInt32Opt/bin/pisoFoam" #7 Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&) in "/usr/local/openfoam-3.0/OpenFOAM-v3.0+/platforms/linux64GccDPInt32Opt/bin/pisoFoam" #8 Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::oldTime() const in "/usr/local/openfoam-3.0/OpenFOAM-v3.0+/platforms/linux64GccDPInt32Opt/bin/pisoFoam" #9 Foam::fv::backwardDdtScheme<Foam::Vector<double> >::fvmDdt(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&) in "/usr/local/openfoam-3.0/OpenFOAM-v3.0+/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so" #10 ? at pisoFoam.C:0 #11 ? in "/usr/local/openfoam-3.0/OpenFOAM-v3.0+/platforms/linux64GccDPInt32Opt/bin/pisoFoam" #12 __libc_start_main in "/lib64/libc.so.6" #13 __gxx_personality_v0 in "/usr/local/openfoam-3.0/OpenFOAM-v3.0+/platforms/linux64GccDPInt32Opt/bin/pisoFoam" Segmentation fault (core dumped) Though this is not causing any error now but I'm just baffled by what's happening and would appreciate any input. |
|
June 28, 2016, 15:39 |
|
#2 |
Senior Member
Hassan Kassem
Join Date: May 2010
Location: Germany
Posts: 242
Rep Power: 18 |
Have you updated .C file?
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CFL Condition | Matt Umbel | Main CFD Forum | 19 | June 30, 2020 09:20 |
Filtering DNS solutions Vs projecting filtered DNS solution | juliom | Main CFD Forum | 5 | May 19, 2016 17:06 |
[OpenFOAM] error in 0 folder by defining a variable in another place | immortality | ParaView | 0 | August 13, 2013 02:51 |
help, solution blows up! | noName | Main CFD Forum | 3 | May 10, 2005 02:26 |
Wall functions | Abhijit Tilak | Main CFD Forum | 6 | February 5, 1999 02:16 |