escript  Revision_
ripley/src/Rectangle.h
Go to the documentation of this file.
1 
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2020 by The University of Queensland
5 * http://www.uq.edu.au
6 *
7 * Primary Business: Queensland, Australia
8 * Licensed under the Apache License, version 2.0
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 * Development 2012-2013 by School of Earth Sciences
13 * Development from 2014-2017 by Centre for Geoscience Computing (GeoComp)
14 * Development from 2019 by School of Earth and Environmental Sciences
15 **
16 *****************************************************************************/
17 
18 #ifndef __RIPLEY_RECTANGLE_H__
19 #define __RIPLEY_RECTANGLE_H__
20 
21 #ifdef _WIN32 // for M_1_PI
22 #define _USE_MATH_DEFINES
23 #include <math.h>
24 #endif
25 
26 #include <ripley/RipleyDomain.h>
27 
28 namespace ripley {
29 
35 {
36  template<class Scalar> friend class DefaultAssembler2D;
37  friend class WaveAssembler2D;
38  friend class LameAssembler2D;
39 public:
40 
48  Rectangle(dim_t n0, dim_t n1, double x0, double y0, double x1, double y1,
49  int d0=-1, int d1=-1,
50  const std::vector<double>& points = std::vector<double>(),
51  const std::vector<int>& tags = std::vector<int>(),
52  const TagMap& tagnamestonums = TagMap(),
54  );
55 
60  ~Rectangle();
61 
66  virtual std::string getDescription() const;
67 
71  virtual bool operator==(const escript::AbstractDomain& other) const;
72 
78  virtual void write(const std::string& filename) const;
79 
85  void dump(const std::string& filename) const;
86 
89  virtual void readNcGrid(escript::Data& out, std::string filename,
90  std::string varname, const ReaderParameters& params) const;
91 
94  virtual void readBinaryGrid(escript::Data& out, std::string filename,
95  const ReaderParameters& params) const;
96 
99  virtual void readBinaryGridFromZipped(escript::Data& out, std::string filename,
100  const ReaderParameters& params) const;
101 
104  virtual void writeBinaryGrid(const escript::Data& in,
105  std::string filename,
106  int byteOrder, int dataType) const;
107 
113  const dim_t* borrowSampleReferenceIDs(int fsType) const;
114 
119  virtual bool ownSample(int fsType, index_t id) const;
120 
127  virtual void setToNormal(escript::Data& out) const;
128 
134  virtual void setToSize(escript::Data& out) const;
135 
140  virtual dim_t getNumDataPointsGlobal() const;
141 
147  virtual void Print_Mesh_Info(const bool full=false) const;
148 
153  virtual const dim_t* getNumNodesPerDim() const { return m_NN; }
154 
159  virtual const dim_t* getNumElementsPerDim() const { return m_NE; }
160 
166  virtual const dim_t* getNumFacesPerBoundary() const { return m_faceCount; }
167 
172  virtual IndexVector getNodeDistribution() const { return m_nodeDistribution; }
173 
178  virtual const int* getNumSubdivisionsPerDim() const { return m_NX; }
179 
184  virtual double getLocalCoordinate(index_t index, int dim) const;
185 
190  virtual boost::python::tuple getGridParameters() const;
191 
197  const escript::FunctionSpace& what, long seed,
198  const boost::python::tuple& filter) const;
199 
204  virtual Assembler_ptr createAssembler(std::string type,
205  const DataMap& options) const;
206 
211  const double *getLength() const { return m_length; }
212 
217  const double *getElementLength() const { return m_dx; }
218 
224  virtual RankVector getOwnerVector(int fsType) const;
225 
226 protected:
227  virtual dim_t getNumNodes() const;
228  virtual dim_t getNumElements() const;
229  virtual dim_t getNumFaceElements() const;
230  virtual dim_t getNumDOF() const;
231  virtual dim_t getNumDOFInAxis(unsigned axis) const;
232  virtual index_t getFirstInDim(unsigned axis) const;
233 
234  virtual IndexVector getDiagonalIndices(bool upperOnly) const;
235  virtual void assembleCoordinates(escript::Data& arg) const;
236  virtual void assembleGradient(escript::Data& out,
237  const escript::Data& in) const;
238  virtual void assembleIntegrate(std::vector<real_t>& integrals,
239  const escript::Data& arg) const;
240  virtual void assembleIntegrate(std::vector<cplx_t>& integrals,
241  const escript::Data& arg) const;
242  virtual std::vector<IndexVector> getConnections(bool includeShared=false) const;
243 
244 #ifdef ESYS_HAVE_TRILINOS
245  virtual esys_trilinos::const_TrilinosGraph_ptr getTrilinosGraph() const;
246 #endif
247 
248 #ifdef ESYS_HAVE_PASO
249  virtual paso::SystemMatrixPattern_ptr getPasoMatrixPattern(
250  bool reducedRowOrder, bool reducedColOrder) const;
251 #endif
252  virtual void interpolateNodesOnElements(escript::Data& out,
253  const escript::Data& in, bool reduced) const;
254  virtual void interpolateNodesOnFaces(escript::Data& out,
255  const escript::Data& in,
256  bool reduced) const;
257 
258  virtual void nodesToDOF(escript::Data& out, const escript::Data& in) const;
259  virtual dim_t getDofOfNode(dim_t node) const;
260 
261  virtual void populateSampleIds();
262  virtual void populateDofMap();
263 
264  template<typename Scalar>
265  void assembleGradientImpl(escript::Data& out,
266  const escript::Data& in) const;
267 
268  template<typename Scalar>
269  void addToMatrixAndRHS(escript::AbstractSystemMatrix* S, escript::Data& F,
270  const std::vector<Scalar>& EM_S, const std::vector<Scalar>& EM_F,
271  bool addS, bool addF, index_t firstNode, int nEq=1, int nComp=1) const;
272 
273  template<typename ValueType>
274  void readBinaryGridImpl(escript::Data& out, const std::string& filename,
275  const ReaderParameters& params) const;
276 
277 #ifdef ESYS_HAVE_BOOST_IO
278  template<typename ValueType>
279  void readBinaryGridZippedImpl(escript::Data& out,
280  const std::string& filename, const ReaderParameters& params) const;
281 #endif
282 
283  template<typename ValueType>
284  void writeBinaryGridImpl(const escript::Data& in,
285  const std::string& filename, int byteOrder) const;
286 
287  virtual dim_t findNode(const double *coords) const;
288 
289 
290  escript::Data randomFillWorker(const escript::DataTypes::ShapeType& shape,
291  long seed, const boost::python::tuple& filter) const;
292 
294  dim_t m_gNE[2];
295 
297  double m_origin[2];
298 
300  double m_length[2];
301 
303  double m_dx[2];
304 
306  int m_NX[2];
307 
309  dim_t m_NE[2];
310 
312  dim_t m_ownNE[2];
313 
315  dim_t m_NN[2];
316 
318  dim_t m_offset[2];
319 
321  dim_t m_faceCount[4];
322 
326 
332 
333  // vector with first node id on each rank
335 
336  // vector that maps each node to a DOF index (used for the coupler)
338 
339 #ifdef ESYS_HAVE_PASO
340  // the Paso System Matrix pattern
341  mutable paso::SystemMatrixPattern_ptr m_pattern;
342 #endif
343 
344 #ifdef ESYS_HAVE_TRILINOS
345  mutable esys_trilinos::const_TrilinosGraph_ptr m_graph;
347 #endif
348 private:
349  template<typename Scalar>
350  void assembleIntegrateImpl(std::vector<Scalar>& integrals, const escript::Data& arg) const;
351 
352  template <typename S>
353  void interpolateNodesOnElementsWorker(escript::Data& out,
354  const escript::Data& in, bool reduced, S sentinel) const;
355  template <typename S>
356  void interpolateNodesOnFacesWorker(escript::Data& out,
357  const escript::Data& in,
358  bool reduced, S sentinel) const;
359 };
360 
363 {
364  return m_dofMap[node];
365 }
366 
368 {
369  return (m_gNE[0]+1)*(m_gNE[1]+1);
370 }
371 
372 inline double Rectangle::getLocalCoordinate(index_t index, int dim) const
373 {
374  ESYS_ASSERT(dim>=0 && dim<2, "'dim' out of bounds");
375  ESYS_ASSERT(index>=0 && index<m_NN[dim], "'index' out of bounds");
376  return m_origin[dim]+m_dx[dim]*(m_offset[dim]+index);
377 }
378 
379 inline boost::python::tuple Rectangle::getGridParameters() const
380 {
381  return boost::python::make_tuple(
382  boost::python::make_tuple(m_origin[0], m_origin[1]),
383  boost::python::make_tuple(m_dx[0], m_dx[1]),
384  boost::python::make_tuple(m_gNE[0], m_gNE[1]));
385 }
386 
387 //protected
389 {
390  return (m_gNE[0]+1)/m_NX[0]*(m_gNE[1]+1)/m_NX[1];
391 }
392 
393 //protected
394 inline dim_t Rectangle::getNumDOFInAxis(unsigned axis) const
395 {
396  ESYS_ASSERT(axis < m_numDim, "Invalid axis");
397  return (m_gNE[axis]+1)/m_NX[axis];
398 }
399 
400 //protected
402 {
403  return m_NN[0]*m_NN[1];
404 }
405 
406 //protected
408 {
409  return m_NE[0]*m_NE[1];
410 }
411 
412 //protected
414 {
415  return m_faceCount[0] + m_faceCount[1] + m_faceCount[2] + m_faceCount[3];
416 }
417 
418 //protected
419 inline index_t Rectangle::getFirstInDim(unsigned axis) const
420 {
421  return m_offset[axis] == 0 ? 0 : 1;
422 }
423 
424 } // end of namespace ripley
425 
426 #endif // __RIPLEY_RECTANGLE_H__
427 
speckley::DATATYPE_INT32
@ DATATYPE_INT32
Definition: speckley/src/system_dep.h:63
speckley::TagMap
std::map< std::string, int > TagMap
Definition: Speckley.h:46
MPI_Status
int MPI_Status
Definition: EsysMPI.h:47
escript::Data::getNumDataPointsPerSample
int getNumDataPointsPerSample() const
Return the number of data points per sample.
Definition: Data.h:544
ripley::ReducedElements
@ ReducedElements
Definition: Ripley.h:55
escript::Data::isComplex
bool isComplex() const
True if components of this data are stored as complex.
Definition: Data.cpp:1160
ripley
Definition: ripley/src/AbstractAssembler.h:26
ripley::RipleyDomain::m_mpiInfo
escript::JMPI m_mpiInfo
Definition: ripley/src/RipleyDomain.h:773
message::sourceID
neighbourID_t sourceID
Definition: blocktools.h:72
speckley::Rectangle::getDescription
virtual std::string getDescription() const
returns a description for this domain
Definition: speckley/src/Rectangle.cpp:197
ripley::DECOMP_STRICT
@ DECOMP_STRICT
Definition: ripley/src/RipleyDomain.h:62
ripley::Rectangle::m_faceId
IndexVector m_faceId
Definition: ripley/src/Rectangle.h:331
escript::DataTypes::real_t
double real_t
type of all real-valued scalars in escript
Definition: DataTypes.h:52
ripley::byte_swap64
char * byte_swap64(char *val)
Definition: ripley/src/system_dep.h:118
ripley::DataMap
std::map< std::string, escript::Data > DataMap
Definition: ripley/src/domainhelpers.h:25
ripley::Rectangle::readBinaryGridImpl
void readBinaryGridImpl(escript::Data &out, const std::string &filename, const ReaderParameters &params) const
Definition: ripley/src/Rectangle.cpp:572
message
Definition: blocktools.h:70
ripley::Rectangle::getNumDOF
virtual dim_t getNumDOF() const
returns the number of degrees of freedom per MPI rank
Definition: ripley/src/Rectangle.h:388
ripley::Rectangle::m_NN
dim_t m_NN[2]
number of nodes for this rank in each dimension
Definition: ripley/src/Rectangle.h:315
speckley::Rectangle::writeBinaryGrid
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
Definition: speckley/src/Rectangle.cpp:800
speckley::SpeckleyDomain::addPoints
void addPoints(const std::vector< double > &coords, const std::vector< int > &tags)
Definition: speckley/src/SpeckleyDomain.cpp:1134
ripley::Rectangle::getOwnerVector
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.
Definition: ripley/src/Rectangle.cpp:1105
ripley::Rectangle::getNumElementsPerDim
virtual const dim_t * getNumElementsPerDim() const
returns the number of elements per MPI rank in each dimension
Definition: ripley/src/Rectangle.h:159
escript::Data::requireWrite
void requireWrite()
Ensures data is ready for write access. This means that the data will be resolved if lazy and will be...
Definition: Data.cpp:1239
ripley::RipleyDomain::m_elementTags
std::vector< int > m_elementTags
Definition: ripley/src/RipleyDomain.h:776
speckley::Rectangle::integral_order4
void integral_order4(std::vector< Scalar > &, const escript::Data &) const
Definition: RectangleIntegrals.cpp:76
ripley::Rectangle::m_dofMap
IndexVector m_dofMap
Definition: ripley/src/Rectangle.h:337
ripley::ReaderParameters::first
std::vector< dim_t > first
the (global) offset into the data object to start writing into
Definition: ripley/src/RipleyDomain.h:72
ripley::Rectangle::WaveAssembler2D
friend class WaveAssembler2D
Definition: ripley/src/Rectangle.h:37
ripley::Rectangle::m_ownNE
dim_t m_ownNE[2]
number of own elements for this rank in each dimension
Definition: ripley/src/Rectangle.h:312
ripley::RipleyDomain::m_faceTags
std::vector< int > m_faceTags
Definition: ripley/src/RipleyDomain.h:777
speckley::Rectangle::Print_Mesh_Info
virtual void Print_Mesh_Info(const bool full=false) const
writes information about the mesh to standard output
Definition: speckley/src/Rectangle.cpp:1112
ripley::Rectangle::m_dofId
IndexVector m_dofId
vector of sample reference identifiers
Definition: ripley/src/Rectangle.h:328
escript::Distribution_ptr
boost::shared_ptr< Distribution > Distribution_ptr
Definition: Distribution.h:25
speckley::SpeckleyDomain::m_diracPointNodeIDs
IndexVector m_diracPointNodeIDs
Definition: speckley/src/SpeckleyDomain.h:752
speckley::DATATYPE_FLOAT64
@ DATATYPE_FLOAT64
Definition: speckley/src/system_dep.h:65
speckley::SpeckleyDomain::m_order
int m_order
element order (will be m_order + 1 quad points in each axis)
Definition: speckley/src/SpeckleyDomain.h:755
message::destID
neighbourID_t destID
Definition: blocktools.h:73
INDEX2
#define INDEX2(_X1_, _X2_, _N1_)
Definition: index.h:23
ripley::RipleyException
RipleyException exception class.
Definition: RipleyException.h:31
ripley::Points
@ Points
Definition: Ripley.h:58
speckley::Rectangle::assembleIntegrate
virtual void assembleIntegrate(std::vector< real_t > &integrals, const escript::Data &arg) const
copies the integrals of the function defined by 'arg' into 'integrals'
Definition: speckley/src/Rectangle.cpp:1210
ripley::DECOMP_ADD_ELEMENTS
@ DECOMP_ADD_ELEMENTS
Definition: ripley/src/RipleyDomain.h:60
speckley::Rectangle::WaveAssembler2D
friend class WaveAssembler2D
Definition: speckley/src/Rectangle.h:402
ripley::TagMap
std::map< std::string, int > TagMap
Definition: Ripley.h:47
RIPLEY_DLL_API
#define RIPLEY_DLL_API
Definition: ripley/src/system_dep.h:21
escript::Data::getSampleDataRO
const DataTypes::real_t * getSampleDataRO(DataTypes::RealVectorType::size_type sampleNo, DataTypes::real_t dummy=0) const
Return the sample data for the given sample no. Please do not use this unless you NEED to access samp...
Definition: Data.h:1991
ripley::factorise
void factorise(std::vector< int > &factors, int product)
Definition: ripley/src/domainhelpers.cpp:29
ripley::Rectangle::m_gNE
dim_t m_gNE[2]
total number of elements in each dimension
Definition: ripley/src/Rectangle.h:294
ripley::DATATYPE_FLOAT64
@ DATATYPE_FLOAT64
Definition: ripley/src/system_dep.h:65
speckley::Rectangle::m_faceCount
dim_t m_faceCount[4]
number of face elements per edge (left, right, bottom, top)
Definition: speckley/src/Rectangle.h:387
speckley::Rectangle::interpolateElementsOnNodesWorker
void interpolateElementsOnNodesWorker(escript::Data &out, const escript::Data &in) const
Definition: speckley/src/Rectangle.cpp:1599
speckley::Rectangle::setToNormal
virtual void setToNormal(escript::Data &out) const
copies the surface normals at data points into out. The actual function space to be considered is def...
Definition: speckley/src/Rectangle.cpp:1067
ripley::DATATYPE_INT32
@ DATATYPE_INT32
Definition: ripley/src/system_dep.h:63
ripley::Rectangle::getNodeDistribution
virtual IndexVector getNodeDistribution() const
returns the node distribution vector
Definition: ripley/src/Rectangle.h:172
escript::NotImplementedError
An exception class for features which are not (yet) implemented.
Definition: EsysException.h:90
ripley::Rectangle::getNumFacesPerBoundary
virtual const dim_t * getNumFacesPerBoundary() const
returns the number of face elements in the order (left,right,bottom,top) on current MPI rank
Definition: ripley/src/Rectangle.h:166
ripley::Rectangle::interpolateNodesOnFacesWorker
void interpolateNodesOnFacesWorker(escript::Data &out, const escript::Data &in, bool reduced, S sentinel) const
Definition: ripley/src/Rectangle.cpp:2365
speckley::Rectangle::m_NX
int m_NX[2]
number of spatial subdivisions
Definition: speckley/src/Rectangle.h:375
escript::AbstractDomain::getPtr
Domain_ptr getPtr()
Returns smart pointer which is managing this object. If one does not exist yet it creates one.
Definition: AbstractDomain.cpp:25
ripley::Rectangle::getDofOfNode
virtual dim_t getDofOfNode(dim_t node) const
Definition: ripley/src/Rectangle.h:362
ripley::Nodes
@ Nodes
Definition: Ripley.h:52
ripley::Rectangle::ownSample
virtual bool ownSample(int fsType, index_t id) const
returns true if this rank owns the sample id.
Definition: ripley/src/Rectangle.cpp:1057
ripley::ReducedDegreesOfFreedom
@ ReducedDegreesOfFreedom
Definition: Ripley.h:51
speckley::Rectangle::setToSize
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....
Definition: speckley/src/Rectangle.cpp:1072
escript::Data::getNumberOfTaggedValues
size_t getNumberOfTaggedValues() const
For tagged Data returns the number of tags with values. For non-tagged data will return 0 (even Data ...
Definition: Data.cpp:5855
ripley::Rectangle::getLocalCoordinate
virtual double getLocalCoordinate(index_t index, int dim) const
returns the index'th coordinate value in given dimension for this rank
Definition: ripley/src/Rectangle.h:372
ripley::Elements
@ Elements
Definition: Ripley.h:54
escript::FileWriter
Definition: FileWriter.h:30
escript::DataTypes::DataVectorAlt< real_t >
ripley::Rectangle::getLength
const double * getLength() const
returns the lengths of the domain
Definition: ripley/src/Rectangle.h:211
escript::randomFillArray
void randomFillArray(long seed, double *array, size_t n)
Definition: Random.cpp:79
speckley::Rectangle::write
virtual void write(const std::string &filename) const
writes the current mesh to a file with the given name
Definition: speckley/src/Rectangle.cpp:881
speckley::Rectangle::m_nodeDistribution
IndexVector m_nodeDistribution
Definition: speckley/src/Rectangle.h:395
speckley::SpeckleyDomain::m_nodeTags
std::vector< int > m_nodeTags
Definition: speckley/src/SpeckleyDomain.h:749
speckley::ReaderParameters::byteOrder
int byteOrder
byte order in the file (used by binary reader only)
Definition: speckley/src/SpeckleyDomain.h:64
speckley::Rectangle::m_elementId
IndexVector m_elementId
Definition: speckley/src/Rectangle.h:392
speckley::Rectangle::interpolateNodesOnElementsWorker
void interpolateNodesOnElementsWorker(escript::Data &out, const escript::Data &in, bool reduced) const
Definition: speckley/src/Rectangle.cpp:1446
ripley::DegreesOfFreedom
@ DegreesOfFreedom
Definition: Ripley.h:50
paso::SystemMatrixPattern_ptr
boost::shared_ptr< SystemMatrixPattern > SystemMatrixPattern_ptr
Definition: SystemMatrixPattern.h:40
speckley::Rectangle::integral_order3
void integral_order3(std::vector< Scalar > &, const escript::Data &) const
Definition: RectangleIntegrals.cpp:51
ripley::Rectangle::randomFillWorker
escript::Data randomFillWorker(const escript::DataTypes::ShapeType &shape, long seed, const boost::python::tuple &filter) const
Definition: ripley/src/Rectangle.cpp:2584
ripley::Rectangle::getDiagonalIndices
virtual IndexVector getDiagonalIndices(bool upperOnly) const
returns the indices of the occupied matrix diagonals
Definition: ripley/src/Rectangle.cpp:1766
speckley::SpeckleyDomain::m_numDim
int m_numDim
Definition: speckley/src/SpeckleyDomain.h:745
ripley::BYTEORDER_NATIVE
@ BYTEORDER_NATIVE
Definition: ripley/src/system_dep.h:50
ripley::byte_swap32
char * byte_swap32(char *val)
Definition: ripley/src/system_dep.h:111
speckley::Rectangle::interpolateElementsOnNodes
virtual void interpolateElementsOnNodes(escript::Data &out, const escript::Data &in) const
interpolates data on elements in 'in' onto nodes in 'out'
Definition: speckley/src/Rectangle.cpp:1588
ripley::ReaderParameters::byteOrder
int byteOrder
byte order in the file (used by binary reader only)
Definition: ripley/src/RipleyDomain.h:81
ripley::RipleyDomain::m_diracPointNodeIDs
IndexVector m_diracPointNodeIDs
Definition: ripley/src/RipleyDomain.h:779
ripley::ReaderParameters::numValues
std::vector< dim_t > numValues
the number of values to read from file
Definition: ripley/src/RipleyDomain.h:74
speckley::Rectangle::probeInterpolationAcross
virtual bool probeInterpolationAcross(int, const escript::AbstractDomain &, int) const
determines whether interpolation from source to target is possible
Definition: speckley/src/Rectangle.cpp:1948
speckley::Rectangle::borrowSampleReferenceIDs
const dim_t * borrowSampleReferenceIDs(int fsType) const
returns the array of reference numbers for a function space type
Definition: speckley/src/Rectangle.cpp:1030
speckley::SpeckleyDomain::Print_Mesh_Info
virtual void Print_Mesh_Info(bool full=false) const
writes information about the mesh to standard output
Definition: speckley/src/SpeckleyDomain.cpp:692
ripley::ReducedNodes
@ ReducedNodes
Definition: Ripley.h:53
ripley::Rectangle::populateSampleIds
virtual void populateSampleIds()
Definition: ripley/src/Rectangle.cpp:1873
ripley::Rectangle::getElementLength
const double * getElementLength() const
returns the lengths of an element
Definition: ripley/src/Rectangle.h:217
escript::Data::getDataPointSize
int getDataPointSize() const
Return the size of the data point. It is the product of the data point shape dimensions.
Definition: Data.cpp:1360
speckley::ReaderParameters::first
std::vector< dim_t > first
the (global) offset into the data object to start writing into
Definition: speckley/src/SpeckleyDomain.h:55
escript::FunctionSpace
Definition: FunctionSpace.h:36
ripley::RipleyDomain::MPIBarrier
virtual void MPIBarrier() const
if compiled for MPI then executes an MPI_Barrier, else does nothing
Definition: ripley/src/RipleyDomain.h:142
speckley::Rectangle::integral_order6
void integral_order6(std::vector< Scalar > &, const escript::Data &) const
Definition: RectangleIntegrals.cpp:126
speckley::Rectangle::readBinaryGridFromZipped
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
Definition: speckley/src/Rectangle.cpp:499
speckley::Rectangle::findNode
dim_t findNode(const double *coords) const
finds the node that the given point coordinates belong to
Definition: speckley/src/Rectangle.cpp:1882
escript::Data::getFunctionSpace
const FunctionSpace & getFunctionSpace() const
Return the function space.
Definition: Data.h:463
message::tag
int tag
Definition: blocktools.h:74
escript::FileWriter::openFile
bool openFile(std::string filename, size_t initialSize=0, bool binary=false, bool append=false)
Definition: FileWriter.h:49
speckley::probeInterpolationAcross
bool probeInterpolationAcross(int fsType_source, const escript::AbstractDomain &domain, int fsType_target, int dim)
Definition: CrossDomainCoupler.cpp:32
ripley::Rectangle::m_faceOffset
IndexVector m_faceOffset
Definition: ripley/src/Rectangle.h:325
escript::Distribution
Definition: Distribution.h:33
ripley::Rectangle::nodesToDOF
virtual void nodesToDOF(escript::Data &out, const escript::Data &in) const
converts data on nodes in 'in' to degrees of freedom in 'out'
Definition: ripley/src/Rectangle.cpp:1788
ripley::Rectangle::m_elementId
IndexVector m_elementId
Definition: ripley/src/Rectangle.h:330
ripley::Rectangle::getNumDataPointsGlobal
virtual dim_t getNumDataPointsGlobal() const
returns the number of data points summed across all MPI processes
Definition: ripley/src/Rectangle.h:367
speckley::BYTEORDER_NATIVE
@ BYTEORDER_NATIVE
Definition: speckley/src/system_dep.h:50
ripley::RipleyDomain::m_nodeTags
std::vector< int > m_nodeTags
Definition: ripley/src/RipleyDomain.h:775
speckley
Definition: AbstractAssembler.cpp:19
ripley::DATATYPE_FLOAT32
@ DATATYPE_FLOAT32
Definition: ripley/src/system_dep.h:64
speckley::Rectangle::getNumNodes
virtual dim_t getNumNodes() const
returns the number of nodes per MPI rank
Definition: speckley/src/Rectangle.h:440
ripley::RankVector
std::vector< int > RankVector
Definition: Ripley.h:46
paso::util::copy
void copy(dim_t N, double *out, const double *in)
out = in
Definition: PasoUtil.h:88
speckley::SpeckleyDomain::setTagMap
virtual void setTagMap(const std::string &name, int tag)
sets a map from a clear tag name to a tag key
Definition: speckley/src/SpeckleyDomain.h:193
Block2::getOutBuffer
double * getOutBuffer(unsigned char subx, unsigned char suby)
Definition: blocktools2.cpp:101
ripley::Rectangle
Rectangle is the 2-dimensional implementation of a RipleyDomain.
Definition: ripley/src/Rectangle.h:35
ripley::Rectangle::populateDofMap
virtual void populateDofMap()
Definition: ripley/src/Rectangle.cpp:2088
speckley::Rectangle::reduceElements
virtual void reduceElements(escript::Data &out, const escript::Data &in) const
interpolates from Element -> ReducedElement
Definition: speckley/src/Rectangle.cpp:1383
speckley::Rectangle::populateSampleIds
void populateSampleIds()
Definition: speckley/src/Rectangle.cpp:1292
escript::Data
Data represents a collection of datapoints.
Definition: Data.h:64
speckley::SpeckleyDomain::m_elementTags
std::vector< int > m_elementTags
Definition: speckley/src/SpeckleyDomain.h:750
ripley::RipleyDomain
RipleyDomain extends the AbstractContinuousDomain interface for the Ripley library and is the base cl...
Definition: ripley/src/RipleyDomain.h:103
speckley::Rectangle::m_NN
dim_t m_NN[2]
number of nodes for this rank in each dimension
Definition: speckley/src/Rectangle.h:381
ripley::RipleyDomain::m_numDim
int m_numDim
Definition: ripley/src/RipleyDomain.h:771
escript::IOError
An exception class for Input/Output errors.
Definition: EsysException.h:80
ripley::Rectangle::m_NX
int m_NX[2]
number of spatial subdivisions
Definition: ripley/src/Rectangle.h:306
speckley::Rectangle::writeBinaryGridImpl
void writeBinaryGridImpl(const escript::Data &in, const std::string &filename, int byteOrder) const
Definition: speckley/src/Rectangle.cpp:821
INDEX3
#define INDEX3(_X1_, _X2_, _X3_, _N1_, _N2_)
Definition: index.h:25
escript::DataTypes::dim_t
index_t dim_t
Definition: DataTypes.h:66
escript::DataTypes::ShapeType
std::vector< int > ShapeType
The shape of a single datapoint.
Definition: DataTypes.h:44
speckley::ReaderParameters::reverse
std::vector< int > reverse
if non-zero, values are written from last index to first index
Definition: speckley/src/SpeckleyDomain.h:62
speckley::byte_swap64
char * byte_swap64(char *val)
Definition: speckley/src/system_dep.h:118
speckley::Rectangle::integral_order9
void integral_order9(std::vector< Scalar > &, const escript::Data &) const
Definition: RectangleIntegrals.cpp:201
escript::AbstractSystemMatrix
Base class for escript system matrices.
Definition: AbstractSystemMatrix.h:44
speckley::Rectangle::~Rectangle
~Rectangle()
Destructor.
Definition: speckley/src/Rectangle.cpp:189
speckley::Rectangle::m_gNE
dim_t m_gNE[2]
total number of elements in each dimension
Definition: speckley/src/Rectangle.h:363
ripley::Rectangle::assembleIntegrateImpl
void assembleIntegrateImpl(std::vector< Scalar > &integrals, const escript::Data &arg) const
Definition: ripley/src/Rectangle.cpp:1597
speckley::DATATYPE_FLOAT32
@ DATATYPE_FLOAT32
Definition: speckley/src/system_dep.h:64
speckley::SpeckleyDomain::m_mpiInfo
escript::JMPI m_mpiInfo
Definition: speckley/src/SpeckleyDomain.h:747
Block2
Definition: blocktools.h:227
escript::Data::getSampleDataRW
DataTypes::real_t * getSampleDataRW(DataTypes::RealVectorType::size_type sampleNo, DataTypes::real_t dummy=0)
Return the sample data for the given sample no. Please do not use this unless you NEED to access samp...
Definition: Data.h:1956
speckley::Rectangle::dump
void dump(const std::string &filename) const
dumps the mesh to a file with the given name
Definition: speckley/src/Rectangle.cpp:886
speckley::Rectangle::randomFill
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.
ripley::Rectangle::getFirstInDim
virtual index_t getFirstInDim(unsigned axis) const
Definition: ripley/src/Rectangle.h:419
ripley::readBinaryGridFromZipped
escript::Data readBinaryGridFromZipped(std::string filename, escript::FunctionSpace fs, const object &pyShape, double fill, int byteOrder, int dataType, const object &pyFirst, const object &pyNum, const object &pyMultiplier, const object &pyReverse)
Definition: ripleycpp.cpp:88
speckley::Rectangle::getLocalCoordinate
virtual double getLocalCoordinate(index_t index, int dim) const
returns the index'th coordinate value in given dimension for this rank
Definition: speckley/src/Rectangle.h:416
speckley::Rectangle::interpolateNodesOnElements
virtual void interpolateNodesOnElements(escript::Data &out, const escript::Data &in, bool reduced) const
interpolates data on nodes in 'in' onto elements in 'out'
Definition: speckley/src/Rectangle.cpp:1434
escript::DataTypes::noValues
int noValues(const ShapeType &shape)
Calculate the number of values in a datapoint with the given shape.
Definition: DataTypes.cpp:91
speckley::SpeckleyDomain::getMPISize
virtual int getMPISize() const
returns the number of processors used for this domain
Definition: speckley/src/SpeckleyDomain.h:110
ripley::Rectangle::write
virtual void write(const std::string &filename) const
writes the current mesh to a file with the given name
Definition: ripley/src/Rectangle.cpp:880
speckley::factorise
void factorise(std::vector< int > &factors, int product)
Definition: speckley/src/domainhelpers.cpp:30
paso::SystemMatrixPattern
Definition: SystemMatrixPattern.h:45
ripley::Rectangle::borrowSampleReferenceIDs
const dim_t * borrowSampleReferenceIDs(int fsType) const
returns the array of reference numbers for a function space type
Definition: ripley/src/Rectangle.cpp:1031
ripley::readBinaryGrid
escript::Data readBinaryGrid(std::string filename, escript::FunctionSpace fs, const object &pyShape, double fill, int byteOrder, int dataType, const object &pyFirst, const object &pyNum, const object &pyMultiplier, const object &pyReverse)
Definition: ripleycpp.cpp:63
ripley::Rectangle::~Rectangle
~Rectangle()
Destructor.
Definition: ripley/src/Rectangle.cpp:241
speckley::SpeckleyDomain
SpeckleyDomain extends the AbstractContinuousDomain interface for the Speckley library and is the bas...
Definition: speckley/src/SpeckleyDomain.h:86
ripley::ReaderParameters::multiplier
std::vector< int > multiplier
Definition: ripley/src/RipleyDomain.h:77
speckley::ReducedElements
@ ReducedElements
Definition: Speckley.h:64
ripley::readNcGrid
escript::Data readNcGrid(std::string filename, std::string varname, escript::FunctionSpace fs, const object &pyShape, double fill, const object &pyFirst, const object &pyNum, const object &pyMultiplier, const object &pyReverse)
Definition: ripleycpp.cpp:117
escript::Data::isDataPointShapeEqual
bool isDataPointShapeEqual(int rank, const int *dimensions) const
Returns true if the shape matches the vector (dimensions[0],..., dimensions[rank-1])....
Definition: Data.h:567
speckley::SpeckleyDomain::MPIBarrier
virtual void MPIBarrier() const
if compiled for MPI then executes an MPI_Barrier, else does nothing
Definition: speckley/src/SpeckleyDomain.h:122
speckley::Rectangle::m_dx
double m_dx[2]
grid spacings / cell sizes of domain
Definition: speckley/src/Rectangle.h:372
ripley::Rectangle::setToSize
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....
Definition: ripley/src/Rectangle.cpp:1250
Block2::getInBuffer
double * getInBuffer(unsigned char subx, unsigned char suby)
Definition: blocktools2.cpp:111
ripley::doublyLink
void doublyLink(std::vector< ripley::IndexVector > &va, std::vector< ripley::IndexVector > &vb, int a, int b)
Definition: ripley/src/domainhelpers.h:50
ripley::Rectangle::getNumSubdivisionsPerDim
virtual const int * getNumSubdivisionsPerDim() const
returns the number of spatial subdivisions in each dimension
Definition: ripley/src/Rectangle.h:178
globalNodeId
#define globalNodeId(x, y)
messvec
std::vector< message > messvec
Definition: blocktools.h:79
ripley::FaceElements
@ FaceElements
Definition: Ripley.h:56
escript::Data::numSamplesEqual
bool numSamplesEqual(int numDataPointsPerSample, int numSamples) const
Returns true if the number of data points per sample and the number of samples match the respective a...
Definition: Data.h:555
ripley::Rectangle::getNumDOFInAxis
virtual dim_t getNumDOFInAxis(unsigned axis) const
Definition: ripley/src/Rectangle.h:394
ripley::DefaultAssembler2D
Definition: ripley/src/DefaultAssembler2D.h:26
ripley::RipleyDomain::getDecompositionPolicy
static DecompositionPolicy getDecompositionPolicy()
Definition: ripley/src/RipleyDomain.cpp:58
speckley::Rectangle
Rectangle is the 2-dimensional implementation of a SpeckleyDomain.
Definition: speckley/src/Rectangle.h:34
ripley::Rectangle::addToMatrixAndRHS
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
Definition: ripley/src/Rectangle.cpp:2228
speckley::Rectangle::integral_order8
void integral_order8(std::vector< Scalar > &, const escript::Data &) const
Definition: RectangleIntegrals.cpp:176
speckley::RipleyCoupler
Definition: CrossDomainCoupler.h:29
ripley::Rectangle::getNumElements
virtual dim_t getNumElements() const
returns the number of elements per MPI rank
Definition: ripley/src/Rectangle.h:407
ripley::Rectangle::setToNormal
virtual void setToNormal(escript::Data &out) const
copies the surface normals at data points into out. The actual function space to be considered is def...
Definition: ripley/src/Rectangle.cpp:1145
speckley::DegreesOfFreedom
@ DegreesOfFreedom
Definition: Speckley.h:59
ripley::RipleyDomain::getContinuousFunctionCode
virtual int getContinuousFunctionCode() const
returns a continuous FunctionSpace code
Definition: ripley/src/RipleyDomain.h:400
ripley::RipleyDomain::updateTagsInUse
void updateTagsInUse(int fsType) const
Definition: ripley/src/RipleyDomain.cpp:1283
ripley::RipleyDomain::setTagMap
virtual void setTagMap(const std::string &name, int tag)
sets a map from a clear tag name to a tag key
Definition: ripley/src/RipleyDomain.h:213
ripley::Rectangle::randomFill
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.
ripley::Rectangle::Print_Mesh_Info
virtual void Print_Mesh_Info(const bool full=false) const
writes information about the mesh to standard output
Definition: ripley/src/Rectangle.cpp:1312
speckley::Elements
@ Elements
Definition: Speckley.h:63
speckley::Rectangle::interpolateFromCorners
void interpolateFromCorners(escript::Data &out) const
Definition: speckley/src/Rectangle.cpp:759
speckley::SpeckleyDomain::updateTagsInUse
void updateTagsInUse(int fsType) const
Definition: speckley/src/SpeckleyDomain.cpp:844
speckley::Rectangle::integral_order7
void integral_order7(std::vector< Scalar > &, const escript::Data &) const
Definition: RectangleIntegrals.cpp:151
ripley::ReaderParameters
Structure that wraps parameters for the grid reading routines.
Definition: ripley/src/RipleyDomain.h:70
speckley::Rectangle::getNumDataPointsGlobal
virtual dim_t getNumDataPointsGlobal() const
returns the number of data points summed across all MPI processes
Definition: speckley/src/Rectangle.h:411
MPI_DOUBLE
#define MPI_DOUBLE
Definition: EsysMPI.h:49
escript::SubWorld_ptr
boost::shared_ptr< SubWorld > SubWorld_ptr
Definition: SubWorld.h:147
speckley::Rectangle::getNumElements
virtual dim_t getNumElements() const
returns the number of elements per MPI rank
Definition: speckley/src/Rectangle.h:446
speckley::ReaderParameters::dataType
int dataType
data type in the file (used by binary reader only)
Definition: speckley/src/SpeckleyDomain.h:66
Block2::getBuffSize
size_t getBuffSize(unsigned char subx, unsigned char suby)
Definition: blocktools2.cpp:121
speckley::Rectangle::operator==
virtual bool operator==(const escript::AbstractDomain &other) const
equality operator
Definition: speckley/src/Rectangle.cpp:202
ripley::Rectangle::assembleIntegrate
virtual void assembleIntegrate(std::vector< real_t > &integrals, const escript::Data &arg) const
copies the integrals of the function defined by 'arg' into 'integrals'
Definition: ripley/src/Rectangle.cpp:1582
escript::DataTypes::index_t
int index_t
type for array/matrix indices used both globally and on each rank
Definition: DataTypes.h:61
ripley::Rectangle::interpolateNodesOnElementsWorker
void interpolateNodesOnElementsWorker(escript::Data &out, const escript::Data &in, bool reduced, S sentinel) const
Definition: ripley/src/Rectangle.cpp:2302
ripley::IndexVector
std::vector< index_t > IndexVector
Definition: Ripley.h:44
ripley::Rectangle::m_offset
dim_t m_offset[2]
first node on this rank is at (offset0,offset1) in global mesh
Definition: ripley/src/Rectangle.h:318
ripley::ReaderParameters::reverse
std::vector< int > reverse
if non-zero, values are written from last index to first index
Definition: ripley/src/RipleyDomain.h:79
speckley::Rectangle::assembleIntegrateWorker
void assembleIntegrateWorker(std::vector< Scalar > &integrals, const escript::Data &arg) const
Definition: speckley/src/Rectangle.cpp:1225
ripley::Rectangle::createAssembler
virtual Assembler_ptr createAssembler(std::string type, const DataMap &options) const
creates and returns an assembler of the requested type.
Definition: ripley/src/Rectangle.cpp:2799
speckley::Rectangle::m_origin
double m_origin[2]
origin of domain
Definition: speckley/src/Rectangle.h:366
ripley::Rectangle::m_faceCount
dim_t m_faceCount[4]
number of face elements per edge (left, right, bottom, top)
Definition: ripley/src/Rectangle.h:321
speckley::Rectangle::m_nodeId
IndexVector m_nodeId
Definition: speckley/src/Rectangle.h:391
ripley::Rectangle::operator==
virtual bool operator==(const escript::AbstractDomain &other) const
equality operator
Definition: ripley/src/Rectangle.cpp:250
ripley::Rectangle::readBinaryGrid
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
Definition: ripley/src/Rectangle.cpp:527
ripley::LameAssembler2D
Definition: LameAssembler2D.h:26
speckley::ReaderParameters::multiplier
std::vector< int > multiplier
Definition: speckley/src/SpeckleyDomain.h:60
ripley::RipleyDomain::addPoints
void addPoints(const std::vector< double > &coords, const std::vector< int > &tags)
Definition: ripley/src/RipleyDomain.cpp:1834
ripley::Rectangle::m_dx
double m_dx[2]
grid spacings / cell sizes of domain
Definition: ripley/src/Rectangle.h:303
speckley::Rectangle::DefaultAssembler2D
friend class DefaultAssembler2D
Definition: speckley/src/Rectangle.h:401
ripley::Rectangle::assembleGradientImpl
void assembleGradientImpl(escript::Data &out, const escript::Data &in) const
Definition: ripley/src/Rectangle.cpp:1364
speckley::Rectangle::integral_order5
void integral_order5(std::vector< Scalar > &, const escript::Data &) const
Definition: RectangleIntegrals.cpp:101
ripley::Rectangle::LameAssembler2D
friend class LameAssembler2D
Definition: ripley/src/Rectangle.h:38
ripley::Rectangle::getNumNodesPerDim
virtual const dim_t * getNumNodesPerDim() const
returns the number of nodes per MPI rank in each dimension
Definition: ripley/src/Rectangle.h:153
ripley::Rectangle::m_NE
dim_t m_NE[2]
number of elements for this rank in each dimension including shared
Definition: ripley/src/Rectangle.h:309
ripley::ReducedFaceElements
@ ReducedFaceElements
Definition: Ripley.h:57
ripley::Rectangle::getConnections
virtual std::vector< IndexVector > getConnections(bool includeShared=false) const
returns occupied matrix column indices for all matrix rows
Definition: ripley/src/Rectangle.cpp:2035
ripley::Rectangle::writeBinaryGrid
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
Definition: ripley/src/Rectangle.cpp:789
Block2::setUsed
void setUsed(unsigned char buffid)
Definition: blocktools2.cpp:216
speckley::Rectangle::assembleGradient
virtual void assembleGradient(escript::Data &out, const escript::Data &in) const
computes the gradient of 'in' and puts the result in 'out'
Definition: speckley/src/Rectangle.cpp:1151
ripley::Rectangle::getDescription
virtual std::string getDescription() const
returns a description for this domain
Definition: ripley/src/Rectangle.cpp:245
BlockGrid2
Definition: blocktools.h:207
escript::FunctionSpace::getTypeCode
int getTypeCode() const
Returns the function space type code.
Definition: FunctionSpace.cpp:95
ripley::Rectangle::getNumFaceElements
virtual dim_t getNumFaceElements() const
returns the number of face elements on current MPI rank
Definition: ripley/src/Rectangle.h:413
ripley::Rectangle::m_nodeDistribution
IndexVector m_nodeDistribution
Definition: ripley/src/Rectangle.h:334
speckley::Rectangle::readBinaryGridImpl
void readBinaryGridImpl(escript::Data &out, const std::string &filename, const ReaderParameters &params) const
Definition: speckley/src/Rectangle.cpp:524
speckley::SpeckleyDomain::getMPIRank
virtual int getMPIRank() const
returns the MPI rank of this processor
Definition: speckley/src/SpeckleyDomain.h:116
escript::function
FunctionSpace function(const AbstractDomain &domain)
Return a function FunctionSpace.
Definition: FunctionSpaceFactory.cpp:43
ripley::Rectangle::m_nodeId
IndexVector m_nodeId
Definition: ripley/src/Rectangle.h:329
speckley::Rectangle::readBinaryGrid
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
Definition: speckley/src/Rectangle.cpp:479
ripley::Rectangle::m_length
double m_length[2]
side lengths of domain
Definition: ripley/src/Rectangle.h:300
speckley::ReaderParameters
Structure that wraps parameters for the grid reading routines.
Definition: speckley/src/SpeckleyDomain.h:53
MPI_Request
int MPI_Request
Definition: EsysMPI.h:45
ripley::Rectangle::findNode
virtual dim_t findNode(const double *coords) const
finds the node that the given point coordinates belong to
Definition: ripley/src/Rectangle.cpp:2747
ripley::WaveAssembler2D
Definition: ripley/src/WaveAssembler2D.h:26
speckley::Rectangle::integral_order2
void integral_order2(std::vector< Scalar > &, const escript::Data &) const
Definition: RectangleIntegrals.cpp:25
speckley::Points
@ Points
Definition: Speckley.h:67
escript::DataTypes::real_t_eps
real_t real_t_eps()
Returns the machine epsilon for the real_t type.
Definition: DataTypes.h:99
paso::Connector_ptr
boost::shared_ptr< Connector > Connector_ptr
Definition: Coupler.h:38
paso::Pattern_ptr
boost::shared_ptr< Pattern > Pattern_ptr
Definition: Pattern.h:39
ripley::Rectangle::m_origin
double m_origin[2]
origin of domain
Definition: ripley/src/Rectangle.h:297
ripley::Rectangle::getNumNodes
virtual dim_t getNumNodes() const
returns the number of nodes per MPI rank
Definition: ripley/src/Rectangle.h:401
ripley::RipleyDomain::getMPISize
virtual int getMPISize() const
returns the number of processors used for this domain
Definition: ripley/src/RipleyDomain.h:130
escript::Data::actsExpanded
bool actsExpanded() const
Return true if this Data is expanded or resolves to expanded. That is, if it has a separate value for...
Definition: Data.cpp:1118
escript::AbstractDomain
Base class for all escript domains.
Definition: AbstractDomain.h:51
speckley::Rectangle::m_NE
dim_t m_NE[2]
number of elements for this rank in each dimension including shared
Definition: speckley/src/Rectangle.h:378
speckley::Rectangle::ownSample
virtual bool ownSample(int fs_code, index_t id) const
returns true if this rank owns the sample id.
Definition: speckley/src/Rectangle.cpp:1050
escript::getMPIRankWorld
int getMPIRankWorld()
returns the MPI processor number within MPI_COMM_WORLD
Definition: Utils.cpp:105
S
#define S(_J_, _I_)
Definition: ShapeFunctions.cpp:122
speckley::Rectangle::readNcGrid
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
Definition: speckley/src/Rectangle.cpp:357
ripley::Rectangle::dump
void dump(const std::string &filename) const
dumps the mesh to a file with the given name
Definition: ripley/src/Rectangle.cpp:885
speckley::ReaderParameters::numValues
std::vector< dim_t > numValues
the number of values to read from file
Definition: speckley/src/SpeckleyDomain.h:57
ripley::Rectangle::readNcGrid
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
Definition: ripley/src/Rectangle.cpp:404
escript::Data::getExpandedVectorReference
DataTypes::RealVectorType & getExpandedVectorReference(DataTypes::real_t dummy=0)
Ensures that the Data is expanded and returns its underlying vector Does not check for exclusive writ...
Definition: Data.cpp:5837
ripley::Rectangle::readBinaryGridFromZipped
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
Definition: ripley/src/Rectangle.cpp:547
escript::FileWriter::close
void close()
Definition: FileWriter.h:199
message::destbuffid
unsigned char destbuffid
Definition: blocktools.h:76
escript::DataTypes::cplx_t
std::complex< real_t > cplx_t
complex data type
Definition: DataTypes.h:55
speckley::Rectangle::m_offset
dim_t m_offset[2]
first node on this rank is at (offset0,offset1) in global mesh
Definition: speckley/src/Rectangle.h:384
ripley::Rectangle::writeBinaryGridImpl
void writeBinaryGridImpl(const escript::Data &in, const std::string &filename, int byteOrder) const
Definition: ripley/src/Rectangle.cpp:810
escript::Scalar
Data Scalar(double value, const FunctionSpace &what, bool expanded)
A collection of factory functions for creating Data objects which contain data points of various shap...
Definition: DataFactory.cpp:49
ripley::Rectangle::interpolateNodesOnElements
virtual void interpolateNodesOnElements(escript::Data &out, const escript::Data &in, bool reduced) const
interpolates data on nodes in 'in' onto (reduced) elements in 'out'
Definition: ripley/src/Rectangle.cpp:2263
message::srcbuffid
unsigned char srcbuffid
Definition: blocktools.h:75
speckley::DataMap
std::map< std::string, escript::Data > DataMap
Definition: speckley/src/domainhelpers.h:25
ripley::ReaderParameters::dataType
int dataType
data type in the file (used by binary reader only)
Definition: ripley/src/RipleyDomain.h:83
ESYS_ASSERT
#define ESYS_ASSERT(a, b)
EsysAssert is a MACRO that will throw an exception if the boolean condition specified is false.
Definition: Assert.h:79
speckley::Rectangle::interpolateAcross
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
Definition: speckley/src/Rectangle.cpp:1959
Block2::copyAllToBuffer
void copyAllToBuffer(double *src)
Definition: blocktools2.cpp:221
speckley::Rectangle::assembleCoordinates
virtual void assembleCoordinates(escript::Data &arg) const
populates the data object 'arg' with the node coordinates
Definition: speckley/src/Rectangle.cpp:1129
escript::FileWriter::writeAt
bool writeAt(std::ostringstream &oss, long offset)
Definition: FileWriter.h:174
escript::ValueError
An exception class that signals an invalid argument value.
Definition: EsysException.h:100
speckley::point_locations
const double point_locations[][11]
Definition: Speckley.h:71
speckley::Rectangle::m_length
double m_length[2]
side lengths of domain
Definition: speckley/src/Rectangle.h:369
speckley::SpeckleyException
SpeckleyException exception class.
Definition: SpeckleyException.h:31
speckley::Rectangle::integral_order10
void integral_order10(std::vector< Scalar > &, const escript::Data &) const
Definition: RectangleIntegrals.cpp:226
speckley::byte_swap32
char * byte_swap32(char *val)
Definition: speckley/src/system_dep.h:111
MATRIX_FORMAT_DEFAULT
#define MATRIX_FORMAT_DEFAULT
Definition: Paso.h:61
ripley::RipleyDomain::Print_Mesh_Info
virtual void Print_Mesh_Info(bool full=false) const
writes information about the mesh to standard output
Definition: ripley/src/RipleyDomain.cpp:857
ripley::Rectangle::getGridParameters
virtual boost::python::tuple getGridParameters() const
returns the tuple (origin, spacing, number_of_elements)
Definition: ripley/src/Rectangle.h:379
ripley::Rectangle::assembleCoordinates
virtual void assembleCoordinates(escript::Data &arg) const
populates the data object 'arg' with the node coordinates
Definition: ripley/src/Rectangle.cpp:1329
ripley::DECOMP_EXPAND
@ DECOMP_EXPAND
Definition: ripley/src/RipleyDomain.h:61
escript::DataTypes::scalarShape
static const ShapeType scalarShape
Use this instead of creating empty shape objects for scalars.
Definition: DataTypes.h:48
BlockGrid2::generateInNeighbours
void generateInNeighbours(coord_t blockx, coord_t blocky, messvec &v)
Definition: blocktools2.cpp:35
ripley::Rectangle::interpolateNodesOnFaces
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'
Definition: ripley/src/Rectangle.cpp:2282
Block2::copyUsedFromBuffer
void copyUsedFromBuffer(double *dest)
Definition: blocktools2.cpp:234
speckley::Rectangle::createAssembler
virtual Assembler_ptr createAssembler(std::string type, const DataMap &options) const
Creates and returns an assembler of the requested type.
Definition: speckley/src/Rectangle.cpp:1936
BlockGrid2::generateOutNeighbours
void generateOutNeighbours(coord_t blockx, coord_t blocky, messvec &v)
Definition: blocktools2.cpp:68
ripley::Rectangle::assembleGradient
virtual void assembleGradient(escript::Data &out, const escript::Data &in) const
computes the gradient of 'in' and puts the result in 'out'
Definition: ripley/src/Rectangle.cpp:1351
speckley::Nodes
@ Nodes
Definition: Speckley.h:61