CylindricalCoordinatesUnitTest.cpp File Reference
#include <Math/Vector.h>
#include <cstdio>
#include <Logger.h>
#include <Math/Matrix.h>

Functions

int main (int argc UNUSED, char *argv[] UNUSED)
 

Function Documentation

◆ main()

int main ( int argc  UNUSED,
char *argv[]  UNUSED 
)
11 {
12  Vec3D position(1,.5,0);
14  Matrix3D stress;
15 
16  //just to check that the magnitude of position does not matter
17  position *=2;
18 
19  //check velocity in radial direction
20  velocity = Vec3D(1,.5,0);
21  logger(INFO,"radial\tpos % \tvel % \tvel-cyl %",position,velocity,velocity.getCylindricalTensorField(position));
22 
23  //check velocity in angular direction
24  velocity = Vec3D(-.5,1,0);
25  logger(INFO,"angular\tpos % \tvel % \tvel-cyl %",position,velocity,velocity.getCylindricalTensorField(position));
26 
27  //check velocity in z direction
28  velocity = Vec3D(0,0,1);
29  logger(INFO,"z \tpos % \tvel % \tvel-cyl %",position,velocity,velocity.getCylindricalTensorField(position));
30 
31  //check stress in radial direction
32  velocity = Vec3D(1,.5,0);
34  logger(INFO,"radial\tpos % \tstress % \tstress-cyl %",position,stress,stress.getCylindricalTensorField(position));
35 
36  //check stress in angular direction
37  velocity = Vec3D(-.5,1,0);
39  logger(INFO,"angular\tpos % \tstress %\tstress-cyl %",position,stress,stress.getCylindricalTensorField(position));
40 
41  //check stress in z direction
42  velocity = Vec3D(0,0,1);
44  logger(INFO,"z \tpos % \tstress % \tstress-cyl %",position,stress,stress.getCylindricalTensorField(position));
45 
46 }
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
Implementation of a 3D matrix.
Definition: Kernel/Math/Matrix.h:17
static Matrix3D dyadic(const Vec3D &a, const Vec3D &b)
Calculates the dyadic product of a two Vec3D: .
Definition: Matrix.cc:302
Matrix3D getCylindricalTensorField(const Vec3D &p) const
Returns the matrix in cylindrical coordinates.
Definition: Matrix.cc:373
Definition: Kernel/Math/Vector.h:30
#define INFO(i)
Definition: mumps_solver.h:54
double velocity(const double &t)
Angular velocity as function of time t.
Definition: jeffery_orbit.cc:107

References Matrix3D::dyadic(), Matrix3D::getCylindricalTensorField(), INFO, logger, and Jeffery_Solution::velocity().