Documentation of CSL
Public Member Functions | Protected Member Functions | Protected Attributes
csl::FieldParent Class Reference
Inheritance diagram for csl::FieldParent:
Inheritance graph
[legend]

Public Member Functions

 FieldParent (const std::string &t_name)
 
 FieldParent (const FieldParent &field)=default
 
 FieldParent (const std::string &t_name, const Space *t_spaceField)
 
cslParent::PrimaryType getPrimaryType () const override
 
const SpacegetFieldSpace () const override
 
- Public Member Functions inherited from csl::AbstractParent
 AbstractParent ()
 Default constructor, parent with no name.
 
 AbstractParent (const std::string &t_name)
 Intializes the name of the parent. More...
 
 AbstractParent (const AbstractParent &abstract)=default
 Copy constructor, c++ default.
 
virtual ~AbstractParent ()
 Destructor.
 
Parent self ()
 
virtual bool isAnAbbreviation () const
 
std::string const & getName () const
 
std::string const & getLatexName () const
 
virtual std::string const & getBaseName () const
 
bool getCommutable () const
 
csl::ComplexProperty getComplexProp () const
 
virtual void setName (std::string t_name)
 
virtual void setLatexName (const std::string &t_name)
 
void setCommutable (bool t_commutable)
 
virtual void setComplexProperty (csl::ComplexProperty t_prop)
 
void addProperty (Equation *prop)
 Adds a property for the parent. More...
 
void removeProperty (Equation *prop)
 Removes a property. More...
 
virtual cslParent::Type getType () const =0
 
virtual int getDim () const
 
virtual void printDefinition (std::ostream &out=std::cout, int indentSize=4, bool header=false) const =0
 
void printPropDefinition (std::ostream &out, int indentSize, bool header) const
 
virtual void enableEvaluation ()
 
virtual void disableEvaluation ()
 
virtual void toggleEvaluation ()
 
virtual std::optional< Exprevaluate (Expr_info self, csl::eval::mode user_mode=csl::eval::base) const
 
virtual Expr const & getEncapsulated () const
 
virtual Expr getExactEncapsulated (Expr_info self) const
 
virtual void setEncapsulated (Expr const &)
 
virtual int getDim (const Space *t_space) const
 Returns the dimension of the parent relatively to a certain vector space, i.e. the number of indices in this vector space. More...
 
virtual std::vector< const Space * > getSpace () const
 
virtual void setFieldSpace (const Space *t_space)
 
virtual bool getFullySymmetric () const
 
virtual bool getFullyAntiSymmetric () const
 
virtual std::vector< PermutationgetPermutation () const
 For an TensorParent returns all the possible permutations of the tensor with respect to the symmetries or antisymmetries in a vector of Permutation. More...
 
virtual bool isValued () const
 
virtual Expr getTensor () const
 For a valued TensorParent returns the corresponding tensor. Valued means that the tensor has been defined by the user. More...
 
virtual Expr getTensor (Expr_info expr) const
 
virtual Expr getTrace () const
 For an TensorParent of dimension 2 (in a given unique space) returns the trace of it, i.e. the sum of its diagonal elements.
 
virtual bool dependsOn (Expr_info expr) const
 Tells if the parent depends on another expression or not. More...
 
virtual bool dependsExplicitlyOn (Expr_info expr) const
 Tells if the parent depends explicitely on another expression or not. More...
 
virtual const std::vector< Equation * > & getProperties () const
 
virtual void addSpace (const Space *t_space)
 Adds a dimension to an TensorParent in a specific vector space. More...
 
virtual void setFullySymmetric ()
 Set the TensorParent fully symmetric.
 
virtual void setFullyAntiSymmetric ()
 Set the TensorParent fully antisymmetric.
 
virtual bool isTraceLessIn (csl::Space const *space) const
 
virtual void addTraceLessNess (csl::Space const *space)
 
virtual void removeTraceLessNess (csl::Space const *space)
 
virtual void addSymmetry (int i1, int i2)
 Adds a symmetry between indices in position i1 and i2. More...
 
virtual void addAntiSymmetry (int i1, int i2)
 Adds an antisymmetry between indices in position i1 and i2. More...
 
virtual void setSymmetry (const Symmetry &t_symmetry)
 Sets all the symmetry properties of an TensorParent from an object of type Symmetry. This erase all possible properties of (anti)symmetry the parent had before that. More...
 
virtual void setTensor (const Expr &t_tensor)
 
virtual void setTrace (const Expr &t_trace)
 
virtual bool hasContractionProperty (const Abstract *self, Expr_info B) const
 Tells if an TensorParent has contraction properties with another expression. More...
 
virtual Expr contraction (const Abstract *self, Expr_info B) const
 Applies a contractoin property if there is one between self and B. More...
 
virtual bool hasChainContractionProperty () const
 
virtual std::vector< ContractionChaingetContractionProperties () const
 
virtual void addContractionProperty (csl::vector_expr const &leftHandSide, const Expr &rightHandSide)
 
virtual void removeContractionProperty (csl::vector_expr const &leftHandSide, const Expr &rightHandSide)
 
virtual void addSelfContraction (const Expr &A, const Expr &B, const Expr &res, std::optional< std::function< bool(Expr_info, Expr_info)>> condition=std::nullopt)
 Adds a contraction property between an Element and another that share the parent (*this). More...
 
virtual void removeSelfContraction (const Expr &A, const Expr &B)
 
virtual std::optional< ExprgetComplexProperty (Expr_info self) const
 
virtual std::optional< ExprgetHermitianProperty (Expr_info self, const Space *space) const
 
virtual std::optional< ExprgetTransposedProperty (Expr_info self, const Space *space) const
 
virtual void addComplexProperty (const Expr &init, const Expr &res)
 
virtual void addHermitianProperty (const Space *space, const Expr &init, const Expr &res)
 
virtual void addTransposedProperty (const Space *space, const Expr &init, const Expr &res)
 
virtual std::vector< ParentgetBrokenParts (const Space *broken) const
 
virtual std::vector< ParentbreakSpace (const Space *broken, const std::vector< const Space *> &newSpace, const std::vector< size_t > &pieces) const
 
virtual Expr operator() (Index index)
 Generate the Element for an TensorParent of dimension 1 (a single index). More...
 
virtual Expr operator() (const Tensor &point)
 
virtual Expr operator() (std::vector< Index > indices)
 Generate the Element for an TensorParent of arbitrary dimension More...
 
virtual Expr operator() (const std::vector< int > &indices)
 
virtual Expr operator() (Index index, const Tensor &point)
 
virtual Expr operator() (std::vector< Index > indices, const Tensor &point)
 
virtual Expr operator() (const std::vector< int > &indices, const Tensor &point)
 

Protected Member Functions

void checkFieldRequest (TensorParent *point)
 

Protected Attributes

const SpacespaceField
 
- Protected Attributes inherited from csl::AbstractParent
std::string name
 
std::string latexName
 
bool commutable
 
csl::ComplexProperty complexProp = csl::ComplexProperty::Real
 
std::vector< Equation * > props
 

Member Function Documentation

◆ getPrimaryType()

cslParent::PrimaryType csl::FieldParent::getPrimaryType ( ) const
overridevirtual
Returns
The primary type of the parent.

Implements csl::AbstractParent.


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