escript
Revision_
|
Rectangle is the 2-dimensional implementation of a RipleyDomain. More...
#include <Rectangle.h>
Public Member Functions | |
Rectangle (int n0, int n1, double x0, double y0, double x1, double y1, int d0=-1, int d1=-1, const std::vector< double > &points=std::vector< double >(), const std::vector< int > &tags=std::vector< int >(), const simap_t &tagnamestonums=simap_t()) | |
creates a rectangular mesh with n0 x n1 elements over the rectangle [x0,x1] x [y0,y1]. | |
~Rectangle () | |
Destructor. | |
virtual std::string | getDescription () const |
returns a description for this domain | |
virtual bool | operator== (const escript::AbstractDomain &other) const |
equality operator | |
void | dump (const std::string &filename) const |
dumps the mesh to a file with the given name | |
virtual void | readNcGrid (escript::Data &out, std::string filename, std::string varname, const ReaderParameters ¶ms) const |
virtual void | readBinaryGrid (escript::Data &out, std::string filename, const ReaderParameters ¶ms) const |
virtual void | writeBinaryGrid (const escript::Data &in, std::string filename, int byteOrder, int dataType) const |
const int * | borrowSampleReferenceIDs (int fsType) const |
returns the array of reference numbers for a function space type | |
virtual bool | ownSample (int fs_code, index_t id) const |
returns true if this rank owns the sample id. | |
virtual void | setToNormal (escript::Data &out) const |
copies the surface normals at data points into out. The actual function space to be considered is defined by out. out has to be defined on this domain. | |
virtual void | setToSize (escript::Data &out) const |
copies the size of samples into out. The actual function space to be considered is defined by out. out has to be defined on this domain. | |
virtual int | getNumDataPointsGlobal () const |
returns the number of data points summed across all MPI processes | |
virtual void | Print_Mesh_Info (const bool full=false) const |
writes information about the mesh to standard output | |
virtual const int * | getNumNodesPerDim () const |
returns the number of nodes per MPI rank in each dimension | |
virtual const int * | getNumElementsPerDim () const |
returns the number of elements per MPI rank in each dimension | |
virtual const int * | getNumFacesPerBoundary () const |
returns the number of face elements in the order (left,right,bottom,top) on current MPI rank | |
virtual IndexVector | getNodeDistribution () const |
returns the node distribution vector | |
virtual const int * | getNumSubdivisionsPerDim () const |
returns the number of spatial subdivisions in each dimension | |
virtual double | getLocalCoordinate (int index, int dim) const |
returns the index'th coordinate value in given dimension for this rank | |
virtual boost::python::tuple | getGridParameters () const |
returns the tuple (origin, spacing, number_of_elements) | |
virtual escript::Data | randomFill (const escript::DataTypes::ShapeType &shape, const escript::FunctionSpace &what, long seed, const boost::python::tuple &filter) const |
Returns a Data object filled with random data passed through filter. | |
virtual void | setAssembler (std::string type, std::map< std::string, escript::Data > options) |
Sets the assembler to a custom/specific assembler. | |
Protected Member Functions | |
virtual dim_t | getNumNodes () const |
returns the number of nodes per MPI rank | |
virtual dim_t | getNumElements () const |
returns the number of elements per MPI rank | |
virtual dim_t | getNumFaceElements () const |
returns the number of face elements on current MPI rank | |
virtual dim_t | getNumDOF () const |
returns the number of degrees of freedom per MPI rank | |
virtual dim_t | insertNeighbourNodes (IndexVector &index, index_t node) const |
virtual void | assembleCoordinates (escript::Data &arg) const |
populates the data object 'arg' with the node coordinates | |
virtual void | assembleGradient (escript::Data &out, const escript::Data &in) const |
computes the gradient of 'in' and puts the result in 'out' | |
virtual void | assembleIntegrate (DoubleVector &integrals, const escript::Data &arg) const |
copies the integrals of the function defined by 'arg' into 'integrals' | |
virtual paso::SystemMatrixPattern_ptr | getPattern (bool reducedRowOrder, bool reducedColOrder) const |
returns the Paso system matrix pattern | |
virtual void | interpolateNodesOnElements (escript::Data &out, const escript::Data &in, bool reduced) const |
interpolates data on nodes in 'in' onto (reduced) elements in 'out' | |
virtual void | interpolateNodesOnFaces (escript::Data &out, const escript::Data &in, bool reduced) const |
interpolates data on nodes in 'in' onto (reduced) face elements in 'out' | |
virtual void | nodesToDOF (escript::Data &out, const escript::Data &in) const |
converts data on nodes in 'in' to degrees of freedom in 'out' | |
virtual void | dofToNodes (escript::Data &out, const escript::Data &in) const |
converts data on degrees of freedom in 'in' to nodes in 'out' | |
virtual int | getDofOfNode (int node) const |
Private Member Functions | |
void | populateSampleIds () |
void | createPattern () |
void | addToMatrixAndRHS (paso::SystemMatrix_ptr S, escript::Data &F, const DoubleVector &EM_S, const DoubleVector &EM_F, bool addS, bool addF, int firstNode, int nEq=1, int nComp=1) const |
template<typename ValueType > | |
void | readBinaryGridImpl (escript::Data &out, const std::string &filename, const ReaderParameters ¶ms) const |
template<typename ValueType > | |
void | readBinaryGridZippedImpl (escript::Data &out, const std::string &filename, const ReaderParameters ¶ms) const |
template<typename ValueType > | |
void | writeBinaryGridImpl (const escript::Data &in, const std::string &filename, int byteOrder) const |
int | findNode (const double *coords) const |
escript::Data | randomFillWorker (const escript::DataTypes::ShapeType &shape, long seed, const boost::python::tuple &filter) const |
Private Attributes | |
dim_t | m_gNE [2] |
total number of elements in each dimension | |
double | m_origin [2] |
origin of domain | |
double | m_length [2] |
side lengths of domain | |
double | m_dx [2] |
grid spacings / cell sizes of domain | |
dim_t | m_NX [2] |
number of spatial subdivisions | |
dim_t | m_NE [2] |
number of elements for this rank in each dimension including shared | |
dim_t | m_ownNE [2] |
number of own elements for this rank in each dimension | |
dim_t | m_NN [2] |
number of nodes for this rank in each dimension | |
dim_t | m_offset [2] |
first node on this rank is at (offset0,offset1) in global mesh | |
int | m_faceCount [4] |
number of face elements per edge (left, right, bottom, top) | |
IndexVector | m_faceOffset |
IndexVector | m_dofId |
vector of sample reference identifiers | |
IndexVector | m_nodeId |
IndexVector | m_elementId |
IndexVector | m_faceId |
IndexVector | m_nodeDistribution |
IndexVector | m_dofMap |
paso::Connector_ptr | m_connector |
paso::SystemMatrixPattern_ptr | m_pattern |
Friends | |
class | DefaultAssembler2D |
class | WaveAssembler2D |
class | LameAssembler2D |
Rectangle is the 2-dimensional implementation of a RipleyDomain.
ripley::Rectangle::Rectangle | ( | int | n0, |
int | n1, | ||
double | x0, | ||
double | y0, | ||
double | x1, | ||
double | y1, | ||
int | d0 = -1 , |
||
int | d1 = -1 , |
||
const std::vector< double > & | points = std::vector<double>() , |
||
const std::vector< int > & | tags = std::vector<int>() , |
||
const simap_t & | tagnamestonums = simap_t() |
||
) |
creates a rectangular mesh with n0 x n1 elements over the rectangle [x0,x1] x [y0,y1].
n0,n1 | number of elements in each dimension |
x0,y0,x1,y1 | coordinates of bottom-left and top-right corners |
d0,d1 | number of subdivisions in each dimension |
References ripley::RipleyDomain::addPoints(), ripley::RipleyDomain::assembler, createPattern(), DefaultAssembler2D, factorise(), m_dx, m_gNE, m_length, ripley::RipleyDomain::m_mpiInfo, m_NE, m_NN, m_NX, m_offset, m_origin, m_ownNE, populateSampleIds(), Esys_MPIInfo::rank, ripley::RipleyDomain::setTagMap(), and Esys_MPIInfo::size.
Destructor.
References ripley::RipleyDomain::assembler.
void ripley::Rectangle::addToMatrixAndRHS | ( | paso::SystemMatrix_ptr | S, |
escript::Data & | F, | ||
const DoubleVector & | EM_S, | ||
const DoubleVector & | EM_F, | ||
bool | addS, | ||
bool | addF, | ||
int | firstNode, | ||
int | nEq = 1 , |
||
int | nComp = 1 |
||
) | const [private] |
References ripley::RipleyDomain::addToSystemMatrix(), getNumDOF(), escript::Data::getSampleDataRW(), INDEX2, m_dofMap, and m_NN.
Referenced by ripley::WaveAssembler2D::assemblePDESystem().
void ripley::Rectangle::assembleCoordinates | ( | escript::Data & | arg | ) | const [protected, virtual] |
populates the data object 'arg' with the node coordinates
Implements ripley::RipleyDomain.
References escript::Data::getDataC(), getLocalCoordinate(), getNumNodes(), escript::Data::getSampleDataRW(), isDataPointShapeEqual(), m_NN, ripley::RipleyDomain::m_numDim, numSamplesEqual(), and escript::Data::requireWrite().
void ripley::Rectangle::assembleGradient | ( | escript::Data & | out, |
const escript::Data & | in | ||
) | const [protected, virtual] |
computes the gradient of 'in' and puts the result in 'out'
Implements ripley::RipleyDomain.
References ripley::Elements, ripley::FaceElements, escript::Data::getDataPointSize(), escript::Data::getFunctionSpace(), escript::Data::getSampleDataRO(), escript::Data::getSampleDataRW(), escript::FunctionSpace::getTypeCode(), INDEX2, INDEX3, m_dx, m_faceOffset, m_NE, m_NN, ripley::ReducedElements, ripley::ReducedFaceElements, and escript::Data::requireWrite().
void ripley::Rectangle::assembleIntegrate | ( | DoubleVector & | integrals, |
const escript::Data & | arg | ||
) | const [protected, virtual] |
copies the integrals of the function defined by 'arg' into 'integrals'
Implements ripley::RipleyDomain.
References escript::Data::actsExpanded(), ripley::Elements, ripley::FaceElements, escript::Data::getDataPointSize(), escript::Data::getFunctionSpace(), escript::Data::getSampleDataRO(), escript::FunctionSpace::getTypeCode(), INDEX2, m_dx, m_faceOffset, m_NE, m_offset, m_ownNE, ripley::ReducedElements, and ripley::ReducedFaceElements.
const int * ripley::Rectangle::borrowSampleReferenceIDs | ( | int | fsType | ) | const [virtual] |
returns the array of reference numbers for a function space type
fsType | The function space type |
Implements ripley::RipleyDomain.
References ripley::DegreesOfFreedom, ripley::Elements, ripley::FaceElements, ripley::RipleyDomain::m_diracPointNodeIDs, m_dofId, m_elementId, m_faceId, m_nodeId, ripley::Nodes, ripley::Points, ripley::ReducedDegreesOfFreedom, ripley::ReducedElements, ripley::ReducedFaceElements, and ripley::ReducedNodes.
void ripley::Rectangle::createPattern | ( | ) | [private] |
References ripley::RipleyDomain::createCouplePatterns(), ripley::RipleyDomain::createMainPattern(), doublyLink(), getNumNodes(), m_connector, m_dofMap, m_gNE, ripley::RipleyDomain::m_mpiInfo, m_NN, m_nodeDistribution, m_NX, m_offset, m_pattern, MATRIX_FORMAT_DEFAULT, and Esys_MPIInfo::rank.
Referenced by Rectangle().
void ripley::Rectangle::dofToNodes | ( | escript::Data & | out, |
const escript::Data & | in | ||
) | const [protected, virtual] |
converts data on degrees of freedom in 'in' to nodes in 'out'
Implements ripley::RipleyDomain.
References paso::util::copy(), escript::Data::getDataPointSize(), getNumDOF(), getNumNodes(), escript::Data::getSampleDataRO(), escript::Data::getSampleDataRW(), m_connector, m_dofMap, and escript::Data::requireWrite().
void ripley::Rectangle::dump | ( | const std::string & | filename | ) | const [virtual] |
dumps the mesh to a file with the given name
filename | The name of the output file |
Implements ripley::RipleyDomain.
References Esys_MPIInfo::comm, getDescription(), getLocalCoordinate(), getNumElementsPerDim(), getNumNodesPerDim(), m_elementId, ripley::RipleyDomain::m_mpiInfo, m_NN, m_nodeId, Esys_MPIInfo::rank, and Esys_MPIInfo::size.
int ripley::Rectangle::findNode | ( | const double * | coords | ) | const [private, virtual] |
Implements ripley::RipleyDomain.
References INDEX2, m_dx, m_length, m_NE, m_NN, ripley::RipleyDomain::m_numDim, m_offset, and m_origin.
string ripley::Rectangle::getDescription | ( | ) | const [virtual] |
int ripley::Rectangle::getDofOfNode | ( | int | node | ) | const [inline, protected, virtual] |
Implements ripley::RipleyDomain.
References m_dofMap.
boost::python::tuple ripley::Rectangle::getGridParameters | ( | ) | const [inline, virtual] |
returns the tuple (origin, spacing, number_of_elements)
Implements ripley::RipleyDomain.
double ripley::Rectangle::getLocalCoordinate | ( | int | index, |
int | dim | ||
) | const [inline, virtual] |
returns the index'th coordinate value in given dimension for this rank
Implements ripley::RipleyDomain.
References EsysAssert, m_dx, m_NN, m_offset, and m_origin.
Referenced by assembleCoordinates(), dump(), and Print_Mesh_Info().
virtual IndexVector ripley::Rectangle::getNodeDistribution | ( | ) | const [inline, virtual] |
returns the node distribution vector
Implements ripley::RipleyDomain.
int ripley::Rectangle::getNumDataPointsGlobal | ( | ) | const [inline, virtual] |
returns the number of data points summed across all MPI processes
Implements ripley::RipleyDomain.
References m_gNE.
Referenced by populateSampleIds().
dim_t ripley::Rectangle::getNumDOF | ( | ) | const [inline, protected, virtual] |
returns the number of degrees of freedom per MPI rank
Implements ripley::RipleyDomain.
Referenced by addToMatrixAndRHS(), dofToNodes(), ownSample(), and populateSampleIds().
dim_t ripley::Rectangle::getNumElements | ( | ) | const [inline, protected, virtual] |
returns the number of elements per MPI rank
Implements ripley::RipleyDomain.
References m_NE.
Referenced by populateSampleIds(), and setToSize().
virtual const int* ripley::Rectangle::getNumElementsPerDim | ( | ) | const [inline, virtual] |
returns the number of elements per MPI rank in each dimension
Implements ripley::RipleyDomain.
Referenced by dump().
dim_t ripley::Rectangle::getNumFaceElements | ( | ) | const [inline, protected, virtual] |
returns the number of face elements on current MPI rank
Implements ripley::RipleyDomain.
References m_faceCount.
Referenced by populateSampleIds().
virtual const int* ripley::Rectangle::getNumFacesPerBoundary | ( | ) | const [inline, virtual] |
returns the number of face elements in the order (left,right,bottom,top) on current MPI rank
Implements ripley::RipleyDomain.
dim_t ripley::Rectangle::getNumNodes | ( | ) | const [inline, protected, virtual] |
returns the number of nodes per MPI rank
Implements ripley::RipleyDomain.
References m_NN.
Referenced by assembleCoordinates(), createPattern(), dofToNodes(), populateSampleIds(), and Print_Mesh_Info().
virtual const int* ripley::Rectangle::getNumNodesPerDim | ( | ) | const [inline, virtual] |
returns the number of nodes per MPI rank in each dimension
Implements ripley::RipleyDomain.
Referenced by dump().
virtual const int* ripley::Rectangle::getNumSubdivisionsPerDim | ( | ) | const [inline, virtual] |
returns the number of spatial subdivisions in each dimension
Implements ripley::RipleyDomain.
paso::SystemMatrixPattern_ptr ripley::Rectangle::getPattern | ( | bool | reducedRowOrder, |
bool | reducedColOrder | ||
) | const [inline, protected, virtual] |
dim_t ripley::Rectangle::insertNeighbourNodes | ( | IndexVector & | index, |
index_t | node | ||
) | const [protected, virtual] |
inserts the nodes that share an element with 'node' into 'index' and returns the number of these neighbours
Implements ripley::RipleyDomain.
void ripley::Rectangle::interpolateNodesOnElements | ( | escript::Data & | out, |
const escript::Data & | in, | ||
bool | reduced | ||
) | const [protected, virtual] |
interpolates data on nodes in 'in' onto (reduced) elements in 'out'
Implements ripley::RipleyDomain.
References escript::Data::getDataPointSize(), escript::Data::getSampleDataRO(), escript::Data::getSampleDataRW(), INDEX2, m_NE, m_NN, and escript::Data::requireWrite().
void ripley::Rectangle::interpolateNodesOnFaces | ( | escript::Data & | out, |
const escript::Data & | in, | ||
bool | reduced | ||
) | const [protected, virtual] |
interpolates data on nodes in 'in' onto (reduced) face elements in 'out'
Implements ripley::RipleyDomain.
References escript::Data::getDataPointSize(), escript::Data::getSampleDataRO(), escript::Data::getSampleDataRW(), INDEX2, m_faceOffset, m_NE, m_NN, and escript::Data::requireWrite().
void ripley::Rectangle::nodesToDOF | ( | escript::Data & | out, |
const escript::Data & | in | ||
) | const [protected, virtual] |
converts data on nodes in 'in' to degrees of freedom in 'out'
Implements ripley::RipleyDomain.
References paso::util::copy(), escript::Data::getDataPointSize(), escript::Data::getSampleDataRO(), escript::Data::getSampleDataRW(), m_gNE, m_NN, m_NX, m_offset, and escript::Data::requireWrite().
bool ripley::Rectangle::operator== | ( | const escript::AbstractDomain & | other | ) | const [virtual] |
equality operator
Reimplemented from ripley::RipleyDomain.
bool ripley::Rectangle::ownSample | ( | int | fs_code, |
index_t | id | ||
) | const [virtual] |
returns true if this rank owns the sample id.
Implements ripley::RipleyDomain.
References ripley::DegreesOfFreedom, ripley::Elements, ripley::FaceElements, ripley::RipleyDomain::getMPISize(), getNumDOF(), m_dofMap, m_faceCount, m_NE, m_NN, ripley::Nodes, ripley::ReducedDegreesOfFreedom, ripley::ReducedElements, ripley::ReducedFaceElements, and ripley::ReducedNodes.
void ripley::Rectangle::populateSampleIds | ( | ) | [private] |
References ripley::Elements, ripley::FaceElements, getNumDataPointsGlobal(), getNumDOF(), getNumElements(), getNumFaceElements(), getNumNodes(), globalNodeId, m_dofId, m_elementId, ripley::RipleyDomain::m_elementTags, m_faceCount, m_faceId, m_faceOffset, ripley::RipleyDomain::m_faceTags, m_gNE, ripley::RipleyDomain::m_mpiInfo, m_NE, m_NN, m_nodeDistribution, m_nodeId, ripley::RipleyDomain::m_nodeTags, m_NX, m_offset, ripley::Nodes, Esys_MPIInfo::rank, ripley::RipleyDomain::setTagMap(), Esys_MPIInfo::size, and ripley::RipleyDomain::updateTagsInUse().
Referenced by Rectangle().
void ripley::Rectangle::Print_Mesh_Info | ( | const bool | full = false | ) | const [virtual] |
writes information about the mesh to standard output
full | whether to print additional data |
Reimplemented from ripley::RipleyDomain.
References getLocalCoordinate(), getNumNodes(), m_NN, and m_nodeId.
escript::Data ripley::Rectangle::randomFill | ( | const escript::DataTypes::ShapeType & | shape, |
const escript::FunctionSpace & | what, | ||
long | seed, | ||
const boost::python::tuple & | filter | ||
) | const [virtual] |
Returns a Data object filled with random data passed through filter.
Implements escript::AbstractDomain.
References escript::Data::getFunctionSpace(), escript::DataTypes::noValues(), and randomFillWorker().
escript::Data ripley::Rectangle::randomFillWorker | ( | const escript::DataTypes::ShapeType & | shape, |
long | seed, | ||
const boost::python::tuple & | filter | ||
) | const [private] |
References Esys_MPIInfo::comm, Block2::copyAllToBuffer(), Block2::copyUsedFromBuffer(), message::destbuffid, message::destID, BlockGrid2::generateInNeighbours(), BlockGrid2::generateOutNeighbours(), Block2::getBuffSize(), ripley::RipleyDomain::getContinuousFunctionCode(), escript::Data::getExpandedVectorReference(), Block2::getInBuffer(), Block2::getOutBuffer(), escript::AbstractDomain::getPtr(), ripley::RipleyDomain::m_mpiInfo, m_NN, m_NX, MPI_DOUBLE, escript::DataTypes::noValues(), esysUtils::randomFillArray(), Esys_MPIInfo::rank, escript::DataTypes::scalarShape, Block2::setUsed(), message::sourceID, message::srcbuffid, and message::tag.
Referenced by randomFill().
void ripley::Rectangle::readBinaryGrid | ( | escript::Data & | out, |
std::string | filename, | ||
const ReaderParameters & | params | ||
) | const [virtual] |
Implements ripley::RipleyDomain.
References ripley::ReaderParameters::dataType, ripley::DATATYPE_FLOAT32, ripley::DATATYPE_FLOAT64, and ripley::DATATYPE_INT32.
void ripley::Rectangle::readBinaryGridImpl | ( | escript::Data & | out, |
const std::string & | filename, | ||
const ReaderParameters & | params | ||
) | const [private] |
References ripley::byte_swap32(), ripley::ReaderParameters::byteOrder, ripley::BYTEORDER_NATIVE, ripley::Elements, ripley::ReaderParameters::first, escript::Data::getDataPointSize(), escript::Data::getFunctionSpace(), escript::Data::getNumDataPointsPerSample(), escript::Data::getSampleDataRW(), escript::FunctionSpace::getTypeCode(), m_NE, m_NN, m_offset, ripley::ReaderParameters::multiplier, ripley::Nodes, ripley::ReaderParameters::numValues, ripley::ReducedElements, and escript::Data::requireWrite().
void ripley::Rectangle::readBinaryGridZippedImpl | ( | escript::Data & | out, |
const std::string & | filename, | ||
const ReaderParameters & | params | ||
) | const [private] |
void ripley::Rectangle::readNcGrid | ( | escript::Data & | out, |
std::string | filename, | ||
std::string | varname, | ||
const ReaderParameters & | params | ||
) | const [virtual] |
Implements ripley::RipleyDomain.
References ripley::Elements, ripley::ReaderParameters::first, escript::Data::getDataPointSize(), escript::Data::getFunctionSpace(), escript::Data::getNumDataPointsPerSample(), escript::Data::getSampleDataRW(), escript::FunctionSpace::getTypeCode(), m_NE, m_NN, m_offset, ripley::ReaderParameters::multiplier, ripley::Nodes, ripley::ReaderParameters::numValues, ripley::ReducedElements, escript::Data::requireWrite(), and ripley::ReaderParameters::reverse.
void ripley::Rectangle::setAssembler | ( | std::string | type, |
std::map< std::string, escript::Data > | options | ||
) | [virtual] |
Sets the assembler to a custom/specific assembler.
Reimplemented from ripley::RipleyDomain.
References ripley::RipleyDomain::assembler, ripley::RipleyDomain::assembler_type, ripley::DEFAULT_ASSEMBLER, ripley::LAME_ASSEMBLER, LameAssembler2D, m_dx, m_NE, m_NN, m_NX, ripley::WAVE_ASSEMBLER, and WaveAssembler2D.
void ripley::Rectangle::setToNormal | ( | escript::Data & | out | ) | const [virtual] |
copies the surface normals at data points into out. The actual function space to be considered is defined by out. out has to be defined on this domain.
Implements ripley::RipleyDomain.
References ripley::FaceElements, escript::Data::getFunctionSpace(), escript::Data::getSampleDataRW(), escript::FunctionSpace::getTypeCode(), m_faceOffset, m_NE, ripley::ReducedFaceElements, and escript::Data::requireWrite().
void ripley::Rectangle::setToSize | ( | escript::Data & | out | ) | const [virtual] |
copies the size of samples into out. The actual function space to be considered is defined by out. out has to be defined on this domain.
Implements ripley::RipleyDomain.
References ripley::Elements, ripley::FaceElements, escript::Data::getFunctionSpace(), escript::Data::getNumDataPointsPerSample(), getNumElements(), escript::Data::getSampleDataRW(), escript::FunctionSpace::getTypeCode(), m_dx, m_faceOffset, m_NE, ripley::ReducedElements, ripley::ReducedFaceElements, and escript::Data::requireWrite().
void ripley::Rectangle::writeBinaryGrid | ( | const escript::Data & | in, |
std::string | filename, | ||
int | byteOrder, | ||
int | dataType | ||
) | const [virtual] |
Implements ripley::RipleyDomain.
References ripley::DATATYPE_FLOAT32, ripley::DATATYPE_FLOAT64, and ripley::DATATYPE_INT32.
void ripley::Rectangle::writeBinaryGridImpl | ( | const escript::Data & | in, |
const std::string & | filename, | ||
int | byteOrder | ||
) | const [private] |
References ripley::byte_swap32(), ripley::BYTEORDER_NATIVE, esysUtils::FileWriter::close(), ripley::Elements, escript::Data::getDataPointSize(), escript::Data::getFunctionSpace(), escript::Data::getNumDataPointsPerSample(), escript::Data::getSampleDataRO(), escript::FunctionSpace::getTypeCode(), m_gNE, m_NE, m_NN, m_offset, ripley::RipleyDomain::MPIBarrier(), ripley::Nodes, esysUtils::FileWriter::openFile(), ripley::ReducedElements, and esysUtils::FileWriter::writeAt().
friend class DefaultAssembler2D [friend] |
Referenced by Rectangle().
friend class LameAssembler2D [friend] |
Referenced by setAssembler().
friend class WaveAssembler2D [friend] |
Referenced by setAssembler().
Referenced by createPattern(), and dofToNodes().
IndexVector ripley::Rectangle::m_dofId [private] |
vector of sample reference identifiers
Referenced by borrowSampleReferenceIDs(), and populateSampleIds().
IndexVector ripley::Rectangle::m_dofMap [private] |
Referenced by addToMatrixAndRHS(), createPattern(), dofToNodes(), getDofOfNode(), and ownSample().
double ripley::Rectangle::m_dx[2] [private] |
grid spacings / cell sizes of domain
Referenced by assembleGradient(), assembleIntegrate(), findNode(), getGridParameters(), getLocalCoordinate(), Rectangle(), setAssembler(), and setToSize().
IndexVector ripley::Rectangle::m_elementId [private] |
Referenced by borrowSampleReferenceIDs(), dump(), and populateSampleIds().
int ripley::Rectangle::m_faceCount[4] [private] |
number of face elements per edge (left, right, bottom, top)
Referenced by getNumFaceElements(), ownSample(), and populateSampleIds().
IndexVector ripley::Rectangle::m_faceId [private] |
Referenced by borrowSampleReferenceIDs(), and populateSampleIds().
IndexVector ripley::Rectangle::m_faceOffset [private] |
faceOffset[i]=-1 if face i is not an external face, otherwise it is the index of that face (where i: 0=left, 1=right, 2=bottom, 3=top)
Referenced by assembleGradient(), assembleIntegrate(), interpolateNodesOnFaces(), populateSampleIds(), setToNormal(), and setToSize().
dim_t ripley::Rectangle::m_gNE[2] [private] |
total number of elements in each dimension
Referenced by createPattern(), getGridParameters(), getNumDataPointsGlobal(), getNumDOF(), insertNeighbourNodes(), nodesToDOF(), operator==(), populateSampleIds(), Rectangle(), and writeBinaryGridImpl().
double ripley::Rectangle::m_length[2] [private] |
side lengths of domain
Referenced by findNode(), operator==(), and Rectangle().
dim_t ripley::Rectangle::m_NE[2] [private] |
number of elements for this rank in each dimension including shared
Referenced by assembleGradient(), assembleIntegrate(), findNode(), getNumElements(), interpolateNodesOnElements(), interpolateNodesOnFaces(), ownSample(), populateSampleIds(), readBinaryGridImpl(), readNcGrid(), Rectangle(), setAssembler(), setToNormal(), setToSize(), and writeBinaryGridImpl().
dim_t ripley::Rectangle::m_NN[2] [private] |
number of nodes for this rank in each dimension
Referenced by addToMatrixAndRHS(), assembleCoordinates(), assembleGradient(), createPattern(), dump(), findNode(), getLocalCoordinate(), getNumNodes(), interpolateNodesOnElements(), interpolateNodesOnFaces(), nodesToDOF(), ownSample(), populateSampleIds(), Print_Mesh_Info(), randomFillWorker(), readBinaryGridImpl(), readNcGrid(), Rectangle(), setAssembler(), and writeBinaryGridImpl().
Referenced by createPattern(), and populateSampleIds().
IndexVector ripley::Rectangle::m_nodeId [private] |
Referenced by borrowSampleReferenceIDs(), dump(), populateSampleIds(), and Print_Mesh_Info().
dim_t ripley::Rectangle::m_NX[2] [private] |
number of spatial subdivisions
Referenced by createPattern(), getNumDOF(), insertNeighbourNodes(), nodesToDOF(), operator==(), populateSampleIds(), randomFillWorker(), Rectangle(), and setAssembler().
dim_t ripley::Rectangle::m_offset[2] [private] |
first node on this rank is at (offset0,offset1) in global mesh
Referenced by assembleIntegrate(), createPattern(), findNode(), getLocalCoordinate(), nodesToDOF(), populateSampleIds(), readBinaryGridImpl(), readNcGrid(), Rectangle(), and writeBinaryGridImpl().
double ripley::Rectangle::m_origin[2] [private] |
origin of domain
Referenced by findNode(), getGridParameters(), getLocalCoordinate(), operator==(), and Rectangle().
dim_t ripley::Rectangle::m_ownNE[2] [private] |
number of own elements for this rank in each dimension
Referenced by assembleIntegrate(), and Rectangle().
Referenced by createPattern(), and getPattern().