nglibs-cfd
Version:
NGLibs, The module for CFD field Loading for OpenFOAM.
72 lines (71 loc) • 2.51 kB
TypeScript
import { CFDCellParmaters } from "./CFDField";
export interface fieldConstrustPara {
points: Array<Array<number>>;
faces: Array<Array<number>>;
owners: Array<Array<number>>;
cellsProps?: Array<cellsStepContent>;
cellPropNames?: {
[key: string]: boolean;
};
}
export interface cellsStepContent {
timeStep: number;
props: CFDCellParmaters[];
}
export declare class CFDOpenFoam {
curFacesArray: Array<Array<number>>;
curPointsArray: Array<Array<number>>;
curOwnerArray: Array<Array<number>>;
cellsContentTimeStepArray: Array<cellsStepContent>;
cellProperties: {
[k: string]: boolean;
};
fileImportRegList: RegExp[];
dirExRegList: RegExp[];
static Instance<T>(this: {
new (): T;
}): T;
static get instance(): CFDOpenFoam;
constructor();
Reset(): void;
/**
* Setup CFD filed After Parsed all File needed
*/
AssetFor(): {
faces: number[][];
owners: number[][];
points: number[][];
cellsProps: cellsStepContent[];
cellPropNames: {
[k: string]: boolean;
};
};
/**
* On files loaded callback, Sort into categoris and parsing content
* @param dir the directory, the time tag
* @param type the attribut filename
* @param buf
* @returns
*/
onFileLoad(dir: string, type: string, buf: string): boolean;
/**
*
* @param rule
* @returns
*/
FilesRulCheck(dir: string, filename: string): boolean;
Parser(dir: string, type: string, buf: string): boolean;
ParserInitJSON(content: object): Promise<CFDOpenFoam>;
ParserOutPutVelContentJSON(content: Array<string>, attribute: string, cellContainer: cellsStepContent): void;
ParserOutPutScaleContentJSON(content: Array<string>, attribute: string, cellContainer: cellsStepContent): void;
ParserConstantJSON(content: object): Promise<CFDOpenFoam>;
ParseForNumbersArray(contents: Array<string>, resArray: number[][]): void;
ParseForOwnerArray(contents: Array<string>): void;
ParseForFaces(buf: string): boolean;
ParseForPoints(buf: string): boolean;
private _sortOutCellsStep;
ParseForScalar(timeStep: string, typename: string, buf: string): boolean;
ParseForVel(timeStep: string, buf: string): boolean;
ParseForOwner(buf: string, fileCheckRegExp?: RegExp): boolean;
ParseForNeighbour(buf: string): boolean;
}