#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"
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 pair< unsigned int, unsigned int > PII |
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().
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().
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().
void testCubeMesh | ( | ) |
Low-level tests for the CubeMesh object: No MOOSE calls involved.
References CUBOID, doubleEq(), CubeMesh::getCoords(), ChemCompt::getDimensions(), CubeMesh::getDx(), CubeMesh::getDy(), CubeMesh::getDz(), CubeMesh::getMeshDimensions(), CubeMesh::getMeshType(), MeshCompt::getNeighbors(), CubeMesh::getNx(), CubeMesh::getNy(), CubeMesh::getNz(), CubeMesh::getX0(), CubeMesh::getX1(), CubeMesh::getY0(), CubeMesh::getY1(), CubeMesh::getZ0(), CubeMesh::getZ1(), CubeMesh::innerGetNumEntries(), CubeMesh::innerSetCoords(), CubeMesh::setPreserveNumEntries(), CubeMesh::setX0(), CubeMesh::setX1(), CubeMesh::setY0(), CubeMesh::setY1(), CubeMesh::setZ0(), and CubeMesh::setZ1().
Referenced by testMesh().
void testCubeMeshExtendStencil | ( | ) |
References CUBOID, MeshCompt::extendStencil(), ChemCompt::getDimensions(), CubeMesh::getMeshDimensions(), CubeMesh::getMeshType(), MeshCompt::getStencilRow(), CubeMesh::innerSetCoords(), and CubeMesh::setPreserveNumEntries().
Referenced by testMesh().
void testCubeMeshFillThreeDimSurface | ( | ) |
Referenced by testMesh().
void testCubeMeshFillTwoDimSurface | ( | ) |
References CubeMesh::innerSetCoords(), CubeMesh::numDims(), CubeMesh::setPreserveNumEntries(), and CubeMesh::surface().
Referenced by testMesh().
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().
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
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().
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().
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.
void testMesh | ( | ) |
References testCubeMesh(), testCubeMeshExtendStencil(), testCubeMeshFillThreeDimSurface(), testCubeMeshFillTwoDimSurface(), testCubeMeshJunctionDiffSizeMesh(), testCubeMeshJunctionThreeDimSurface(), testCubeMeshJunctionTwoDimSurface(), testCubeMeshMultiJunctionTwoD(), testVec(), and testVolScaling().
Referenced by nonMpiTests().
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().
void testVec | ( | ) |
References Vec::crossProduct(), Vec::dotProduct(), doubleEq(), and Vec::orthogonalAxes().
Referenced by testMesh().
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().