CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Programming & Development

Division: volScalarField1 : volScalarField2

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   March 14, 2014, 05:48
Default Division: volScalarField1 : volScalarField2
Senior Member
Join Date: Jan 2012
Posts: 159
Rep Power: 7
maybee is on a distinguished road

I have some code like

ActualPhase -> volScalarFieldNEW() = (ActualPhase -> volScalarField1()) : (ActualPhase -> volScalarField2());
where "ActualPhase" is a pointer to a phase of type "phaseModel" and the methods like "volScalarFieldNEW()" return respective other fields of the phase.

Unfortunately I get the following error for the calculation of the new field:

/home/USER/Solver.H:164: error: expected ‘;’ before ‘:’ token
maybee is offline   Reply With Quote

Old   March 14, 2014, 06:25
Senior Member
Join Date: Jan 2012
Posts: 159
Rep Power: 7
maybee is on a distinguished road
Ok got it,

only had to use "/" instead of ":" which is obviously not defined in this context.

greetings maybee
maybee is offline   Reply With Quote


Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Division by zero exception - loop over scalarField Pat84 OpenFOAM Programming & Development 6 February 18, 2017 06:57
Catching an exception - division by zero. MaLa OpenFOAM Running, Solving & CFD 1 February 16, 2014 12:00
Division of dimensioned scalars Joachim OpenFOAM 5 August 8, 2013 01:53
Suspected division by zero on velocity reported by point probe dahicke STAR-CCM+ 1 July 4, 2013 02:16
runtime error after succ. compilation + vector component division ramhari OpenFOAM Programming & Development 6 May 30, 2011 06:40

All times are GMT -4. The time now is 13:29.