47{
48 int i;
50
51 if (argc != 3)
52 {
53 fprintf(stderr,
54 "Usage: ./ExtractCriticalLayer meshfile fieldfile \n");
55 exit(1);
56 }
57
58
59
61 LibUtilities::SessionReader::CreateInstance(argc, argv);
62
63
64
65
67 SpatialDomains::MeshGraphIO::Read(vSession);
68
69
70
71
73
75 graphShPt);
76
77
78
79
80 string fieldfile(argv[argc - 1]);
81 vector<LibUtilities::FieldDefinitionsSharedPtr> fielddef;
82 vector<vector<NekDouble>> fielddata;
84
85
86
87
88 string streak_field("w");
89 for (unsigned int i = 0; i < fielddata.size(); ++i)
90 {
91 streak->ExtractDataToCoeffs(fielddef[i], fielddata[i], streak_field,
92 streak->UpdateCoeffs());
93 }
94
95
96 int npts;
97 vSession->LoadParameter("NumCriticalLayerPts", npts, 30);
100
102 vSession->LoadParameter("WidthOfLayers", trans, 0.1);
103
105
106 cout << "# x_c y_c" << endl;
107 for (i = 0; i < npts; ++i)
108 {
109 fprintf(stdout, "%12.10lf %12.10lf \n", x_c[i], y_c[i]);
110
111 }
112}
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
void Import(const std::string &infilename, std::vector< FieldDefinitionsSharedPtr > &fielddefs, std::vector< std::vector< NekDouble > > &fielddata, FieldMetaDataMap &fieldinfomap, const Array< OneD, int > &ElementIDs)
This function allows for data to be imported from an FLD file when a session and/or communicator is n...
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
std::shared_ptr< MeshGraph > MeshGraphSharedPtr