📄 cogfaces.hxx
字号:
#ifndef cogfaces_hxx
#define cogfaces_hxx
// defines the following classes:
class CogeometryForBoundary;
class CogeometryForFaces;
class CogeometryWithBoundary;
class CogeometryWithFaces;
class CogeometryOfBoundary;
class CogeometryOfFaces;
/*
naming convention:
"Faces" defines only boundary conditions for inner boundary faces;
"Boundary" defines also the boundary condition for outside;
"For" uses a cogeometry (their Point function) to define the face function;
"With" uses an abstract PointToSegment object to define the face function;
"Of" uses a simple function cogSegment face(cogPoint);
*/
#include "cogfunction.hxx"
class CogeometryForBoundary: public Cogeometry{
const cogeometry old;
const cogeometry face;
CogeometryForBoundary(cogeometry boundary, cogeometry original)
:old(original),face(boundary){;}
cogIndex Point(cogPoint& p0) const {return old->Point(p0);}
cogIndex Line (cogFlag1& f, const cogLine& s) const;
cogIndex BoundaryCondition(cogFlag1& f) const;
void setDelta(cogFloat delta=1.e-4);
};
class CogeometryForFaces: public Cogeometry{
const cogeometry old;
const cogeometry face;
CogeometryForFaces(const Cogeometry& for_face, const Cogeometry& original)
:old(&original),face(&for_face){;}
cogIndex Point(cogPoint& p0) const {return old->Point(p0);}
cogIndex Line (cogFlag1& f, const cogLine& s) const;
void setDelta(cogFloat delta=1.e-4);
};
class CogeometryWithBoundary: public Cogeometry{
const cogPointToSegment& f;
const cogeometry old;
public:
CogeometryWithBoundary(const cogPointToSegment& func,const cogeometry geom)
:f(func),old(geom){;}
cogIndex Point(cogPoint& p0) const {return old->Point(p0);}
cogIndex Line (cogFlag1& f, const cogLine& s) const;
cogIndex BoundaryCondition(cogFlag1& f) const;
void setDelta(cogFloat delta=1.e-4);
};
class CogeometryWithFaces: public Cogeometry{
const cogPointToSegment& f;
const cogeometry old;
public:
CogeometryWithFaces(const cogPointToSegment& func,const cogeometry geom)
:f(func),old(geom){;}
cogIndex Point(cogPoint& p0) const {return old->Point(p0);}
cogIndex Line (cogFlag1& f, const cogLine& s) const;
void setDelta(cogFloat delta=1.e-4);
};
class CogeometryOfBoundary
:public cogPointToSegment
,public CogeometryWithBoundary
{
public:
cogSegment (*f)(const cogPoint& p);
CogeometryOfBoundary(cogSegment (*func)(const cogPoint& p),cogeometry geom)
:CogeometryWithBoundary(*(cogPointToSegment*)this,geom),f(func){;}
cogSegment operator()(const cogPoint& p) const
{return f(p);}
};
class CogeometryOfFaces
:public cogPointToSegment
,public CogeometryWithFaces
{
public:
cogSegment (*f)(const cogPoint& p);
CogeometryOfFaces(cogSegment (*func)(const cogPoint& p),cogeometry g)
:CogeometryWithFaces(*(cogPointToSegment*)this,g),f(func){;}
cogSegment operator()(const cogPoint& p) const
{return f(p);}
};
// obsolete names:
#define CogeometrySimpleFaces CogeometryOfFaces
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -