12#ifndef CL_GRADIENT_HPP
13#define CL_GRADIENT_HPP
35 const int mNumDimensions ;
38 bool mFlipSign = false ;
41 const uint mDofMaganerIndex ;
82 const bool aFlipSign =
false,
83 const uint aDofManagerIndex = 0 );
88 set_fields(
const string & aScalarField,
const string & aGradientField );
113 poly1_2d(
const real x,
const real y );
116 poly2_2d(
const real x,
const real y );
119 poly3_2d(
const real x,
const real y );
122 poly4_2d(
const real x,
const real y );
143 (this->*mFunComputePoly)( aX );
149 (this->*mFunPoly2D )( aX( 0, 0 ), aX( 0, 1 ) );
153 Gradient::compute_poly_3d(
const Matrix< real > & aX )
155 (this->*mFunPoly3D )( aX( 0, 0 ), aX( 0, 1 ), aX( 0, 2 ) );
159 Gradient::poly1_2d(
const real x,
const real y )
167 Gradient::poly2_2d(
const real x,
const real y )
178 Gradient::poly3_2d(
const real x,
const real y )
186 mP( 6, 0 ) = mP( 3, 0 )*
x ;
187 mP( 7, 0 ) = mP( 3, 0 )*
y ;
188 mP( 8, 0 ) =
x * mP( 5, 0 );
189 mP( 9, 0 ) =
y * mP( 5, 0 );
193 Gradient::poly4_2d(
const real x,
const real y )
201 mP( 6, 0 ) = mP( 3, 0 )*
x ;
202 mP( 7, 0 ) = mP( 3, 0 )*
y ;
203 mP( 8, 0 ) =
x * mP( 5, 0 );
204 mP( 9, 0 ) =
y * mP( 5, 0 );
205 mP( 10, 0 ) = mP( 3, 0 ) * mP( 3, 0 );
206 mP( 11, 0 ) = mP( 6, 0 ) *
y ;
207 mP( 12, 0 ) = mP( 3, 0 ) * mP( 5, 0 ) ;
208 mP( 13, 0 ) =
x * mP( 9, 0 ) ;
209 mP( 14, 0 ) = mP( 5, 0 ) * mP( 5, 0 ) ;
213 Gradient::poly1_3d(
const real x,
const real y,
const real z )
222 Gradient::poly2_3d(
const real x,
const real y,
const real z )
237 Gradient::poly3_3d(
const real x,
const real y,
const real z )
249 mP( 10, 0 ) = mP( 4, 0 ) *
x ;
250 mP( 11, 0 ) = mP( 4, 0 ) *
y ;
251 mP( 12, 0 ) =
x * mP( 6, 0 ) ;
252 mP( 13, 0 ) =
y * mP( 6, 0 ) ;
253 mP( 14, 0 ) = z * mP( 6, 0 ) ;
254 mP( 15, 0 ) =
y * mP( 8, 0 ) ;
255 mP( 16, 0 ) = z * mP( 8, 0 ) ;
256 mP( 17, 0 ) =
x * mP( 8, 0 ) ;
257 mP( 18, 0 ) = mP( 4, 0 ) * z ;
258 mP( 19, 0 ) =
x *
y * z ;
262 Gradient::poly4_3d(
const real x,
const real y,
const real z )
274 mP( 10, 0 ) = mP( 4, 0 ) *
x ;
275 mP( 11, 0 ) = mP( 4, 0 ) *
y ;
276 mP( 12, 0 ) =
x * mP( 6, 0 ) ;
277 mP( 13, 0 ) =
y * mP( 6, 0 ) ;
278 mP( 14, 0 ) = z * mP( 6, 0 ) ;
279 mP( 15, 0 ) =
y * mP( 8, 0 ) ;
280 mP( 16, 0 ) = z * mP( 8, 0 ) ;
281 mP( 17, 0 ) =
x * mP( 8, 0 ) ;
282 mP( 18, 0 ) = mP( 4, 0 ) * z ;
283 mP( 19, 0 ) =
x *
y * z ;
284 mP( 20, 0 ) = mP( 4, 0 ) * mP( 4, 0 ) ;
285 mP( 21, 0 ) = mP( 4, 0 ) * mP( 5, 0 ) ;
286 mP( 22, 0 ) = mP( 4, 0 ) * mP( 6, 0 ) ;
287 mP( 23, 0 ) = mP( 5, 0 ) * mP( 6, 0 ) ;
288 mP( 24, 0 ) = mP( 6, 0 ) * mP( 6, 0 ) ;
289 mP( 25, 0 ) = mP( 6, 0 ) * mP( 7, 0 ) ;
290 mP( 26, 0 ) = mP( 6, 0 ) * mP( 8, 0 ) ;
291 mP( 27, 0 ) = mP( 7, 0 ) * mP( 8, 0 ) ;
292 mP( 28, 0 ) = mP( 8, 0 ) * mP( 8, 0 ) ;
293 mP( 29, 0 ) = mP( 9, 0 ) * mP( 8, 0 ) ;
294 mP( 30, 0 ) = mP( 4, 0 ) * mP( 8, 0 ) ;
295 mP( 31, 0 ) = mP( 9, 0 ) * mP( 4, 0 ) ;
296 mP( 32, 0 ) = mP( 4, 0 ) * mP( 7, 0 ) ;
297 mP( 33, 0 ) = mP( 6, 0 ) * mP( 9, 0 ) ;
298 mP( 34, 0 ) = mP( 5, 0 ) * mP( 8, 0 ) ;
A bounds-checked wrapper around std::vector.
Definition cl_Cell.hpp:45
Hash map (unordered key-value).
Definition cl_Map.hpp:75
void set_fields(const string &aScalarField, const string &aGradientField)
Definition cl_Gradient.cpp:86
Gradient(Kernel *aKernel, const Vector< id_t > &aBlocksIDs, const bool aFlipSign=false, const uint aDofManagerIndex=0)
Definition cl_Gradient.cpp:19
~Gradient() override=default
void run() override
Definition cl_Gradient.cpp:278
void set_order(const uint aOrder)
Definition cl_Gradient.cpp:216
virtual void process_node(mesh::Node *aNode)
Definition cl_Gradient.cpp:107
Top-level orchestrator.
Definition cl_FEM_Kernel.hpp:56
Postprocessor(Kernel *aKernel, DofManager *aField=nullptr)
Collective.
Definition cl_FEM_Postprocessor.cpp:27
Definition cl_IFB_LINE3.hpp:21
USER GUIDES:
Definition cl_Capacitor.cpp:16
unsigned int uint
Definition typedefs.hpp:30
double real
Definition typedefs.hpp:36
float x
Definition test_curve_frame.py:37
y
Definition test_stadium.py:44