Loading...
Searching...
No Matches
SubMesh.h
// Copyright (C) 2009 Anders Logg
//
// This file is part of DOLFIN.
//
// DOLFIN is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// DOLFIN is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with DOLFIN. If not, see <http://www.gnu.org/licenses/>.
//
// First added: 2009-02-11
// Last changed: 2013-02-11
#ifndef __SUB_MESH_H
#define __SUB_MESH_H
#include <map>
#include "Mesh.h"
namespace dolfin
{
class SubDomain;
template <typename T> class MeshFunction;
class SubMesh : public Mesh
{
public:
SubMesh(const Mesh& mesh, const SubDomain& sub_domain);
SubMesh(const Mesh& mesh, const MeshFunction<std::size_t>& sub_domains,
std::size_t sub_domain);
SubMesh(const Mesh& mesh, std::size_t sub_domain);
~SubMesh();
private:
void init(const Mesh& mesh, const std::vector<std::size_t>& sub_domains,
std::size_t sub_domain);
};
}
#endif
dolfin::MeshFunction
Definition MeshFunction.h:58
dolfin::Mesh::Mesh
Mesh()
Create empty mesh.
Definition Mesh.cpp:59
dolfin::Mesh::init
void init() const
Compute all entities and connectivity.
Definition Mesh.cpp:221
dolfin::SubDomain
Definition SubDomain.h:43
dolfin::SubMesh::SubMesh
SubMesh(const Mesh &mesh, const SubDomain &sub_domain)
Create subset of given mesh marked by sub domain.
Definition SubMesh.cpp:39
dolfin::SubMesh::~SubMesh
~SubMesh()
Destructor.
Definition SubMesh.cpp:96
dolfin
Definition adapt.h:30