ripley::MultiBrick Class Reference

Brick is the 3-dimensional implementation of a RipleyDomain. More...

`#include <MultiBrick.h>`

Inheritance diagram for ripley::MultiBrick:

## Public Member Functions

| MultiBrick (dim_t n0, dim_t n1, dim_t n2, double x0, double y0, double z0, double x1, double y1, double z1, int d0=-1, int d1=-1, int d2=-1, const std::vector< double > &points=std::vector< double >(), const std::vector< int > &tags=std::vector< int >(), const TagMap &tagnamestonums=TagMap(), escript::SubWorld_ptr w=escript::SubWorld_ptr(), unsigned int subdivisions=1)
| creates a hexagonal mesh with n0 x n1 x n2 elements over the brick [x0,x1] x [y0,y1] x [z0,z1]. More...
| ~MultiBrick ()
| Destructor. More...
virtual void | interpolateAcross (escript::Data &target, const escript::Data &source) const
| interpolates data given on source onto target where source and target are given on different domains More...
void | validateInterpolationAcross (int fsType_source, const escript::AbstractDomain &domain, int fsType_target) const
| Checks that the given interpolation is possible, throw RipleyExceptions if not. More...
virtual std::string | getDescription () const
| returns a description for this domain More...
virtual bool | operator== (const escript::AbstractDomain &other) const
| equality operator More...
void | dump (const std::string &filename) const
| dumps the mesh to a file with the given name More...
virtual void | readNcGrid (escript::Data &out, std::string filename, std::string varname, const ReaderParameters &params) const
| reads grid data from a netCDF file into a Data object More...
virtual void | readBinaryGrid (escript::Data &out, std::string filename, const ReaderParameters &params) const
| reads grid data from a raw binary file into a Data object More...
virtual void | readBinaryGridFromZipped (escript::Data &out, std::string filename, const ReaderParameters &params) const
| reads grid data from a compressed raw binary file into a Data object More...
virtual void | writeBinaryGrid (const escript::Data &in, std::string filename, int byteOrder, int dataType) const
| writes a Data object to a file in raw binary format More...
const dim_t * | borrowSampleReferenceIDs (int fsType) const
| returns the array of reference numbers for a function space type More...
virtual bool | ownSample (int fsType, index_t id) const
| returns true if this rank owns the sample id. More...
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. More...
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. More...
virtual void | Print_Mesh_Info (const bool full=false) const
| writes information about the mesh to standard output More...
virtual unsigned int | getNumSubdivisionsPerElement () const
| returns the number of times each root element has been subdivided More...
virtual const dim_t * | getNumFacesPerBoundary () const
| returns the number of face elements in the order (left,right,bottom,top,front,back) on current MPI rank More...
virtual IndexVector | getNodeDistribution () const
| returns the node distribution vector More...
virtual const int * | getNumSubdivisionsPerDim () const
| returns the number of spatial subdivisions in each dimension More...
virtual RankVector | getOwnerVector (int fsType) const
| returns a vector of rank numbers where vec[i]=n means that rank n 'owns' element/face element i. More...
Public Member Functions inherited from ripley::Brick
| Brick (dim_t n0, dim_t n1, dim_t n2, double x0, double y0, double z0, double x1, double y1, double z1, int d0=-1, int d1=-1, int d2=-1, const std::vector< double > &points=std::vector< double >(), const std::vector< int > &tags=std::vector< int >(), const TagMap &tagnamestonums=TagMap(), escript::SubWorld_ptr w=escript::SubWorld_ptr())
| creates a hexagonal mesh with n0 x n1 x n2 elements over the brick [x0,x1] x [y0,y1] x [z0,z1]. More...
| ~Brick ()
| Destructor. More...
virtual void | write (const std::string &filename) const
| writes the current mesh to a file with the given name More...
virtual dim_t | getNumDataPointsGlobal () const
| returns the number of data points summed across all MPI processes More...
virtual const dim_t * | getNumNodesPerDim () const
| returns the number of nodes per MPI rank in each dimension More...
virtual const dim_t * | getNumElementsPerDim () const
| returns the number of elements per MPI rank in each dimension More...
virtual double | getLocalCoordinate (index_t index, int dim) const
| returns the index'th coordinate value in given dimension for this rank More...
virtual boost::python::tuple | getGridParameters () const
| returns the tuple (origin, spacing, number_of_elements) More...
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. More...
virtual Assembler_ptr | createAssembler (std::string type, const DataMap &options) const
const double * | getLength () const
| returns the lengths of the domain More...
const double * | getElementLength () const
| returns the lengths of an element More...
Public Member Functions inherited from ripley::RipleyDomain
| RipleyDomain (dim_t dim, escript::SubWorld_ptr p=escript::SubWorld_ptr())
| Constructor with number of dimensions. Allocates MPI info structure. More...
| ~RipleyDomain ()
| Destructor. More...
virtual escript::JMPI | getMPI () const
| returns a reference to the MPI information wrapper for this domain More...
virtual int | getMPISize () const
| returns the number of processors used for this domain More...
virtual int | getMPIRank () const
| returns the MPI rank of this processor More...
virtual void | MPIBarrier () const
| if compiled for MPI then executes an MPI_Barrier, else does nothing More...
virtual bool | onMasterProcessor () const
| returns true if on MPI processor 0, else false More...
MPI_Comm | getMPIComm () const
| returns the MPI communicator More...
virtual bool | isValidFunctionSpaceType (int fsType) const
| returns true if the argument is a valid function space type for this domain More...
virtual std::string | functionSpaceTypeAsString (int fsType) const
| returns a description for the given function space type code More...
virtual int | getDim () const
| returns the number of spatial dimensions of the domain More...
virtual bool | operator!= (const escript::AbstractDomain &other) const
| inequality operator More...
virtual std::pair< int, dim_t > | getDataShape (int fsType) const
| returns the number of data points per sample, and the number of samples as a pair. More...
int | getTagFromSampleNo (int fsType, dim_t sampleNo) const
| returns the tag key for the given sample number More...
virtual void | setTagMap (const std::string &name, int tag)
| sets a map from a clear tag name to a tag key More...
virtual int | getTag (const std::string &name) const
| returns the tag key for tag name More...
virtual bool | isValidTagName (const std::string &name) const
| returns true if name is a defined tag name More...
virtual std::string | showTagNames () const
| returns all tag names in a single string separated by commas More...
virtual void | setNewX (const escript::Data &arg)
| assigns new location to the domain. More...
virtual void | interpolateOnDomain (escript::Data &target, const escript::Data &source) const
| interpolates data given on source onto target where source and target have to be given on the same domain More...
virtual bool | probeInterpolationOnDomain (int fsType_source, int fsType_target) const
| returns true if data on fsType_source can be interpolated onto fsType_target, false otherwise More...
virtual signed char | preferredInterpolationOnDomain (int fsType_source, int fsType_target) const
| Preferred direction of interpolation. If you really need to test for a particular direction, then use probeInterpolation. More...
bool | commonFunctionSpace (const std::vector< int > &fs, int &resultcode) const
| given a vector of FunctionSpace type codes, passes back a code which all can be interpolated to More...
virtual bool | probeInterpolationAcross (int, const escript::AbstractDomain &, int) const
| determines whether interpolation from source to target is possible More...
virtual escript::Data | getX () const
| returns locations in the FEM nodes More...
virtual escript::Data | getNormal () const
| returns boundary normals at the quadrature point on the face elements More...
virtual escript::Data | getSize () const
| returns the element size More...
virtual void | setToX (escript::Data &arg) const
| copies the location of data points into arg. The domain of arg has to match this domain. More...
virtual void | setToGradient (escript::Data &out, const escript::Data &in) const
| copies the gradient of 'in' into 'out'. The actual function space to be considered for the gradient is defined by 'in'. Both arguments have to be defined on this domain. More...
virtual void | setTags (int fsType, int newTag, const escript::Data &mask) const
| assigns new tag newTag to all samples of given function space with a positive value of mask for any of its sample points More...
virtual bool | isCellOriented (int fsType) const
| returns true if data on this domain and given function space type has to be considered as cell centered data More...
virtual StatusType | getStatus () const
| returns a status indicator of the domain. The status identifier should be unique over the lifetime of the object but may be updated if changes to the domain happen, e.g. modifications to its geometry. More...
virtual int | getNumberOfTagsInUse (int fsType) const
| returns the number of tags in use for a function space type More...
virtual const int * | borrowListOfTagsInUse (int fsType) const
| returns a pointer to the list of tags in use for a function space type More...
virtual bool | canTag (int fsType) const
| checks if this domain allows tags for the specified function space type More...
virtual int | getApproximationOrder (int fsType) const
| returns the approximation order used for a function space More...
virtual bool | supportsContactElements () const
| returns true if this domain supports contact elements, false otherwise More...
virtual int | getContinuousFunctionCode () const
| returns a continuous FunctionSpace code More...
virtual int | getReducedContinuousFunctionCode () const
| returns a continuous on reduced order nodes FunctionSpace code More...
virtual int | getFunctionCode () const
| returns a function FunctionSpace code More...
virtual int | getReducedFunctionCode () const
| returns a function with reduced integration order FunctionSpace code More...
virtual int | getFunctionOnBoundaryCode () const
| returns a function on boundary FunctionSpace code More...
virtual int | getReducedFunctionOnBoundaryCode () const
| returns a function on boundary with reduced integration order FunctionSpace code More...
virtual int | getFunctionOnContactZeroCode () const
| return a FunctionOnContactZero code More...
virtual int | getReducedFunctionOnContactZeroCode () const
| returns a FunctionOnContactZero code with reduced integration order More...
virtual int | getFunctionOnContactOneCode () const
| returns a FunctionOnContactOne code More...
virtual int | getReducedFunctionOnContactOneCode () const
| returns a FunctionOnContactOne code with reduced integration order More...
virtual int | getSolutionCode () const
| returns a Solution FunctionSpace code More...
virtual int | getReducedSolutionCode () const
| returns a ReducedSolution FunctionSpace code More...
virtual int | getDiracDeltaFunctionsCode () const
| returns a DiracDeltaFunctions FunctionSpace code More...
virtual int | getSystemMatrixTypeId (const boost::python::object &options) const
| returns the identifier of the matrix type to be used for the global stiffness matrix when a particular solver, package, preconditioner, and symmetric matrix is used More...
virtual int | getTransportTypeId (int solver, int preconditioner, int package, bool symmetry) const
| returns the identifier of the transport problem type to be used when a particular solver, preconditioner, package and symmetric matrix is used More...
virtual void | setToIntegrals (std::vector< real_t > &integrals, const escript::Data &arg) const
| copies the integrals of the function defined by arg into integrals. arg has to be defined on this domain. More...
virtual void | setToIntegrals (std::vector< cplx_t > &integrals, const escript::Data &arg) const
virtual void | addToSystem (escript::AbstractSystemMatrix &mat, escript::Data &rhs, const DataMap &data, Assembler_ptr assembler) const
| adds a PDE onto the stiffness matrix mat and rhs, used for custom solvers with varying arguments counts and so on More...
virtual void | addToSystemFromPython (escript::AbstractSystemMatrix &mat, escript::Data &rhs, const boost::python::list &data, Assembler_ptr assembler) const
| a wrapper for addToSystem that allows calling from Python More...
virtual void | addToRHS (escript::Data &rhs, const DataMap &data, Assembler_ptr assembler) const
| adds a PDE onto rhs, used for custom solvers with varying arguments counts and so on More...
virtual void | addToRHSFromPython (escript::Data &rhs, const boost::python::list &data, Assembler_ptr assembler) const
| a wrapper for addToRHS that allows calling from Python More...
virtual void | addPDEToTransportProblem (escript::AbstractTransportProblem &tp, escript::Data &source, const DataMap &data, Assembler_ptr assembler) const
| adds a PDE onto a transport problem More...

virtual void

addPDEToTransportProblem (escript::AbstractTransportProblem &tp, escript::Data &source, const escript::Data &M, const escript::Data &A, const escript::Data &B, const escript::Data &C, const escript::Data &D, const escript::Data &X, const escript::Data &Y, const escript::Data &d, const escript::Data &y, const escript::Data &d_contact, const escript::Data &y_contact, const escript::Data &d_dirac, const escript::Data &y_dirac) const

| Do not use. Throws exception. More...
void | addPDEToTransportProblemFromPython (escript::AbstractTransportProblem &tp, escript::Data &source, const boost::python::list &data, Assembler_ptr assembler) const
| adds a PDE onto a transport problem More...
virtual escript::ASM_ptr | newSystemMatrix (int row_blocksize, const escript::FunctionSpace &row_functionspace, int column_blocksize, const escript::FunctionSpace &column_functionspace, int type) const
| creates a stiffness matrix and initializes it with zeros More...
virtual escript::ATP_ptr | newTransportProblem (int blocksize, const escript::FunctionSpace &functionspace, int type) const
| creates a transport problem More...
virtual bool | supportsFilter (const boost::python::tuple &t) const
| returns true if this domain can handle the specified tuple of filter options. More...
Assembler_ptr | createAssemblerFromPython (std::string type, const boost::python::list &options) const
Public Member Functions inherited from escript::AbstractContinuousDomain
| AbstractContinuousDomain ()
| Default constructor for AbstractContinuousDomain. More...
virtual | ~AbstractContinuousDomain ()
| Destructor for AbstractContinuousDomain. More...
virtual void | setToIntegrals (std::vector< DataTypes::real_t > &integrals, const escript::Data &arg) const
| copies the integrals of the function defined by arg into integrals. arg has to be defined on this. has to be implemented by the Domain Adapter. More...
virtual void | setToIntegrals (std::vector< DataTypes::cplx_t > &integrals, const escript::Data &arg) const
virtual void | addPDEToSystem (AbstractSystemMatrix &mat, escript::Data &rhs, const escript::Data &A, const escript::Data &B, const escript::Data &C, const escript::Data &D, const escript::Data &X, const escript::Data &Y, const escript::Data &d, const escript::Data &y, const escript::Data &d_contact, const escript::Data &y_contact, const escript::Data &d_dirac, const escript::Data &y_dirac) const
| adds a PDE onto the stiffness matrix mat and a rhs More...
virtual void | addPDEToRHS (escript::Data &rhs, const escript::Data &X, const escript::Data &Y, const escript::Data &y, const escript::Data &y_contact, const escript::Data &y_dirac) const
| adds a PDE onto the stiffness matrix mat and a rhs More...
Public Member Functions inherited from escript::AbstractDomain
Domain_ptr | getPtr ()
| Returns smart pointer which is managing this object. If one does not exist yet it creates one. More...
const_Domain_ptr | getPtr () const
virtual | ~AbstractDomain ()
| Destructor for AbstractDomain. More...
virtual int | getTagFromSampleNo (int functionSpaceType, DataTypes::index_t sampleNo) const =0
| Return the tag key for the given sample number. More...
virtual bool | ownSample (int fs_code, DataTypes::index_t id) const =0
| True if this rank owns the sample(id) Must be implemented by the Domain adapter. More...
void | throwStandardException (const std::string &functionName) const
| Throw a standard exception. This function is called if any attempt is made to use a base class function. More...

## Protected Member Functions

virtual IndexVector | getDiagonalIndices (bool upperOnly) const
| returns the indices of the occupied matrix diagonals More...
virtual void | interpolateNodesToNodesFiner (const escript::Data &source, escript::Data &target, const MultiBrick &other) const
virtual void | interpolateNodesToElementsFiner (const escript::Data &source, escript::Data &target, const MultiBrick &other) const
virtual void | interpolateElementsToElementsCoarser (const escript::Data &source, escript::Data &target, const MultiBrick &other) const
virtual void | interpolateElementsToElementsFiner (const escript::Data &source, escript::Data &target, const MultiBrick &other) const
virtual void | interpolateReducedToElementsFiner (const escript::Data &source, escript::Data &target, const MultiBrick &other) const
virtual void | interpolateReducedToReducedFiner (const escript::Data &source, escript::Data &target, const MultiBrick &other) const
virtual void | populateSampleIds ()
virtual std::vector< IndexVector > | getConnections (bool includeShared) const
| returns occupied matrix column indices for all matrix rows More...
dim_t | findNode (const double *coords) const
| finds the node that the given point coordinates belong to More...
Protected Member Functions inherited from ripley::Brick
virtual dim_t | getNumNodes () const
| returns the number of nodes per MPI rank More...
virtual dim_t | getNumElements () const
| returns the number of elements per MPI rank More...
virtual dim_t | getNumFaceElements () const
| returns the number of face elements on current MPI rank More...
virtual dim_t | getNumDOF () const
| returns the number of degrees of freedom per MPI rank More...
virtual dim_t | getNumDOFInAxis (unsigned axis) const
virtual dim_t | getFirstInDim (unsigned axis) const
virtual void | assembleCoordinates (escript::Data &arg) const
| populates the data object 'arg' with the node coordinates More...
virtual void | assembleGradient (escript::Data &out, const escript::Data &in) const
| computes the gradient of 'in' and puts the result in 'out' More...
virtual void | assembleIntegrate (std::vector< real_t > &integrals, const escript::Data &arg) const
| copies the integrals of the function defined by 'arg' into 'integrals' More...
virtual void | assembleIntegrate (std::vector< cplx_t > &integrals, const escript::Data &arg) const
virtual void | interpolateNodesOnElements (escript::Data &out, const escript::Data &in, bool reduced) const
| interpolates data on nodes in 'in' onto (reduced) elements in 'out' More...
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' More...
virtual void | nodesToDOF (escript::Data &out, const escript::Data &in) const
| converts data on nodes in 'in' to degrees of freedom in 'out' More...
virtual dim_t | getDofOfNode (dim_t node) const
void | populateSampleIds ()
void | populateDofMap ()
template<typename Scalar >
void | assembleGradientImpl (escript::Data &out, const escript::Data &in) const
template<typename Scalar >
void | addToMatrixAndRHS (escript::AbstractSystemMatrix *S, escript::Data &F, const std::vector< Scalar > &EM_S, const std::vector< Scalar > &EM_F, bool addS, bool addF, index_t firstNode, int nEq=1, int nComp=1) const
template<typename ValueType >
void | readBinaryGridImpl (escript::Data &out, const std::string &filename, const ReaderParameters &params) const
template<typename ValueType >
void | writeBinaryGridImpl (const escript::Data &in, const std::string &filename, int byteOrder) const
virtual escript::Data | randomFillWorker (const escript::DataTypes::ShapeType &shape, long seed, const boost::python::tuple &filter) const
Protected Member Functions inherited from ripley::RipleyDomain
template<typename Scalar >
void | copyData (escript::Data &out, const escript::Data &in) const
| copies data in 'in' to 'out' (both must be on same function space) More...
template<typename Scalar >
void | averageData (escript::Data &out, const escript::Data &in) const
| averages data in 'in' to 'out' (from non-reduced to reduced fs) More...
template<typename Scalar >
void | multiplyData (escript::Data &out, const escript::Data &in) const
| copies data in 'in' to 'out' (from reduced to non-reduced fs) More...
void | updateTagsInUse (int fsType) const
template<typename Scalar >
void | addToSystemMatrix (escript::AbstractSystemMatrix *mat, const IndexVector &nodes, dim_t numEq, const std::vector< Scalar > &array) const
void | addPoints (const std::vector< double > &coords, const std::vector< int > &tags)
template<typename Scalar >
void | dofToNodes (escript::Data &out, const escript::Data &in) const
| converts data on degrees of freedom in 'in' to nodes in 'out' More...
template<>
void | addToSystemMatrix (escript::AbstractSystemMatrix *mat, const IndexVector &nodes, dim_t numEq, const DoubleVector &array) const
template<>
void | addToSystemMatrix (escript::AbstractSystemMatrix *mat, const IndexVector &nodes, dim_t numEq, const vector< cplx_t > &array) const

## Protected Attributes

const unsigned int | m_subdivisions
Protected Attributes inherited from ripley::Brick
dim_t | m_gNE [3]
| total number of elements in each dimension More...
double | m_origin [3]
| origin of domain More...
double | m_length [3]
| side lengths of domain More...
double | m_dx [3]
| grid spacings / cell sizes of domain More...
int | m_NX [3]
| number of spatial subdivisions More...
dim_t | m_NE [3]
| number of elements for this rank in each dimension including shared More...
dim_t | m_ownNE [3]
| number of own elements for this rank in each dimension More...
dim_t | m_NN [3]
| number of nodes for this rank in each dimension More...
dim_t | m_offset [3]
| first node on this rank is at (offset0,offset1,offset2) in global mesh More...
dim_t | m_faceCount [6]
| number of face elements per edge (left, right, bottom, top, front, back) More...
IndexVector | m_faceOffset
IndexVector | m_dofId
| vector of sample reference identifiers More...
IndexVector | m_nodeId
IndexVector | m_elementId
IndexVector | m_faceId
IndexVector | m_nodeDistribution
IndexVector | m_dofMap
Protected Attributes inherited from ripley::RipleyDomain
int | m_numDim
StatusType | m_status
escript::JMPI | m_mpiInfo
TagMap | m_tagMap
std::vector< int > | m_nodeTags
std::vector< int > | m_nodeTagsInUse
std::vector< int > | m_elementTags
std::vector< int > | m_elementTagsInUse
std::vector< int > | m_faceTags
std::vector< int > | m_faceTagsInUse
std::vector< DiracPoint > | m_diracPoints
IndexVector | m_diracPointNodeIDs
assembler_t | assembler_type

## Private Member Functions

template<typename S >
void | interpolateNodesToNodesFinerWorker (const escript::Data &source, escript::Data &target, const MultiBrick &other, S sentinel) const
template<typename S >
void | interpolateNodesToElementsFinerWorker (const escript::Data &source, escript::Data &target, const MultiBrick &other, S sentinel) const
template<typename S >
void | interpolateElementsToElementsCoarserWorker (const escript::Data &source, escript::Data &target, const MultiBrick &other, S sentinel) const
template<typename S >
void | interpolateElementsToElementsFinerWorker (const escript::Data &source, escript::Data &target, const MultiBrick &other, S sentinel) const
template<typename S >
void | interpolateReducedToElementsFinerWorker (const escript::Data &source, escript::Data &target, const MultiBrick &other, S sentinel) const
template<typename S >
void | interpolateReducedToReducedFinerWorker (const escript::Data &source, escript::Data &target, const MultiBrick &other, S sentinel) const

## Friends

template<class Scalar >
class | DefaultAssembler3D
class | WaveAssembler3D
class | LameAssembler3D

## Additional Inherited Members

Public Types inherited from escript::AbstractDomain
typedef int | StatusType
Static Public Member Functions inherited from ripley::RipleyDomain
static void | setDecompositionPolicy (DecompositionPolicy value)
static DecompositionPolicy | getDecompositionPolicy ()

## Detailed Description

Brick is the 3-dimensional implementation of a RipleyDomain.

## Constructor & Destructor Documentation

## MultiBrick()

ripley::MultiBrick::MultiBrick | ( | dim_t | n0,
|  | dim_t | n1,
|  | dim_t | n2,
|  | double | x0,
|  | double | y0,
|  | double | z0,
|  | double | x1,
|  | double | y1,
|  | double | z1,
|  | int | d0 = `-1`,
|  | int | d1 = `-1`,
|  | int | d2 = `-1`,
|  | const std::vector< double > & | points = `std::vector<double>()`,
|  | const std::vector< int > & | tags = `std::vector<int>()`,
|  | const TagMap & | tagnamestonums = `TagMap()`,
|  | escript::SubWorld_ptr | w = `escript::SubWorld_ptr()`,
|  | unsigned int | subdivisions = `1`
| ) |  |

creates a hexagonal mesh with n0 x n1 x n2 elements over the brick [x0,x1] x [y0,y1] x [z0,z1].

Parameters

  n0,n1,n2 | number of elements in each dimension
  x0,y0,z0,x1,y1,z1 | coordinates of corner nodes of the brick
  d0,d1,d2 | number of subdivisions in each dimension

References INDEX3, ripley::RipleyDomain::m_diracPointNodeIDs, ripley::RipleyDomain::m_diracPoints, ripley::Brick::m_dx, ripley::Brick::m_faceCount, ripley::Brick::m_gNE, ripley::RipleyDomain::m_mpiInfo, ripley::Brick::m_NE, ripley::Brick::m_NN, ripley::Brick::m_offset, ripley::Brick::m_ownNE, and populateSampleIds().

## ~MultiBrick()

ripley::MultiBrick::~MultiBrick | ( |  | ) |

Destructor.

## Member Function Documentation

## borrowSampleReferenceIDs()

const dim_t * ripley::MultiBrick::borrowSampleReferenceIDs | ( | int | fsType | ) | const

virtual

returns the array of reference numbers for a function space type

Parameters

  fsType | The function space type

Reimplemented from ripley::Brick.

References ripley::DegreesOfFreedom, ripley::Elements, ripley::FaceElements, ripley::RipleyDomain::m_diracPointNodeIDs, ripley::Brick::m_dofId, ripley::Brick::m_elementId, ripley::Brick::m_faceId, ripley::Brick::m_nodeId, ripley::Nodes, ripley::Points, ripley::ReducedDegreesOfFreedom, ripley::ReducedElements, ripley::ReducedFaceElements, and ripley::ReducedNodes.

## dump()

void ripley::MultiBrick::dump | ( | const std::string & | filename | ) | const

virtual

dumps the mesh to a file with the given name

Parameters

  filename | The name of the output file

Reimplemented from ripley::Brick.

References ripley::Brick::dump(), and m_subdivisions.

## findNode()

dim_t ripley::MultiBrick::findNode | ( | const double * | coords | ) | const

protected virtual

finds the node that the given point coordinates belong to

Reimplemented from ripley::Brick.

References INDEX3, ripley::Brick::m_dx, ripley::Brick::m_length, ripley::Brick::m_NE, ripley::RipleyDomain::m_numDim, ripley::Brick::m_offset, and ripley::Brick::m_origin.

## getConnections()

vector< IndexVector > ripley::MultiBrick::getConnections | ( | bool | includeShared | ) | const

protected virtual

returns occupied matrix column indices for all matrix rows

Reimplemented from ripley::Brick.

References paso::M, ripley::Brick::m_gNE, and ripley::Brick::m_NX.

## getDescription()

string ripley::MultiBrick::getDescription | ( |  | ) | const

virtual

returns a description for this domain

Reimplemented from ripley::Brick.

## getDiagonalIndices()

IndexVector ripley::MultiBrick::getDiagonalIndices | ( | bool | upperOnly | ) | const

protected virtual

returns the indices of the occupied matrix diagonals

Reimplemented from ripley::Brick.

References ripley::Brick::m_gNE, and ripley::Brick::m_NX.

## getNodeDistribution()

virtual IndexVector ripley::MultiBrick::getNodeDistribution | ( |  | ) | const

inline virtual

returns the node distribution vector

Reimplemented from ripley::Brick.

## getNumFacesPerBoundary()

virtual const dim_t* ripley::MultiBrick::getNumFacesPerBoundary | ( |  | ) | const

inline virtual

returns the number of face elements in the order (left,right,bottom,top,front,back) on current MPI rank

Reimplemented from ripley::Brick.

## getNumSubdivisionsPerDim()

virtual const int* ripley::MultiBrick::getNumSubdivisionsPerDim | ( |  | ) | const

inline virtual

returns the number of spatial subdivisions in each dimension

Reimplemented from ripley::Brick.

Referenced by validateInterpolationAcross().

## getNumSubdivisionsPerElement()

virtual unsigned int ripley::MultiBrick::getNumSubdivisionsPerElement | ( |  | ) | const

inline virtual

returns the number of times each root element has been subdivided

Referenced by interpolateAcross(), interpolateElementsToElementsCoarserWorker(), interpolateElementsToElementsFinerWorker(), interpolateNodesToElementsFinerWorker(), interpolateNodesToNodesFinerWorker(), interpolateReducedToElementsFinerWorker(), interpolateReducedToReducedFinerWorker(), and validateInterpolationAcross().

## getOwnerVector()

RankVector ripley::MultiBrick::getOwnerVector | ( | int | fsType | ) | const

virtual

returns a vector of rank numbers where vec[i]=n means that rank n 'owns' element/face element i.

Reimplemented from ripley::Brick.

References ripley::Brick::getOwnerVector(), and m_subdivisions.

## interpolateAcross()

void ripley::MultiBrick::interpolateAcross | ( | escript::Data & | target,
|  | const escript::Data & | source
| ) |  | const

virtual

interpolates data given on source onto target where source and target are given on different domains

Reimplemented from ripley::RipleyDomain.

References ripley::DegreesOfFreedom, ripley::Elements, escript::function(), ripley::RipleyDomain::functionSpaceTypeAsString(), escript::Data::getDomain(), escript::Data::getFunctionSpace(), getNumSubdivisionsPerElement(), escript::FunctionSpace::getTypeCode(), interpolateElementsToElementsCoarser(), interpolateElementsToElementsFiner(), ripley::Brick::interpolateNodesOnElements(), interpolateNodesToElementsFiner(), interpolateNodesToNodesFiner(), interpolateReducedToElementsFiner(), ripley::Nodes, ripley::ReducedDegreesOfFreedom, ripley::ReducedElements, ripley::ReducedNodes, validateInterpolationAcross(), and escript::Vector().

## interpolateElementsToElementsCoarser()

void ripley::MultiBrick::interpolateElementsToElementsCoarser | ( | const escript::Data & | source,
|  | escript::Data & | target,
|  | const MultiBrick & | other
| ) |  | const

protected virtual

References interpolateElementsToElementsCoarserWorker(), and escript::Data::isComplex().

Referenced by interpolateAcross().

## interpolateElementsToElementsCoarserWorker()

template<typename S >

void ripley::MultiBrick::interpolateElementsToElementsCoarserWorker | ( | const escript::Data & | source,
|  | escript::Data & | target,
|  | const MultiBrick & | other,
|  | S | sentinel
| ) |  | const

private

References FIRST_QUAD, escript::Data::getDataPointSize(), ripley::Brick::getNumElementsPerDim(), getNumSubdivisionsPerElement(), escript::Data::getSampleDataRO(), escript::Data::getSampleDataRW(), INDEX3, INDEX4, ripley::Brick::m_NE, m_subdivisions, escript::Data::requireWrite(), S, and SECOND_QUAD.

Referenced by interpolateElementsToElementsCoarser().

## interpolateElementsToElementsFiner()

void ripley::MultiBrick::interpolateElementsToElementsFiner | ( | const escript::Data & | source,
|  | escript::Data & | target,
|  | const MultiBrick & | other
| ) |  | const

protected virtual

References interpolateElementsToElementsFinerWorker(), and escript::Data::isComplex().

Referenced by interpolateAcross().

## interpolateElementsToElementsFinerWorker()

template<typename S >

void ripley::MultiBrick::interpolateElementsToElementsFinerWorker | ( | const escript::Data & | source,
|  | escript::Data & | target,
|  | const MultiBrick & | other,
|  | S | sentinel
| ) |  | const

private

References FIRST_QUAD, escript::Data::getDataPointSize(), getNumSubdivisionsPerElement(), escript::Data::getSampleDataRO(), escript::Data::getSampleDataRW(), INDEX3, INDEX4, ripley::Brick::m_NE, m_subdivisions, escript::Data::requireWrite(), S, and SECOND_QUAD.

Referenced by interpolateElementsToElementsFiner().

## interpolateNodesToElementsFiner()

void ripley::MultiBrick::interpolateNodesToElementsFiner | ( | const escript::Data & | source,
|  | escript::Data & | target,
|  | const MultiBrick & | other
| ) |  | const

protected virtual

References interpolateNodesToElementsFinerWorker(), and escript::Data::isComplex().

Referenced by interpolateAcross().

## interpolateNodesToElementsFinerWorker()

template<typename S >

void ripley::MultiBrick::interpolateNodesToElementsFinerWorker | ( | const escript::Data & | source,
|  | escript::Data & | target,
|  | const MultiBrick & | other,
|  | S | sentinel
| ) |  | const

private

References FIRST_QUAD, escript::Data::getDataPointSize(), ripley::Brick::getLocalCoordinate(), ripley::Brick::getNumElementsPerDim(), getNumSubdivisionsPerElement(), escript::Data::getSampleDataRO(), escript::Data::getSampleDataRW(), INDEX3, INDEX4, ripley::Brick::m_dx, ripley::Brick::m_NE, m_subdivisions, escript::Data::requireWrite(), S, and SECOND_QUAD.

Referenced by interpolateNodesToElementsFiner().

## interpolateNodesToNodesFiner()

void ripley::MultiBrick::interpolateNodesToNodesFiner | ( | const escript::Data & | source,
|  | escript::Data & | target,
|  | const MultiBrick & | other
| ) |  | const

protected virtual

References interpolateNodesToNodesFinerWorker(), and escript::Data::isComplex().

Referenced by interpolateAcross().

## interpolateNodesToNodesFinerWorker()

template<typename S >

void ripley::MultiBrick::interpolateNodesToNodesFinerWorker | ( | const escript::Data & | source,
|  | escript::Data & | target,
|  | const MultiBrick & | other,
|  | S | sentinel
| ) |  | const

private

References escript::Data::getDataPointSize(), ripley::Brick::getLocalCoordinate(), ripley::Brick::getNumNodesPerDim(), getNumSubdivisionsPerElement(), escript::Data::getSampleDataRO(), escript::Data::getSampleDataRW(), INDEX3, ripley::Brick::m_dx, ripley::Brick::m_NN, m_subdivisions, paso::nz, escript::Data::requireWrite(), and S.

Referenced by interpolateNodesToNodesFiner().

## interpolateReducedToElementsFiner()

void ripley::MultiBrick::interpolateReducedToElementsFiner | ( | const escript::Data & | source,
|  | escript::Data & | target,
|  | const MultiBrick & | other
| ) |  | const

protected virtual

References interpolateReducedToElementsFinerWorker(), and escript::Data::isComplex().

Referenced by interpolateAcross().

## interpolateReducedToElementsFinerWorker()

template<typename S >

void ripley::MultiBrick::interpolateReducedToElementsFinerWorker | ( | const escript::Data & | source,
|  | escript::Data & | target,
|  | const MultiBrick & | other,
|  | S | sentinel
| ) |  | const

private

References escript::Data::getDataPointSize(), getNumSubdivisionsPerElement(), escript::Data::getSampleDataRO(), escript::Data::getSampleDataRW(), INDEX3, ripley::Brick::m_NE, m_subdivisions, escript::Data::requireWrite(), and S.

Referenced by interpolateReducedToElementsFiner().

## interpolateReducedToReducedFiner()

void ripley::MultiBrick::interpolateReducedToReducedFiner | ( | const escript::Data & | source,
|  | escript::Data & | target,
|  | const MultiBrick & | other
| ) |  | const

protected virtual

References interpolateReducedToReducedFinerWorker(), and escript::Data::isComplex().

## interpolateReducedToReducedFinerWorker()

template<typename S >

void ripley::MultiBrick::interpolateReducedToReducedFinerWorker | ( | const escript::Data & | source,
|  | escript::Data & | target,
|  | const MultiBrick & | other,
|  | S | sentinel
| ) |  | const

private

References escript::Data::getDataPointSize(), getNumSubdivisionsPerElement(), escript::Data::getSampleDataRO(), escript::Data::getSampleDataRW(), ripley::Brick::m_NE, m_subdivisions, escript::Data::requireWrite(), and S.

Referenced by interpolateReducedToReducedFiner().

## operator==()

bool ripley::MultiBrick::operator== | ( | const escript::AbstractDomain & | other | ) | const

virtual

equality operator

Reimplemented from ripley::Brick.

References ripley::Brick::m_gNE, ripley::Brick::m_length, ripley::Brick::m_NX, ripley::Brick::m_origin, and m_subdivisions.

## ownSample()

bool ripley::MultiBrick::ownSample | ( | int | fsType,
|  | index_t | id
| ) |  | const

virtual

returns true if this rank owns the sample id.

Reimplemented from ripley::Brick.

References ripley::DegreesOfFreedom, ripley::Elements, ripley::FaceElements, ripley::RipleyDomain::getMPISize(), ripley::Brick::getNumDOF(), ripley::Brick::m_dofMap, ripley::Brick::m_faceCount, ripley::Brick::m_NE, ripley::Brick::m_NN, ripley::Nodes, ripley::ReducedDegreesOfFreedom, ripley::ReducedElements, ripley::ReducedFaceElements, and ripley::ReducedNodes.

## populateSampleIds()

void ripley::MultiBrick::populateSampleIds | ( |  | ) |

protected virtual

References ripley::Elements, ESYS_ASSERT, ripley::FaceElements, ripley::Brick::getNumDataPointsGlobal(), ripley::Brick::getNumDOF(), ripley::Brick::getNumElements(), ripley::Brick::getNumFaceElements(), ripley::Brick::getNumNodes(), globalNodeId, ripley::Brick::m_dofId, ripley::Brick::m_elementId, ripley::RipleyDomain::m_elementTags, ripley::Brick::m_faceCount, ripley::Brick::m_faceId, ripley::Brick::m_faceOffset, ripley::RipleyDomain::m_faceTags, ripley::Brick::m_gNE, ripley::RipleyDomain::m_mpiInfo, ripley::Brick::m_NE, ripley::Brick::m_NN, ripley::Brick::m_nodeDistribution, ripley::Brick::m_nodeId, ripley::RipleyDomain::m_nodeTags, ripley::Brick::m_NX, ripley::Brick::m_offset, ripley::Nodes, ripley::Brick::populateDofMap(), ripley::RipleyDomain::setTagMap(), and ripley::RipleyDomain::updateTagsInUse().

Referenced by MultiBrick().

## Print_Mesh_Info()

void ripley::MultiBrick::Print_Mesh_Info | ( | const bool | full = `false` | ) | const

virtual

writes information about the mesh to standard output

Parameters

  full | whether to print additional data

Reimplemented from ripley::Brick.

References ripley::Brick::getLocalCoordinate(), ripley::Brick::getNumNodes(), ripley::Brick::m_NN, ripley::Brick::m_nodeId, and ripley::RipleyDomain::Print_Mesh_Info().

## readBinaryGrid()

void ripley::MultiBrick::readBinaryGrid | ( | escript::Data & | out,
|  | std::string | filename,
|  | const ReaderParameters & | params
| ) |  | const

virtual

reads grid data from a raw binary file into a Data object

Reimplemented from ripley::Brick.

References m_subdivisions, and ripley::Brick::readBinaryGrid().

## readBinaryGridFromZipped()

void ripley::MultiBrick::readBinaryGridFromZipped | ( | escript::Data & | out,
|  | std::string | filename,
|  | const ReaderParameters & | params
| ) |  | const

virtual

reads grid data from a compressed raw binary file into a Data object

Reimplemented from ripley::Brick.

References m_subdivisions, and ripley::Brick::readBinaryGridFromZipped().

## readNcGrid()

void ripley::MultiBrick::readNcGrid | ( | escript::Data & | out,
|  | std::string | filename,
|  | std::string | varname,
|  | const ReaderParameters & | params
| ) |  | const

virtual

reads grid data from a netCDF file into a Data object

Reimplemented from ripley::Brick.

References m_subdivisions, and ripley::Brick::readNcGrid().

## setToNormal()

void ripley::MultiBrick::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.

Reimplemented from ripley::Brick.

References ripley::FaceElements, escript::Data::getFunctionSpace(), escript::Data::getSampleDataRW(), escript::FunctionSpace::getTypeCode(), INDEX2, ripley::Brick::m_faceOffset, ripley::Brick::m_NE, ripley::ReducedFaceElements, and escript::Data::requireWrite().

## setToSize()

void ripley::MultiBrick::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.

Reimplemented from ripley::Brick.

References ripley::Elements, ripley::FaceElements, escript::Data::getFunctionSpace(), escript::Data::getNumDataPointsPerSample(), ripley::Brick::getNumElements(), escript::Data::getSampleDataRW(), escript::FunctionSpace::getTypeCode(), INDEX2, ripley::Brick::m_dx, ripley::Brick::m_faceOffset, ripley::Brick::m_NE, ripley::ReducedElements, ripley::ReducedFaceElements, and escript::Data::requireWrite().

## validateInterpolationAcross()

void ripley::MultiBrick::validateInterpolationAcross | ( | int | fsType_source,
|  | const escript::AbstractDomain & | domain,
|  | int | fsType_target
| ) |  | const

Checks that the given interpolation is possible, throw RipleyExceptions if not.

References ripley::Brick::getLength(), ripley::RipleyDomain::getMPIComm(), ripley::Brick::getNumElementsPerDim(), getNumSubdivisionsPerDim(), getNumSubdivisionsPerElement(), ripley::Brick::m_length, ripley::RipleyDomain::m_mpiInfo, ripley::RipleyDomain::m_numDim, ripley::Brick::m_NX, ripley::Brick::m_ownNE, and m_subdivisions.

Referenced by interpolateAcross().

## writeBinaryGrid()

void ripley::MultiBrick::writeBinaryGrid | ( | const escript::Data & | in,
|  | std::string | filename,
|  | int | byteOrder,
|  | int | dataType
| ) |  | const

virtual

writes a Data object to a file in raw binary format

Reimplemented from ripley::Brick.

References m_subdivisions, and ripley::Brick::writeBinaryGrid().

## Friends And Related Function Documentation

## DefaultAssembler3D

template<class Scalar >

friend class DefaultAssembler3D

friend

## LameAssembler3D

friend class LameAssembler3D

friend

## WaveAssembler3D

friend class WaveAssembler3D

friend

## Member Data Documentation

## m_subdivisions

const unsigned int ripley::MultiBrick::m_subdivisions

protected

Referenced by dump(), getOwnerVector(), interpolateElementsToElementsCoarserWorker(), interpolateElementsToElementsFinerWorker(), interpolateNodesToElementsFinerWorker(), interpolateNodesToNodesFinerWorker(), interpolateReducedToElementsFinerWorker(), interpolateReducedToReducedFinerWorker(), operator==(), readBinaryGrid(), readBinaryGridFromZipped(), readNcGrid(), validateInterpolationAcross(), and writeBinaryGrid().

The documentation for this class was generated from the following files:

- MultiBrick.h
- MultiBrick.cpp