DOLFIN
DOLFIN C++ interface
Toggle main menu visibility
Loading...
Searching...
No Matches
dolfin
mesh
PeriodicBoundaryComputation.h
1
// Copyright (C) 2013 Garth N. Wells
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: 2012-01-10
19
// Last changed:
20
21
#ifndef __PERIODIC_BOUNDARY_COMPUTATION_H
22
#define __PERIODIC_BOUNDARY_COMPUTATION_H
23
24
#include <map>
25
#include <utility>
26
#include <vector>
27
#include <dolfin/common/constants.h>
28
#include <dolfin/mesh/MeshFunction.h>
29
30
namespace
dolfin
31
{
32
33
class
Mesh
;
34
class
SubDomain
;
35
37
38
class
PeriodicBoundaryComputation
39
{
40
public
:
41
46
static
std::map<unsigned int, std::pair<unsigned int, unsigned int> >
47
compute_periodic_pairs
(
const
Mesh
& mesh,
const
SubDomain
& sub_domain,
48
const
std::size_t dim);
49
59
static
MeshFunction<std::size_t>
60
masters_slaves
(std::shared_ptr<const Mesh> mesh,
61
const
SubDomain
& sub_domain,
const
std::size_t dim);
62
63
private
:
64
65
// Return true is point lies within bounding box
66
static
bool
in_bounding_box(
const
std::vector<double>& point,
67
const
std::vector<double>& bounding_box,
68
const
double
tol);
69
70
};
71
72
}
73
74
#endif
dolfin::MeshFunction
Definition
MeshFunction.h:59
dolfin::Mesh
Definition
Mesh.h:83
dolfin::PeriodicBoundaryComputation
This class computes map from slave entity to master entity.
Definition
PeriodicBoundaryComputation.h:39
dolfin::PeriodicBoundaryComputation::compute_periodic_pairs
static std::map< unsigned int, std::pair< unsigned int, unsigned int > > compute_periodic_pairs(const Mesh &mesh, const SubDomain &sub_domain, const std::size_t dim)
Definition
PeriodicBoundaryComputation.cpp:76
dolfin::PeriodicBoundaryComputation::masters_slaves
static MeshFunction< std::size_t > masters_slaves(std::shared_ptr< const Mesh > mesh, const SubDomain &sub_domain, const std::size_t dim)
Definition
PeriodicBoundaryComputation.cpp:281
dolfin::SubDomain
Definition
SubDomain.h:43
dolfin
Definition
adapt.h:30
Generated by
1.17.0