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
Installation
Installation guide
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// Copyright (C) 2006-2024 Matthias Heil and Andrew Hazel
7
// LIC//
8
// LIC// This library is free software; you can redistribute it and/or
9
// LIC// modify it under the terms of the GNU Lesser General Public
10
// LIC// License as published by the Free Software Foundation; either
11
// LIC// version 2.1 of the License, or (at your option) any later version.
12
// LIC//
13
// LIC// This library is distributed in the hope that it will be useful,
14
// LIC// but WITHOUT ANY WARRANTY; without even the implied warranty of
15
// LIC// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
// LIC// Lesser General Public License for more details.
17
// LIC//
18
// LIC// You should have received a copy of the GNU Lesser General Public
19
// LIC// License along with this library; if not, write to the Free Software
20
// LIC// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21
// LIC// 02110-1301 USA.
22
// LIC//
23
// LIC// The authors may be contacted at oomph-lib@maths.man.ac.uk.
24
// LIC//
25
// LIC//====================================================================
26
// Templated functions for MeshAsGeomObject
27
// Config header generated by autoconfig
28
#ifdef HAVE_CONFIG_H
29
#include <oomph-lib-config.h>
30
#endif
31
32
// oomph-lib headers
33
#include "
mesh.h
"
34
#include "
mesh_as_geometric_object.h
"
35
#include "
multi_domain.h
"
36
37
#include <cstdio>
38
namespace
oomph
39
{
40
/// /////////////////////////////////////////////////////////////////////
41
/// /////////////////////////////////////////////////////////////////////
42
/// /////////////////////////////////////////////////////////////////////
43
44
//========================================================================
45
/// Helper namespace for MeshAsGeomObject -- its only function creates
46
/// SamplePointContainerParameters of the right type for the default
47
/// sample point container
48
//========================================================================
49
namespace
MeshAsGeomObject_Helper
50
{
51
/// Default sample point container type. Must currently be one of
52
/// UseCGALSamplePointContainer, UseRefineableBinArray or
53
/// UseNonRefineableBinArray
54
#ifdef OOMPH_HAS_CGAL
55
unsigned
Default_sample_point_container_version
=
56
UseCGALSamplePointContainer
;
57
#else
58
unsigned
Default_sample_point_container_version
=
UseRefineableBinArray
;
59
#endif
60
61
/// "Factory" for SamplePointContainerParameters of the
62
/// right type as selected
63
/// by Default_sample_point_container_version
64
void
create_sample_point_container_parameters
(
65
Mesh
* mesh_pt,
66
SamplePointContainerParameters
*& sample_point_container_parameters_pt)
67
{
68
switch
(
Default_sample_point_container_version
)
69
{
70
case
UseRefineableBinArray
:
71
sample_point_container_parameters_pt =
72
new
RefineableBinArrayParameters
(mesh_pt);
73
74
break
;
75
76
case
UseNonRefineableBinArray
:
77
sample_point_container_parameters_pt =
78
new
NonRefineableBinArrayParameters
(mesh_pt);
79
80
break
;
81
82
#ifdef OOMPH_HAS_CGAL
83
84
case
UseCGALSamplePointContainer
:
85
sample_point_container_parameters_pt =
86
new
CGALSamplePointContainerParameters
(mesh_pt);
87
88
break
;
89
90
#endif
91
92
default
:
93
94
throw
OomphLibError
(
"Wrong sample_point_container_parameters_pt"
,
95
OOMPH_CURRENT_FUNCTION,
96
OOMPH_EXCEPTION_LOCATION);
97
}
98
}
99
100
}
// namespace MeshAsGeomObject_Helper
101
102
/// /////////////////////////////////////////////////////////////////////
103
/// /////////////////////////////////////////////////////////////////////
104
/// /////////////////////////////////////////////////////////////////////
105
106
107
}
// namespace oomph
oomph::CGALSamplePointContainerParameters
/////////////////////////////////////////////////////////////////////////// /////////////////////////...
Definition:
sample_point_parameters.h:233
oomph::Mesh
A general mesh class.
Definition:
mesh.h:67
oomph::NonRefineableBinArrayParameters
/////////////////////////////////////////////////////////////////////////// /////////////////////////...
Definition:
sample_point_parameters.h:456
oomph::OomphLibError
An OomphLibError object which should be thrown when an run-time error is encountered....
Definition:
oomph_definitions.h:222
oomph::RefineableBinArrayParameters
/////////////////////////////////////////////////////////////////////////// /////////////////////////...
Definition:
sample_point_parameters.h:322
oomph::SamplePointContainerParameters
///////////////////////////////////////////////////////////////// ///////////////////////////////////...
Definition:
sample_point_parameters.h:70
mesh.h
mesh_as_geometric_object.h
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,...
Definition:
mesh_as_geometric_object.cc:55
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:64
oomph
//////////////////////////////////////////////////////////////////// ////////////////////////////////...
Definition:
advection_diffusion_elements.cc:30
oomph::UseRefineableBinArray
@ UseRefineableBinArray
Definition:
sample_point_parameters.h:41
oomph::UseCGALSamplePointContainer
@ UseCGALSamplePointContainer
Definition:
sample_point_parameters.h:45
oomph::UseNonRefineableBinArray
@ UseNonRefineableBinArray
Definition:
sample_point_parameters.h:42