Toggle navigation
Documentation
Big picture
The finite element method
The data structure
Not-so-quick guide
Optimisation
Order of action functions
Example codes and tutorials
List of example codes and tutorials
Meshing
Solvers
MPI parallel processing
Post-processing/visualisation
Other
Change log
Creating documentation
Coding conventions
Index
FAQ
Get it
Installation guide
Get code from subversion repository
Get code as tar file
Copyright
About
People
Contact/Get involved
Publications
Acknowledgements
Picture show
Go
src
generic
mesh_as_geometric_object.cc
Go to the documentation of this file.
1
//LIC// ====================================================================
2
//LIC// This file forms part of oomph-lib, the object-oriented,
3
//LIC// multi-physics finite-element library, available
4
//LIC// at http://www.oomph-lib.org.
5
//LIC//
6
//LIC// Version 1.0; svn revision $LastChangedRevision$
7
//LIC//
8
//LIC// $LastChangedDate$
9
//LIC//
10
//LIC// Copyright (C) 2006-2016 Matthias Heil and Andrew Hazel
11
//LIC//
12
//LIC// This library is free software; you can redistribute it and/or
13
//LIC// modify it under the terms of the GNU Lesser General Public
14
//LIC// License as published by the Free Software Foundation; either
15
//LIC// version 2.1 of the License, or (at your option) any later version.
16
//LIC//
17
//LIC// This library is distributed in the hope that it will be useful,
18
//LIC// but WITHOUT ANY WARRANTY; without even the implied warranty of
19
//LIC// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
//LIC// Lesser General Public License for more details.
21
//LIC//
22
//LIC// You should have received a copy of the GNU Lesser General Public
23
//LIC// License along with this library; if not, write to the Free Software
24
//LIC// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25
//LIC// 02110-1301 USA.
26
//LIC//
27
//LIC// The authors may be contacted at oomph-lib@maths.man.ac.uk.
28
//LIC//
29
//LIC//====================================================================
30
// Templated functions for MeshAsGeomObject
31
// Config header generated by autoconfig
32
#ifdef HAVE_CONFIG_H
33
#include <oomph-lib-config.h>
34
#endif
35
36
//oomph-lib headers
37
#include "
mesh.h
"
38
#include "
mesh_as_geometric_object.h
"
39
#include "
multi_domain.h
"
40
41
#include <cstdio>
42
namespace
oomph
43
{
44
45
46
47
48
////////////////////////////////////////////////////////////////////////
49
////////////////////////////////////////////////////////////////////////
50
////////////////////////////////////////////////////////////////////////
51
52
//========================================================================
53
/// Helper namespace for MeshAsGeomObject -- its only function creates
54
/// SamplePointContainerParameters of the right type for the default
55
/// sample point container
56
//========================================================================
57
namespace
MeshAsGeomObject_Helper
58
{
59
60
/// \short Default sample point container type. Must currently be one of
61
/// UseCGALSamplePointContainer, UseRefineableBinArray or
62
/// UseNonRefineableBinArray
63
#ifdef OOMPH_HAS_CGAL
64
unsigned
Default_sample_point_container_version
=
UseCGALSamplePointContainer
;
65
#else
66
unsigned
Default_sample_point_container_version=
UseRefineableBinArray
;
67
#endif
68
69
/// \short "Factory" for SamplePointContainerParameters of the
70
/// right type as selected
71
/// by Default_sample_point_container_version
72
void
create_sample_point_container_parameters
(
Mesh
* mesh_pt,
73
SamplePointContainerParameters
*&
74
sample_point_container_parameters_pt)
75
{
76
switch
(Default_sample_point_container_version)
77
{
78
case
UseRefineableBinArray
:
79
sample_point_container_parameters_pt=
new
RefineableBinArrayParameters
(mesh_pt);
80
81
break
;
82
83
case
UseNonRefineableBinArray
:
84
sample_point_container_parameters_pt=
new
NonRefineableBinArrayParameters
(mesh_pt);
85
86
break
;
87
88
#ifdef OOMPH_HAS_CGAL
89
90
case
UseCGALSamplePointContainer
:
91
sample_point_container_parameters_pt=
new
CGALSamplePointContainerParameters
(mesh_pt);
92
93
break
;
94
95
#endif
96
97
default
:
98
99
throw
OomphLibError
(
"Wrong sample_point_container_parameters_pt"
,
100
OOMPH_CURRENT_FUNCTION,
101
OOMPH_EXCEPTION_LOCATION);
102
103
}
104
}
105
106
}
107
108
////////////////////////////////////////////////////////////////////////
109
////////////////////////////////////////////////////////////////////////
110
////////////////////////////////////////////////////////////////////////
111
112
113
114
}
oomph::SamplePointContainerParameters
Helper object for dealing with the parameters used for the SamplePointContainer objects.
Definition:
sample_point_parameters.h:78
oomph::MeshAsGeomObject_Helper::create_sample_point_container_parameters
void create_sample_point_container_parameters(Mesh *mesh_pt, SamplePointContainerParameters *&sample_point_container_parameters_pt)
"Factory" for SamplePointContainerParameters of the right type as selected by Default_sample_point_co...
Definition:
mesh_as_geometric_object.cc:72
oomph::NonRefineableBinArrayParameters
Helper object for dealing with the parameters used for the NonRefineableBinArray objects.
Definition:
sample_point_parameters.h:508
oomph::UseRefineableBinArray
Definition:
sample_point_parameters.h:46
oomph::CGALSamplePointContainerParameters
Helper object for dealing with the parameters used for the CGALSamplePointContainer objects...
Definition:
sample_point_parameters.h:250
mesh.h
oomph::RefineableBinArrayParameters
Helper object for dealing with the parameters used for the RefineableBinArray objects.
Definition:
sample_point_parameters.h:359
oomph::OomphLibError
Definition:
oomph_definitions.h:225
oomph
Definition:
advection_diffusion_elements.cc:33
oomph::UseNonRefineableBinArray
Definition:
sample_point_parameters.h:47
multi_domain.h
oomph::MeshAsGeomObject_Helper::Default_sample_point_container_version
unsigned Default_sample_point_container_version
Default sample point container type. Must currently be one of UseCGALSamplePointContainer, UseRefineableBinArray or UseNonRefineableBinArray.
Definition:
mesh_as_geometric_object.cc:64
oomph::UseCGALSamplePointContainer
Definition:
sample_point_parameters.h:49
mesh_as_geometric_object.h
oomph::Mesh
A general mesh class.
Definition:
mesh.h:74