CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Store indexedOctrees in List for reuse

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 24, 2016, 04:53
Default Store indexedOctrees in List for reuse
  #1
Member
 
David GISEN
Join Date: Jul 2009
Location: Germany
Posts: 68
Rep Power: 16
David* is on a distinguished road
Hi,

I have a loop which searches for intersections of arbitrary vectors with my boundaries (Patches) using indexedOctrees.
Code:
pointIndexHit pHit = octree1.findLine(outsideP, insideP);
To save computation time, I want to create the indexedOctrees needed for every patch outside the loop and store them.

Problem: I can't manage to create a List. This code
Code:
Foam::List<indexedOctree<treeDataFace>> octreeList1;
forAll(patches, patchI)
{
    const polyPatch& polyPatch1 = patches[patchI].patch();
    treeBoundBox allBoundingBox(polyPatch1.points());

    const indexedOctree<treeDataFace> octree1
    (
        treeDataFace(false, polyPatch1),
        allBoundingBox, // overall search domain
        8,      // maxLevel
        10,     // leafsize
        3.0     // duplicity
    );

    octreeList1.append(octree1);
}
results in
Code:
error: no default constructor exists for class "Foam::indexedOctree<Foam::treeDataFace>
Do I need to add a default constructor to the indexedOctree class? Or is there a simpler way of doing what I want?

Thanks,
David
David* is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[swak4Foam] funkyDoCalc with OF2.3 massflow NiFl OpenFOAM Community Contributions 14 November 25, 2020 03:30
[Other] How to use finite area method in official OpenFOAM 2.2.0? Detian Liu OpenFOAM Meshing & Mesh Conversion 4 November 3, 2015 03:04
[foam-extend.org] problem when installing foam-extend-1.6 Thomas pan OpenFOAM Installation 7 September 9, 2015 21:53
[swak4Foam] build problem swak4Foam OF 2.2.0 mcathela OpenFOAM Community Contributions 14 April 23, 2013 13:59
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51


All times are GMT -4. The time now is 23:45.