MOOSE - Multiscale Object Oriented Simulation Environment
|
#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"
Go to the source code of this file.
Typedefs | |
typedef pair< unsigned int, unsigned int > | PII |
Functions | |
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) |
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 | testCubeMesh () |
void | testCubeMeshExtendStencil () |
void | testCubeMeshFillThreeDimSurface () |
void | testCubeMeshFillTwoDimSurface () |
void | testCubeMeshJunctionDiffSizeMesh () |
void | testCubeMeshJunctionThreeDimSurface () |
void | testCubeMeshJunctionTwoDimSurface () |
void | testCubeMeshMultiJunctionTwoD () |
void | testIntersectVoxel () |
void | testMesh () |
void | testReMesh () |
void | testVec () |
void | testVolScaling () |
Variables | |
static const unsigned int | ABUT = ~2 |
static const unsigned int | EMPTY = ~0 |
static const unsigned int | MULTI = ~3 |
static const unsigned int | SURFACE = ~1 |
typedef pair< unsigned int, unsigned int > PII |
Definition at line 1304 of file testMesh.cpp.
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.
Definition at line 1348 of file CubeMesh.cpp.
References CubeMesh::ABUTX, CubeMesh::ABUTY, CubeMesh::ABUTZ, CubeMesh::EMPTY, CubeMesh::MULTI, and CubeMesh::SURFACE.
Referenced by CubeMesh::matchCubeMeshEntries(), and testIntersectVoxel().
theta in degrees len and dia in metres as usual
Definition at line 855 of file testMesh.cpp.
References Eref::data(), Shell::doAddMsg(), Shell::doCreate(), Id::eref(), Field< A >::get(), PI, and Field< A >::set().
Referenced by testCellDiffn(), and testSmallCellDiffn().
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 | ||
) |
Definition at line 1304 of file CubeMesh.cpp.
References CubeMesh::ABUTX, CubeMesh::ABUTY, CubeMesh::ABUTZ, setAbut(), and CubeMesh::SURFACE.
Referenced by CubeMesh::assignVoxels(), and testIntersectVoxel().
void testCubeMesh | ( | ) |
Low-level tests for the CubeMesh object: No MOOSE calls involved.
Definition at line 600 of file testMesh.cpp.
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 | ( | ) |
Definition at line 726 of file testMesh.cpp.
References CUBOID, MeshCompt::extendStencil(), ChemCompt::getDimensions(), CubeMesh::getMeshDimensions(), CubeMesh::getMeshType(), MeshCompt::getStencilRow(), CubeMesh::innerSetCoords(), and CubeMesh::setPreserveNumEntries().
Referenced by testMesh().
void testCubeMeshFillThreeDimSurface | ( | ) |
Definition at line 1447 of file testMesh.cpp.
Referenced by testMesh().
void testCubeMeshFillTwoDimSurface | ( | ) |
Definition at line 1428 of file testMesh.cpp.
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)
Definition at line 1560 of file testMesh.cpp.
References CubeMesh::innerSetCoords(), CubeMesh::matchCubeMeshEntries(), CubeMesh::setPreserveNumEntries(), and CubeMesh::surface().
Referenced by testMesh().
void testCubeMeshJunctionThreeDimSurface | ( | ) |
Definition at line 1620 of file testMesh.cpp.
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.
Definition at line 1452 of file testMesh.cpp.
References CubeMesh::getMeshToSpace(), CubeMesh::getSpaceToMesh(), 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.
Definition at line 1636 of file testMesh.cpp.
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
Definition at line 1318 of file testMesh.cpp.
References CubeMesh::ABUTX, checkAbut(), CubeMesh::EMPTY, CubeMesh::MULTI, setIntersectVoxel(), and CubeMesh::SURFACE.
void testMesh | ( | ) |
Definition at line 2138 of file testMesh.cpp.
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
Definition at line 792 of file testMesh.cpp.
References Eref::data(), Shell::doCreate(), Shell::doDelete(), doubleEq(), Id::eref(), Field< A >::get(), NA, Field< A >::set(), and SetGet2< A1, A2 >::set().
void testVec | ( | ) |
Definition at line 1691 of file testMesh.cpp.
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.
Definition at line 34 of file testMesh.cpp.
References Eref::data(), Shell::doCreate(), Shell::doDelete(), doubleEq(), Id::eref(), Field< A >::get(), makeReacTest(), and Field< A >::set().
Referenced by testMesh().
|
static |
Definition at line 1302 of file testMesh.cpp.
|
static |
Definition at line 1300 of file testMesh.cpp.
|
static |
Definition at line 1303 of file testMesh.cpp.
|
static |
Definition at line 1301 of file testMesh.cpp.