|
[Sponsors] |
why CPtr_ defined as SlicedGeometricField, whereas magSfPtr_ as GeometricField? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 6, 2016, 04:14 |
why CPtr_ defined as SlicedGeometricField, whereas magSfPtr_ as GeometricField?
|
#1 | |
Member
Jerry
Join Date: Oct 2013
Location: Salt Lake City, UT, USA
Posts: 52
Rep Power: 13 |
Hi,
I read the code of fvMesh recently. I got confused about one thing. I realized that its class data attributes like CPtr_ (cell centers), CfPtr_ (face centers) and SfPtr_ (face area vectors) are all defined as slicedGeometricField pointers, but magSfPtr_ (cell surface area magnitude) is defined as a GeometricField pointer. Quote:
|
||
July 6, 2016, 22:02 |
|
#2 | |||
Member
Jerry
Join Date: Oct 2013
Location: Salt Lake City, UT, USA
Posts: 52
Rep Power: 13 |
It seems that I got the answer. It is all because of the way how it handles the slicing for the boundary fields. Below is what I got from the source code.
The complete field is the surface area vector field. The slicing for the boundary is achieved by using the slicedBoundaryField function in the slicedGeometricField constructor. As for why they do it this way, I think it might because the GeometricField class doesn't have a proper constructor so that we can just use a complete field as an argument to generator a GeoemtricField. Though GeometricField class does have a constructor that can take a Field type variable argument, the problem is the field variable used in this constructor must contain the internal field only, the boundary filed should not be included. I think this is the main reason, they have to use slicedGeometricField class here. While for magSfPtr_, it just simply use the magnitude of SfPtr_, which is already a kind of GeometricField. That's why magSfPtr_ is defined as a GeometricField pointer. Any comment is welcomed towards this discussion. Thanks. Quote:
Quote:
Quote:
|
||||
Tags |
geometricfield, slicedgeometricfield |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ICEM] How can I define different zones in ICEM? | llrr | ANSYS Meshing & Geometry | 14 | February 12, 2017 14:44 |
UDF link fortran source | yorelchr | Fluent UDF and Scheme Programming | 0 | February 7, 2013 04:44 |
using METIS functions in fortran | dokeun | Main CFD Forum | 7 | January 29, 2013 05:06 |
GeometricField of a user defined class! | Hisham | OpenFOAM Programming & Development | 7 | October 13, 2011 08:13 |
OpenFOAM static build on Cray XT5 | asaijo | OpenFOAM Installation | 9 | April 6, 2011 13:21 |