Finite Element Domain Decomposition Library
FEDDLib
Loading...
Searching...
No Matches
FEDDCore.hpp
1#ifndef FEDDCORE_hpp
2#define FEDDCORE_hpp
3
4#define FEDD_TIMER
5#define FEDD_DETAIL_TIMER
6
7#include <stdint.h>
8#include <vector>
9#include <cstdlib>
10#include <iostream>
11#include <cmath>
12#include <numeric>
13#include <iosfwd>
14#include <string>
15#include <limits>
16#include <chrono>
17
18#include "feddlib/core/General/DefaultTypeDefs.hpp"
19#include "feddlib/core/General/SmallMatrix.hpp"
20
21#include <Teuchos_RCPDecl.hpp>
22#include <Teuchos_RCPBoostSharedPtrConversions.hpp>
23#include <Teuchos_ParameterList.hpp>
24#include <Teuchos_XMLParameterListHelpers.hpp>
25#include <Teuchos_TimeMonitor.hpp>
26#include <Teuchos_CommandLineProcessor.hpp>
27
28#include <boost/function.hpp>
29namespace FEDD {
30// template<class SC, class LO, class GO, class NO>
31// class InterfaceEntity;
32// enum EntityType {DefaultType,VertexType,EdgeType,FaceType,InteriorType,InterfaceType};
33// enum EntityFlag {DefaultFlag,StraightFlag,ShortFlag,NodeFlag};
34// enum DistanceFunction {ConstantDistanceFunction,InverseEuclideanDistanceFunction};
35//
36// template <class SC,class LO,class GO,class NO>
37// bool compareInterfaceEntities(Teuchos::RCP<InterfaceEntity<SC,LO,GO,NO> > iEa,
38// Teuchos::RCP<InterfaceEntity<SC,LO,GO,NO> > iEb)
39// {
40// return iEa->getUniqueID()<iEb->getUniqueID();
41// }
42//
43// template <class SC,class LO,class GO,class NO>
44// bool equalInterfaceEntities(Teuchos::RCP<InterfaceEntity<SC,LO,GO,NO> > iEa,
45// Teuchos::RCP<InterfaceEntity<SC,LO,GO,NO> > iEb)
46// {
47// return iEa->getUniqueID()==iEb->getUniqueID();
48// }
49
50//
51//#ifndef FEDD_TIMER_START
52//#define FEDD_TIMER_START(A,S) Teuchos::RCP<TimeMonitor> A = Teuchos::rcp(new Teuchos::TimeMonitor(*Teuchos::TimeMonitor::getNewTimer(std::string("FEDD:") + std::string(S))));
53//#endif
54//
55//#ifndef FEDD_TIMER_STOP
56//#define FEDD_TIMER_STOP(A) A.reset();
57//#endif
58
59#define FEDDLIB_WARNING(CLASS,VERBOSE,OUTPUT) if (VERBOSE) std::cerr << std::setw(5) << " " << "[WARNING] " << CLASS << ": " << OUTPUT << std::endl;
60
61#define FEDDLIB_NOTIFICATION(CLASS,VERBOSE,OUTPUT) if (VERBOSE) std::cerr << std::setw(5) << " " << "[NOTIFICATION] " << CLASS << ": " << OUTPUT << std::endl;
62
63
64typedef unsigned UN;
65
66typedef std::tuple<int,int> tuple_intint_Type;
67typedef std::tuple<std::string,std::string,int,int> tuple_ssii_Type;
68typedef std::tuple<std::string,double> tuple_sd_Type;
69typedef std::vector<tuple_sd_Type> tuple_sd_vec_Type;
70typedef Teuchos::RCP<tuple_sd_vec_Type> tuple_sd_vec_ptr_Type;
71
72typedef std::vector<tuple_ssii_Type> tuple_disk_vec_Type;
73typedef Teuchos::RCP<tuple_disk_vec_Type> tuple_disk_vec_ptr_Type;
74
75typedef std::vector<std::string> string_vec_Type;
76typedef Teuchos::RCP<string_vec_Type> string_vec_ptr_Type;
77
78typedef std::vector<std::string> vec_string_Type;
79typedef std::vector<double> vec_dbl_Type;
80typedef std::vector<int> vec_int_Type;
81typedef std::vector<long long> vec_long_Type;
82typedef std::vector<default_lo> vec_LO_Type;
83typedef std::vector<default_go> vec_GO_Type;
84typedef std::vector<bool> vec_bool_Type;
85typedef std::vector<std::vector<double> > vec2D_dbl_Type;
86typedef std::vector<std::vector<int> > vec2D_int_Type;
87typedef std::vector<vec_long_Type > vec2D_long_Type;
88typedef std::vector<vec_LO_Type > vec2D_LO_Type;
89typedef std::vector<vec_GO_Type > vec2D_GO_Type;
90typedef std::vector<vec2D_dbl_Type> vec3D_dbl_Type;
91typedef std::vector<vec2D_long_Type > vec3D_long_Type;
92
93typedef Teuchos::RCP<vec_dbl_Type> vec_dbl_ptr_Type;
94typedef Teuchos::RCP<vec_int_Type> vec_int_ptr_Type;
95typedef Teuchos::RCP<vec_long_Type> vec_long_ptr_Type;
96typedef Teuchos::RCP<vec_GO_Type> vec_GO_ptr_Type;
97typedef Teuchos::RCP<vec2D_dbl_Type > vec2D_dbl_ptr_Type;
98typedef Teuchos::RCP<vec2D_int_Type > vec2D_int_ptr_Type;
99typedef Teuchos::RCP<vec2D_long_Type > vec2D_long_ptr_Type;
100typedef Teuchos::RCP<vec3D_dbl_Type> vec3D_dbl_ptr_Type;
101typedef std::vector<vec_long_ptr_Type> vec_long_ptr_vec_Type;
102typedef Teuchos::RCP<vec_long_ptr_vec_Type> vec_long_ptr_vec_ptr_Type;
103typedef std::vector<vec2D_int_Type> vec2D_int_vec_Type;
104typedef std::vector<vec2D_dbl_Type> vec2D_dbl_vec_Type;
105typedef std::vector<vec2D_int_ptr_Type> vec2D_int_ptr_vec_Type;
106typedef std::vector<vec2D_dbl_ptr_Type> vec2D_dbl_ptr_vec_Type;
107
108typedef Teuchos::RCP<vec2D_int_vec_Type> vec2D_int_vec_ptr_Type;
109typedef Teuchos::RCP<vec2D_dbl_vec_Type> vec2D_dbl_vec_ptr_Type;
110typedef Teuchos::RCP<vec2D_int_ptr_vec_Type> vec2D_int_ptr_vec_ptr_Type;
111typedef Teuchos::RCP<vec2D_dbl_ptr_vec_Type> vec2D_dbl_ptr_vec_ptr_Type;
112
113typedef Teuchos::RCP<vec3D_long_Type> vec3D_long_ptr_Type;
114
115typedef Teuchos::RCP<std::vector<vec_int_ptr_Type> > vec_int_ptr_vec_ptr_Type;
116
117typedef Teuchos::Time Time_Type;
118typedef Teuchos::RCP<Time_Type> TimePtr_Type;
119typedef Teuchos::TimeMonitor TimeMonitor_Type;
120
121typedef Teuchos::ParameterList ParameterList_Type;
122typedef Teuchos::RCP<ParameterList_Type> ParameterListPtr_Type;
123typedef Teuchos::RCP<const ParameterList_Type> ParameterListConstPtr_Type;
124
125typedef boost::function<double(double* x, int* parameters)> CoeffFunc_Type;
126typedef boost::function<double(double* x, double* parameters)> CoeffFuncDbl_Type;
127typedef boost::function<void(double* x, double* res, double* parameters)> RhsFunc_Type;
128typedef boost::function<void(double* x, double* res, double t, double* parameters)> GeneralFunc_Type;
129typedef boost::function<void(double* x, double* res)> Func_Type;
130
131}
132#endif
Adaptive Mesh Refinement.
Definition AdaptiveMeshRefinement_decl.hpp:33