vtkPV3FoamUpdateInfoFields.H
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef vtkPV3FoamUpdateInfoFields_H
00031 #define vtkPV3FoamUpdateInfoFields_H
00032
00033
00034
00035 template<template<class> class patchType, class meshType>
00036 void Foam::vtkPV3Foam::updateInfoFields
00037 (
00038 vtkDataArraySelection *select
00039 )
00040 {
00041 if (debug)
00042 {
00043 Info<< "<beg> Foam::vtkPV3Foam::updateInfoFields <"
00044 << meshType::Mesh::typeName
00045 << "> [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]"
00046 << endl;
00047 }
00048
00049 stringList enabledEntries;
00050
00051 if (select->GetNumberOfArrays() == 0 && !meshPtr_)
00052 {
00053 enabledEntries.setSize(2);
00054 enabledEntries[0] = "p";
00055 enabledEntries[1] = "U";
00056 }
00057 else
00058 {
00059
00060 enabledEntries = getSelectedArrayEntries(select);
00061 }
00062
00063 select->RemoveAllArrays();
00064
00065
00066
00067 word regionPrefix;
00068 if (meshRegion_ != polyMesh::defaultRegion)
00069 {
00070 regionPrefix = meshRegion_;
00071 }
00072
00073
00074 IOobjectList objects(dbPtr_(), dbPtr_().timeName(), regionPrefix);
00075
00076
00077 addToSelection<GeometricField<scalar, patchType, meshType> >
00078 (
00079 select,
00080 objects
00081 );
00082 addToSelection<GeometricField<vector, patchType, meshType> >
00083 (
00084 select,
00085 objects
00086 );
00087 addToSelection<GeometricField<sphericalTensor, patchType, meshType> >
00088 (
00089 select,
00090 objects
00091 );
00092 addToSelection<GeometricField<symmTensor, patchType, meshType> >
00093 (
00094 select,
00095 objects
00096 );
00097 addToSelection<GeometricField<tensor, patchType, meshType> >
00098 (
00099 select,
00100 objects
00101 );
00102
00103
00104 setSelectedArrayEntries(select, enabledEntries);
00105
00106 if (debug)
00107 {
00108 Info<< "<end> Foam::vtkPV3Foam::updateInfoFields" << endl;
00109 }
00110 }
00111
00112
00113
00114 #endif
00115
Copyright © 2000-2009 OpenCFD Ltd