|
HArD::Core3D
Hybrid Arbitrary Degree::Core 3D - Library to implement 3D schemes with vertex, edge, face and cell polynomials as unknowns
|
Implementation of the arbitrary order Serendipity DDR scheme for the Yang-Mills problem. More...

Classes | |
| struct | HArDCore3D::YangMillsNorms |
| Structure to store norm components. More... | |
| struct | HArDCore3D::YangMills |
| Assemble a YangMills problem. More... | |
Functions | |
| HArDCore3D::YangMillsNorms::YangMillsNorms (double norm_E, double norm_A, double norm_lambda) | |
| Constructor. | |
| HArDCore3D::YangMills::YangMills (const DDRCore &ddrcore, const LADDRCore &laddrcore, const LieAlgebra &liealgebra, size_t nonlinear_discretisation, bool use_threads, std::ostream &output=std::cout) | |
| Constructor. | |
| void | HArDCore3D::YangMills::assembleLinearSystem (double dt) |
| Assemble the global system | |
| void | HArDCore3D::YangMills::setSystemVector (const Eigen::VectorXd &interp_f, const Eigen::VectorXd &interp_dE, const Eigen::VectorXd &interp_A, const Eigen::VectorXd &E_i, const Eigen::VectorXd &A_i, double dt, double theta, double nonlinear_coeff) |
| Sets system vector for the nonlinear problem. | |
| void | HArDCore3D::YangMills::assembleSystemNewton (const Eigen::VectorXd &E_i, const Eigen::VectorXd &A_i, const Eigen::VectorXd &Elambda_k, double dt, double theta, double nonlinear_coeff) |
| Assembles the system for Newton iterations. | |
| double | HArDCore3D::YangMills::stoppingCrit (const Eigen::VectorXd &v, const Eigen::VectorXd &u) |
| Stops once changes become small. | |
| void | HArDCore3D::YangMills::setNonlinearRes (const Eigen::VectorXd &Elambda_k, const Eigen::VectorXd &E_i, const Eigen::VectorXd &A_i, double dt, double theta, double nonlinear_coeff) |
| Sets the nonlinear residual vector b-F(x_k) in m_b_k. | |
| void | HArDCore3D::YangMills::addBoundaryConditions (const LAMagneticFieldType &curl_A, double dt) |
| Adds boundary condition for chosen solution to the system vector. | |
| Eigen::VectorXd | HArDCore3D::YangMills::computeInitialConditions (const Eigen::MatrixXd &Eh, const Eigen::MatrixXd &Ah, const double nonlinear_coeff, const size_t solver) |
| Computes the projected initial conditions that satisfy the constraint. | |
| std::vector< Eigen::MatrixXd > | HArDCore3D::YangMills::epsBkt_v (size_t iT, boost::multi_array< double, 3 > &crossij_Pot_T, const std::vector< Eigen::VectorXd > &vec_list) const |
| std::vector< Eigen::MatrixXd > | HArDCore3D::YangMills::L2v_Bkt (size_t iT, boost::multi_array< double, 3 > &intPciPcjPgk, const std::vector< Eigen::VectorXd > &vec_list, const size_t &entry) const |
| Wrapper to plug vector into L2 integral product: int (Pcurl 1,[Pcurl 2, Pgrad 3]) | |
| std::vector< Eigen::MatrixXd > | HArDCore3D::YangMills::L2v_epsBkt (size_t iT, boost::multi_array< double, 3 > &crossij_Pot_T, const std::vector< Eigen::VectorXd > &v_L2prod) const |
| size_t | HArDCore3D::YangMills::dimensionSpace () const |
| Returns the global problem dimension. | |
| size_t | HArDCore3D::YangMills::nbSCDOFs_E () const |
| Returns the number of statically condensed DOFs (Electric field) | |
| size_t | HArDCore3D::YangMills::nbSCDOFs_lambda () const |
| Returns the number of statically condensed DOFs (lambda) | |
| size_t | HArDCore3D::YangMills::nbSCDOFs () const |
| Returns the number of statically condensed DOFs (both velocity and pressure) | |
| size_t | HArDCore3D::YangMills::sizeSystem () const |
| Returns the size of the system. | |
| const LieAlgebra & | HArDCore3D::YangMills::lieAlg () const |
| Returns the Lie algebra. | |
| const LASXGrad & | HArDCore3D::YangMills::laSXGrad () const |
| Returns the space LAXGrad. | |
| const LASXCurl & | HArDCore3D::YangMills::laSXCurl () const |
| Returns the space LAXCurl. | |
| const LASXDiv & | HArDCore3D::YangMills::laSXDiv () const |
| Returns the space LAXCurl. | |
| const SXGrad & | HArDCore3D::YangMills::xSGrad () const |
| Returns the space XDiv. | |
| const SXCurl & | HArDCore3D::YangMills::xSCurl () const |
| Returns the space XDiv. | |
| const SXDiv & | HArDCore3D::YangMills::xSDiv () const |
| Returns the space XDiv. | |
| const SystemMatrixType & | HArDCore3D::YangMills::systemMatrix () const |
| Returns the linear system matrix. | |
| SystemMatrixType & | HArDCore3D::YangMills::systemMatrix () |
| Returns the linear system matrix. | |
| const Eigen::VectorXd & | HArDCore3D::YangMills::systemVectorNewton () const |
| Returns the linear system right-hand side vector. | |
| Eigen::VectorXd & | HArDCore3D::YangMills::systemVectorNewton () |
| Returns the linear system right-hand side vector. | |
| const Eigen::VectorXd & | HArDCore3D::YangMills::systemVector () const |
| Returns the right-hand side to the nonlinear problem. | |
| Eigen::VectorXd & | HArDCore3D::YangMills::systemVector () |
| Returns the right-hand side to the nonlinear problem. | |
| const Eigen::VectorXd & | HArDCore3D::YangMills::nonlinearRes () const |
| Returns the right-hand side to the nonlinear problem. | |
| Eigen::VectorXd & | HArDCore3D::YangMills::nonlinearRes () |
| Returns the right-hand side to the nonlinear problem. | |
| const SystemMatrixType & | HArDCore3D::YangMills::scMatrix () const |
| Returns the static condensation recovery operator. | |
| Eigen::VectorXd & | HArDCore3D::YangMills::scVector () |
| Returns the static condensation rhs. | |
| const double & | HArDCore3D::YangMills::stabilizationParameter () const |
| Returns the stabilization parameter. | |
| double & | HArDCore3D::YangMills::stabilizationParameter () |
| Returns the stabilization parameter. | |
| std::vector< YangMillsNorms > | HArDCore3D::YangMills::computeYangMillsNorms (const std::vector< Eigen::VectorXd > &list_dofs) const |
| Compute the discrete L2 norms, for a family of Eigen::VectorXd representing the electric field and potential. | |
| template<typename outValue , typename TFct > | |
| std::function< outValue(const Eigen::Vector3d &)> | HArDCore3D::YangMills::contractPara (const TFct &F, double t) const |
| Takes a two parameter function and a value and returns a function with the first parameter fixed to value. | |
| template<typename outValue , typename Fct , typename TFct > | |
| std::vector< Fct > | HArDCore3D::YangMills::contractParaLA (const std::vector< TFct > &TF, double t) const |
| Takes a vector of two parameter functions and a value and returns a function with the first parameter fixed to value. | |
| double | HArDCore3D::YangMills::computeResidual (const Eigen::VectorXd &x) const |
| Calculates residual with current matrix and rhs from given x (m_A*x = m_b) | |
| Eigen::VectorXd | HArDCore3D::YangMills::computeConstraint (const Eigen::VectorXd &E, const Eigen::VectorXd &A, const double nonlinear_coeff) |
| Computes the constraint [E, grad P'] + int <E, [A, P']> for the DOFs. | |
| double | HArDCore3D::YangMills::computeConstraintNorm (const Eigen::VectorXd &Ch, const size_t itersolver) const |
| Solves a system to calculate the norm of the constraint (in the dual space of LaXgrad) | |
| std::pair< double, double > | HArDCore3D::YangMills::computeConditionNum () const |
Implementation of the arbitrary order Serendipity DDR scheme for the Yang-Mills problem.
| typedef std::function<Eigen::Vector3d(const Eigen::Vector3d &)> HArDCore3D::YangMills::ElectricFieldType |
| typedef std::function<Eigen::Vector3d(const Eigen::Vector3d &)> HArDCore3D::YangMills::ForcingTermType |
Base functions.
Lie algebra valued functions (vector of dim Lie algebra)
| typedef std::function<Eigen::Vector3d(const Eigen::Vector3d &)> HArDCore3D::YangMills::MagneticFieldType |
| typedef Eigen::SparseMatrix<double> HArDCore3D::YangMills::SystemMatrixType |
| typedef std::function<Eigen::Vector3d(const double &, const Eigen::Vector3d &)> HArDCore3D::YangMills::TElectricFieldType |
| typedef std::function<Eigen::Vector3d(const double &, const Eigen::Vector3d &)> HArDCore3D::YangMills::TForcingTermType |
Base functions with time component.
Lie algebra valued functions with time component.
| typedef std::function<Eigen::Vector3d(const double &, const Eigen::Vector3d &)> HArDCore3D::YangMills::TMagneticFieldType |
| void HArDCore3D::YangMills::addBoundaryConditions | ( | const LAMagneticFieldType & | curl_A, |
| double | dt | ||
| ) |
Adds boundary condition for chosen solution to the system vector.
| curl_A | Curl of the potential |
| dt | Time step |
Assemble the global system
| dt | Time step |
| void YangMills::assembleSystemNewton | ( | const Eigen::VectorXd & | E_i, |
| const Eigen::VectorXd & | A_i, | ||
| const Eigen::VectorXd & | Elambda_k, | ||
| double | dt, | ||
| double | theta, | ||
| double | nonlinear_coeff | ||
| ) |
Assembles the system for Newton iterations.
| E_i | Electric field at previous time |
| A_i | Potential at previous time |
| Elambda_k | Solution position after previous Newton iteration |
| dt | Time step |
| theta | Theta scheme |
| nonlinear_coeff | Scaling of the nonlinear terms (0 for Maxwell) |
| Eigen::VectorXd HArDCore3D::YangMills::computeConstraint | ( | const Eigen::VectorXd & | E, |
| const Eigen::VectorXd & | A, | ||
| const double | nonlinear_coeff | ||
| ) |
Computes the constraint [E, grad P'] + int <E, [A, P']> for the DOFs.
| double HArDCore3D::YangMills::computeConstraintNorm | ( | const Eigen::VectorXd & | Ch, |
| const size_t | itersolver | ||
| ) | const |
Solves a system to calculate the norm of the constraint (in the dual space of LaXgrad)
| Eigen::VectorXd HArDCore3D::YangMills::computeInitialConditions | ( | const Eigen::MatrixXd & | Eh, |
| const Eigen::MatrixXd & | Ah, | ||
| const double | nonlinear_coeff, | ||
| const size_t | solver | ||
| ) |
Computes the projected initial conditions that satisfy the constraint.
| Eh | Interpolate of the initial electric field |
| Ah | Interpolate of the initial potential field |
| nonlinear_coeff | Scaling of the nonlinear terms (0 for Maxwell) |
| solver | Solver to use |
Calculates residual with current matrix and rhs from given x (m_A*x = m_b)
| std::vector< YangMillsNorms > HArDCore3D::YangMills::computeYangMillsNorms | ( | const std::vector< Eigen::VectorXd > & | list_dofs | ) | const |
Compute the discrete L2 norms, for a family of Eigen::VectorXd representing the electric field and potential.
| list_dofs | List of vectors representing the electric field and potential |
|
inline |
Takes a two parameter function and a value and returns a function with the first parameter fixed to value.
|
inline |
Takes a vector of two parameter functions and a value and returns a function with the first parameter fixed to value.
|
inline |
Returns the global problem dimension.
| std::vector< Eigen::MatrixXd > YangMills::epsBkt_v | ( | size_t | iT, |
| boost::multi_array< double, 3 > & | crossij_Pot_T, | ||
| const std::vector< Eigen::VectorXd > & | vec_list | ||
| ) | const |
Does one of two things depending on the bracket discretisation chosen (m_nl_par) 0: Calculates the local matrix of *[v,.]^div. (i,j), i represents laxdiv index, j represents xcurl index of entry 0: Calculates the matrix of *[v,.] (i,j), i represents LaP2k3 basis index, j represents xcurl index of entry
| iT | Element index |
| crossij_Pot_T | The output of _compute_crossij_Pot_T representing the DDR nonlinear operator in the element |
| vec_list | Vector to plug in |
| std::vector< Eigen::MatrixXd > YangMills::L2v_Bkt | ( | size_t | iT, |
| boost::multi_array< double, 3 > & | intPciPcjPgk, | ||
| const std::vector< Eigen::VectorXd > & | vec_list, | ||
| const size_t & | entry | ||
| ) | const |
Wrapper to plug vector into L2 integral product: int (Pcurl 1,[Pcurl 2, Pgrad 3])
| iT | Element index |
| intPciPcjPgk | L2 integral product (trilinear form) |
| vec_list | Vector to plug in |
| entry | Position to put vector (1, 2, 3) |
| std::vector< Eigen::MatrixXd > YangMills::L2v_epsBkt | ( | size_t | iT, |
| boost::multi_array< double, 3 > & | crossij_Pot_T, | ||
| const std::vector< Eigen::VectorXd > & | v_L2prod | ||
| ) | const |
Does one of two things depending on the bracket discretisation chosen (m_nl_par) 0: Calculates the bracket inside the L2prod with v: (v,*[.,.]^div)_L2, adds the contribution from the faces, then the element 1: Calculates the bracket inside the L2prod with v: \int_T <v,*[.,.]>
| iT | Element index |
| crossij_Pot_T | The output of _compute_crossij_Pot_T representing the DDR nonlinear operator in the element |
| v_L2prod | Local vector in T (because we often only have the local part of the vector e.g. (*[A,A]^div)_T), representing (v,.)_L2 or \int_T <v,.> depending on m_nl_par |
|
inline |
Returns the Lie algebra.
|
inline |
Returns the number of statically condensed DOFs (both velocity and pressure)
|
inline |
Returns the number of statically condensed DOFs (Electric field)
|
inline |
Returns the number of statically condensed DOFs (lambda)
|
inline |
Returns the right-hand side to the nonlinear problem.
|
inline |
Returns the right-hand side to the nonlinear problem.
|
inline |
Returns the static condensation recovery operator.
|
inline |
Returns the static condensation rhs.
| void YangMills::setNonlinearRes | ( | const Eigen::VectorXd & | Elambda_k, |
| const Eigen::VectorXd & | E_i, | ||
| const Eigen::VectorXd & | A_i, | ||
| double | dt, | ||
| double | theta, | ||
| double | nonlinear_coeff | ||
| ) |
Sets the nonlinear residual vector b-F(x_k) in m_b_k.
| Elambda_k | Solution in Newton iterations |
| E_i | Electric field at previous time |
| A_i | Potential at previous time |
| dt | Time step |
| theta | Theta scheme |
| nonlinear_coeff | Scaling of the nonlinear terms (0 for Maxwell) |
| void HArDCore3D::YangMills::setSystemVector | ( | const Eigen::VectorXd & | interp_f, |
| const Eigen::VectorXd & | interp_dE, | ||
| const Eigen::VectorXd & | interp_A, | ||
| const Eigen::VectorXd & | E_i, | ||
| const Eigen::VectorXd & | A_i, | ||
| double | dt, | ||
| double | theta, | ||
| double | nonlinear_coeff | ||
| ) |
Sets system vector for the nonlinear problem.
| interp_f | Forcing term of first equation |
| interp_dE | Used in forcing term of second equation |
| interp_A | Used in forcing term of second equation |
| E_i | Electric field at previous time |
| A_i | Potential at previous time |
| dt | Time step |
| theta | Theta scheme |
| nonlinear_coeff | Scaling of the nonlinear terms (0 for Maxwell) |
|
inline |
Returns the size of the system.
|
inline |
Returns the stabilization parameter.
Returns the stabilization parameter.
Stops once changes become small.
|
inline |
Returns the linear system matrix.
|
inline |
Returns the linear system matrix.
|
inline |
Returns the right-hand side to the nonlinear problem.
|
inline |
Returns the right-hand side to the nonlinear problem.
|
inline |
Returns the linear system right-hand side vector.
|
inline |
Returns the linear system right-hand side vector.
| YangMills::YangMills | ( | const DDRCore & | ddrcore, |
| const LADDRCore & | laddrcore, | ||
| const LieAlgebra & | liealgebra, | ||
| size_t | nonlinear_discretisation, | ||
| bool | use_threads, | ||
| std::ostream & | output = std::cout |
||
| ) |
Constructor.
| ddrcore | Core for the DDR space sequence |
| laddrcore | Has extra P2k3_T space for nonlinear operator |
| liealgebra | Lie algebra of the problem |
| use_threads | Discretisation of nonlinear terms (1: discrete xdiv bracket, 2: (C_h,C_h)_xdiv + integral bracket) True for parallel execution, false for sequential execution |
| output | Output stream to print status messages |
|
inline |
Constructor.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |