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

createFields dimensionedVector deprecated?

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 2 Post By gentodin
  • 1 Post By rarnaunot

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 5, 2021, 20:41
Default createFields dimensionedVector deprecated?
  #1
Member
 
Anonymous.
Join Date: Sep 2020
Posts: 35
Rep Power: 5
gentodin is on a distinguished road
Hi all,

I am currently using OFv2006 and is trying to declare a new vector in createFields.H

I used the following code:
Info<< "Reading the laser beam heat source\n" <<endl;
IOdictionary beamProperties
(
IOobject
(
"beamProperties",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
)
);

dimensionedVector Ulaser
(
"Ulaser",
dimensionSet(0,1,-1,0,0,0,0),
beamProperties //.lookup("Ulaser")
);

But the error of the following came out:
"warning: ‘Foam::dimensioned<Type>::dimensioned(const Foam::word&, const Foam::dimensionSet&, Foam::Istream&) [with Type = Foam::Vector<double>]’ is deprecated: Since 2018-11 [-Wdeprecated-declarations]
);"

I think it is deprecated since 2018 version of OF. I am wondering where I can find the new way to declare a vector.

Does anyone know the proper way to do it?
rarnaunot and kuangBaoYeZhu like this.
gentodin is offline   Reply With Quote

Old   February 21, 2022, 07:39
Default Same problem
  #2
Member
 
Rosario Arnau
Join Date: Feb 2017
Location: Spain
Posts: 57
Rep Power: 9
rarnaunot is on a distinguished road
Hi gentodin,

I'm facing the same problem. How did you fix this?

Tanks a lot!
Zitzeronion likes this.
rarnaunot 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
meaning of two mesh key in createFields AmirBaqa1987 OpenFOAM Programming & Development 1 June 22, 2013 12:03
createfields C7H16 viv05 OpenFOAM 5 August 7, 2009 01:23
Propellerfanrotating machinery clo OpenFOAM Running, Solving & CFD 7 January 30, 2007 12:48


All times are GMT -4. The time now is 09:54.