Go to the documentation of this file.
24 explicit Mesh(
int ndim,
int nvert_e = 0,
int ndof_e = 0,
int nedge_e = 0);
221 virtual void Visualize(std::vector<double>
const &
v)
const;
387 return static_cast<int>(
_bedges.size());
599 std::vector<std::shared_ptr<Mesh>>
_gmesh;
621 Mesh_2d_3_square(
int nx,
int ny,
int myid = 0,
int procx = 1,
int procy = 1);
632 void SetU(std::vector<double> &
u)
const;
638 void SetF(std::vector<double> &f)
const;
662 void SaveVectorP(std::string
const &name, std::vector<double>
const &
u)
const;
void Write_ascii_matlab(std::string const &fname, std::vector< double > const &v) const
void Export_scicomp(std::string const &basename) const
void DeriveVertexFromEdgeBased()
int NedgesElements() const
int _nedge
number of edges in mesh
void SetBoundaryValues(std::vector< double > &v, const std::function< double(double, double)> &func) const
std::vector< int > _ea
edge based element connectivity
std::vector< int > _edges
edges of mesh (vertices ordered ascending)
std::vector< std::vector< int > > Node2NodeGraph_2() const
Mesh & operator=(Mesh const &)=delete
void DeriveEdgeFromVertexBased()
std::vector< int > _bedges
boundary edges [nbedges][2] storing start/end vertex
void Resize_Coords(int nnodes, int ndim)
virtual std::vector< int > Index_BoundaryNodes() const
void Resize_Connectivity(int nelem, int nvert_e)
std::vector< std::vector< int > > Node2NodeGraph() const
RefinedMesh & operator=(RefinedMesh const &)=delete
void ReadVertexBasedMesh(std::string const &fname)
std::vector< int > _ebedges
boundary edges [nbedges]
void PermuteVertices_EdgeBased(std::vector< int > const &old2new)
int _nref
number of regular refinements performed
const std::vector< int > & GetConnectivity() const
void Del_EdgeConnectivity()
std::vector< int > _sdedges
boundary edges [nbedges][2] with left/right subdomain number
const std::vector< bool > _ibref
refinement info
void SetNverticesElement(int nvert)
void RefineAllElements(int nref=1)
std::vector< double > & GetCoords()
const Mesh & finest() const
int _procy
number of MPI ranks in y-direction
const std::vector< int > _dummy
empty dummy vector
int _nedge_e
number of edges per element
int _procx
number of MPI ranks in x-direction
void SetValues(std::vector< double > &v, const std::function< double(double, double)> &func) const
std::vector< int > _ia
element connectivity
std::vector< std::vector< int > > Node2NodeGraph_1() const
void DeriveEdgeFromVertexBased_slow()
Mesh_2d_3_square(int nx, int ny, int myid=0, int procx=1, int procy=1)
std::array< int, 4 > _neigh
MPI ranks of neighbors (negative: no neighbor but b.c.)
std::vector< int > Index_BoundaryNodes() const override
void SetDirchletValues(std::vector< double > &v, const std::function< double(double, double)> &func) const
std::vector< int > & GetEdges()
Mesh(int ndim, int nvert_e=0, int ndof_e=0, int nedge_e=0)
int _ndim
space dimension of the problem (1, 2, or 3)
~Mesh_2d_3_square() override
int _nx
number of intervals in x-direction
void SetU(std::vector< double > &u) const
Mesh RefineElements(std::vector< bool > const &ibref)
virtual const std::vector< int > & GetFathersOfVertices() const
const std::vector< int > & GetEdges() const
double _xl
x coordinate of lower left corner of square
void SetF(std::vector< double > &f) const
const Mesh & coarsest() const
int _nvert_e
number of vertices per element
void GetConnectivityInRectangle(int nx, int ny, int ia[])
virtual void Visualize(std::vector< double > const &v) const
gMesh_Hierarchy(Mesh const &cmesh, int nlevel)
__attribute__((noinline)) Mesh(Mesh const &)=default
void SaveVectorP(std::string const &name, std::vector< double > const &u) const
int _ndof_e
degrees of freedom (d.o.f.) per element
void DeriveEdgeFromVertexBased_fast()
virtual ~RefinedMesh() override
const Mesh & operator[](int lev) const
const std::vector< int > & GetFathersOfVertices() const override
void ReadVectexBasedMesh(std::string const &fname)
bool Check_array_dimensions() const override
function vertex minimal boundary edge info in an ASCII file Matlab indexing is stored(starts with 1). % % The output file format is compatible with Mesh_2d_3_matlab nnode
double _xr
x coordinate of lower right corner of square
int _nelem
number elements
void SetNdofsElement(int ndof)
RefinedMesh(Mesh const &cmesh)
std::vector< int > Index_DirichletNodes() const override
std::vector< int > & GetConnectivity()
std::vector< int > _vfathers
stores the 2 fathers of each vertex (equal fathers denote original coarse vertex)
void GetCoordsInRectangle(int nx, int ny, double xl, double xr, double yb, double yt, double xc[])
double _yt
y coordinate of upper right corner of square
std::vector< int > & GetEdgeConnectivity()
virtual bool Check_array_dimensions() const
const std::vector< int > & GetEdgeConnectivity() const
int NverticesElements() const
std::vector< std::shared_ptr< Mesh > > _gmesh
mesh hierarchy from coarse ([0]) to fine.
int _color
red/black coloring (checker board) of subdomains
int _ny
number of intervals in y-direction
double _yb
y coordinate or lower left corner of square
void DeriveEdgeFromVertexBased_fast_2()
virtual std::vector< int > Index_DirichletNodes() const
void DebugEdgeBased() const
int _nnode
number nodes/vertices
std::vector< double > _xc
coordinates
RefinedMesh(Mesh const &cmesh, std::vector< bool > const &ibref)
const std::vector< double > & GetCoords() const
void PermuteVertices_EdgeBased(std::vector< int > const &old2new)