Foam::extendedFeatureEdgeMesh::extendedFeatureEdgeMesh(const IOobject& io) : regIOobject(io), edgeMesh(pointField(0), edgeList(0)), concaveStart_(0), mixedStart_(0), nonFeatureStart_(0), internalStart_(0), flatStart_(0), openStart_(0), multipleStart_(0), normals_(0), edgeDirections_(0), edgeNormals_(0), featurePointNormals_(0), featurePointEdges_(0), regionEdges_(0), pointTree_(), edgeTree_(), edgeTreesByType_() { if ( io.readOpt() == IOobject::MUST_READ || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { if (readOpt() == IOobject::MUST_READ_IF_MODIFIED) { WarningIn ( "extendedFeatureEdgeMesh::extendedFeatureEdgeMesh" "(const IOobject&)" ) << "Specified IOobject::MUST_READ_IF_MODIFIED but class" << " does not support automatic rereading." << endl; } Istream& is = readStream(typeName); is >> *this >> concaveStart_ >> mixedStart_ >> nonFeatureStart_ >> internalStart_ >> flatStart_ >> openStart_ >> multipleStart_ >> normals_ >> edgeNormals_ >> featurePointNormals_ >> featurePointEdges_ >> regionEdges_; close(); { // Calculate edgeDirections const edgeList& eds(edges()); const pointField& pts(points()); edgeDirections_.setSize(eds.size()); forAll(eds, eI) { edgeDirections_[eI] = eds[eI].vec(pts); } edgeDirections_ /= mag(edgeDirections_); } }
void YamlConfigReader::readFile( Config& config, const QString& filename ) { std::ifstream in( qPrintable( filename )); readStream( config, in, filename ); }
ConfigSvcImplFile::ConfigSvcImplFile (std::istream& stream, const std::string& file) : ConfigSvcImplI() , m_config() { readStream( stream, file ); }