libMesh
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | Private Attributes | List of all members
SolutionGradient< dim > Class Template Reference

#include <solution_function.h>

Inheritance diagram for SolutionGradient< dim >:
[legend]

Public Member Functions

 SolutionGradient ()=default
 
 ~SolutionGradient ()=default
 
virtual Gradient operator() (const Point &, const Real=0)
 
virtual void operator() (const Point &p, const Real, DenseVector< Gradient > &output)
 Evaluation function for time-dependent vector-valued functions.
 
virtual Gradient component (unsigned int component_in, const Point &p, const Real)
 
virtual std::unique_ptr< FunctionBase< Gradient > > clone () const
 
 SolutionGradient (const unsigned int u_var)
 
 ~SolutionGradient ()=default
 
virtual Gradient operator() (const Point &, const Real=0)
 
virtual void operator() (const Point &p, const Real, DenseVector< Gradient > &output)
 Evaluation function for time-dependent vector-valued functions.
 
virtual Gradient component (unsigned int component_in, const Point &p, const Real)
 
virtual std::unique_ptr< FunctionBase< Gradient > > clone () const
 
 SolutionGradient (const unsigned int u_var)
 
 ~SolutionGradient ()=default
 
virtual Gradient operator() (const Point &, const Real=0)
 
virtual void operator() (const Point &p, const Real, DenseVector< Gradient > &output)
 Evaluation function for time-dependent vector-valued functions.
 
virtual Gradient component (unsigned int component_in, const Point &p, const Real)
 
virtual std::unique_ptr< FunctionBase< Gradient > > clone () const
 
 SolutionGradient (const unsigned int u_var)
 
 ~SolutionGradient ()=default
 
virtual Gradient operator() (const Point &, const Real=0)
 
virtual void operator() (const Point &p, const Real, DenseVector< Gradient > &output)
 Evaluation function for time-dependent vector-valued functions.
 
virtual Gradient component (unsigned int component_in, const Point &p, const Real)
 
virtual std::unique_ptr< FunctionBase< Gradient > > clone () const
 
 SolutionGradient ()=default
 
 ~SolutionGradient ()=default
 
virtual Gradient operator() (const Point &, const Real=0)
 
virtual void operator() (const Point &p, const Real, DenseVector< Gradient > &output)
 Evaluation function for time-dependent vector-valued functions.
 
virtual Gradient component (unsigned int component_in, const Point &p, const Real)
 
virtual std::unique_ptr< FunctionBase< Gradient > > clone () const
 
 SolutionGradient ()=default
 
 ~SolutionGradient ()=default
 
virtual Gradient operator() (const Point &, const Real=0) override
 
virtual void operator() (const Point &p, const Real, DenseVector< Gradient > &output) override
 Evaluation function for time-dependent vector-valued functions.
 
virtual std::unique_ptr< FunctionBase< Gradient > > clone () const override
 
virtual Gradient component (unsigned int i, const Point &p, Real time=0.) override
 
 SolutionGradient ()=default
 
 ~SolutionGradient ()=default
 
virtual Gradient operator() (const Point &, const Real=0) override
 
virtual void operator() (const Point &p, const Real, DenseVector< Gradient > &output) override
 Evaluation function for time-dependent vector-valued functions.
 
virtual std::unique_ptr< FunctionBase< Gradient > > clone () const override
 
virtual Gradient component (unsigned int i, const Point &p, Real time=0.) override
 
void operator() (const Point &p, const Real, DenseVector< Gradient > &output)
 Evaluation function for time-dependent vector-valued functions.
 
void operator() (const Point &p, const Real, DenseVector< Gradient > &output)
 Evaluation function for time-dependent vector-valued functions.
 
void operator() (const Point &p, const Real, DenseVector< Gradient > &output)
 Evaluation function for time-dependent vector-valued functions.
 
void operator() (const Point &p, const Real, DenseVector< Gradient > &output)
 Evaluation function for time-dependent vector-valued functions.
 
void operator() (const Point &p, const Real, DenseVector< Gradient > &output)
 Evaluation function for time-dependent vector-valued functions.
 
void operator() (const Point &p, const Real, DenseVector< Gradient > &output)
 Evaluation function for time-dependent vector-valued functions.
 
virtual void init ()
 The actual initialization process.
 
virtual void clear ()
 Clears the function.
 
void operator() (const Point &p, DenseVector< Gradient > &output)
 Evaluation function for time-independent vector-valued functions.
 
bool initialized () const
 
void set_is_time_dependent (bool is_time_dependent)
 Function to set whether this is a time-dependent function or not.
 
bool is_time_dependent () const
 

Protected Attributes

const FunctionBase_master
 Const pointer to our master, initialized to nullptr.
 
bool _initialized
 When init() was called so that everything is ready for calls to operator() (...), then this bool is true.
 
bool _is_time_dependent
 Cache whether or not this function is actually time-dependent.
 

Private Attributes

GradDivExactSolution soln
 
const unsigned int _u_var
 
LaplaceExactGradient soln
 
CurlCurlExactSolution soln
 
DivGradExactSolution soln
 
MixedExactSolution soln
 

Detailed Description

template<unsigned int dim>
class SolutionGradient< dim >

Definition at line 70 of file solution_function.h.

Constructor & Destructor Documentation

◆ SolutionGradient() [1/7]

template<unsigned int dim>
SolutionGradient< dim >::SolutionGradient ( )
default

◆ ~SolutionGradient() [1/7]

template<unsigned int dim>
SolutionGradient< dim >::~SolutionGradient ( )
default

◆ SolutionGradient() [2/7]

template<unsigned int dim>
SolutionGradient< dim >::SolutionGradient ( const unsigned int  u_var)
inline

Definition at line 81 of file solution_function.h.

82 : _u_var(u_var) {}
const unsigned int _u_var

◆ ~SolutionGradient() [2/7]

template<unsigned int dim>
SolutionGradient< dim >::~SolutionGradient ( )
default

◆ SolutionGradient() [3/7]

template<unsigned int dim>
SolutionGradient< dim >::SolutionGradient ( const unsigned int  u_var)
inline

Definition at line 77 of file solution_function.h.

78 : _u_var(u_var) {}

◆ ~SolutionGradient() [3/7]

template<unsigned int dim>
SolutionGradient< dim >::~SolutionGradient ( )
default

◆ SolutionGradient() [4/7]

template<unsigned int dim>
SolutionGradient< dim >::SolutionGradient ( const unsigned int  u_var)
inline

Definition at line 78 of file solution_function.h.

79 : _u_var(u_var) {}

◆ ~SolutionGradient() [4/7]

template<unsigned int dim>
SolutionGradient< dim >::~SolutionGradient ( )
default

◆ SolutionGradient() [5/7]

template<unsigned int dim>
SolutionGradient< dim >::SolutionGradient ( )
default

◆ ~SolutionGradient() [5/7]

template<unsigned int dim>
SolutionGradient< dim >::~SolutionGradient ( )
default

◆ SolutionGradient() [6/7]

template<unsigned int dim>
SolutionGradient< dim >::SolutionGradient ( )
default

◆ ~SolutionGradient() [6/7]

template<unsigned int dim>
SolutionGradient< dim >::~SolutionGradient ( )
default

◆ SolutionGradient() [7/7]

template<unsigned int dim>
SolutionGradient< dim >::SolutionGradient ( )
default

◆ ~SolutionGradient() [7/7]

template<unsigned int dim>
SolutionGradient< dim >::~SolutionGradient ( )
default

Member Function Documentation

◆ clear()

virtual void libMesh::FunctionBase< Gradient >::clear ( )
inlinevirtualinherited

Clears the function.

Definition at line 92 of file function_base.h.

92{}

◆ clone() [1/7]

template<unsigned int dim>
virtual std::unique_ptr< FunctionBase< Gradient > > SolutionGradient< dim >::clone ( ) const
inlinevirtual
Returns
A new copy of the function.

The new copy should be as "deep" as necessary to allow independent destruction and simultaneous evaluations of the copies in different threads.

Implements libMesh::FunctionBase< Gradient >.

Definition at line 99 of file solution_function.h.

100 { return std::make_unique<SolutionGradient>(); }

◆ clone() [2/7]

template<unsigned int dim>
virtual std::unique_ptr< FunctionBase< Gradient > > SolutionGradient< dim >::clone ( ) const
inlinevirtual
Returns
A new copy of the function.

The new copy should be as "deep" as necessary to allow independent destruction and simultaneous evaluations of the copies in different threads.

Implements libMesh::FunctionBase< Gradient >.

Definition at line 107 of file solution_function.h.

108 { return std::make_unique<SolutionGradient>(_u_var); }

References SolutionGradient< dim >::_u_var.

◆ clone() [3/7]

template<unsigned int dim>
virtual std::unique_ptr< FunctionBase< Gradient > > SolutionGradient< dim >::clone ( ) const
inlinevirtual
Returns
A new copy of the function.

The new copy should be as "deep" as necessary to allow independent destruction and simultaneous evaluations of the copies in different threads.

Implements libMesh::FunctionBase< Gradient >.

Definition at line 101 of file solution_function.h.

102 { return std::make_unique<SolutionGradient>(_u_var); }

References SolutionGradient< dim >::_u_var.

◆ clone() [4/7]

template<unsigned int dim>
virtual std::unique_ptr< FunctionBase< Gradient > > SolutionGradient< dim >::clone ( ) const
inlinevirtual
Returns
A new copy of the function.

The new copy should be as "deep" as necessary to allow independent destruction and simultaneous evaluations of the copies in different threads.

Implements libMesh::FunctionBase< Gradient >.

Definition at line 105 of file solution_function.h.

106 { return std::make_unique<SolutionGradient>(_u_var); }

References SolutionGradient< dim >::_u_var.

◆ clone() [5/7]

template<unsigned int dim>
virtual std::unique_ptr< FunctionBase< Gradient > > SolutionGradient< dim >::clone ( ) const
inlinevirtual
Returns
A new copy of the function.

The new copy should be as "deep" as necessary to allow independent destruction and simultaneous evaluations of the copies in different threads.

Implements libMesh::FunctionBase< Gradient >.

Definition at line 114 of file solution_function.h.

115 { return std::make_unique<SolutionGradient>(); }

◆ clone() [6/7]

template<unsigned int dim>
virtual std::unique_ptr< FunctionBase< Gradient > > SolutionGradient< dim >::clone ( ) const
inlineoverridevirtual
Returns
A new copy of the function.

The new copy should be as "deep" as necessary to allow independent destruction and simultaneous evaluations of the copies in different threads.

Implements libMesh::FunctionBase< Gradient >.

Definition at line 108 of file solution_function.h.

109 {
110 return std::make_unique<SolutionGradient>();
111 }

◆ clone() [7/7]

template<unsigned int dim>
virtual std::unique_ptr< FunctionBase< Gradient > > SolutionGradient< dim >::clone ( ) const
inlineoverridevirtual
Returns
A new copy of the function.

The new copy should be as "deep" as necessary to allow independent destruction and simultaneous evaluations of the copies in different threads.

Implements libMesh::FunctionBase< Gradient >.

Definition at line 108 of file solution_function.h.

109 {
110 return std::make_unique<SolutionGradient>();
111 }

◆ component() [1/7]

template<unsigned int dim>
Gradient SolutionGradient< dim >::component ( unsigned int  i,
const Point p,
const Real  time 
)
inlinevirtual
Returns
The vector component i at coordinate p and time time.
Note
Subclasses aren't required to override this, since the default implementation is based on the full vector evaluation, which is often correct.
Subclasses are recommended to override this, since the default implementation is based on a vector evaluation, which is usually unnecessarily inefficient.
The default implementation calls operator() with a DenseVector of size i+1 which will result in unexpected behaviour if operator() makes any access beyond that limit.

Reimplemented from libMesh::FunctionBase< Gradient >.

Definition at line 90 of file solution_function.h.

93 {
94 DenseVector<Gradient> outvec(3);
95 (*this)(p, 0, outvec);
96 return outvec(component_in);
97 }
Defines a dense vector for use in Finite Element-type computations.

◆ component() [2/7]

template<unsigned int dim>
virtual Gradient SolutionGradient< dim >::component ( unsigned int  i,
const Point p,
const Real  time 
)
inlinevirtual
Returns
The vector component i at coordinate p and time time.
Note
Subclasses aren't required to override this, since the default implementation is based on the full vector evaluation, which is often correct.
Subclasses are recommended to override this, since the default implementation is based on a vector evaluation, which is usually unnecessarily inefficient.
The default implementation calls operator() with a DenseVector of size i+1 which will result in unexpected behaviour if operator() makes any access beyond that limit.

Reimplemented from libMesh::FunctionBase< Gradient >.

Definition at line 99 of file solution_function.h.

102 {
103 const Real x=p(0), y=p(1), z=p(2);
104 return soln(component_in, x, y, z);
105 }
GradDivExactSolution soln
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

References libMesh::Real, and SolutionGradient< dim >::soln.

◆ component() [3/7]

template<unsigned int dim>
virtual Gradient SolutionGradient< dim >::component ( unsigned int  i,
const Point p,
const Real  time 
)
inlinevirtual
Returns
The vector component i at coordinate p and time time.
Note
Subclasses aren't required to override this, since the default implementation is based on the full vector evaluation, which is often correct.
Subclasses are recommended to override this, since the default implementation is based on a vector evaluation, which is usually unnecessarily inefficient.
The default implementation calls operator() with a DenseVector of size i+1 which will result in unexpected behaviour if operator() makes any access beyond that limit.

Reimplemented from libMesh::FunctionBase< Gradient >.

Definition at line 95 of file solution_function.h.

97 {
98 return soln.grad(p).row(component_in);
99 }
TypeVector< T > row(const unsigned int r) const

References GradDivExactSolution::grad(), libMesh::TypeTensor< T >::row(), and SolutionGradient< dim >::soln.

◆ component() [4/7]

template<unsigned int dim>
virtual Gradient SolutionGradient< dim >::component ( unsigned int  i,
const Point p,
const Real  time 
)
inlinevirtual
Returns
The vector component i at coordinate p and time time.
Note
Subclasses aren't required to override this, since the default implementation is based on the full vector evaluation, which is often correct.
Subclasses are recommended to override this, since the default implementation is based on a vector evaluation, which is usually unnecessarily inefficient.
The default implementation calls operator() with a DenseVector of size i+1 which will result in unexpected behaviour if operator() makes any access beyond that limit.

Reimplemented from libMesh::FunctionBase< Gradient >.

Definition at line 97 of file solution_function.h.

100 {
101 const Real x=p(0), y=p(1), z=p(2);
102 return soln.grad(x, y, z).row(component_in);
103 }

References GradDivExactSolution::grad(), libMesh::Real, libMesh::TypeTensor< T >::row(), and SolutionGradient< dim >::soln.

◆ component() [5/7]

template<unsigned int dim>
virtual Gradient SolutionGradient< dim >::component ( unsigned int  i,
const Point p,
const Real  time 
)
virtual
Returns
The vector component i at coordinate p and time time.
Note
Subclasses aren't required to override this, since the default implementation is based on the full vector evaluation, which is often correct.
Subclasses are recommended to override this, since the default implementation is based on a vector evaluation, which is usually unnecessarily inefficient.
The default implementation calls operator() with a DenseVector of size i+1 which will result in unexpected behaviour if operator() makes any access beyond that limit.

Reimplemented from libMesh::FunctionBase< Gradient >.

◆ component() [6/7]

template<unsigned int dim>
virtual Gradient SolutionGradient< dim >::component ( unsigned int  i,
const Point p,
Real  time = 0. 
)
inlineoverridevirtual
Returns
The vector component i at coordinate p and time time.
Note
Subclasses aren't required to override this, since the default implementation is based on the full vector evaluation, which is often correct.
Subclasses are recommended to override this, since the default implementation is based on a vector evaluation, which is usually unnecessarily inefficient.
The default implementation calls operator() with a DenseVector of size i+1 which will result in unexpected behaviour if operator() makes any access beyond that limit.

Reimplemented from libMesh::FunctionBase< Gradient >.

Definition at line 113 of file solution_function.h.

114 {
115 const auto size = dim == 2 ? 4 : 5;
116 DenseVector<Gradient> outvec(size);
117 (*this)(p, time, outvec);
118 return outvec(i);
119 }
unsigned int dim

References dim.

◆ component() [7/7]

template<unsigned int dim>
virtual Gradient SolutionGradient< dim >::component ( unsigned int  i,
const Point p,
Real  time = 0. 
)
inlineoverridevirtual
Returns
The vector component i at coordinate p and time time.
Note
Subclasses aren't required to override this, since the default implementation is based on the full vector evaluation, which is often correct.
Subclasses are recommended to override this, since the default implementation is based on a vector evaluation, which is usually unnecessarily inefficient.
The default implementation calls operator() with a DenseVector of size i+1 which will result in unexpected behaviour if operator() makes any access beyond that limit.

Reimplemented from libMesh::FunctionBase< Gradient >.

Definition at line 113 of file solution_function.h.

114 {
115 const auto size = dim == 2 ? 4 : 5;
116 DenseVector<Gradient> outvec(size);
117 (*this)(p, time, outvec);
118 return outvec(i);
119 }

References dim.

◆ init()

virtual void libMesh::FunctionBase< Gradient >::init ( )
inlinevirtualinherited

The actual initialization process.

Reimplemented in libMesh::GradientMeshFunction.

Definition at line 87 of file function_base.h.

87{}

◆ initialized()

bool libMesh::FunctionBase< Gradient >::initialized ( ) const
inlineinherited
Returns
true when this object is properly initialized and ready for use, false otherwise.

Definition at line 154 of file function_base.h.

211{
212 return (this->_initialized);
213}

◆ is_time_dependent()

bool libMesh::FunctionBase< Gradient >::is_time_dependent ( ) const
inlineinherited
Returns
true when the function this object represents is actually time-dependent, false otherwise.

Definition at line 168 of file function_base.h.

225{
226 return (this->_is_time_dependent);
227}

◆ operator()() [1/21]

template<unsigned int dim>
virtual Gradient SolutionGradient< dim >::operator() ( const Point p,
const Real  time = 0 
)
inlinevirtual
Returns
The scalar function value at coordinate p and time time, which defaults to zero.

Pure virtual, so you have to override it.

Implements libMesh::FunctionBase< Gradient >.

Definition at line 77 of file solution_function.h.

78 { libmesh_not_implemented(); }

◆ operator()() [2/21]

template<unsigned int dim>
virtual Gradient SolutionGradient< dim >::operator() ( const Point p,
const Real  time = 0 
)
inlinevirtual
Returns
The scalar function value at coordinate p and time time, which defaults to zero.

Pure virtual, so you have to override it.

Implements libMesh::FunctionBase< Gradient >.

Definition at line 85 of file solution_function.h.

86 { libmesh_not_implemented(); }

◆ operator()() [3/21]

template<unsigned int dim>
virtual Gradient SolutionGradient< dim >::operator() ( const Point p,
const Real  time = 0 
)
inlinevirtual
Returns
The scalar function value at coordinate p and time time, which defaults to zero.

Pure virtual, so you have to override it.

Implements libMesh::FunctionBase< Gradient >.

Definition at line 82 of file solution_function.h.

83 { libmesh_not_implemented(); }

◆ operator()() [4/21]

template<unsigned int dim>
virtual Gradient SolutionGradient< dim >::operator() ( const Point p,
const Real  time = 0 
)
inlinevirtual
Returns
The scalar function value at coordinate p and time time, which defaults to zero.

Pure virtual, so you have to override it.

Implements libMesh::FunctionBase< Gradient >.

Definition at line 82 of file solution_function.h.

84 { libmesh_not_implemented(); }

◆ operator()() [5/21]

template<unsigned int dim>
virtual Gradient SolutionGradient< dim >::operator() ( const Point p,
const Real  time = 0 
)
inlinevirtual
Returns
The scalar function value at coordinate p and time time, which defaults to zero.

Pure virtual, so you have to override it.

Implements libMesh::FunctionBase< Gradient >.

Definition at line 103 of file solution_function.h.

104 { libmesh_not_implemented(); }

◆ operator()() [6/21]

template<unsigned int dim>
virtual Gradient SolutionGradient< dim >::operator() ( const Point p,
const Real  time = 0 
)
inlineoverridevirtual
Returns
The scalar function value at coordinate p and time time, which defaults to zero.

Pure virtual, so you have to override it.

Implements libMesh::FunctionBase< Gradient >.

Definition at line 104 of file solution_function.h.

104{ libmesh_not_implemented(); }

◆ operator()() [7/21]

template<unsigned int dim>
virtual Gradient SolutionGradient< dim >::operator() ( const Point p,
const Real  time = 0 
)
inlineoverridevirtual
Returns
The scalar function value at coordinate p and time time, which defaults to zero.

Pure virtual, so you have to override it.

Implements libMesh::FunctionBase< Gradient >.

Definition at line 104 of file solution_function.h.

104{ libmesh_not_implemented(); }

◆ operator()() [8/21]

template<unsigned int dim>
virtual void SolutionGradient< dim >::operator() ( const Point p,
const Real  time,
DenseVector< Gradient > &  output 
)
inlinevirtual

Evaluation function for time-dependent vector-valued functions.

Sets output values in the passed-in output DenseVector.

Pure virtual, so you have to override it.

Implements libMesh::FunctionBase< Gradient >.

Definition at line 80 of file solution_function.h.

83 {
84 output.zero();
85 output(0) = soln.grad(p).row(0);
86 output(1) = soln.grad(p).row(1);
87 output(2) = soln.grad(p).row(2);
88 }
virtual void zero() override final
Set every element in the vector to 0.

References GradDivExactSolution::grad(), libMesh::TypeTensor< T >::row(), SolutionGradient< dim >::soln, and libMesh::DenseVector< T >::zero().

◆ operator()() [9/21]

template<unsigned int dim>
virtual void SolutionGradient< dim >::operator() ( const Point p,
const Real  time,
DenseVector< Gradient > &  output 
)
inlinevirtual

Evaluation function for time-dependent vector-valued functions.

Sets output values in the passed-in output DenseVector.

Pure virtual, so you have to override it.

Implements libMesh::FunctionBase< Gradient >.

Definition at line 88 of file solution_function.h.

91 {
92 output.zero();
93 const Real x=p(0), y=p(1), z=p(2);
94 output(_u_var) = soln(0, x, y, z);
95 output(_u_var+1) = soln(1, x, y, z);
96 output(_u_var+2) = soln(2, x, y, z);
97 }

References SolutionGradient< dim >::_u_var, libMesh::Real, SolutionGradient< dim >::soln, and libMesh::DenseVector< T >::zero().

◆ operator()() [10/21]

template<unsigned int dim>
virtual void SolutionGradient< dim >::operator() ( const Point p,
const Real  time,
DenseVector< Gradient > &  output 
)
inlinevirtual

Evaluation function for time-dependent vector-valued functions.

Sets output values in the passed-in output DenseVector.

Pure virtual, so you have to override it.

Implements libMesh::FunctionBase< Gradient >.

Definition at line 85 of file solution_function.h.

88 {
89 output.zero();
90 output(_u_var) = soln.grad(p).row(0);
91 output(_u_var+1) = soln.grad(p).row(1);
92 output(_u_var+2) = soln.grad(p).row(2);
93 }

References SolutionGradient< dim >::_u_var, GradDivExactSolution::grad(), libMesh::TypeTensor< T >::row(), SolutionGradient< dim >::soln, and libMesh::DenseVector< T >::zero().

◆ operator()() [11/21]

template<unsigned int dim>
virtual void SolutionGradient< dim >::operator() ( const Point p,
const Real  time,
DenseVector< Gradient > &  output 
)
inlinevirtual

Evaluation function for time-dependent vector-valued functions.

Sets output values in the passed-in output DenseVector.

Pure virtual, so you have to override it.

Implements libMesh::FunctionBase< Gradient >.

Definition at line 86 of file solution_function.h.

89 {
90 output.zero();
91 const Real x=p(0), y=p(1), z=p(2);
92 output(_u_var) = soln.grad(x, y, z).row(0);
93 output(_u_var+1) = soln.grad(x, y, z).row(1);
94 output(_u_var+2) = soln.grad(x, y, z).row(2);
95 }

References SolutionGradient< dim >::_u_var, GradDivExactSolution::grad(), libMesh::Real, libMesh::TypeTensor< T >::row(), SolutionGradient< dim >::soln, and libMesh::DenseVector< T >::zero().

◆ operator()() [12/21]

template<unsigned int dim>
virtual void SolutionGradient< dim >::operator() ( const Point p,
const Real  time,
DenseVector< Gradient > &  output 
)
virtual

Evaluation function for time-dependent vector-valued functions.

Sets output values in the passed-in output DenseVector.

Pure virtual, so you have to override it.

Implements libMesh::FunctionBase< Gradient >.

◆ operator()() [13/21]

void SolutionGradient< 2 >::operator() ( const Point p,
const Real  time,
DenseVector< Gradient > &  output 
)
virtual

Evaluation function for time-dependent vector-valued functions.

Sets output values in the passed-in output DenseVector.

Pure virtual, so you have to override it.

Implements libMesh::FunctionBase< Gradient >.

Definition at line 123 of file solution_function.h.

126{
127 output.zero();
128 const Real x=p(0), y=p(1);
129 output(0) = soln.grad(x, y).row(0);
130 output(1) = soln.grad(x, y).row(1);
131 output(2) = -soln(x, y);
132}

References libMesh::Real, and libMesh::DenseVector< T >::zero().

◆ operator()() [14/21]

void SolutionGradient< 3 >::operator() ( const Point p,
const Real  time,
DenseVector< Gradient > &  output 
)
virtual

Evaluation function for time-dependent vector-valued functions.

Sets output values in the passed-in output DenseVector.

Pure virtual, so you have to override it.

Implements libMesh::FunctionBase< Gradient >.

Definition at line 135 of file solution_function.h.

138{
139 output.zero();
140 const Real x=p(0), y=p(1), z=p(2);
141 output(0) = soln.grad(x, y, z).row(0);
142 output(1) = soln.grad(x, y, z).row(1);
143 output(2) = soln.grad(x, y, z).row(2);
144 output(3) = -soln(x, y, z);
145}

References libMesh::Real, and libMesh::DenseVector< T >::zero().

◆ operator()() [15/21]

void SolutionGradient< 2 >::operator() ( const Point p,
const Real  time,
DenseVector< Gradient > &  output 
)
virtual

Evaluation function for time-dependent vector-valued functions.

Sets output values in the passed-in output DenseVector.

Pure virtual, so you have to override it.

Implements libMesh::FunctionBase< Gradient >.

Definition at line 127 of file solution_function.h.

128{
129 output.zero();
130 const Real x = p(0), y = p(1);
131 output(0) = soln.grad(x, y).row(0);
132 output(1) = soln.grad(x, y).row(1);
133}

References libMesh::Real, and libMesh::DenseVector< T >::zero().

◆ operator()() [16/21]

void SolutionGradient< 3 >::operator() ( const Point p,
const Real  time,
DenseVector< Gradient > &  output 
)
virtual

Evaluation function for time-dependent vector-valued functions.

Sets output values in the passed-in output DenseVector.

Pure virtual, so you have to override it.

Implements libMesh::FunctionBase< Gradient >.

Definition at line 137 of file solution_function.h.

138{
139 output.zero();
140 const Real x = p(0), y = p(1), z = p(2);
141 output(0) = soln.grad(x, y, z).row(0);
142 output(1) = soln.grad(x, y, z).row(1);
143 output(2) = soln.grad(x, y, z).row(2);
144}

References libMesh::Real, and libMesh::DenseVector< T >::zero().

◆ operator()() [17/21]

void SolutionGradient< 2 >::operator() ( const Point p,
const Real  time,
DenseVector< Gradient > &  output 
)
virtual

Evaluation function for time-dependent vector-valued functions.

Sets output values in the passed-in output DenseVector.

Pure virtual, so you have to override it.

Implements libMesh::FunctionBase< Gradient >.

Definition at line 127 of file solution_function.h.

128{
129 output.zero();
130 const Real x = p(0), y = p(1);
131 output(0) = soln.grad(x, y).row(0);
132 output(1) = soln.grad(x, y).row(1);
133}

References libMesh::Real, and libMesh::DenseVector< T >::zero().

◆ operator()() [18/21]

void SolutionGradient< 3 >::operator() ( const Point p,
const Real  time,
DenseVector< Gradient > &  output 
)
virtual

Evaluation function for time-dependent vector-valued functions.

Sets output values in the passed-in output DenseVector.

Pure virtual, so you have to override it.

Implements libMesh::FunctionBase< Gradient >.

Definition at line 137 of file solution_function.h.

138{
139 output.zero();
140 const Real x = p(0), y = p(1), z = p(2);
141 output(0) = soln.grad(x, y, z).row(0);
142 output(1) = soln.grad(x, y, z).row(1);
143 output(2) = soln.grad(x, y, z).row(2);
144}

References libMesh::Real, and libMesh::DenseVector< T >::zero().

◆ operator()() [19/21]

template<unsigned int dim>
virtual void SolutionGradient< dim >::operator() ( const Point p,
const Real  time,
DenseVector< Gradient > &  output 
)
overridevirtual

Evaluation function for time-dependent vector-valued functions.

Sets output values in the passed-in output DenseVector.

Pure virtual, so you have to override it.

Implements libMesh::FunctionBase< Gradient >.

◆ operator()() [20/21]

template<unsigned int dim>
virtual void SolutionGradient< dim >::operator() ( const Point p,
const Real  time,
DenseVector< Gradient > &  output 
)
overridevirtual

Evaluation function for time-dependent vector-valued functions.

Sets output values in the passed-in output DenseVector.

Pure virtual, so you have to override it.

Implements libMesh::FunctionBase< Gradient >.

◆ operator()() [21/21]

void libMesh::FunctionBase< Gradient >::operator() ( const Point p,
DenseVector< Gradient > &  output 
)
inlineinherited

Evaluation function for time-independent vector-valued functions.

Sets output values in the passed-in output DenseVector.

Definition at line 116 of file function_base.h.

247{
248 // Call the time-dependent function with t=0.
249 this->operator()(p, 0., output);
250}
virtual Gradient operator()(const Point &p, const Real time=0.)=0

◆ set_is_time_dependent()

void libMesh::FunctionBase< Gradient >::set_is_time_dependent ( bool  is_time_dependent)
inlineinherited

Function to set whether this is a time-dependent function or not.

This is intended to be only used by subclasses who cannot natively determine time-dependence. In such a case, this function should be used immediately following construction.

Definition at line 162 of file function_base.h.

218{
220}
bool _is_time_dependent
Cache whether or not this function is actually time-dependent.

Member Data Documentation

◆ _initialized

bool libMesh::FunctionBase< Gradient >::_initialized
protectedinherited

When init() was called so that everything is ready for calls to operator() (...), then this bool is true.

Definition at line 184 of file function_base.h.

◆ _is_time_dependent

bool libMesh::FunctionBase< Gradient >::_is_time_dependent
protectedinherited

Cache whether or not this function is actually time-dependent.

Definition at line 189 of file function_base.h.

◆ _master

const FunctionBase* libMesh::FunctionBase< Gradient >::_master
protectedinherited

Const pointer to our master, initialized to nullptr.

There may be cases where multiple functions are required, but to save memory, one master handles some centralized data.

Definition at line 178 of file function_base.h.

◆ _u_var

template<unsigned int dim>
const unsigned int SolutionGradient< dim >::_u_var
private

◆ soln [1/5]

template<unsigned int dim>
DivGradExactSolution SolutionGradient< dim >::soln
private

◆ soln [2/5]

template<unsigned int dim>
LaplaceExactGradient SolutionGradient< dim >::soln
private

Definition at line 113 of file solution_function.h.

◆ soln [3/5]

template<unsigned int dim>
CurlCurlExactSolution SolutionGradient< dim >::soln
private

Definition at line 107 of file solution_function.h.

◆ soln [4/5]

template<unsigned int dim>
DivGradExactSolution SolutionGradient< dim >::soln
private

Definition at line 119 of file solution_function.h.

◆ soln [5/5]

template<unsigned int dim>
MixedExactSolution SolutionGradient< dim >::soln
private

Definition at line 122 of file solution_function.h.


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