Hermes2D  3.0
discrete_problem_integration_order_calculator.h
1 
16 #ifndef __H2D_DISCRETE_PROBLEM_INTEGRATION_ORDER_CALCULATOR_H
17 #define __H2D_DISCRETE_PROBLEM_INTEGRATION_ORDER_CALCULATOR_H
18 
19 #include "hermes_common.h"
20 #include "adapt/adapt.h"
21 #include "graph.h"
22 #include "forms.h"
23 #include "weakform/weakform.h"
24 #include "function/function.h"
25 #include "neighbor_search.h"
26 #include "refinement_selectors/selector.h"
27 #include "exceptions.h"
28 #include "mixins2d.h"
29 #include "discrete_problem_helpers.h"
30 
31 namespace Hermes
32 {
33  namespace Hermes2D
34  {
35  class PrecalcShapeset;
38  template<typename Scalar>
41  {
42  private:
44 
46  void adjust_order_to_refmaps(Form<Scalar> *form, int& order, Hermes::Ord* o, RefMap** current_refmaps);
47 
49  template<typename MatrixFormType>
50  int calc_order_matrix_form(const std::vector<SpaceSharedPtr<Scalar> >& spaces, MatrixFormType* mf, RefMap** current_refmaps, Func<Hermes::Ord>** ext, Func<Hermes::Ord>** u_ext);
51 
53  template<typename VectorFormType>
54  int calc_order_vector_form(const std::vector<SpaceSharedPtr<Scalar> >& spaces, VectorFormType* vf, RefMap** current_refmaps, Func<Hermes::Ord>** ext, Func<Hermes::Ord>** u_ext);
55 
57  int calculate_order(const std::vector<SpaceSharedPtr<Scalar> >& spaces, RefMap** current_refmaps, WeakFormSharedPtr<Scalar> current_wf);
58 
61  Func<Hermes::Ord>** init_u_ext_orders();
64  void deinit_u_ext_orders(Func<Hermes::Ord>** u_ext_func);
65 
68  Func<Hermes::Ord>** init_ext_orders(std::vector<MeshFunctionSharedPtr<Scalar> >& ext, std::vector<UExtFunctionSharedPtr<Scalar> >& u_ext_fns, Func<Hermes::Ord>** u_ext_func);
71  void deinit_ext_orders(Func<Hermes::Ord>** ext_func);
72 
74  int calc_order_dg_matrix_form(const std::vector<SpaceSharedPtr<Scalar> > spaces, Traverse::State* state, MatrixFormDG<Scalar>* mfDG, RefMap** current_refmaps, Solution<Scalar>** current_u_ext, bool neighbor_supp_u, bool neighbor_supp_v, NeighborSearch<Scalar>** neighbor_searches);
75 
77  int calc_order_dg_vector_form(const std::vector<SpaceSharedPtr<Scalar> > spaces, Traverse::State* state, VectorFormDG<Scalar>* vfDG, RefMap** current_refmaps, Solution<Scalar>** current_u_ext, bool neighbor_supp_v, NeighborSearch<Scalar>** neighbor_searches);
78 
81 
83  DiscontinuousFunc<Hermes::Ord>** init_ext_fns_ord(std::vector<MeshFunctionSharedPtr<Scalar> > &ext,
84  NeighborSearch<Scalar>** neighbor_searches);
85 
87  template<typename FormType>
88  void deinit_ext_fns_ord(Form<Scalar> *form, FormType** oi, FormType** oext);
89 
92 
94  Solution<Scalar>** u_ext;
95  Func<Hermes::Ord>** ext_orders;
96  Func<Hermes::Ord>** u_ext_orders;
97  Traverse::State* current_state;
98 
99  template<typename T> friend class DiscreteProblem;
100  template<typename T> friend class DiscreteProblemThreadAssembler;
101  };
102  }
103 }
104 #endif
Definition: adapt.h:24
This class represents a function with jump discontinuity on an interface of two elements.
Definition: forms.h:335
Provides capabilities to (re-)assemble a matrix / vector only where necessary. See also Solver::keep_...
Used to pass the instances of Space around.
Definition: space.h:34
Abstract, base class for vector DG form - i.e. linear Form, where the integration is with respect to ...
Definition: weakform.h:50
Abstract, base class for any form - i.e. integral in the weak formulation of (a system of) PDE By de...
Definition: weakform.h:43
Used to pass the instances of WeakForm around.
Definition: weakform.h:55
This class is a one-thread (non-DG) assembly worker.
Represents the reference mapping.
Definition: refmap.h:40
This class characterizes a neighborhood of a given edge in terms of adjacent elements and provides me...
Represents the solution of a PDE.
Definition: api2d.h:35
Abstract, base class for matrix DG form - i.e. bilinear form, where the integration is with respect t...
Definition: weakform.h:49