Operator: Get node coordinates in the given coordinate system
Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
This commit is contained in:
parent
183ea9f776
commit
b3ef0361b2
@ -187,6 +187,14 @@ bool Operator::GetYeeCoords(int ny, unsigned int pos[3], double* coords, bool du
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Operator::GetNodeCoords(unsigned int pos[3], double* coords, bool dualMesh, CoordinateSystem c_system) const
|
||||||
|
{
|
||||||
|
for (int n=0;n<3;++n)
|
||||||
|
coords[n]=GetDiscLine(n,pos[n],dualMesh);
|
||||||
|
TransformCoordSystem(coords,coords,m_MeshType,c_system);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
double Operator::GetEdgeLength(int n, const unsigned int* pos, bool dualMesh) const
|
double Operator::GetEdgeLength(int n, const unsigned int* pos, bool dualMesh) const
|
||||||
{
|
{
|
||||||
return GetDiscDelta(n,pos[n],dualMesh)*gridDelta;
|
return GetDiscDelta(n,pos[n],dualMesh)*gridDelta;
|
||||||
|
@ -101,6 +101,8 @@ public:
|
|||||||
//! Get the coordinates for a given node index and component, according to the yee-algorithm. Returns true if inside the FDTD domain.
|
//! Get the coordinates for a given node index and component, according to the yee-algorithm. Returns true if inside the FDTD domain.
|
||||||
virtual bool GetYeeCoords(int ny, unsigned int pos[3], double* coords, bool dualMesh) const;
|
virtual bool GetYeeCoords(int ny, unsigned int pos[3], double* coords, bool dualMesh) const;
|
||||||
|
|
||||||
|
virtual bool GetNodeCoords(unsigned int pos[3], double* coords, bool dualMesh=false, CoordinateSystem c_system=UNDEFINED_CS) const;
|
||||||
|
|
||||||
//! Get the node width for a given direction \a n and a given mesh position \a pos
|
//! Get the node width for a given direction \a n and a given mesh position \a pos
|
||||||
virtual double GetNodeWidth(int ny, const unsigned int pos[3], bool dualMesh = false) const {return GetEdgeLength(ny,pos,!dualMesh);}
|
virtual double GetNodeWidth(int ny, const unsigned int pos[3], bool dualMesh = false) const {return GetEdgeLength(ny,pos,!dualMesh);}
|
||||||
//! Get the node width for a given direction \a n and a given mesh position \a pos
|
//! Get the node width for a given direction \a n and a given mesh position \a pos
|
||||||
|
Loading…
Reference in New Issue
Block a user