mesh/testMesh.cpp File Reference

#include "header.h"
#include "SparseMatrix.h"
#include "../shell/Shell.h"
#include "Boundary.h"
#include "MeshEntry.h"
#include "ChemCompt.h"
#include "MeshCompt.h"
#include "CubeMesh.h"
#include "CylBase.h"
#include "NeuroNode.h"
#include "NeuroMesh.h"
#include "../utility/Vec.h"
#include "CylMesh.h"
#include "SpineEntry.h"
#include "SpineMesh.h"
#include "PsdMesh.h"
Include dependency graph for testMesh.cpp:

Typedefs

typedef pair< unsigned int,
unsigned int > 
PII

Functions

void testVolScaling ()
void testCubeMesh ()
void testCubeMeshExtendStencil ()
void testReMesh ()
Id makeCompt (Id parentCompt, Id parentObj, string name, double len, double dia, double theta)
void setIntersectVoxel (vector< PII > &intersect, unsigned int ix, unsigned int iy, unsigned int iz, unsigned int nx, unsigned int ny, unsigned int nz, unsigned int meshIndex)
void checkAbut (const vector< PII > &intersect, unsigned int ix, unsigned int iy, unsigned int iz, unsigned int nx, unsigned int ny, unsigned int nz, unsigned int meshIndex, vector< VoxelJunction > &ret)
void testIntersectVoxel ()
void testCubeMeshFillTwoDimSurface ()
void testCubeMeshFillThreeDimSurface ()
void testCubeMeshJunctionTwoDimSurface ()
void testCubeMeshJunctionDiffSizeMesh ()
void testCubeMeshJunctionThreeDimSurface ()
void testCubeMeshMultiJunctionTwoD ()
void testVec ()
void testMesh ()

Typedef Documentation

typedef pair< unsigned int, unsigned int > PII

Function Documentation

void checkAbut ( const vector< PII > &  intersect,
unsigned int  ix,
unsigned int  iy,
unsigned int  iz,
unsigned int  nx,
unsigned int  ny,
unsigned int  nz,
unsigned int  meshIndex,
vector< VoxelJunction > &  ret 
)

checkAbut checks the intersect vector for the current position ix, iy, iz, to determine how many diffusion terms to extract. It then puts each of the extracted terms into the ret vector. There is a minor efficiency for one and two diffusion terms as they are encoded within the intersect vector. Higher-order surface alignments require an in-line scan of neighboring voxels. In all casesl the function inserts a flag indicating surface direction into the diffScale field of the VoxelJunction. 0 = x; 1 = y; 2 = z.

References CubeMesh::ABUTX, CubeMesh::ABUTY, CubeMesh::ABUTZ, CubeMesh::EMPTY, CubeMesh::MULTI, and CubeMesh::SURFACE.

Referenced by testIntersectVoxel().

Id makeCompt ( Id  parentCompt,
Id  parentObj,
string  name,
double  len,
double  dia,
double  theta 
)

theta in degrees len and dia in metres as usual

References Shell::doAddMsg(), Shell::doCreate(), Field< A >::get(), PI, and Field< A >::set().

Referenced by ReadSwc::build().

Here is the call graph for this function:

void setIntersectVoxel ( vector< PII > &  intersect,
unsigned int  ix,
unsigned int  iy,
unsigned int  iz,
unsigned int  nx,
unsigned int  ny,
unsigned int  nz,
unsigned int  meshIndex 
)

References CubeMesh::ABUTX, CubeMesh::ABUTY, CubeMesh::ABUTZ, setAbut(), and CubeMesh::SURFACE.

Referenced by testIntersectVoxel().

Here is the call graph for this function:

void testCubeMesh (  ) 
void testCubeMeshExtendStencil (  ) 
void testCubeMeshFillThreeDimSurface (  ) 

Referenced by testMesh().

void testCubeMeshFillTwoDimSurface (  ) 

References CubeMesh::innerSetCoords(), CubeMesh::numDims(), CubeMesh::setPreserveNumEntries(), and CubeMesh::surface().

Referenced by testMesh().

Here is the call graph for this function:

void testCubeMeshJunctionDiffSizeMesh (  ) 

14 15 12 13 10 11 12 13 14 10 11 8 9 5 6 7 8 9 6 7 4 5 0 1 2 3 4 2 3 0 1

So, junction should be (4,2)(4,4),(9,6),(9,8),(14,10),(14,12)

References CylMesh::innerSetCoords(), CubeMesh::innerSetCoords(), CubeMesh::matchCubeMeshEntries(), CubeMesh::setPreserveNumEntries(), and CubeMesh::surface().

Referenced by testMesh().

Here is the call graph for this function:

void testCubeMeshJunctionThreeDimSurface (  ) 

Referenced by testMesh().

void testCubeMeshJunctionTwoDimSurface (  ) 

8 9 10 11 12 13 14 6 7 5 6 7 8 9 4 5 0 1 2 3 4 2 3 0 1

So, junction should be (4,2),(9,4),(14,6)

That was too easy, since the spatial and meshIndices were identical. Now trim the geometries a bit to look like: 6 7 10 11 12 13 - 4 5 5 6 7 8 9 2 3 0 1 2 3 4 - 1

  • 0

So, junction should be (9,2) only.

References CubeMesh::getMeshToSpace(), CubeMesh::getSpaceToMesh(), CylMesh::innerSetCoords(), CubeMesh::innerSetCoords(), CubeMesh::matchCubeMeshEntries(), CubeMesh::setMeshToSpace(), CubeMesh::setPreserveNumEntries(), CubeMesh::setSpaceToMesh(), CubeMesh::setSurface(), and CubeMesh::surface().

Referenced by testMesh().

Here is the call graph for this function:

void testCubeMeshMultiJunctionTwoD (  ) 

The simulated geometry is: D D BBBA CCCCC Here, A is at (0,0,0) to (10,10,10) microns. B is then (-30,0,0) to (0,10,10) microns C is (-30,-10,0) to (20,0,10) microns D is (0,10,0) to (10,30,10) microns.

References CubeMesh::innerSetCoords(), CubeMesh::setPreserveNumEntries(), and CubeMesh::surface().

Referenced by testMesh().

Here is the call graph for this function:

void testIntersectVoxel (  ) 

Here is the geometry of the surface. * is surface, - is empty.

-***- -*--- -***-

x***x x*32- x***x

x is ABUTX y is ABUTY z is ABUTZ 2 is 2 points 3 is MULTI

References CubeMesh::ABUTX, checkAbut(), CubeMesh::EMPTY, CubeMesh::MULTI, setIntersectVoxel(), and CubeMesh::SURFACE.

Here is the call graph for this function:

void testMesh (  ) 
void testReMesh (  ) 

Tests scaling of volume and # of entries upon mesh resize

References Shell::doCreate(), Shell::doDelete(), doubleEq(), Field< A >::get(), NA, Field< A >::set(), and SetGet2< A1, A2 >::set().

Here is the call graph for this function:

void testVec (  ) 

References Vec::crossProduct(), Vec::dotProduct(), doubleEq(), and Vec::orthogonalAxes().

Referenced by testMesh().

Here is the call graph for this function:

void testVolScaling (  ) 

This tests how volume changes in a mesh propagate to all child pools, reacs, and enzymes.

References Shell::doCreate(), Shell::doDelete(), doubleEq(), Field< A >::get(), makeReacTest(), and Field< A >::set().

Referenced by testMesh().

Here is the call graph for this function:


Generated on 1 Jul 2015 for MOOSE by  doxygen 1.6.1