Line data Source code
1 : /*
2 : * Copyright (c) 2011-2015: G-CSC, Goethe University Frankfurt
3 : * Author: Andreas Vogel
4 : *
5 : * This file is part of UG4.
6 : *
7 : * UG4 is free software: you can redistribute it and/or modify it under the
8 : * terms of the GNU Lesser General Public License version 3 (as published by the
9 : * Free Software Foundation) with the following additional attribution
10 : * requirements (according to LGPL/GPL v3 §7):
11 : *
12 : * (1) The following notice must be displayed in the Appropriate Legal Notices
13 : * of covered and combined works: "Based on UG4 (www.ug4.org/license)".
14 : *
15 : * (2) The following notice must be displayed at a prominent place in the
16 : * terminal output of covered works: "Based on UG4 (www.ug4.org/license)".
17 : *
18 : * (3) The following bibliography is recommended for citation and must be
19 : * preserved in all covered files:
20 : * "Reiter, S., Vogel, A., Heppner, I., Rupp, M., and Wittum, G. A massively
21 : * parallel geometric multigrid solver on hierarchically distributed grids.
22 : * Computing and visualization in science 16, 4 (2013), 151-164"
23 : * "Vogel, A., Reiter, S., Rupp, M., Nägel, A., and Wittum, G. UG4 -- a novel
24 : * flexible software system for simulating pde based models on high performance
25 : * computers. Computing and visualization in science 16, 4 (2013), 165-179"
26 : *
27 : * This program is distributed in the hope that it will be useful,
28 : * but WITHOUT ANY WARRANTY; without even the implied warranty of
29 : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 : * GNU Lesser General Public License for more details.
31 : */
32 :
33 : #include <string>
34 :
35 : // include brigde
36 : #include "bridge/bridge.h"
37 : #include "bridge/util.h"
38 :
39 : // includes of lib_discretization
40 : #include "lib_disc/common/function_group.h"
41 : #include "lib_disc/common/multi_index.h"
42 : #include "lib_disc/dof_manager/function_pattern.h"
43 : #include "lib_disc/spatial_disc/elem_disc/elem_disc_interface.h"
44 :
45 : using namespace std;
46 :
47 : namespace ug
48 : {
49 : namespace bridge
50 : {
51 :
52 : /**
53 : * \defgroup disccommon_bridge Common Discretization Bridge
54 : * \ingroup disc_bridge
55 : * \{
56 : */
57 :
58 1 : void RegisterBridge_DiscCommon(Registry& reg, string parentGroup)
59 : {
60 : // get group string
61 1 : string grp = parentGroup; grp.append("/Discretization");
62 :
63 : try
64 : {
65 : // MultiIndex2
66 : {
67 : typedef MultiIndex<2, size_t> T;
68 1 : string name = string("MultiIndex2");
69 3 : reg.add_class_<T>(name, grp);
70 : }
71 :
72 : #ifdef UG_PARALLEL
73 : // IDomainDecompositionInfo, StandardDomainDecompositionInfo
74 : {
75 : typedef pcl::IDomainDecompositionInfo Tbase;
76 : reg.add_class_<Tbase>("IDomainDecompositionInfo", grp);
77 : typedef pcl::StandardDomainDecompositionInfo T;
78 : reg.add_class_<T, Tbase>("StandardDomainDecompositionInfo", grp)
79 : .add_constructor()
80 : .add_method("map_proc_id_to_subdomain_id", &T::map_proc_id_to_subdomain_id)
81 : .add_method("set_num_subdomains", &T::set_num_subdomains)
82 : .add_method("get_num_subdomains", &T::get_num_subdomains)
83 : .add_method("set_num_spatial_dimensions", &T::set_num_spatial_dimensions)
84 : .add_method("get_num_spatial_dimensions", &T::get_num_spatial_dimensions)
85 : .set_construct_as_smart_pointer(true);
86 : }
87 : #endif
88 :
89 : }
90 0 : UG_REGISTRY_CATCH_THROW(grp);
91 1 : }
92 :
93 : // end group disccommon_bridge
94 : /// \}
95 :
96 : } // end namespace bridge
97 : } // end namespace ug
|