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

Where and how to create additional, temporary scalarFields?

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   December 6, 2023, 16:10
Default Where and how to create additional, temporary scalarFields?
  #1
Senior Member
 
Klaus
Join Date: Mar 2009
Posts: 250
Rep Power: 22
klausb will become famous soon enough
I need additional, temporary scalarFields of the same sizes and data types as diag() and lower() to store intermediate values during the creation of a custom preconditioner.

The sizes should be:
Code:
const label nCells = rD_.size(); // for the scalarFields like diag()
     const label nFaces = solver_.matrix().upper().size(); // for the scalarFields similar to lower()
Where and how should I create additional, temporary scalarFields considering, that they will be used in every timestep?
klausb is offline   Reply With Quote

 


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



All times are GMT -4. The time now is 11:49.