Flow123d  release_3.0.0-1150-g11be08a
assembly_theory.hh
Go to the documentation of this file.
1 /*
2  * assembly_theory.hh
3  *
4  * Created on: Apr 30, 2016
5  * Author: jb
6  */
7 
8 #ifndef SRC_FLOW_ASSEMBLY_THEORY_HH_
9 #define SRC_FLOW_ASSEMBLY_THEORY_HH_
10 
11 /**
12  * @file
13  * Conceptual scheme of Assembly classes.
14  *
15  * TODO:
16  * - passing data between classes
17  * - equations derive code and data
18  * - assembly residual and assembly jacobian
19  */
20 
21 
23 
24 };
25 
26 template <class ImplAL>
28  void group_generate_quadratute_points();
29  void group_precompute_fields();
30  void group_assembly_element_integrals();
31  void group_assembly_edge_integrals();
32  void group_assembly_boundary_integrals();
33 
34  // interface for descendants
35 
36 
37 };
38 
39 
40 
41 
42 /**
43  * Class that groups the mesh entities (mainly elements) into
44  * local groups that should fit into the cache with all necessary data.
45  * Assembly of one group may involve few virtual calls, and may involve more cycles, since
46  * these are local in the cache.
47  * Group assembly scheme:
48  * 1. generate quadrature points, make subgroups by region (partly VECTORISE)
49  * 2. precompute field values in quadrature points (may involve various dependencies)
50  * single virtual call per involved field per subgroup (VECTORISE)
51  * 3. assembly element integrals per dim (VECTORISE)
52  * 4. assembly edge integrals per dim (VECTORISE)
53  * 5. assembly boundary integrals
54  */
55 class Assembler {
57  MultidimGroupAssembly group_assemblers_;
58  Assembler(MultidimGroupAssembly assembly_vec_)
59  : group_assemblers_(assembly_vec_)
60  {}
61 
62 
63 };
64 
65 /********************** Equations examples ********************/
66 
67 
68 class FlowMHData : public FieldSet {
69 
70 };
71 
72 template <int Dim>
73 class FlowMHAssembly : public AssemblyGroupBase< SomeEqAssembly<Dim> > {
74  FlowMHAssembly(std::shared_ptr<FlowMHData> data);
75  std::shared_ptr<FlowMHData> data_;
76 };
77 
78 class FlowMHEq : public EquationBase {
79  FlowMHEq(Mesh &mesh) {
80 
81  }
82 };
83 
84 /********** Derived equation **********/
85 
86 class FlowLMHData : public FlowMHData {
87 
88 };
89 
90 template <int Dim>
91 class FlowLMHAssembly : public AssemblyGroupBase< SomeEqAssembly<Dim> > {
92  FlowLMHAssembly(std::shared_ptr<FlowLMHData> data)
93  :FlowMHAssembly(data)
94  {}
95 
96  void assembly_vector_on_element();
97 
98  void assembly_matrix_on_element();
99 
100  std::shared_ptr<FlowLMHData> data_;
101 };
102 
103 class FlowLMHEq : public EquationBase {
104  FlowLMHEq(Mesh &mesh) {
105 
106  }
107 };
108 
109 
110 #endif /* SRC_FLOW_ASSEMBLY_THEORY_HH_ */
Container for various descendants of FieldCommonBase.
Definition: field_set.hh:71
Assembler(MultidimGroupAssembly assembly_vec_)
FlowLMHEq(Mesh &mesh)
Definition: mesh.h:76
FlowLMHAssembly(std::shared_ptr< FlowLMHData > data)
MultidimGroupAssembly group_assemblers_
FlowMHEq(Mesh &mesh)
std::shared_ptr< FlowMHData > data_
std::shared_ptr< FlowLMHData > data_
std::vector< std::shared_ptr< AssemblyGroupInterface > > MultidimGroupAssembly