KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
real_field_linear_time_dependant_coeff.h
Go to the documentation of this file.
1 #ifndef KRATOS_REAL_FIELD_LINEAR_TIME_DEPENDANT_COEFF_H
2 #define KRATOS_REAL_FIELD_LINEAR_TIME_DEPENDANT_COEFF_H
3 // /* External includes */
4 
5 // System includes
6 
7 // Project includes
8 #include "includes/variables.h"
9 
10 /* System includes */
11 #include <limits>
12 #include <iostream>
13 #include <iomanip>
14 
15 /* External includes */
16 #ifdef _OPENMP
17 #include <omp.h>
18 #endif
19 
20 /* Project includes */
21 #include "includes/define.h"
22 #include "utilities/openmp_utils.h"
23 #include "real_field.h"
24 
25 namespace Kratos
26 {
28 {
29 public:
30 
32 
34 
35 LinearRealField(const double& a0, const double& b0, const double& c0,
37  : mX0(a0), mY0(b0), mZ0(c0), mFx(fa), mFy(fb), mFz(fc)
38 {}
39 
41 
42 virtual ~LinearRealField(){}
43 
44 
45 //***************************************************************************************************************
46 //***************************************************************************************************************
47 
48 double Evaluate(const double time, const array_1d<double, 3>& coor) override
49 {
50  return mX0 + mFx.Evaluate(time) * coor[0] + mY0 + mFy.Evaluate(time) * coor[1] + mZ0 + mFz.Evaluate(time) * coor[2];
51 }
52 
53 //***************************************************************************************************************
54 //***************************************************************************************************************
55 
56 double CalculateTimeDerivative(const double time, const array_1d<double, 3>& coor) override
57 {
58  return mFx.CalculateDerivative(time) * coor[0] + mY0 + mFy.CalculateDerivative(time) * coor[1] + mZ0 + mFz.CalculateDerivative(time) * coor[2];;
59 }
60 
61 //***************************************************************************************************************
62 //***************************************************************************************************************
63 
64 void CalculateGradient(const double time, const array_1d<double, 3>& coor, array_1d<double, 3>& gradient) override
65 {
66  gradient = ZeroVector(3);
67 }
68 
69 //***************************************************************************************************************
70 //***************************************************************************************************************
71 
72 void CalculateLaplacian(const double time, const array_1d<double, 3>& coor, array_1d<double, 3>& laplacian) override
73 {
74  laplacian = ZeroVector(3);
75 }
76 
77 //***************************************************************************************************************
78 //***************************************************************************************************************
79 
83 
84 
88 
90 
91 virtual std::string Info() const override
92 {
93 return "";
94 }
95 
97 
98 virtual void PrintInfo(std::ostream& rOStream) const override
99 {
100 }
101 
103 
104 virtual void PrintData(std::ostream& rOStream) const override
105 {
106 }
107 
108 
112 
114 
115 protected:
118 
119 
123 
124 
128 
129 
133 
134 
138 
142 
143 
147 
148 
150 
151 private:
152 
155 
156 
160 double mX0;
161 double mY0;
162 double mZ0;
163 RealFunction& mFx;
164 RealFunction& mFy;
165 RealFunction& mFz;
166 
170 
174 
175 
179 
180 
184 
185 
189 
191 LinearRealField & operator=(LinearRealField const& rOther);
192 
193 
195 
196 }; // Class LinearRealField
197 
199 
202 
203 
207 
208 } // namespace Kratos.
209 
210 #endif // KRATOS_REAL_FIELD_LINEAR_TIME_DEPENDANT_COEFF_H
Definition: real_field_linear_time_dependant_coeff.h:28
void CalculateGradient(const double time, const array_1d< double, 3 > &coor, array_1d< double, 3 > &gradient) override
Definition: real_field_linear_time_dependant_coeff.h:64
virtual void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: real_field_linear_time_dependant_coeff.h:98
virtual ~LinearRealField()
Destructor.
Definition: real_field_linear_time_dependant_coeff.h:42
KRATOS_CLASS_POINTER_DEFINITION(LinearRealField)
virtual void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: real_field_linear_time_dependant_coeff.h:104
void CalculateLaplacian(const double time, const array_1d< double, 3 > &coor, array_1d< double, 3 > &laplacian) override
Definition: real_field_linear_time_dependant_coeff.h:72
double Evaluate(const double time, const array_1d< double, 3 > &coor) override
Definition: real_field_linear_time_dependant_coeff.h:48
virtual std::string Info() const override
Turn back information as a stemplate<class T, std::size_t dim> tring.
Definition: real_field_linear_time_dependant_coeff.h:91
LinearRealField(const double &a0, const double &b0, const double &c0, RealFunction &fa, RealFunction &fb, RealFunction &fc)
Default constructor.
Definition: real_field_linear_time_dependant_coeff.h:35
double CalculateTimeDerivative(const double time, const array_1d< double, 3 > &coor) override
Definition: real_field_linear_time_dependant_coeff.h:56
Definition: real_field.h:29
Definition: real_functions.h:27
virtual double CalculateDerivative(const double x)
Definition: real_functions.h:52
virtual double Evaluate(const double x)
Definition: real_functions.h:44
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
time
Definition: face_heat.py:85
list a0
Definition: hinsberg_optimization.py:137