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