Reference documentation for deal.II version 9.4.1
|
Public Types | |
using | time_type = typename FunctionTime< typename numbers::NumberTraits< RangeNumberType >::real_type >::time_type |
Public Member Functions | |
RefSpaceFEFieldFunction (const DoFHandler< dim > &dof_handler, const VectorType &dof_values) | |
void | set_active_cell (const typename Triangulation< dim >::active_cell_iterator &cell) override |
double | value (const Point< dim > &point, const unsigned int component=0) const override |
Tensor< 1, dim > | gradient (const Point< dim > &point, const unsigned int component=0) const override |
SymmetricTensor< 2, dim > | hessian (const Point< dim > &point, const unsigned int component=0) const override |
virtual void | vector_value (const Point< dim > &p, Vector< RangeNumberType > &values) const |
virtual void | value_list (const std::vector< Point< dim > > &points, std::vector< RangeNumberType > &values, const unsigned int component=0) const |
virtual void | vector_value_list (const std::vector< Point< dim > > &points, std::vector< Vector< RangeNumberType > > &values) const |
virtual void | vector_values (const std::vector< Point< dim > > &points, std::vector< std::vector< RangeNumberType > > &values) const |
virtual void | vector_gradient (const Point< dim > &p, std::vector< Tensor< 1, dim, RangeNumberType > > &gradients) const |
virtual void | gradient_list (const std::vector< Point< dim > > &points, std::vector< Tensor< 1, dim, RangeNumberType > > &gradients, const unsigned int component=0) const |
virtual void | vector_gradients (const std::vector< Point< dim > > &points, std::vector< std::vector< Tensor< 1, dim, RangeNumberType > > > &gradients) const |
virtual void | vector_gradient_list (const std::vector< Point< dim > > &points, std::vector< std::vector< Tensor< 1, dim, RangeNumberType > > > &gradients) const |
virtual RangeNumberType | laplacian (const Point< dim > &p, const unsigned int component=0) const |
virtual void | vector_laplacian (const Point< dim > &p, Vector< RangeNumberType > &values) const |
virtual void | laplacian_list (const std::vector< Point< dim > > &points, std::vector< RangeNumberType > &values, const unsigned int component=0) const |
virtual void | vector_laplacian_list (const std::vector< Point< dim > > &points, std::vector< Vector< RangeNumberType > > &values) const |
virtual void | vector_hessian (const Point< dim > &p, std::vector< SymmetricTensor< 2, dim, RangeNumberType > > &values) const |
virtual void | hessian_list (const std::vector< Point< dim > > &points, std::vector< SymmetricTensor< 2, dim, RangeNumberType > > &values, const unsigned int component=0) const |
virtual void | vector_hessian_list (const std::vector< Point< dim > > &points, std::vector< std::vector< SymmetricTensor< 2, dim, RangeNumberType > > > &values) const |
virtual std::size_t | memory_consumption () const |
Number | get_time () const |
virtual void | set_time (const Number new_time) |
virtual void | advance_time (const Number delta_t) |
Public Attributes | |
const unsigned int | n_components |
Static Public Attributes | |
static constexpr unsigned int | dimension = dim |
Private Member Functions | |
bool | cell_is_set () const |
Private Attributes | |
const SmartPointer< const DoFHandler< dim > > | dof_handler |
const SmartPointer< const VectorType > | global_dof_values |
SmartPointer< const FiniteElement< dim > > | element |
std::vector< types::global_dof_index > | local_dof_indices |
std::vector< typename VectorType::value_type > | local_dof_values |
std::vector< Polynomials::Polynomial< double > > | poly |
std::vector< unsigned int > | renumber |
bool | polynomials_are_hat_functions |
Number | time |
Subscriptor functionality | |
Classes derived from Subscriptor provide a facility to subscribe to this object. This is mostly used by the SmartPointer class. | |
std::atomic< unsigned int > | counter |
std::map< std::string, unsigned int > | counter_map |
std::vector< std::atomic< bool > * > | validity_pointers |
const std::type_info * | object_info |
void | subscribe (std::atomic< bool > *const validity, const std::string &identifier="") const |
void | unsubscribe (std::atomic< bool > *const validity, const std::string &identifier="") const |
unsigned int | n_subscriptions () const |
template<typename StreamType > | |
void | list_subscribers (StreamType &stream) const |
void | list_subscribers () const |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int version) |
void | check_no_subscribers () const noexcept |
using | map_value_type = decltype(counter_map)::value_type |
using | map_iterator = decltype(counter_map)::iterator |
static std::mutex | mutex |
static ::ExceptionBase & | ExcInUse (int arg1, std::string arg2, std::string arg3) |
static ::ExceptionBase & | ExcNoSubscriber (std::string arg1, std::string arg2) |
This class evaluates a function defined by a solution vector and a DoFHandler transformed to reference space. To be precise, if we let \(\hat{x}\) be a point on the reference cell, this class implements the function
\(\hat{f}(\hat{x}) = \sum_{j=0}^{n-1} f_j \hat{\phi}_j(\hat{x})\),
where \(f_j\) are the local solution values and \(\hat{\phi}_j(\hat(x))\) are the local reference space shape functions. The gradient and Hessian of this function are thus derivatives with respect to the reference space coordinates, \(\hat{x}_0, \hat{x}_1, \ldots\).
Note that this class is similar to FEFieldFunction, but that FEFieldFunction implements the following function on a given cell, \(K\),
\(f(x) = \sum_{j=0}^{n-1} f_j \hat{\phi}_j(F_K^{-1}(x))\),
which has the same coefficients but uses real space basis functions. Here, \(F_K\) is the mapping from the reference cell to the real cell.
Before calling the value/gradient/hessian function, the set_active_cell function must be called to specify which cell the function should be evaluated on.
Definition at line 1312 of file quadrature_generator.cc.
|
inherited |
The scalar-valued real type used for representing time.
Definition at line 169 of file function.h.
NonMatching::internal::DiscreteQuadratureGeneratorImplementation::RefSpaceFEFieldFunction< dim, VectorType >::RefSpaceFEFieldFunction | ( | const DoFHandler< dim > & | dof_handler, |
const VectorType & | dof_values | ||
) |
Constructor. Takes the solution vector and the associated DoFHandler.
Pointers to the input arguments are stored internally, so they must have a longer lifetime than the created RefSpaceFEFieldFunction object.
Definition at line 1421 of file quadrature_generator.cc.
|
overridevirtual |
Set the cell that the function should be evaluated on.
Implements NonMatching::internal::DiscreteQuadratureGeneratorImplementation::CellWiseFunction< dim >.
Definition at line 1435 of file quadrature_generator.cc.
|
overridevirtual |
Return the value of the function at the given point. Unless there is only one component (i.e. the function is scalar), you should state the component you want to have evaluated; it defaults to zero, i.e. the first component.
Reimplemented from Function< dim, RangeNumberType >.
Definition at line 1509 of file quadrature_generator.cc.
|
overridevirtual |
Return the gradient of the specified component of the function at the given point.
Reimplemented from Function< dim, RangeNumberType >.
Definition at line 1542 of file quadrature_generator.cc.
|
overridevirtual |
Compute the Hessian of a given component at point p
, that is the gradient of the gradient of the function.
Reimplemented from Function< dim, RangeNumberType >.
Definition at line 1575 of file quadrature_generator.cc.
|
private |
Return whether the set_active_cell function has been called.
Definition at line 1498 of file quadrature_generator.cc.
|
virtualinherited |
Return all components of a vector-valued function at a given point.
values
shall have the right size beforehand, i.e. n_components.
The default implementation will call value() for each component.
Reimplemented in Functions::ConstantFunction< dim, RangeNumberType >, ComponentSelectFunction< dim, RangeNumberType >, VectorFunctionFromScalarFunctionObject< dim, RangeNumberType >, VectorFunctionFromTensorFunction< dim, RangeNumberType >, Functions::IncrementalFunction< dim, RangeNumberType >, and Functions::FEFieldFunction< dim, VectorType, spacedim >.
|
virtualinherited |
Set values
to the point values of the specified component of the function at the points
. It is assumed that values
already has the right size, i.e. the same size as the points
array.
By default, this function repeatedly calls value() for each point separately, to fill the output array.
Reimplemented in Functions::ConstantFunction< dim, RangeNumberType >, and Functions::FEFieldFunction< dim, VectorType, spacedim >.
|
virtualinherited |
Set values
to the point values of the function at the points
. It is assumed that values
already has the right size, i.e. the same size as the points
array, and that all elements be vectors with the same number of components as this function has.
By default, this function repeatedly calls vector_value() for each point separately, to fill the output array.
Reimplemented in Functions::ConstantFunction< dim, RangeNumberType >, VectorFunctionFromTensorFunction< dim, RangeNumberType >, ComponentSelectFunction< dim, RangeNumberType >, and Functions::FEFieldFunction< dim, VectorType, spacedim >.
|
virtualinherited |
For each component of the function, fill a vector of values, one for each point.
The default implementation of this function in Function calls value_list() for each component. In order to improve performance, this can be reimplemented in derived classes to speed up performance.
|
virtualinherited |
Return the gradient of all components of the function at the given point.
Reimplemented in Functions::ConstantFunction< dim, RangeNumberType >, and Functions::FEFieldFunction< dim, VectorType, spacedim >.
|
virtualinherited |
Set gradients
to the gradients of the specified component of the function at the points
. It is assumed that gradients
already has the right size, i.e. the same size as the points
array.
Reimplemented in Functions::FEFieldFunction< dim, VectorType, spacedim >, and Functions::ConstantFunction< dim, RangeNumberType >.
|
virtualinherited |
For each component of the function, fill a vector of gradient values, one for each point.
The default implementation of this function in Function calls value_list() for each component. In order to improve performance, this can be reimplemented in derived classes to speed up performance.
|
virtualinherited |
Set gradients
to the gradients of the function at the points
, for all components. It is assumed that gradients
already has the right size, i.e. the same size as the points
array.
The outer loop over gradients
is over the points in the list, the inner loop over the different components of the function.
Reimplemented in Functions::FEFieldFunction< dim, VectorType, spacedim >, and Functions::ConstantFunction< dim, RangeNumberType >.
|
virtualinherited |
Compute the Laplacian of a given component at point p
.
Reimplemented in Functions::CosineGradFunction< dim >, Functions::IdentityFunction< dim, RangeNumberType >, Functions::CSpline< dim >, Functions::SquareFunction< dim >, Functions::Q1WedgeFunction< dim >, Functions::PillowFunction< dim >, Functions::CosineFunction< dim >, Functions::ExpFunction< dim >, Functions::SlitSingularityFunction< dim >, Functions::JumpFunction< dim >, Functions::FourierCosineFunction< dim >, Functions::FourierSineFunction< dim >, Functions::FourierSineSum< dim >, Functions::FourierCosineSum< dim >, Functions::SymbolicFunction< dim, RangeNumberType >, Functions::FEFieldFunction< dim, VectorType, spacedim >, Functions::ConstantFunction< dim, RangeNumberType >, and Functions::ConstantFunction< dim, double >.
|
virtualinherited |
Compute the Laplacian of all components at point p
and store them in values
.
Reimplemented in Functions::FEFieldFunction< dim, VectorType, spacedim >.
|
virtualinherited |
Compute the Laplacian of one component at a set of points.
Reimplemented in Functions::FEFieldFunction< dim, VectorType, spacedim >.
|
virtualinherited |
Compute the Laplacians of all components at a set of points.
Reimplemented in Functions::FEFieldFunction< dim, VectorType, spacedim >.
|
virtualinherited |
Compute the Hessian of all components at point p
and store them in values
.
|
virtualinherited |
Compute the Hessian of one component at a set of points.
|
virtualinherited |
Compute the Hessians of all components at a set of points.
|
virtualinherited |
Return an estimate for the memory consumption, in bytes, of this object.
This function is virtual and can be overloaded by derived classes.
Reimplemented in Functions::FlowFunction< dim >, Functions::FlowFunction< 2 >, Functions::ConstantFunction< dim, RangeNumberType >, Functions::ConstantFunction< dim, double >, ComponentSelectFunction< dim, RangeNumberType >, Functions::CSpline< dim >, FunctionDerivative< dim >, Functions::JumpFunction< dim >, Functions::InterpolatedTensorProductGridData< dim >, Functions::InterpolatedUniformGridData< dim >, Functions::Polynomial< dim >, and Functions::Spherical< dim >.
|
inherited |
Return the value of the time variable.
|
virtualinherited |
Set the time to new_time
, overwriting the old value.
|
virtualinherited |
Advance the time by the given time step delta_t
.
|
private |
Pointer to the DoFHandler passed to the constructor.
Definition at line 1375 of file quadrature_generator.cc.
|
private |
Pointer to the vector of solution coefficients passed to the constructor.
Definition at line 1381 of file quadrature_generator.cc.
|
private |
Pointer to the element associated with the cell in the last call to set_active_cell().
Definition at line 1387 of file quadrature_generator.cc.
|
private |
DOF-indices of the cell in the last call to set_active_cell()
Definition at line 1392 of file quadrature_generator.cc.
|
private |
Local solution values of the cell in the last call to set_active_cell()
Definition at line 1398 of file quadrature_generator.cc.
|
private |
Description of the 1D polynomial basis for tensor product elements used for the fast path of this class using tensor product evaluators.
Definition at line 1405 of file quadrature_generator.cc.
|
private |
Renumbering for the tensor-product evaluator in the fast path.
Definition at line 1410 of file quadrature_generator.cc.
|
private |
Check whether the shape functions are linear.
Definition at line 1415 of file quadrature_generator.cc.
|
staticconstexprinherited |
Export the value of the template parameter as a static member constant. Sometimes useful for some expression template programming.
Definition at line 159 of file function.h.
|
inherited |
Number of vector components.
Definition at line 164 of file function.h.
|
privateinherited |
Store the present time.
Definition at line 113 of file function_time.h.