HArD::Core2D
Hybrid Arbitrary Degree::Core 2D - Library to implement 2D schemes with edge and cell polynomials as unknowns
|
The vector Xh manipulated in the resolution has mixed components, corresponding either to the unknown \(u\) or to \(\zeta(e^W u)\), depending on the choice of weight of mass-lumping for the cell/edge unknowns. If no weight is put on the edges (resp. the cells), then the edge (resp. cell) unknowns represent \(\zeta(e^W u)\). Otherwise, they represent u. More...
#include <HMM_StochTrans_StefanPME.hpp>
Public Types | |
using | solution_function_type = TemporalSpatialFunctionType< double > |
type for solution | |
using | source_function_type = PiecewiseSpatialFunctionType< double > |
type for source (at a given fixed time) | |
using | grad_function_type = PiecewiseTemporalSpatialFunctionType< VectorRd > |
type for gradient | |
using | lapl_function_type = PiecewiseTemporalSpatialFunctionType< double > |
type for laplacian | |
using | tensor_function_type = PiecewiseSpatialFunctionType< Eigen::Matrix2d > |
type for diffusion tensor (does not depend on time) | |
using | WienerType = SpatialFunctionType< double > |
type for the Wiener process at a fixed time (only variation in space) | |
using | GradWienerType = SpatialFunctionType< VectorRd > |
type for gradient of Wiener process | |
using | ReactionType = SpatialFunctionType< double > |
Type for reaction term mu^2. | |
Public Member Functions | |
StochStefanPME (HybridCore &hmm, tensor_function_type kappa, TestCaseNonLinearity::nonlinearity_function_type zeta, BoundaryConditions BC, solution_function_type exact_solution, grad_function_type grad_exact_solution, solution_function_type time_der_exact_solution, lapl_function_type minus_Lapl_exact_solution, double weight, std::string solver_type, std::ostream &output=std::cout) | |
Constructor of the class. | |
StochStefanPME::source_function_type | compute_source (const bool &use_exact_source, const double &t, const WienerType &W, const GradWienerType &grad_W, const WienerType &Delta_exp_W, const ReactionType &mu_squared) |
Compute the source to zero or the exact one based on the selected solution and Wiener process. | |
std::pair< UVector, size_t > | iterate (const double tps, const double dt, const UVector &Xn, const UVector &Ih_W, const WienerType &W, const ReactionType &mu_squared, const source_function_type &source) |
Execute one time iteration: return the calculated vector, and the number of Newton iterations. | |
void | SetWienerProcess (const int &caseW, const double &t, WienerType &W, UVector &I_W, GradWienerType &grad_W, WienerType &Delta_exp_W, ReactionType &mu_squared, bool verbose=false) |
Set the Wiener process, deterministic case. | |
void | SimulateWienerProcess (const double &dt, DoubleVector< double > &Wtime, WienerType &W, const DoubleVector< Eigen::VectorXd > &Ih_eigs, UVector &I_W, GradWienerType &grad_W, WienerType &Delta_exp_W, ReactionType &mu_squared) |
Set the Wiener process, random case. | |
Eigen::VectorXd | apply_nonlinearity_eW (const std::string type, const Eigen::VectorXd &Y, const Eigen::VectorXd &I_W) const |
Compute non-linearity and e^W on vector Y (depends if weight=0, weight=1 or weight\in (0,1) ) | |
UVector | apply_nonlinearity_eW (const std::string type, const UVector &Y, const Eigen::VectorXd &I_W) const |
double | L2_MassLumped (const UVector &Xh) const |
Mass-lumped L2 norm of a function given by a vector. | |
double | Lp_MassLumped (const UVector &Xh, double p) const |
Mass-lumped Lp norm of a function given by a vector. | |
double | EnergyNorm (const UVector &Xh) const |
Discrete energy norm (associated to the diffusion operator) | |
double | Integral (const UVector &Xh) const |
Integral of a function given by a vector. | |
double | get_assembly_time () const |
cpu time to assemble the scheme | |
double | get_solution_time () const |
cpu time to solve the linear systems | |
double | get_itime (size_t idx) const |
various intermediate assembly times | |
double | get_solving_error () const |
residual after solving the scheme | |
Eigen::MatrixXd | get_MassT (size_t iT) const |
Mass matrix in cell iT. | |
The vector Xh manipulated in the resolution has mixed components, corresponding either to the unknown \(u\) or to \(\zeta(e^W u)\), depending on the choice of weight of mass-lumping for the cell/edge unknowns. If no weight is put on the edges (resp. the cells), then the edge (resp. cell) unknowns represent \(\zeta(e^W u)\). Otherwise, they represent u.