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

How to initialize zero vectorField?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 10, 2024, 08:37
Exclamation How to initialize zero vectorField?
  #1
New Member
 
S03r3n
Join Date: Feb 2024
Posts: 6
Rep Power: 2
S03r3n is on a distinguished road
Hello together,

how can I initialize a vectorField with only zero values?
The following command does not work for me:

const vectorField abc=vectorField::zero;

Thanks in advance!

Best regards
S03r3n is offline   Reply With Quote

Old   April 11, 2024, 02:46
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,689
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by S03r3n View Post
Hello together,

how can I initialize a vectorField with only zero values?
The following command does not work for me:

const vectorField abc=vectorField::zero;

Thanks in advance!

Best regards

Odd. How can you initialize a vectorField without any size????
The following would work, but this is also clear from the documentation:
Code:
label len = ...;

vectorField abc(len, Zero);
olesen is offline   Reply With Quote

Reply

Tags
vectorfield


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
loading fluent data and turbo initialize in CFD post shohag FLUENT 0 June 29, 2020 20:26
using codestream to initialize internal velocity shaoyx OpenFOAM Pre-Processing 2 February 25, 2020 17:23
Subtract number from every value in vectorField ali.m.1 OpenFOAM Programming & Development 0 October 16, 2017 12:21
power of vectorField matthias OpenFOAM Programming & Development 0 August 19, 2014 08:52
scalar points to vectorField deji OpenFOAM 2 January 26, 2012 12:28


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