Commit c50af1d2 authored by Jean-Noël Grad's avatar Jean-Noël Grad Committed by Helen Schottenhamml
Browse files

Tutorials and documentation maintenance

parent 7751b2df
......@@ -43,7 +43,7 @@ public:
* \brief Estimates the point which is farthest in direction \a d.
*
* \param d The normalized search direction in world-frame coordinates.
* \return The support point in world-frame coordinates in direction a\ d.
* \return The support point in world-frame coordinates in direction \a d.
*/
Vec3 support( Vec3 d ) const;
public:
......
......@@ -37,7 +37,7 @@ public:
/**
* @brief If the BlockForest is changed this function has to be called in order to
* update all interal caches!
* update all internal caches!
*
* Updates the local caches for local and neighbor AABBs.
*/
......@@ -45,7 +45,7 @@ public:
bool isContainedInProcessSubdomain(const uint_t rank, const Vec3& pt) const override;
bool isContainedInLocalSubdomain(const Vec3& pt, const real_t& radius) const override;
/// Is the sphere defined by \p pt and \p radius completely inside the local subdomin?
/// Is the sphere defined by \p pt and \p radius completely inside the local subdomain?
/// \attention Also take into account periodicity!
/// \param pt center of the sphere
/// \param radius radius of the sphere
......
......@@ -41,7 +41,7 @@ namespace mesa_pd {
namespace kernel {
/**
* Kernel which performes collision detection on a pair of two particles
* Kernel which performs collision detection on a pair of two particles
* and inserts the contact (if existent) into the contact storage passed in the constructor.
* Call this kernel on each particle pair to perform contact detection and insert each contact in the contact
* storage.
......
......@@ -37,7 +37,7 @@ namespace mesa_pd {
namespace kernel {
/**
* Kernel which calculates the Lennard Jones froce between two particles.
* Kernel which calculates the Lennard Jones force between two particles.
*
* This kernel uses the type property of a particle to decide on the material parameters.
*
......
......@@ -1009,7 +1009,7 @@ inline real_t HCSITSRelaxationStep::relaxInelasticContactsByProjectedGaussSeidel
// No need to apply zero impulse.
}
else {
// Dissect the impuls in a tangetial and normal directions
// Dissect the impuls in a tangential and normal directions
// Use the inverted contact frame with -n as in the publication
Mat3 reversedContactFrame( -ca.getNormal(cid), ca.getT(cid), ca.getO(cid) );
Vec3 p_rcf( reversedContactFrame.getTranspose() * p_wf );
......
......@@ -40,7 +40,7 @@ namespace kernel {
/**
* Heat conduction interaction kernel
*
* This kernel implements a simple heat conduction: \frac{dQ}{dt} = - \alpha (T_2 - T_1)
* This kernel implements a simple heat conduction: \f$ \frac{dQ}{dt} = - \alpha (T_2 - T_1) \f$
*
* \code
* const walberla::real_t& getTemperature(const size_t p_idx) const;
......
......@@ -40,7 +40,7 @@ namespace kernel {
/**
* Init the datastructures for the particles for later use of the HCSITS-Solver.
* Call this kernel on all particles that will be treated with HCSITS before performing any relaxation timesteps.
* Use setGlobalAcceleration() to set an accelleration action uniformly across all particles (e.g. gravity)
* Use setGlobalAcceleration() to set an acceleration action uniformly across all particles (e.g. gravity)
* \ingroup mesa_pd_kernel
*/
class InitParticlesForHCSITS
......
......@@ -36,7 +36,7 @@ namespace kernel {
/**
* Velocity verlet integration for all particles.
*
* Velocit verlet integration is a two part kernel. preForceUpdate has to be
* Velocity verlet integration is a two part kernel. preForceUpdate has to be
* called before the force calculation and postFroceUpdate afterwards. The
* integration is only complete when both functions are called. The integration
* is symplectic.
......
......@@ -111,9 +111,9 @@ void AnisotropicVDWContact::operator()(const size_t p_idx1,
// c1 - contact 1-2 normal
// b1 - ball 1 axial direction
// b2 - ball 2 axial direction
// b3 - neytral direction
// g - alighning torque direction
// d - neytral plane normal direction
// b3 - neutral direction
// g - aligning torque direction
// d - neutral plane normal direction
// s - shear force direction
// angle gamma - angle between two axial directions
......@@ -121,7 +121,7 @@ void AnisotropicVDWContact::operator()(const size_t p_idx1,
// if the angle between two axal directions is blunt, then inverce b2
// if the angle between two axial directions is blunt, then inverse b2
if (cos_gamma < 0_r)
{
b2 = -b2;
......
......@@ -76,7 +76,7 @@ constexpr auto ro = 4_r * mm / ( math::root_three * a_CC );
/// Atomic mass of Carbon in AMU
constexpr auto M_C = 12.011_r;
/// Mass of the repetative cell in AMU
/// Mass of the repetitive cell in AMU
constexpr auto mass_T = ro * T * M_C * 104.397_r;
/// Volume of a capsule
......
......@@ -41,7 +41,7 @@ namespace walberla {
namespace mesa_pd {
/**
* Trasmits the contact history
* Transmits the contact history
*/
class ContactHistoryNotification
{
......
......@@ -39,7 +39,7 @@ namespace walberla {
namespace mesa_pd {
/**
* Trasmits force and torque information.
* Transmits force and torque information.
*/
class ForceTorqueNotification
{
......
......@@ -39,7 +39,7 @@ namespace walberla {
namespace mesa_pd {
/**
* Trasmits force and torque information.
* Transmits force and torque information.
*/
class HeatFluxNotification
{
......
......@@ -39,7 +39,7 @@ namespace walberla {
namespace mesa_pd {
/**
* Trasmits force and torque information.
* Transmits force and torque information.
*/
class HydrodynamicForceTorqueNotification
{
......
......@@ -167,7 +167,7 @@ void MeshParticleVTKOutput<MeshType>::assembleMesh() {
// ensure the mesh is empty, as this will contain the new output
mesh_->clean();
// then iterate over every particle and tesselate it to include it in the output mesh
// then iterate over every particle and tessellate it to include it in the output mesh
for (auto pIt = ps_->begin(); pIt != ps_->end(); ++pIt) {
if (!particleSelector_(pIt)) continue;
......@@ -180,7 +180,7 @@ void MeshParticleVTKOutput<MeshType>::assembleMesh() {
const auto& convexPolyhedron = *static_cast<walberla::mesa_pd::data::ConvexPolyhedron*>(shape.get());
const auto& particle = *pIt;
// tesselate: add the shape at the particle's position into the output mesh
// tessellate: add the shape at the particle's position into the output mesh
tesselate(convexPolyhedron, particle, mesh_, newVertices, newFaces);
}
......
......@@ -55,7 +55,7 @@ mesh::PythonTriangleMesh might be the right choice.
\subsection load Loading meshes
Meshes can be loaded from any file format supported by OpenMesh including obj, off, ply, stl and a custom om format.
To load a mesh at large scale simulations waLBerla provides the function readAndBroadcast() which reads a file from disk on a single process and broadcasts it.
This way the pressure on the file system is kept to a minmum.
This way the pressure on the file system is kept to a minimum.
\subsection conversion Conversion between OpenMesh and waLBerla data types
OpenMesh and waLBerla use different vector data types. The file MatrixVectorOperations.h provides the functions toWalberla() and toOpenMesh()
......@@ -68,11 +68,11 @@ can be found in MeshConversion.h.
\section setup How can I setup my simulation using the mesh module?
\subsection distance Initilization of mesh distance data structures
\subsection distance Initialization of mesh distance data structures
To set up the simulation using a surface mesh, waLBerla needs to compute distances to the surface and determine the location of points relative to mesh.
The necessary data structure is called mesh::TriangleDistance and is defined in DistanceComputations.h.
It adds the necessary information to the mesh's triangles and offers functions to compute a signed point<->triangle distance.
It also offers to compute a asigned point<->mesh distance but this is only recommended for smaller meshes with only a few triangles.
It also offers to compute a assigned point<->mesh distance but this is only recommended for smaller meshes with only a few triangles.
Larger meshes should use a \ref mesh::distance_octree::DistanceOctree "mesh::DistanceOctree" which reduces the number of evaluated point<->mesh distances significantly from \f$\mathcal O(n)\f$ to \f$\mathcal O(\log n)\f$.
If you are only interested whether a point is contained in the mesh you can use the \ref mesh::distance_octree::DistanceOctree "mesh::DistanceOctree" with geometry::ContainmentOctree to get faster results.
......
......@@ -50,7 +50,7 @@ public:
}
else
{
WALBERLA_ABORT( "Tesselation not implemented for your body!" );
WALBERLA_ABORT( "Tessellation not implemented for your body!" );
}
}
......
......@@ -103,7 +103,7 @@ void ConvexPolyhedron::init( const Vec3& gpos, const Quat& q,
setMassAndInertiaToInfinity();
} else
{
// sets inverse mass and interatio tensor
// sets inverse mass and inertia tensor
setMassAndInertia( getVolume() * Material::getDensity( getMaterial() ), mesh::computeInertiaTensor( mesh_ ) );
}
setCommunicating( communicating );
......@@ -189,7 +189,7 @@ real_t ConvexPolyhedron::getSurfaceArea() const
/*!\brief Estimates the point which is farthest in direction \a d.
*
* \param d The normalized search direction in world-frame coordinates.
* \return The support point in world-frame coordinates in direction a\ d.
* \return The support point in world-frame coordinates in direction \a d.
*/
Vec3 ConvexPolyhedron::support( const Vec3& d ) const
{
......@@ -233,7 +233,7 @@ Vec3 ConvexPolyhedron::support( const Vec3& d ) const
/*!\brief Estimates the vertex which is farthest in direction \a d.
*
* \param d The normalized search direction in body-frame coordinates.
* \return The support vertex in direction a\ d.
* \return The support vertex in direction \a d.
*/
TriangleMesh::VertexHandle ConvexPolyhedron::supportVertex( const TriangleMesh::Normal & d, const TriangleMesh::VertexHandle startVertex ) const
{
......@@ -266,7 +266,7 @@ TriangleMesh::VertexHandle ConvexPolyhedron::supportVertex( const TriangleMesh::
/*!\brief Estimates the point which is farthest in direction \a d.
*
* \param d The normalized search direction in world-frame coordinates
* \return The support point in world-frame coordinates in direction a\ d extended by a vector in
* \return The support point in world-frame coordinates in direction \a d extended by a vector in
* direction \a d of length \a pe::contactThreshold.
*/
Vec3 ConvexPolyhedron::supportContactThreshold( const Vec3& /*d*/ ) const
......
......@@ -43,11 +43,11 @@ ConvexPolyhedronID createConvexPolyhedron( BodyStorage& globalStorage, BlockStor
MaterialID material,
bool global, bool communicating, bool infiniteMass )
{
WALBERLA_ASSERT_UNEQUAL( ConvexPolyhedron::getStaticTypeID(), std::numeric_limits<id_t>::max(), "ConvexPolyhedron TypeID not initalized!");
WALBERLA_ASSERT_UNEQUAL( ConvexPolyhedron::getStaticTypeID(), std::numeric_limits<id_t>::max(), "ConvexPolyhedron TypeID not initialized!");
// Checking the side lengths
if( pointCloud.size() < size_t(4) )
WALBERLA_ABORT( "Polyhedron needs at leat 4 points!" );
WALBERLA_ABORT( "Polyhedron needs at least 4 points!" );
shared_ptr< TriangleMesh > mesh = make_shared<TriangleMesh>();
mesh::QHull<TriangleMesh> qhull( pointCloud, mesh );
......@@ -63,7 +63,7 @@ ConvexPolyhedronID createConvexPolyhedron( BodyStorage& globalStorage, BlockStor
MaterialID material,
bool global, bool communicating, bool infiniteMass )
{
WALBERLA_ASSERT_UNEQUAL( ConvexPolyhedron::getStaticTypeID(), std::numeric_limits<id_t>::max(), "ConvexPolyhedron TypeID not initalized!");
WALBERLA_ASSERT_UNEQUAL( ConvexPolyhedron::getStaticTypeID(), std::numeric_limits<id_t>::max(), "ConvexPolyhedron TypeID not initialized!");
ConvexPolyhedronID poly = nullptr;
......
......@@ -67,7 +67,7 @@ struct DistanceProperties
* \brief Adds information required to compute signed distances from a point to a triangle
*
* The class adds vertex, edge and face normals to mesh. The normals are calculated according to \cite Baerentzen2005
* to allow for a numerically stable sign computation. To compute the point<->trinagle distance, we use the rotation
* to allow for a numerically stable sign computation. To compute the point<->triangle distance, we use the rotation
* method described in \cite Jones1995. Some data is precomputed to allow for faster computations and is stored
* at each face in an object of class DistanceProperties. The numbering of vertices, edges and voronoi regions in
* the rotated triangles are shown here:
......@@ -75,13 +75,12 @@ struct DistanceProperties
* \image html mesh/triangle_topo.svg "A rotated triangle in the planar coordinate system. The vertex numbering is shown in red, the edge numbering in blue and the numbering of the voronoi regions in green."
*
* The class offers multiple methods to get the signed squared distance from a point to a single triangle or the whole mesh.
* Please note that the distance compuattion for whole meshes is rather ineffecient. Instead you should an object of this
* class into a \ref mesh::distance_octree::DistanceOctree "mesh::DistanceOctree" reduce the computaional complexity
* Please note that the distance computation for whole meshes is rather inefficient. Instead you should an object of this
* class into a \ref mesh::distance_octree::DistanceOctree "mesh::DistanceOctree" reduce the computational complexity
* from \f$\mathcal O(n)\f$ to \f$\mathcal O(\log n)\f$, where \f$\mathcal O(n)\f$ where \f$n\f$ is the number triangles.
*
* Additionally to the signed squared distance you can also retrieve the closest point on the triangle or mesh to
* your point of inquiry. You may also retrieve the coresponding normal and the clostest voronoi region region.
* your point of inquiry. You may also retrieve the corresponding normal and the closest voronoi region.
*/
template< typename MeshType >
class TriangleDistance
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment