HArD::Core3D
Hybrid Arbitrary Degree::Core 3D - Library to implement 3D schemes with vertex, edge, face and cell polynomials as unknowns
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
HArDCore3D::YangMills Struct Reference

Assemble a YangMills problem. More...

#include <laddr-yangmills-lm.hpp>

Public Types

typedef Eigen::SparseMatrix< doubleSystemMatrixType
 
typedef std::function< Eigen::Vector3d(const Eigen::Vector3d &)> ForcingTermType
 Base functions.
 
typedef std::function< Eigen::Vector3d(const Eigen::Vector3d &)> ElectricFieldType
 
typedef std::function< Eigen::Vector3d(const Eigen::Vector3d &)> MagneticFieldType
 
typedef std::function< Eigen::Vector3d(const double &, const Eigen::Vector3d &)> TForcingTermType
 Base functions with time component.
 
typedef std::function< Eigen::Vector3d(const double &, const Eigen::Vector3d &)> TElectricFieldType
 
typedef std::function< Eigen::Vector3d(const double &, const Eigen::Vector3d &)> TMagneticFieldType
 
typedef std::vector< ForcingTermTypeLAForcingTermType
 Lie algebra valued functions (vector of dim Lie algebra)
 
typedef std::vector< ElectricFieldTypeLAElectricFieldType
 
typedef std::vector< MagneticFieldTypeLAMagneticFieldType
 
typedef std::vector< TForcingTermTypeTLAForcingTermType
 Lie algebra valued functions with time component.
 
typedef std::vector< TElectricFieldTypeTLAElectricFieldType
 
typedef std::vector< TMagneticFieldTypeTLAMagneticFieldType
 
typedef Eigen::SparseMatrix< doubleSystemMatrixType
 
typedef std::function< Eigen::Vector3d(const Eigen::Vector3d &)> ForcingTermType
 Base functions.
 
typedef std::function< Eigen::Vector3d(const Eigen::Vector3d &)> ElectricFieldType
 
typedef std::function< Eigen::Vector3d(const Eigen::Vector3d &)> MagneticFieldType
 
typedef std::function< Eigen::Vector3d(const double &, const Eigen::Vector3d &)> TForcingTermType
 Base functions with time component.
 
typedef std::function< Eigen::Vector3d(const double &, const Eigen::Vector3d &)> TElectricFieldType
 
typedef std::function< Eigen::Vector3d(const double &, const Eigen::Vector3d &)> TMagneticFieldType
 
typedef std::vector< ForcingTermTypeLAForcingTermType
 Lie algebra valued functions (vector of dim Lie algebra)
 
typedef std::vector< ElectricFieldTypeLAElectricFieldType
 
typedef std::vector< MagneticFieldTypeLAMagneticFieldType
 
typedef std::vector< TForcingTermTypeTLAForcingTermType
 Lie algebra valued functions with time component.
 
typedef std::vector< TElectricFieldTypeTLAElectricFieldType
 
typedef std::vector< TMagneticFieldTypeTLAMagneticFieldType
 

Public Member Functions

 YangMills (const DDRCore &ddrcore, const LieAlgebra &liealgebra, bool use_threads, std::ostream &output=std::cout)
 Constructor.
 
void assembleLinearSystem (double dt)
 Assemble the global system

 
void setSystemVector (const Eigen::VectorXd &interp_f, const Eigen::VectorXd &interp_dE, const Eigen::VectorXd &interp_A, const Eigen::VectorXd &E_old, const Eigen::VectorXd &A_old, double dt, double theta, double nonlinear_coeff)
 Sets system vector for the nonlinear problem.
 
void assembleSystemNewton (const Eigen::VectorXd &E_i, const Eigen::VectorXd &A_i, const Eigen::VectorXd &Elambdac_k, const Eigen::VectorXd &sysVec, double dt, double theta, double nonlinear_coeff)
 Assembles the system for Newton iterations.
 
double stoppingCrit (const Eigen::VectorXd &v, const Eigen::VectorXd &u)
 Stops once changes become small.
 
double stoppingCrit2 (const Eigen::VectorXd &Elambda_k, const Eigen::VectorXd &E_i, const Eigen::VectorXd &A_i, const Eigen::VectorXd &sysVec, double dt, double theta, double nonlinear_coeff)
 Stops once close enough to system vector for nonlinear problem.
 
void addBoundaryConditions (const LAMagneticFieldType &curl_A, double dt)
 Adds boundary condition for chosen solution to the system vector.
 
Eigen::VectorXd 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.
 
Eigen::MatrixXd epsBkt_v (size_t iT, boost::multi_array< double, 3 > &ebkt_T, const Eigen::VectorXd &v) const
 Calculates the matrix of *[v,.]^div in element index iT.
 
Eigen::MatrixXd L2v_Bkt (size_t iT, boost::multi_array< double, 3 > &intPciPcjPgk, const Eigen::VectorXd &v, const size_t &entry) const
 Wrapper to plug vector into L2 integral product: int (Pcurl 1,[Pcurl 2, Pgrad 3])
 
Eigen::MatrixXd L2v_epsBkt (size_t iT, boost::multi_array< double, 3 > &ebkt_T, const Eigen::VectorXd &v_T, const Eigen::MatrixXd &L2prod) const
 Calculates the bracket inside the L2prod with v.
 
size_t dimension () const
 Returns the global problem dimension.
 
size_t sizeSystem () const
 Returns the size of the system.
 
const LieAlgebralieAlg () const
 Returns the Lie algebra.
 
const LAXGradlaXGrad () const
 Returns the space LAXGrad.
 
const LAXCurllaXCurl () const
 Returns the space LAXCurl.
 
const LAXDivlaXDiv () const
 Returns the space LAXCurl.
 
const XGradxGrad () const
 Returns the space XDiv.
 
const XCurlxCurl () const
 Returns the space XDiv.
 
const XDivxDiv () const
 Returns the space XDiv.
 
const SystemMatrixTypesystemMatrix () const
 Returns the linear system matrix.
 
SystemMatrixTypesystemMatrix ()
 Returns the linear system matrix.
 
const Eigen::VectorXd & systemVector () const
 Returns the linear system right-hand side vector.
 
Eigen::VectorXd & systemVector ()
 Returns the linear system right-hand side vector.
 
const doublestabilizationParameter () const
 Returns the stabilization parameter.
 
doublestabilizationParameter ()
 Returns the stabilization parameter.
 
std::vector< YangMillsNormscomputeYangMillsNorms (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 &)> 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< FctcontractParaLA (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 computeResidual (const Eigen::VectorXd &x) const
 Calculates residual with current matrix and rhs from given x (m_A*x = m_b)
 
Eigen::VectorXd 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 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, doublecomputeConditionNum () const
 
 YangMills (const DDRCore &ddrcore, const LADDRCore &laddrcore, const LieAlgebra &liealgebra, size_t nonlinear_discretisation, bool use_threads, std::ostream &output=std::cout)
 Constructor.
 
void assembleLinearSystem (double dt)
 Assemble the global system

 
void 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 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 stoppingCrit (const Eigen::VectorXd &v, const Eigen::VectorXd &u)
 Stops once changes become small.
 
void 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 addBoundaryConditions (const LAMagneticFieldType &curl_A, double dt)
 Adds boundary condition for chosen solution to the system vector.
 
Eigen::VectorXd 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 > 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 > 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 > L2v_epsBkt (size_t iT, boost::multi_array< double, 3 > &crossij_Pot_T, const std::vector< Eigen::VectorXd > &v_L2prod) const
 
size_t dimensionSpace () const
 Returns the global problem dimension.
 
size_t nbSCDOFs_E () const
 Returns the number of statically condensed DOFs (Electric field)
 
size_t nbSCDOFs_lambda () const
 Returns the number of statically condensed DOFs (lambda)
 
size_t nbSCDOFs () const
 Returns the number of statically condensed DOFs (both velocity and pressure)
 
size_t sizeSystem () const
 Returns the size of the system.
 
const LieAlgebralieAlg () const
 Returns the Lie algebra.
 
const LASXGradlaSXGrad () const
 Returns the space LAXGrad.
 
const LASXCurllaSXCurl () const
 Returns the space LAXCurl.
 
const LASXDivlaSXDiv () const
 Returns the space LAXCurl.
 
const SXGradxSGrad () const
 Returns the space XDiv.
 
const SXCurlxSCurl () const
 Returns the space XDiv.
 
const SXDivxSDiv () const
 Returns the space XDiv.
 
const SystemMatrixTypesystemMatrix () const
 Returns the linear system matrix.
 
SystemMatrixTypesystemMatrix ()
 Returns the linear system matrix.
 
const Eigen::VectorXd & systemVectorNewton () const
 Returns the linear system right-hand side vector.
 
Eigen::VectorXd & systemVectorNewton ()
 Returns the linear system right-hand side vector.
 
const Eigen::VectorXd & systemVector () const
 Returns the right-hand side to the nonlinear problem.
 
Eigen::VectorXd & systemVector ()
 Returns the right-hand side to the nonlinear problem.
 
const Eigen::VectorXd & nonlinearRes () const
 Returns the right-hand side to the nonlinear problem.
 
Eigen::VectorXd & nonlinearRes ()
 Returns the right-hand side to the nonlinear problem.
 
const SystemMatrixTypescMatrix () const
 Returns the static condensation recovery operator.
 
Eigen::VectorXd & scVector ()
 Returns the static condensation rhs.
 
const doublestabilizationParameter () const
 Returns the stabilization parameter.
 
doublestabilizationParameter ()
 Returns the stabilization parameter.
 
std::vector< YangMillsNormscomputeYangMillsNorms (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 &)> 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< FctcontractParaLA (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 computeResidual (const Eigen::VectorXd &x) const
 Calculates residual with current matrix and rhs from given x (m_A*x = m_b)
 
Eigen::VectorXd 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 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, doublecomputeConditionNum () const
 

Detailed Description

Assemble a YangMills problem.


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