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

create a new field inside a tmp<class> member function

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 29, 2015, 04:39
Default create a new field inside a tmp<class> member function
  #1
Member
 
Join Date: Apr 2015
Location: EU
Posts: 38
Rep Power: 11
roadRunner is on a distinguished road
Hello,
I want to create a new field inside tmp<volVectorField> class::func()
assign it to existing vector field, do some operations on it end return the result.

So far, I was unable to do this, or figure out how to do it. I can create a new field, and assign a value. And after that I can only return it, and not access it again. example:
tmp<class> func() const {
return (
new class("Name", a + b)
);
}

Where I would like to do some other operations on Name before I return it.
Is that a silly thing to do?
Thanks for reading
__________________
beep-beep
roadRunner 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
channelFoam for a 3D pipe AlmostSurelyRob OpenFOAM 3 June 24, 2011 13:06
Help creating a field function to create a sine pressure wave Pleb STAR-CCM+ 2 February 17, 2011 12:16
Compilation errors in ThirdPartymallochoard feng_w OpenFOAM Installation 1 January 25, 2009 06:59
Can anybody help me to solve the list errors while compiling Openfoam 15 on Opensuse 103 32bit coompressor OpenFOAM Installation 0 November 12, 2008 19:53
[OpenFOAM] Could you please help me liugx212 ParaView 4 December 22, 2005 16:55


All times are GMT -4. The time now is 06:18.