DOLFIN
DOLFIN C++ interface
dolfin
mesh
SubMesh.h
1
// Copyright (C) 2009 Anders Logg
2
//
3
// This file is part of DOLFIN.
4
//
5
// DOLFIN is free software: you can redistribute it and/or modify
6
// it under the terms of the GNU Lesser General Public License as published by
7
// the Free Software Foundation, either version 3 of the License, or
8
// (at your option) any later version.
9
//
10
// DOLFIN is distributed in the hope that it will be useful,
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
// GNU Lesser General Public License for more details.
14
//
15
// You should have received a copy of the GNU Lesser General Public License
16
// along with DOLFIN. If not, see <http://www.gnu.org/licenses/>.
17
//
18
// First added: 2009-02-11
19
// Last changed: 2013-02-11
20
21
#ifndef __SUB_MESH_H
22
#define __SUB_MESH_H
23
24
#include <map>
25
#include "Mesh.h"
26
27
namespace
dolfin
28
{
29
30
class
SubDomain;
31
template
<
typename
T>
class
MeshFunction;
32
39
40
class
SubMesh
:
public
Mesh
41
{
42
public
:
43
45
SubMesh
(
const
Mesh
& mesh,
const
SubDomain
& sub_domain);
46
48
SubMesh
(
const
Mesh
& mesh,
const
MeshFunction<std::size_t>
& sub_domains,
49
std::size_t sub_domain);
50
52
SubMesh
(
const
Mesh
& mesh, std::size_t sub_domain);
53
55
~SubMesh
();
56
57
private
:
58
60
void
init
(
const
Mesh
& mesh,
const
std::vector<std::size_t>& sub_domains,
61
std::size_t sub_domain);
62
63
};
64
65
}
66
67
#endif
dolfin::MeshFunction< std::size_t >
dolfin::SubDomain
Definition:
SubDomain.h:42
dolfin
Definition:
adapt.h:29
dolfin::SubMesh::~SubMesh
~SubMesh()
Destructor.
Definition:
SubMesh.cpp:96
dolfin::SubMesh
Definition:
SubMesh.h:40
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::Mesh::init
void init() const
Compute all entities and connectivity.
Definition:
Mesh.cpp:216
dolfin::Mesh
Definition:
Mesh.h:82
Generated by
1.8.13