gmsh-TingyuanDoc
0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
|
Go to the documentation of this file.
24 Msg::Warning(
"Using tag == 0 in view is discouraged; view tags should be >= 1");
38 for(std::size_t i = 0; i <
list.size(); i++) {
82 Msg::Warning(
"Original view for alias does not exist anymore");
100 std::vector<double> &x, std::vector<double> &y)
121 Msg::Error(
"Can only add step data to list-based datasets");
125 std::vector<double> &y, std::vector<double> &
z,
126 std::vector<double> &v)
140 std::map<
int, std::vector<double> > &data,
double time,
141 int numComp,
int tag)
145 if(type ==
"NodeData")
147 else if(type ==
"ElementData")
149 else if(type ==
"ElementNodeData")
151 else if(type ==
"Beam")
154 Msg::Error(
"Unknown type of view to create '%s'", type.c_str());
158 d->
addData(model, data, 0, time, 1, numComp);
169 const std::map<
int, std::vector<double> > &data,
170 double time,
int numComp)
176 Msg::Error(
"Can only add step data to mesh-based datasets");
185 auto it = std::find(
list.begin(),
list.end(),
this);
186 if(it !=
list.end())
list.erase(it);
192 for(std::size_t i = 0; i <
list.size(); i++)
198 for(std::size_t i = 0; i <
list.size(); i++)
256 std::vector<nameData> nds;
257 for(std::size_t i = 0; i <
list.size(); i++) {
271 while(j < nds.size()) {
272 if(nds[j].name == nd.
name) {
273 nds[j].data.push_back(data);
274 nds[j].indices.push_back(i);
279 if(j == nds.size()) {
280 nd.
data.push_back(data);
288 std::set<PView *> rm;
289 for(std::size_t i = 0; i < nds.size(); i++) {
290 if(nds[i].data.size() > 1) {
292 bool allListBased =
true, allModelBased =
true;
293 for(std::size_t j = 0; j < nds[i].data.size(); j++) {
295 if(!d1) allListBased =
false;
297 if(!d2) allModelBased =
false;
301 else if(allModelBased) {
306 Msg::Error(
"Cannot combine hybrid list/mesh-based datasets");
312 for(std::size_t j = 0; j < nds[i].indices.size(); j++)
313 rm.insert(
list[nds[i].indices[j]]);
322 if(copyOptions && nds[i].options)
330 for(
auto it = rm.begin(); it != rm.end(); it++)
delete *it;
348 int partition,
const std::string &fileName)
351 for(
int i =
list.size() - 1; i >= 0; i--) {
353 ((timeStep < 0 || !
list[i]->
getData()->hasTimeStep(timeStep)) ||
355 !
list[i]->
getData()->hasPartition(timeStep, partition))) &&
356 (fileName.empty() || !
list[i]->getData()->hasFileName(fileName)))
366 for(
int i =
list.size() - 1; i >= 0; i--) {
367 if(
list[i]->
getData()->getFileName() == fileName &&
368 ((timeStep < 0 || !
list[i]->
getData()->hasTimeStep(timeStep)) ||
370 !
list[i]->
getData()->hasPartition(timeStep, partition))))
378 for(std::size_t i = 0; i <
list.size(); i++) {
380 ((timeStep < 0 || !
list[i]->
getData()->hasTimeStep(timeStep)) ||
382 !
list[i]->
getData()->hasPartition(timeStep, partition))))
std::vector< int > indices
static PView * getViewByName(const std::string &name, int timeStep=-1, int partition=-1, const std::string &fileName="")
virtual bool combineSpace(nameData &nd)
static void Info(const char *fmt,...)
static void Debug(const char *fmt,...)
static void Warning(const char *fmt,...)
static void Error(const char *fmt,...)
virtual void setFileName(const std::string &val)
adaptiveData * getAdaptiveData()
void setChanged(bool val)
void initAdaptiveData(int step, int level, double tol)
void addStep(std::vector< double > &y)
static PView * getViewByTag(int tag, int timeStep=-1, int partition=-1)
std::vector< PViewData * > data
VertexArray * va_ellipses
static void combine(bool time, int how, bool remove, bool copyOptions)
PViewData * getData(bool useAdaptiveIfAvailable=false)
void destroyAdaptiveData()
virtual bool combineTime(nameData &nd)
virtual void setName(const std::string &val)
int getType(int step, int ent, int ele)
static PViewOptions * reference()
int adaptVisualizationGrid
static int getGlobalTag()
virtual void setXYZV(std::vector< double > &x, std::vector< double > &y, std::vector< double > &z, std::vector< double > &v)
virtual double getMemoryInMb()
VertexArray * va_triangles
void deleteVertexArrays()
PViewOptions * getOptions()
static PView * getViewByFileName(const std::string &fileName, int timeStep=-1, int partition=-1)
virtual std::string getName()
bool operator()(PView *v1, PView *v2) const
static void setGlobalTag(int tag)
void addStep(GModel *model, const std::map< int, std::vector< double > > &data, double time=0., int numComp=-1)
static std::vector< PView * > list
void setOptions(PViewOptions *val=nullptr)
virtual void setXY(std::vector< double > &x, std::vector< double > &y)
bool addData(GModel *model, const std::map< int, std::vector< double > > &data, int step, double time, int partition, int numComp)