#include <Surface.h>
Public Types | |
typedef Part< DataType, 3 > | PartType |
typedef Connection | ConBase |
typedef Segment< DataType, 3 > | SegType |
typedef Facet< DataType > | FacetType |
Public Member Functions | |
Surface () | |
~Surface () | |
virtual void | resetPart () |
virtual DataType | Length () const |
virtual DataType | Area () const |
virtual DataType | Volume () const |
virtual void | setLength (DataType val) |
virtual void | setArea (DataType val) |
virtual void | setVolume (DataType val) |
virtual DataType | conArea () const |
void | setConArea (DataType val) |
virtual bool | closure () const |
virtual void | setClosure (bool val) |
virtual PType | Centroid () const |
virtual void | setCentroid (PType val) |
virtual void | AddPoint (const PType v) |
virtual int | GetNumPoints () const |
virtual PType | GetNthPoint (int n) const |
virtual PType * | GetNthPointA (int n) |
virtual PType * | GetNthPointAddress (int n) |
virtual PType * | GetNthVelocityAddress (int n) |
virtual PType | UpdateNthPoint (int n, PType val) |
virtual PType | GetNthPoint_org (int n) const |
virtual std::vector< PType > & | GetCPoints () |
virtual std::vector< PType > & | GetCPoints_org () |
virtual int | GetNumVelocities () const |
virtual PType | UpdateNthVelocity (int n, PType val) |
virtual PType | GetNthVelocity (int n) const |
virtual std::vector< PType > & | GetVelocities () |
virtual int | GetNumCons () const |
virtual int | GetConnectivity () |
virtual void | AddConnection (SegType v) |
virtual void | AddConnection (FacetType v) |
virtual int | GetNumConnections () const |
virtual ConBase * | GetNthConnection (int n) const |
virtual std::vector< FacetType > & | GetConnections () |
virtual const SegType * | GetNthSegment (int n) const |
virtual const FacetType * | GetNthFacet (int n) const |
virtual FacetType * | EditNthFacet (int n) |
virtual SegType * | EditNthSegment (int n) |
virtual void | setNthCon (int i, int val) |
virtual int | getNthCon (int i) const |
virtual PType | Normal () const |
virtual void | setNormal (PType val) |
virtual void | updatePart (DataType dt, DataType time) |
virtual void | setDeformation (bool val) |
virtual bool | GetDeformation () const |
virtual void | deformPart (DataType dt, DataType time) |
virtual void | nearestFacet (PType pointNearPart, DataType &minDist, int &facetId, PType &facetC, PType &facetN, int &orientationFlip) |
virtual bool | validFacet (const PType &a, const PType &b, const PType &c) |
virtual void | measure () |
virtual void | read (const int type, std::string file) |
virtual void | output (int type, DataType time, FILE *fout) |
virtual void | output (int type, DataType time, std::string file) |
virtual void | Restart (std::ifstream &ifs, int &pos, double &t, double &dt) |
virtual void | Checkpointing (std::ofstream &ofs) |
virtual void | updateAxis () |
virtual void | pressureForce (multi_index_type *cons, DataType *press, DataType scale) |
virtual void | logLoad (std::ofstream &ofs, DataType time_, int step) |
virtual PType | GetNetP () |
virtual PType | GetMomP () |
virtual PType | GetXaxis () |
virtual PType | GetYaxis () |
virtual PType | GetZaxis () |
Protected Attributes | |
bool | closed |
bool | loft |
PType | centroid |
PType | netP |
PType | momP |
PType | xAxis |
PType | yAxis |
PType | zAxis |
DataType | area |
DataType | volume |
std::vector< PType > | cPoints |
std::vector< PType > | cPoints_org |
std::vector< PType > | velocities_loc |
std::vector< PType > | pressureForce_con |
std::vector< FacetType > | connectivity |
int | num_cPoints_org |
int | num_cPoints |
int | num_connections |
int | num_velocities |
Surfaces are 3D parts with Facet Connections.
typedef Connection Surface< DataType >::ConBase |
Reimplemented from Part< DataType, 3 >.
Reimplemented from Part< DataType, 3 >.
Reimplemented from Part< DataType, 3 >.
virtual void Surface< DataType >::AddConnection | ( | FacetType | v | ) | [inline, virtual] |
Implements Part< DataType, 3 >.
Reimplemented in Loft< DataType >.
References Surface< DataType >::connectivity.
virtual void Surface< DataType >::AddConnection | ( | SegType | v | ) | [inline, virtual] |
Implements Part< DataType, 3 >.
Referenced by Surface< DataType >::read().
virtual void Surface< DataType >::AddPoint | ( | const PType | v | ) | [inline, virtual] |
Implements PartBase< DataType, 3 >.
Reimplemented in Loft< DataType >.
References Surface< DataType >::cPoints.
Referenced by Surface< DataType >::read().
Reimplemented from Facet< DataType >.
Reimplemented in Loft< DataType >.
References Surface< DataType >::area.
Referenced by Surface< DataType >::measure().
Reimplemented from Facet< DataType >.
Reimplemented in Loft< DataType >.
References Surface< DataType >::centroid.
Referenced by Surface< DataType >::measure(), and Surface< DataType >::pressureForce().
virtual void Surface< DataType >::Checkpointing | ( | std::ofstream & | ofs | ) | [inline, virtual] |
Implements PartBase< DataType, 3 >.
Reimplemented in Loft< DataType >.
References Surface< DataType >::area, Surface< DataType >::centroid, PartBase< DataType, 3 >::CheckpointPart(), Surface< DataType >::connectivity, Facet< DataType >::cPid, Surface< DataType >::cPoints, Surface< DataType >::cPoints_org, Surface< DataType >::momP, PartBase< DataType, 3 >::Name(), Surface< DataType >::netP, Surface< DataType >::num_connections, Surface< DataType >::num_cPoints, Surface< DataType >::num_cPoints_org, Surface< DataType >::num_velocities, Surface< DataType >::velocities_loc, Surface< DataType >::volume, Surface< DataType >::xAxis, Surface< DataType >::yAxis, and Surface< DataType >::zAxis.
Referenced by Loft< DataType >::Checkpointing().
Implements PartBase< DataType, 3 >.
Reimplemented in Loft< DataType >.
References Surface< DataType >::closed.
Reimplemented in Loft< DataType >.
References Surface< DataType >::area.
virtual void Surface< DataType >::deformPart | ( | DataType | dt, | |
DataType | time | |||
) | [inline, virtual] |
Implements PartBase< DataType, 3 >.
Reimplemented in Loft< DataType >.
virtual FacetType* Surface< DataType >::EditNthFacet | ( | int | n | ) | [inline, virtual] |
Implements Part< DataType, 3 >.
References Surface< DataType >::connectivity.
Referenced by Surface< DataType >::nearestFacet().
virtual SegType* Surface< DataType >::EditNthSegment | ( | int | n | ) | [inline, virtual] |
Implements Part< DataType, 3 >.
virtual std::vector<FacetType>& Surface< DataType >::GetConnections | ( | ) | [inline, virtual] |
References Surface< DataType >::connectivity.
Reimplemented in Loft< DataType >.
virtual std::vector<PType>& Surface< DataType >::GetCPoints | ( | ) | [inline, virtual] |
Implements PartBase< DataType, 3 >.
Reimplemented in Loft< DataType >.
References Surface< DataType >::cPoints.
Referenced by Surface< DataType >::updatePart().
virtual std::vector<PType>& Surface< DataType >::GetCPoints_org | ( | ) | [inline, virtual] |
Implements PartBase< DataType, 3 >.
Reimplemented in Loft< DataType >.
References Surface< DataType >::cPoints_org.
Referenced by Surface< DataType >::updatePart().
virtual bool Surface< DataType >::GetDeformation | ( | ) | const [inline, virtual] |
Implements PartBase< DataType, 3 >.
References PartBase< DataType, 3 >::deformable.
Referenced by Surface< DataType >::measure(), Surface< DataType >::updatePart(), and Loft< DataType >::updatePart().
References Surface< DataType >::momP.
Reimplemented in Loft< DataType >.
References Surface< DataType >::netP.
Referenced by Loft< DataType >::GetNetP().
virtual int Surface< DataType >::getNthCon | ( | int | i | ) | const [inline, virtual] |
Reimplemented from Facet< DataType >.
Reimplemented in Loft< DataType >.
Referenced by Surface< DataType >::measure(), and Surface< DataType >::output().
virtual ConBase* Surface< DataType >::GetNthConnection | ( | int | n | ) | const [inline, virtual] |
Implements PartBase< DataType, 3 >.
Reimplemented in Loft< DataType >.
References Surface< DataType >::connectivity.
virtual const FacetType* Surface< DataType >::GetNthFacet | ( | int | n | ) | const [inline, virtual] |
Implements Part< DataType, 3 >.
Reimplemented in Loft< DataType >.
References Surface< DataType >::connectivity.
Referenced by Surface< DataType >::output(), and Surface< DataType >::read().
virtual PType Surface< DataType >::GetNthPoint | ( | int | n | ) | const [inline, virtual] |
Implements PartBase< DataType, 3 >.
Reimplemented in Loft< DataType >.
References Surface< DataType >::cPoints.
Referenced by Surface< DataType >::nearestFacet(), Surface< DataType >::output(), and Surface< DataType >::read().
virtual PType Surface< DataType >::GetNthPoint_org | ( | int | n | ) | const [inline, virtual] |
References Surface< DataType >::cPoints_org.
virtual PType* Surface< DataType >::GetNthPointA | ( | int | n | ) | [inline, virtual] |
Reimplemented in Loft< DataType >.
References Surface< DataType >::cPoints.
virtual PType* Surface< DataType >::GetNthPointAddress | ( | int | n | ) | [inline, virtual] |
Implements PartBase< DataType, 3 >.
References Surface< DataType >::cPoints.
virtual const SegType* Surface< DataType >::GetNthSegment | ( | int | n | ) | const [inline, virtual] |
Implements Part< DataType, 3 >.
Reimplemented in Loft< DataType >.
virtual PType Surface< DataType >::GetNthVelocity | ( | int | n | ) | const [inline, virtual] |
References Surface< DataType >::velocities_loc.
Referenced by Surface< DataType >::output().
virtual PType* Surface< DataType >::GetNthVelocityAddress | ( | int | n | ) | [inline, virtual] |
Implements PartBase< DataType, 3 >.
References Surface< DataType >::velocities_loc.
virtual int Surface< DataType >::GetNumConnections | ( | ) | const [inline, virtual] |
Implements PartBase< DataType, 3 >.
Reimplemented in Loft< DataType >.
References Surface< DataType >::connectivity.
Referenced by Surface< DataType >::nearestFacet(), and Surface< DataType >::output().
Reimplemented in Loft< DataType >.
References Surface< DataType >::connectivity.
Referenced by Surface< DataType >::measure().
Implements PartBase< DataType, 3 >.
Reimplemented in Loft< DataType >.
References Surface< DataType >::cPoints.
Referenced by Surface< DataType >::output(), and Surface< DataType >::read().
virtual int Surface< DataType >::GetNumVelocities | ( | ) | const [inline, virtual] |
References Surface< DataType >::velocities_loc.
Referenced by Surface< DataType >::output().
virtual std::vector<PType>& Surface< DataType >::GetVelocities | ( | ) | [inline, virtual] |
Implements PartBase< DataType, 3 >.
References Surface< DataType >::velocities_loc.
Referenced by Surface< DataType >::updatePart(), and Loft< DataType >::updatePart().
References Surface< DataType >::xAxis.
References Surface< DataType >::yAxis.
References Surface< DataType >::zAxis.
Reimplemented from Facet< DataType >.
Reimplemented in Loft< DataType >.
virtual void Surface< DataType >::logLoad | ( | std::ofstream & | ofs, | |
DataType | time_, | |||
int | step | |||
) | [inline, virtual] |
Implements PartBase< DataType, 3 >.
References Surface< DataType >::area, Surface< DataType >::centroid, Surface< DataType >::momP, PartBase< DataType, 3 >::Name(), Surface< DataType >::netP, projectScalar(), Surface< DataType >::updateAxis(), Surface< DataType >::volume, Surface< DataType >::xAxis, Surface< DataType >::yAxis, and Surface< DataType >::zAxis.
area calculated as half the sum of facet normal magnitudes.
volume by divergence theorem http://en.wikipedia.org/wiki/Polyhedron#Volume
Reimplemented from Facet< DataType >.
References Surface< DataType >::Area(), Surface< DataType >::area, Surface< DataType >::Centroid(), Surface< DataType >::centroid, Surface< DataType >::connectivity, Surface< DataType >::cPoints, cross3D(), PartBase< DataType, 3 >::GetCGS(), Surface< DataType >::GetDeformation(), PartBase< DataType, 3 >::GetMobility(), Surface< DataType >::getNthCon(), Surface< DataType >::GetNumCons(), innerProd3D(), PartBase< DataType, 3 >::Name(), norm_2(), Surface< DataType >::Normal(), and Surface< DataType >::volume.
Referenced by Loft< DataType >::makeFacets(), Surface< DataType >::read(), Loft< DataType >::read(), Surface< DataType >::updatePart(), and Loft< DataType >::updatePart().
Reimplemented from Facet< DataType >.
Reimplemented in Loft< DataType >.
Referenced by Surface< DataType >::measure(), and Surface< DataType >::output().
virtual void Surface< DataType >::output | ( | int | type, | |
DataType | time, | |||
std::string | file | |||
) | [inline, virtual] |
Implements PartBase< DataType, 3 >.
References PartBase< DataType, 3 >::Brep2D, PartBase< DataType, 3 >::Brep3D, Surface< DataType >::getNthCon(), Surface< DataType >::GetNthFacet(), Surface< DataType >::GetNthPoint(), Surface< DataType >::GetNthVelocity(), Surface< DataType >::GetNumConnections(), Surface< DataType >::GetNumPoints(), Surface< DataType >::GetNumVelocities(), PartBase< DataType, 3 >::Name(), Surface< DataType >::Normal(), PartBase< DataType, 3 >::pointList, PartBase< DataType, 3 >::STL, PartBase< DataType, 3 >::VelDat, PartBase< DataType, 3 >::VTK_curve, and PartBase< DataType, 3 >::VTK_PL.
virtual void Surface< DataType >::output | ( | int | type, | |
DataType | time, | |||
FILE * | fout | |||
) | [inline, virtual] |
Implements PartBase< DataType, 3 >.
References PartBase< DataType, 3 >::Brep2D, PartBase< DataType, 3 >::Brep3D, Surface< DataType >::getNthCon(), Surface< DataType >::GetNthFacet(), Surface< DataType >::GetNthPoint(), Surface< DataType >::GetNthVelocity(), Surface< DataType >::GetNumConnections(), Surface< DataType >::GetNumPoints(), Surface< DataType >::GetNumVelocities(), PartBase< DataType, 3 >::Name(), Surface< DataType >::Normal(), PartBase< DataType, 3 >::pointList, PartBase< DataType, 3 >::STL, PartBase< DataType, 3 >::VelDat, PartBase< DataType, 3 >::VTK_curve, and PartBase< DataType, 3 >::VTK_PL.
virtual void Surface< DataType >::pressureForce | ( | multi_index_type * | cons, | |
DataType * | press, | |||
DataType | scale | |||
) | [inline, virtual] |
Implements PartBase< DataType, 3 >.
References Surface< DataType >::Centroid(), Surface< DataType >::connectivity, cross3D(), PartBase< DataType, 3 >::GetCGS(), Surface< DataType >::momP, Surface< DataType >::netP, Surface< DataType >::num_connections, Surface< DataType >::pressureForce_con, and Surface< DataType >::updateAxis().
virtual void Surface< DataType >::read | ( | const int | type, | |
std::string | file | |||
) | [inline, virtual] |
Implements PartBase< DataType, 3 >.
Reimplemented in Loft< DataType >.
References Surface< DataType >::AddConnection(), Surface< DataType >::AddPoint(), PartBase< DataType, 3 >::Brep2D, PartBase< DataType, 3 >::Brep3D, Surface< DataType >::connectivity, Surface< DataType >::cPoints, Surface< DataType >::cPoints_org, Facet< DataType >::getNthCon(), Surface< DataType >::GetNthFacet(), Surface< DataType >::GetNthPoint(), Surface< DataType >::GetNumPoints(), Surface< DataType >::measure(), PartBase< DataType, 3 >::Name(), norm_2(), PartBase< DataType, 3 >::pointList, Surface< DataType >::setClosure(), PartBase< DataType, 3 >::setName(), Facet< DataType >::setNthCon(), PartBase< DataType, 3 >::STL, TOL, PartBase< DataType, 3 >::VTK_curve, and PartBase< DataType, 3 >::VTK_PL.
virtual void Surface< DataType >::Restart | ( | std::ifstream & | ifs, | |
int & | pos, | |||
double & | t, | |||
double & | dt | |||
) | [inline, virtual] |
Implements PartBase< DataType, 3 >.
Reimplemented in Loft< DataType >.
References Surface< DataType >::area, Surface< DataType >::centroid, Surface< DataType >::connectivity, Facet< DataType >::cPid, Surface< DataType >::cPoints, Surface< DataType >::cPoints_org, Surface< DataType >::momP, PartBase< DataType, 3 >::Name(), Surface< DataType >::netP, Surface< DataType >::num_connections, Surface< DataType >::num_cPoints, Surface< DataType >::num_cPoints_org, Surface< DataType >::num_velocities, PartBase< DataType, 3 >::RestartPart(), Surface< DataType >::velocities_loc, Surface< DataType >::volume, Surface< DataType >::xAxis, Surface< DataType >::yAxis, and Surface< DataType >::zAxis.
Referenced by Loft< DataType >::Restart().
virtual void Surface< DataType >::setArea | ( | DataType | val | ) | [inline, virtual] |
Reimplemented from Facet< DataType >.
Reimplemented in Loft< DataType >.
References Surface< DataType >::area.
virtual void Surface< DataType >::setCentroid | ( | PType | val | ) | [inline, virtual] |
Reimplemented from Facet< DataType >.
Reimplemented in Loft< DataType >.
References Surface< DataType >::centroid.
virtual void Surface< DataType >::setClosure | ( | bool | val | ) | [inline, virtual] |
Implements PartBase< DataType, 3 >.
Reimplemented in Loft< DataType >.
References Surface< DataType >::closed.
Referenced by Surface< DataType >::read().
Reimplemented in Loft< DataType >.
References Surface< DataType >::area.
virtual void Surface< DataType >::setDeformation | ( | bool | val | ) | [inline, virtual] |
Implements PartBase< DataType, 3 >.
References PartBase< DataType, 3 >::deformable.
virtual void Surface< DataType >::setLength | ( | DataType | val | ) | [inline, virtual] |
Reimplemented from Facet< DataType >.
Reimplemented in Loft< DataType >.
virtual void Surface< DataType >::setNormal | ( | PType | val | ) | [inline, virtual] |
Reimplemented from Facet< DataType >.
Reimplemented in Loft< DataType >.
virtual void Surface< DataType >::setNthCon | ( | int | i, | |
int | val | |||
) | [inline, virtual] |
Reimplemented from Facet< DataType >.
Reimplemented in Loft< DataType >.
virtual void Surface< DataType >::setVolume | ( | DataType | val | ) | [inline, virtual] |
Reimplemented in Loft< DataType >.
References Surface< DataType >::volume.
virtual PType Surface< DataType >::UpdateNthPoint | ( | int | n, | |
PType | val | |||
) | [inline, virtual] |
References Surface< DataType >::cPoints.
virtual PType Surface< DataType >::UpdateNthVelocity | ( | int | n, | |
PType | val | |||
) | [inline, virtual] |
References Surface< DataType >::cPoints.
virtual void Surface< DataType >::updatePart | ( | DataType | dt, | |
DataType | time | |||
) | [inline, virtual] |
Implements PartBase< DataType, 3 >.
Reimplemented in Loft< DataType >.
References PartBase< DataType, 3 >::DHMat, PartBase< DataType, 3 >::DHMat_old, Surface< DataType >::GetCPoints(), Surface< DataType >::GetCPoints_org(), Surface< DataType >::GetDeformation(), PartBase< DataType, 3 >::GetDHMat(), PartBase< DataType, 3 >::GetDHMat_old(), PartBase< DataType, 3 >::GetMobility(), Surface< DataType >::GetVelocities(), Surface< DataType >::measure(), PartBase< DataType, 3 >::Name(), numVelMVP(), prodMVP(), and PartBase< DataType, 3 >::setDHMat_old().
virtual bool Surface< DataType >::validFacet | ( | const PType & | a, | |
const PType & | b, | |||
const PType & | c | |||
) | [inline, virtual] |
Referenced by Loft< DataType >::makeFacets().
Implements PartBase< DataType, 3 >.
Reimplemented in Loft< DataType >.
References Surface< DataType >::volume.
Reimplemented from Facet< DataType >.
Referenced by Surface< DataType >::Area(), Loft< DataType >::Area(), Surface< DataType >::Checkpointing(), Surface< DataType >::conArea(), Loft< DataType >::conArea(), Surface< DataType >::logLoad(), Surface< DataType >::measure(), Surface< DataType >::Restart(), Surface< DataType >::setArea(), Loft< DataType >::setArea(), Surface< DataType >::setConArea(), Loft< DataType >::setConArea(), and Surface< DataType >::Surface().
Reimplemented from Connection.
Referenced by Surface< DataType >::Centroid(), Loft< DataType >::Centroid(), Surface< DataType >::Checkpointing(), Surface< DataType >::logLoad(), Surface< DataType >::measure(), Surface< DataType >::Restart(), Surface< DataType >::setCentroid(), Loft< DataType >::setCentroid(), and Surface< DataType >::Surface().
std::vector<FacetType> Surface< DataType >::connectivity [protected] |
Referenced by Surface< DataType >::AddConnection(), Loft< DataType >::AddConnection(), Surface< DataType >::Checkpointing(), Surface< DataType >::EditNthFacet(), Surface< DataType >::GetConnections(), Surface< DataType >::GetNthConnection(), Loft< DataType >::GetNthConnection(), Surface< DataType >::GetNthFacet(), Loft< DataType >::GetNthFacet(), Surface< DataType >::GetNumConnections(), Loft< DataType >::GetNumConnections(), Surface< DataType >::GetNumCons(), Loft< DataType >::GetNumCons(), Loft< DataType >::makeUnique(), Surface< DataType >::measure(), Surface< DataType >::pressureForce(), Surface< DataType >::read(), Loft< DataType >::read(), and Surface< DataType >::Restart().
Referenced by Surface< DataType >::AddPoint(), Loft< DataType >::AddPoint(), Surface< DataType >::Checkpointing(), Loft< DataType >::GenLoft(), Surface< DataType >::GetCPoints(), Loft< DataType >::GetCPoints(), Surface< DataType >::GetNthPoint(), Loft< DataType >::GetNthPoint(), Surface< DataType >::GetNthPointA(), Loft< DataType >::GetNthPointA(), Surface< DataType >::GetNthPointAddress(), Surface< DataType >::GetNumPoints(), Loft< DataType >::GetNumPoints(), Loft< DataType >::makeUnique(), Surface< DataType >::measure(), Loft< DataType >::operator[](), Surface< DataType >::read(), Surface< DataType >::resetPart(), Surface< DataType >::Restart(), Surface< DataType >::UpdateNthPoint(), and Surface< DataType >::UpdateNthVelocity().
std::vector<PType> Surface< DataType >::cPoints_org [protected] |
Referenced by Surface< DataType >::Checkpointing(), Loft< DataType >::GenLoft(), Surface< DataType >::GetCPoints_org(), Loft< DataType >::GetCPoints_org(), Surface< DataType >::GetNthPoint_org(), Loft< DataType >::makeUnique(), Surface< DataType >::read(), Surface< DataType >::resetPart(), and Surface< DataType >::Restart().
int Surface< DataType >::num_connections [protected] |
int Surface< DataType >::num_cPoints [protected] |
Referenced by Surface< DataType >::Checkpointing(), and Surface< DataType >::Restart().
int Surface< DataType >::num_cPoints_org [protected] |
Referenced by Surface< DataType >::Checkpointing(), and Surface< DataType >::Restart().
int Surface< DataType >::num_velocities [protected] |
Referenced by Surface< DataType >::Checkpointing(), and Surface< DataType >::Restart().
std::vector<PType> Surface< DataType >::pressureForce_con [protected] |
Referenced by Surface< DataType >::pressureForce().
std::vector<PType> Surface< DataType >::velocities_loc [protected] |
Referenced by Surface< DataType >::Checkpointing(), Surface< DataType >::logLoad(), Surface< DataType >::measure(), Surface< DataType >::Restart(), Surface< DataType >::setVolume(), Loft< DataType >::setVolume(), Surface< DataType >::Surface(), Surface< DataType >::Volume(), and Loft< DataType >::Volume().