gmsh-TingyuanDoc
0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
|
Go to the documentation of this file.
24 for(std::size_t i = 0; i <
points.size(); i++)
delete points[i];
34 Msg::Error(
"Cannot set position of this kind of point");
56 std::ostringstream sstream;
57 sstream.precision(12);
58 sstream <<
"Position (" <<
x() <<
", " <<
y() <<
", " <<
z() <<
")";
65 sstream <<
"On boundary of curves: ";
67 if(it !=
l_edges.begin()) sstream <<
", ";
68 sstream << (*it)->tag();
77 if(lc <
MAX_LC) { sstream <<
"Mesh attributes: size " << lc; }
79 std::string str = sstream.str();
80 if(str.size() && (str[str.size() - 1] ==
'\n' || str[str.size() - 1] ==
' '))
81 str.resize(str.size() - 1);
88 if(meshSizeParameter.size())
89 fprintf(fp,
"Point(%d) = {%.16g, %.16g, %.16g, %s};\n",
tag(),
x(),
y(),
90 z(), meshSizeParameter.c_str());
92 fprintf(fp,
"Point(%d) = {%.16g, %.16g, %.16g, %.16g};\n",
tag(),
x(),
y(),
95 fprintf(fp,
"Point(%d) = {%.16g, %.16g, %.16g};\n",
tag(),
x(),
y(),
z());
101 if(meshSizeParameter.size())
102 fprintf(fp,
"gmsh.model.%s.addPoint(%.16g, %.16g, %.16g, %s, %d)\n",
103 factory,
x(),
y(),
z(), meshSizeParameter.c_str(),
tag());
105 fprintf(fp,
"gmsh.model.%s.addPoint(%.16g, %.16g, %.16g, %.16g, %d)\n",
108 fprintf(fp,
"gmsh.model.%s.addPoint(%.16g, %.16g, %.16g, tag=%d)\n",
109 factory,
x(),
y(),
z(),
tag());
131 const std::size_t index)
const
140 auto const location =
142 [&](
GEdge *
const edge) {
return edge->
isSeam(gf); });
143 return location != end(
l_edges);
149 std::vector<GFace *>
faces;
152 std::vector<GFace *>
const &temp = (*it)->faces();
153 faces.insert(
faces.end(), temp.begin(), temp.end());
164 std::vector<GFace *>
const _faces =
faces();
165 std::set<GRegion *> _r;
166 for(
auto it = _faces.begin(); it != _faces.end(); ++it) {
167 std::list<GRegion *> temp = (*it)->regions();
168 _r.insert(temp.begin(), temp.end());
170 std::list<GRegion *> ret;
171 ret.insert(ret.begin(), _r.begin(), _r.end());
177 if(
model()->getNumRegions())
179 else if(
model()->getNumFaces())
180 return faces().empty();
181 else if(
model()->getNumEdges())
182 return edges().empty();
201 Msg::Error(
"Trying to add unsupported element in point %d",
tag());
214 Msg::Error(
"Trying to remove unsupported element in point %d",
tag());
223 Msg::Error(
"Trying to remove unsupported elements in point %d",
tag());
228 const std::vector<std::size_t> &ordering)
231 if(
points.front()->getTypeForMSH() == elementType) {
232 if(ordering.size() !=
points.size())
return false;
234 for(
auto it = ordering.begin(); it != ordering.end(); ++it) {
235 if(*it >=
points.size())
return false;
238 std::vector<MPoint *> newPointsOrder(
points.size());
239 for(std::size_t i = 0; i < ordering.size(); i++) {
240 newPointsOrder[i] =
points[ordering[i]];
242 points = std::move(newPointsOrder);
virtual double z() const =0
virtual void setPosition(GPoint &p)
virtual void writeGEO(FILE *fp, const std::string &meshSizeParameter="")
virtual void resetMeshAttributes()
bool isOnSeam(const GFace *gf) const
static double c(int i, int j, fullMatrix< double > &CA, const std::vector< SPoint3 > &P, const std::vector< SPoint3 > &Q)
std::size_t getNumMeshElementsByType(const int familyType) const
static void Error(const char *fmt,...)
void addElement(int type, MElement *e)
virtual bool reorder(const int elementType, const std::vector< std::size_t > &ordering)
virtual std::vector< GEdge * > const & edges() const
virtual ModelType getNativeType() const
void removeElement(int type, MElement *e)
MElement * getMeshElementByType(const int familyType, const std::size_t index) const
virtual std::vector< GFace * > faces() const
virtual std::list< GRegion * > regions() const
virtual void writePY(FILE *fp, const std::string &meshSizeParameter="")
std::vector< MPoint * > points
virtual void deleteMesh()
std::vector< MVertex * > mesh_vertices
MElement * getMeshElement(std::size_t index) const
virtual double prescribedMeshSizeAtVertex() const
std::size_t getNumMeshElements() const
virtual SPoint2 parFromPoint(const SPoint3 &, bool onSurface=true, bool convTestXYZ=false) const
void relocateMeshVertices()
virtual bool isSeam(const GFace *face) const
std::vector< GEdge * > l_edges
virtual std::string getAdditionalInfoString(bool multline=false)
virtual double x() const =0
virtual double y() const =0
virtual SPoint2 reparamOnFace(const GFace *gf, int) const
void removeElements(int type)
void deleteVertexArrays()
GVertex(GModel *m, int tag, double ms=MAX_LC)