17 #ifndef __RIPLEY_RECTANGLE_H__
18 #define __RIPLEY_RECTANGLE_H__
20 #include <paso/Coupler.h>
21 #include <ripley/RipleyDomain.h>
40 Rectangle(
int n0,
int n1,
double x0,
double y0,
double x1,
double y1,
42 const std::vector<double>& points = std::vector<double>(),
43 const std::vector<int>& tags = std::vector<int>(),
56 virtual std::string getDescription()
const;
68 void dump(
const std::string& filename)
const;
82 virtual void readBinaryGridFromZipped(
escript::Data& out, std::string filename,
90 int byteOrder,
int dataType)
const;
97 const int* borrowSampleReferenceIDs(
int fsType)
const;
103 virtual bool ownSample(
int fs_code,
index_t id)
const;
124 virtual int getNumDataPointsGlobal()
const;
131 virtual void Print_Mesh_Info(
const bool full=
false)
const;
168 virtual double getLocalCoordinate(
int index,
int dim)
const;
174 virtual boost::python::tuple getGridParameters()
const;
188 virtual void setAssembler(std::string type, std::map<std::string, escript::Data> options);
192 virtual dim_t getNumNodes()
const;
193 virtual dim_t getNumElements()
const;
194 virtual dim_t getNumFaceElements()
const;
195 virtual dim_t getNumDOF()
const;
210 virtual int getDofOfNode(
int node)
const;
213 void populateSampleIds();
214 void createPattern();
217 bool addS,
bool addF,
int firstNode,
int nEq=1,
int nComp=1)
const;
219 template<
typename ValueType>
220 void readBinaryGridImpl(
escript::Data& out,
const std::string& filename,
223 template<
typename ValueType>
227 template<
typename ValueType>
229 const std::string& filename,
int byteOrder)
const;
231 int findNode(
const double *coords)
const;
235 long seed,
const boost::python::tuple& filter)
const;
307 EsysAssert((dim>=0 && dim<2),
"'dim' out of bounds");
308 EsysAssert((index>=0 && index<
m_NN[dim]),
"'index' out of bounds");
314 return boost::python::make_tuple(
316 boost::python::make_tuple(
m_dx[0],
m_dx[1]),
317 boost::python::make_tuple(
m_gNE[0],
m_gNE[1]));
321 bool reducedColOrder)
const
355 #endif // __RIPLEY_RECTANGLE_H__
Give a short description of what FunctionSpace does.
Definition: FunctionSpace.h:46
virtual dim_t getNumFaceElements() const
returns the number of face elements on current MPI rank
Definition: Rectangle.h:347
virtual const int * getNumSubdivisionsPerDim() const
returns the number of spatial subdivisions in each dimension
Definition: Rectangle.h:162
virtual dim_t getNumNodes() const
returns the number of nodes per MPI rank
Definition: Rectangle.h:335
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:109
IndexVector m_elementId
Definition: Rectangle.h:274
IndexVector m_nodeId
Definition: Rectangle.h:273
virtual boost::python::tuple getGridParameters() const
returns the tuple (origin, spacing, number_of_elements)
Definition: Rectangle.h:312
Definition: WaveAssembler2D.h:29
Definition: LameAssembler2D.h:29
virtual dim_t getNumElements() const
returns the number of elements per MPI rank
Definition: Rectangle.h:341
IndexVector m_dofId
vector of sample reference identifiers
Definition: Rectangle.h:272
virtual paso::SystemMatrixPattern_ptr getPattern(bool reducedRowOrder, bool reducedColOrder) const
returns the Paso system matrix pattern
Definition: Rectangle.h:320
virtual double getLocalCoordinate(int index, int dim) const
returns the index'th coordinate value in given dimension for this rank
Definition: Rectangle.h:305
Definition: DefaultAssembler2D.h:29
std::vector< int > ShapeType
The shape of a single datapoint.
Definition: DataTypes.h:38
virtual int getNumDataPointsGlobal() const
returns the number of data points summed across all MPI processes
Definition: Rectangle.h:300
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:57
boost::shared_ptr< SystemMatrixPattern > SystemMatrixPattern_ptr
Definition: SystemMatrixPattern.h:38
virtual const int * getNumFacesPerBoundary() const
returns the number of face elements in the order (left,right,bottom,top) on current MPI rank ...
Definition: Rectangle.h:150
IndexVector m_nodeDistribution
Definition: Rectangle.h:278
boost::shared_ptr< SystemMatrix > SystemMatrix_ptr
Definition: SystemMatrix.h:38
virtual IndexVector getNodeDistribution() const
returns the node distribution vector
Definition: Rectangle.h:156
std::map< std::string, int > simap_t
Definition: ripley/src/RipleyDomain.h:56
virtual dim_t getNumDOF() const
returns the number of degrees of freedom per MPI rank
Definition: Rectangle.h:329
Rectangle is the 2-dimensional implementation of a RipleyDomain.
Definition: Rectangle.h:29
std::vector< index_t > IndexVector
Definition: Ripley.h:38
dim_t m_NX[2]
number of spatial subdivisions
Definition: Rectangle.h:250
Structure that wraps parameters for the grid reading routines.
Definition: ripley/src/RipleyDomain.h:63
int m_faceCount[4]
number of face elements per edge (left, right, bottom, top)
Definition: Rectangle.h:265
Data represents a collection of datapoints.
Definition: Data.h:71
#define EsysAssert(AssertTest, AssertMessage)
EsysAssert is a MACRO that will throw an exception if the boolean condition specified is false...
Definition: EsysAssert.h:96
double m_dx[2]
grid spacings / cell sizes of domain
Definition: Rectangle.h:247
IndexVector m_faceId
Definition: Rectangle.h:275
RipleyDomain extends the AbstractContinuousDomain interface for the Ripley library and is the base cl...
Definition: ripley/src/RipleyDomain.h:96
IndexVector m_faceOffset
Definition: Rectangle.h:269
dim_t m_gNE[2]
total number of elements in each dimension
Definition: Rectangle.h:238
IndexVector m_dofMap
Definition: Rectangle.h:281
int index_t
Definition: types.h:25
dim_t m_offset[2]
first node on this rank is at (offset0,offset1) in global mesh
Definition: Rectangle.h:262
boost::shared_ptr< Connector > Connector_ptr
Definition: Coupler.h:35
virtual const int * getNumNodesPerDim() const
returns the number of nodes per MPI rank in each dimension
Definition: Rectangle.h:137
double m_origin[2]
origin of domain
Definition: Rectangle.h:241
virtual int getDofOfNode(int node) const
Definition: Rectangle.h:296
paso::Connector_ptr m_connector
Definition: Rectangle.h:285
Definition: AbstractDomain.h:62
virtual const int * getNumElementsPerDim() const
returns the number of elements per MPI rank in each dimension
Definition: Rectangle.h:143
#define RIPLEY_DLL_API
Definition: ripley/src/system_dep.h:35
int dim_t
Definition: types.h:24
dim_t m_NN[2]
number of nodes for this rank in each dimension
Definition: Rectangle.h:259
paso::SystemMatrixPattern_ptr m_pattern
Definition: Rectangle.h:288
dim_t m_NE[2]
number of elements for this rank in each dimension including shared
Definition: Rectangle.h:253
#define S(_J_, _I_)
Definition: ShapeFunctions.cpp:121
std::vector< double > DoubleVector
Definition: Ripley.h:39