libMesh
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
GradDivExactSolution Class Reference

#include <grad_div_exact_solution.h>

Public Member Functions

 GradDivExactSolution ()=default
 
 ~GradDivExactSolution ()=default
 
RealGradient operator() (Point p)
 
RealTensor grad (Point p)
 
RealGradient forcing (Point p)
 

Static Public Member Functions

static void RM (RealTensor T)
 

Private Attributes

const Real k = pi
 

Static Private Attributes

static RealTensor R
 

Detailed Description

Definition at line 26 of file grad_div_exact_solution.h.

Constructor & Destructor Documentation

◆ GradDivExactSolution()

GradDivExactSolution::GradDivExactSolution ( )
default

◆ ~GradDivExactSolution()

GradDivExactSolution::~GradDivExactSolution ( )
default

Member Function Documentation

◆ forcing()

RealGradient GradDivExactSolution::forcing ( Point  p)
inline

Definition at line 56 of file grad_div_exact_solution.h.

57 {
58 return (2*k*k + 1)*operator()(p);
59 }
RealGradient operator()(Point p)

References k, and operator()().

Referenced by assemble_graddiv().

◆ grad()

RealTensor GradDivExactSolution::grad ( Point  p)
inline

Definition at line 43 of file grad_div_exact_solution.h.

44 {
45 Point pp = R.transpose()*p;
46 Real x = pp(0), y = pp(1);
47
48 const Real dux_dx = -k*sin(k*x)*sin(k*y);
49 const Real dux_dy = k*cos(k*x)*cos(k*y);
50 const Real duy_dx = dux_dy;
51 const Real duy_dy = dux_dx;
52
53 return R*RealTensor(dux_dx, dux_dy, Real(0), duy_dx, duy_dy)*R.transpose()/R.det();
54 }
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition point.h:40
TypeTensor< T > transpose() const
RealTensorValue RealTensor
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

References libMesh::TypeTensor< T >::det(), k, R, libMesh::Real, and libMesh::TypeTensor< T >::transpose().

Referenced by SolutionGradient< dim >::component(), and SolutionGradient< dim >::operator()().

◆ operator()()

RealGradient GradDivExactSolution::operator() ( Point  p)
inline

Definition at line 32 of file grad_div_exact_solution.h.

33 {
34 Point pp = R.transpose()*p;
35 Real x = pp(0), y = pp(1);
36
37 const Real ux = cos(k*x)*sin(k*y);
38 const Real uy = sin(k*x)*cos(k*y);
39
40 return R*RealGradient(ux, uy)/R.det();
41 }
RealVectorValue RealGradient

References libMesh::TypeTensor< T >::det(), k, R, libMesh::Real, and libMesh::TypeTensor< T >::transpose().

Referenced by forcing().

◆ RM()

static void GradDivExactSolution::RM ( RealTensor  T)
inlinestatic

Definition at line 61 of file grad_div_exact_solution.h.

62 {
63 R = T;
64 }

References R.

Referenced by main().

Member Data Documentation

◆ k

const Real GradDivExactSolution::k = pi
private

Definition at line 68 of file grad_div_exact_solution.h.

Referenced by forcing(), grad(), and operator()().

◆ R

RealTensor GradDivExactSolution::R
staticprivate

Definition at line 67 of file grad_div_exact_solution.h.

Referenced by grad(), operator()(), and RM().


The documentation for this class was generated from the following files: