#include <FEFunction2D.h>
Public Member Functions | |
TFEFunction2D (TFESpace2D *fespace2D, char *name, char *description, double *values, int length) | |
~TFEFunction2D () | |
char * | GetName () |
char * | GetDescription () |
TFESpace2D * | GetFESpace2D () |
int | GetLength () |
double * | GetValues () |
void | GetErrors (DoubleFunct2D *Exact, int N_Derivatives, MultiIndex2D *NeededDerivatives, int N_Errors, ErrorMethod2D *ErrorMeth, CoeffFct2D *Coeff, TAuxParam2D *Aux, int n_fespaces, TFESpace2D **fespaces, double *errors) |
void | GetErrorsForVectorValuedFunction (DoubleFunct2D *const *const Exact, ErrorMethod2D *const ErrorMeth, double *const errors) |
use this for vector valued basis functions (Raviart-Thomas (RT) or Brezzi-Douglas-Marini (BDM) elements) | |
void | GetErrorsAdapt (DoubleFunct2D *Exact, int N_Derivatives, MultiIndex2D *NeededDerivatives, int N_Errors, ErrorMethod2D *ErrorMeth, CoeffFct2D *Coeff, TAuxParam2D *Aux, int n_fespaces, TFESpace2D **fespaces, double *errors) |
void | GetErrorsOPTPDE (DoubleFunct2D *Exact, int N_Derivatives, MultiIndex2D *NeededDerivatives, int N_Errors, ErrorMethod2D *ErrorMeth, CoeffFct2D *Coeff, TAuxParam2D *Aux, int n_fespaces, TFESpace2D **fespaces, int &kink, double upper, double lower, double *errors) |
void | GetErrorsAdaptOPTPDE (DoubleFunct2D *Exact, int N_Derivatives, MultiIndex2D *NeededDerivatives, int N_Errors, ErrorMethod2D *ErrorMeth, CoeffFct2D *Coeff, TAuxParam2D *Aux, int n_fespaces, TFESpace2D **fespaces, double radius, double upper, double lower, double *errors) |
void | FindGradient (double x, double y, double *values) |
void | FindGradientLocal (TBaseCell *cell, int cell_no, double x, double y, double *values) |
void | FindValueLocal (TBaseCell *cell, int cell_no, double x, double y, double *values) |
void | Interpolate (DoubleFunct2D *Exact) |
void | Interpolate (TFEFunction2D *F) |
void | project_into_L20 (double a=0.0) |
project this functions into the space L20 (having zero mean value) More... | |
void | compute_integral_and_measure (double &integral, double &measure) const |
find the integral of this function and the measure of its domain More... | |
double | compute_mean () const |
compute the mean value of this TFEFunction2D More... | |
void | GetMeshCellParams (DoubleFunct2D *Exact, int N_Derivatives, MultiIndex2D *NeededDerivatives, int N_Errors, ErrorMethod2D *ErrorMeth, CoeffFct2D *Coeff, TAuxParam2D *Aux, int n_fespaces, TFESpace2D **fespaces, double *errors, double *parameters) |
void | InterpolateSuper (DoubleFunct2D *Exact) |
void | SetDirichletBC (BoundCondFunct2D *BoundaryCondition, BoundValueFunct2D *BoundaryValue) |
void | WriteSol () |
void | ReadSol (char *BaseName) |
void | CorrectMass (double OldMass) |
void | GetMassAndMean (double *OutVal) |
TFEFunction2D & | operator*= (double alpha) |
TFEFunction2D & | operator+= (const TFEFunction2D &rhs) |
TFEFunction2D & | operator= (const TFEFunction2D &rhs) |
void | MinMax (double &min, double &max) |
void | PrintMinMax () |
Protected Attributes | |
char * | Name |
char * | Description |
TFESpace2D * | FESpace2D |
double * | Values |
int | Length |
a function from a finite element space
TFEFunction2D::TFEFunction2D | ( | TFESpace2D * | fespace2D, |
char * | name, | ||
char * | description, | ||
double * | values, | ||
int | length | ||
) |
constructor with vector initialization
TFEFunction2D::~TFEFunction2D | ( | ) |
destructor
void TFEFunction2D::compute_integral_and_measure | ( | double & | integral, |
double & | measure | ||
) | const |
find the integral of this function and the measure of its domain
integral | double value for the integral of this TFEFunction2D |
measure | double value for the measure of its domain |
double TFEFunction2D::compute_mean | ( | ) | const |
compute the mean value of this TFEFunction2D
this functions uses 'compute_integral_and_measure'. Then the mean is the integral divided by the measure.
void TFEFunction2D::CorrectMass | ( | double | OldMass | ) |
sol will be correct to conserve the Old_Mass (remessing, temp, surfact, psd, etc) - added by sashi
correct the sol to the Old_Mass (remessing, temp, surfact, psd, etc) - added by sashi
void TFEFunction2D::FindGradient | ( | double | x, |
double | y, | ||
double * | values | ||
) |
determine the value of function and its first derivatives at the given point
void TFEFunction2D::FindGradientLocal | ( | TBaseCell * | cell, |
int | cell_no, | ||
double | x, | ||
double | y, | ||
double * | values | ||
) |
determine the value of function and its first derivatives at the given point
determine the value of function and its first derivatives at the given point which lies within !! the cell *cell (not on the boundary of that cell !!)
void TFEFunction2D::FindValueLocal | ( | TBaseCell * | cell, |
int | cell_no, | ||
double | x, | ||
double | y, | ||
double * | values | ||
) |
determine the value of function at the given point
determine the value of function at the given point which lies within the cell *cell. This also works for vector valued basis functions as are used for Raviart-Thomas elements.
|
inline |
return description
void TFEFunction2D::GetErrors | ( | DoubleFunct2D * | Exact, |
int | N_Derivatives, | ||
MultiIndex2D * | NeededDerivatives, | ||
int | N_Errors, | ||
ErrorMethod2D * | ErrorMeth, | ||
CoeffFct2D * | Coeff, | ||
TAuxParam2D * | Aux, | ||
int | n_fespaces, | ||
TFESpace2D ** | fespaces, | ||
double * | errors | ||
) |
calculate errors to given function
calculate errors to given function parallel with MPI, Sashi : 10.10.09
void TFEFunction2D::GetErrorsAdapt | ( | DoubleFunct2D * | Exact, |
int | N_Derivatives, | ||
MultiIndex2D * | NeededDerivatives, | ||
int | N_Errors, | ||
ErrorMethod2D * | ErrorMeth, | ||
CoeffFct2D * | Coeff, | ||
TAuxParam2D * | Aux, | ||
int | n_fespaces, | ||
TFESpace2D ** | fespaces, | ||
double * | errors | ||
) |
calculate errors to given function
void TFEFunction2D::GetErrorsAdaptOPTPDE | ( | DoubleFunct2D * | Exact, |
int | N_Derivatives, | ||
MultiIndex2D * | NeededDerivatives, | ||
int | N_Errors, | ||
ErrorMethod2D * | ErrorMeth, | ||
CoeffFct2D * | Coeff, | ||
TAuxParam2D * | Aux, | ||
int | n_fespaces, | ||
TFESpace2D ** | fespaces, | ||
double | radius, | ||
double | upper, | ||
double | lower, | ||
double * | errors | ||
) |
calculate errors to given function taylored for use in OPTPDE
void TFEFunction2D::GetErrorsOPTPDE | ( | DoubleFunct2D * | Exact, |
int | N_Derivatives, | ||
MultiIndex2D * | NeededDerivatives, | ||
int | N_Errors, | ||
ErrorMethod2D * | ErrorMeth, | ||
CoeffFct2D * | Coeff, | ||
TAuxParam2D * | Aux, | ||
int | n_fespaces, | ||
TFESpace2D ** | fespaces, | ||
int & | kink, | ||
double | upper, | ||
double | lower, | ||
double * | errors | ||
) |
calculate errors to given function taylored for use in OPTPDE (is called from GetErrorsAdaptOPTPDE)
|
inline |
return fe space
|
inline |
return length
void TFEFunction2D::GetMassAndMean | ( | double * | OutVal | ) |
Retun the mass, domain volume and mean values of the function - added by sashi
Retun the mass, domain volume and mean values of the function - added by Sashi
void TFEFunction2D::GetMeshCellParams | ( | DoubleFunct2D * | Exact, |
int | N_Derivatives, | ||
MultiIndex2D * | NeededDerivatives, | ||
int | N_Errors, | ||
ErrorMethod2D * | ErrorMeth, | ||
CoeffFct2D * | Coeff, | ||
TAuxParam2D * | Aux, | ||
int | n_fespaces, | ||
TFESpace2D ** | fespaces, | ||
double * | errors, | ||
double * | cell_parameters | ||
) |
calculate parameters which are connected to a mesh cell
|
inline |
return name
|
inline |
return vector of data
void TFEFunction2D::Interpolate | ( | DoubleFunct2D * | Exact | ) |
calculate the interpolation of an exact function
void TFEFunction2D::Interpolate | ( | TFEFunction2D * | OldFeFunction | ) |
interpolate the old mesh fe function values to the new fe function
Note that this is rather slow, because no further information is required. The function 'OldFeFunction' could even live on a larger domain.
interpolate the old mesh fe function values to the new fe function
void TFEFunction2D::InterpolateSuper | ( | DoubleFunct2D * | Exact | ) |
calculate the super-convergence interpolation of an exact function
void TFEFunction2D::MinMax | ( | double & | min, |
double & | max | ||
) |
find the largest and smallest element in the vector of this FE function
TFEFunction2D & TFEFunction2D::operator*= | ( | double | alpha | ) |
multiply function with a scalar alpha. Only non-Dirichlet dofs are multiplied!
TFEFunction2D & TFEFunction2D::operator+= | ( | const TFEFunction2D & | rhs | ) |
add one TFEFunction2D to another one. Both have to be defined on the same space. Only non-Dirichlet dofs are added!
TFEFunction2D & TFEFunction2D::operator= | ( | const TFEFunction2D & | rhs | ) |
copy one TFEFunction2D to another one. Both have to be defined on the same space
void TFEFunction2D::PrintMinMax | ( | ) |
print the largest and smallest element in the vector of this FE function
void TFEFunction2D::project_into_L20 | ( | double | a = 0.0 | ) |
project this functions into the space L20 (having zero mean value)
After a call to this function the mean value (integral of this function devided by the measure of its domain) has the value a. This is for example needed for the pressure in a Stokes problem with Dirichlet conditions on all boundaries.
a | set mean value of this FEFunction2D to a |
void TFEFunction2D::ReadSol | ( | char * | BaseName | ) |
Read the solution from a given data file - written by Sashi
void TFEFunction2D::SetDirichletBC | ( | BoundCondFunct2D * | BoundaryCondition, |
BoundValueFunct2D * | BoundaryValue | ||
) |
set Dirichlet values according to boundary conditions
void TFEFunction2D::WriteSol | ( | ) |
write the solution into a data file - written by Sashi
|
protected |
some more words describing the function
|
protected |
space to which this function belongs to
|
protected |
length of vector
|
protected |
name of the function
|
protected |
double vector according to FE isomorphism