Class xlifepp::TermVector#

class TermVector : public xlifepp::Term#

Inheritence diagram for xlifepp::TermVector:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "2" [label="xlifepp::Term" tooltip="xlifepp::Term"] "1" [label="xlifepp::TermVector" tooltip="xlifepp::TermVector" fillcolor="#BFBFBF"] "1" -> "2" [dir=forward tooltip="public-inheritance"] }

Collaboration diagram for xlifepp::TermVector:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "19" [label="xlifepp::Vector< complex_t >" tooltip="xlifepp::Vector< complex_t >"] "15" [label="xlifepp::Vector< real_t >" tooltip="xlifepp::Vector< real_t >"] "23" [label="xlifepp::Vector< xlifepp::Vector< complex_t > >" tooltip="xlifepp::Vector< xlifepp::Vector< complex_t > >"] "21" [label="xlifepp::Vector< xlifepp::Vector< real_t > >" tooltip="xlifepp::Vector< xlifepp::Vector< real_t > >"] "12" [label="std::map< const xlifepp::Unknown *, xlifepp::SuLinearForm >" tooltip="std::map< const xlifepp::Unknown *, xlifepp::SuLinearForm >"] "13" [label="std::map< const xlifepp::Unknown *, xlifepp::SuTermVector * >" tooltip="std::map< const xlifepp::Unknown *, xlifepp::SuTermVector * >"] "8" [label="std::map< string_t, number_t >" tooltip="std::map< string_t, number_t >"] "9" [label="std::map< K, T >" tooltip="std::map< K, T >"] "7" [label="std::vector< T >" tooltip="std::vector< T >"] "18" [label="std::vector< K >" tooltip="std::vector< K >"] "20" [label="std::vector< complex_t >" tooltip="std::vector< complex_t >"] "16" [label="std::vector< real_t >" tooltip="std::vector< real_t >"] "25" [label="std::vector< xlifepp::DofComponent >" tooltip="std::vector< xlifepp::DofComponent >"] "6" [label="std::vector< xlifepp::Parameter * >" tooltip="std::vector< xlifepp::Parameter * >"] "10" [label="std::vector< xlifepp::Term * >" tooltip="std::vector< xlifepp::Term * >"] "24" [label="std::vector< xlifepp::Vector< complex_t > >" tooltip="std::vector< xlifepp::Vector< complex_t > >"] "22" [label="std::vector< xlifepp::Vector< real_t > >" tooltip="std::vector< xlifepp::Vector< real_t > >"] "3" [label="xlifepp::ComputingInfo" tooltip="xlifepp::ComputingInfo"] "11" [label="xlifepp::LinearForm" tooltip="xlifepp::LinearForm"] "5" [label="xlifepp::Parameters" tooltip="xlifepp::Parameters"] "4" [label="xlifepp::ReductionMethod" tooltip="xlifepp::ReductionMethod"] "2" [label="xlifepp::Term" tooltip="xlifepp::Term"] "1" [label="xlifepp::TermVector" tooltip="xlifepp::TermVector" fillcolor="#BFBFBF"] "17" [label="xlifepp::Vector< K >" tooltip="xlifepp::Vector< K >"] "14" [label="xlifepp::VectorEntry" tooltip="xlifepp::VectorEntry"] "19" -> "20" [dir=forward tooltip="public-inheritance"] "19" -> "17" [dir=forward tooltip="template-instance"] "15" -> "16" [dir=forward tooltip="public-inheritance"] "15" -> "17" [dir=forward tooltip="template-instance"] "23" -> "24" [dir=forward tooltip="public-inheritance"] "23" -> "17" [dir=forward tooltip="template-instance"] "21" -> "22" [dir=forward tooltip="public-inheritance"] "21" -> "17" [dir=forward tooltip="template-instance"] "12" -> "9" [dir=forward tooltip="template-instance"] "13" -> "9" [dir=forward tooltip="template-instance"] "8" -> "9" [dir=forward tooltip="template-instance"] "18" -> "7" [dir=forward tooltip="template-instance"] "20" -> "7" [dir=forward tooltip="template-instance"] "16" -> "7" [dir=forward tooltip="template-instance"] "25" -> "7" [dir=forward tooltip="template-instance"] "6" -> "7" [dir=forward tooltip="template-instance"] "10" -> "7" [dir=forward tooltip="template-instance"] "24" -> "7" [dir=forward tooltip="template-instance"] "22" -> "7" [dir=forward tooltip="template-instance"] "3" -> "4" [dir=forward tooltip="usage"] "11" -> "12" [dir=forward tooltip="usage"] "5" -> "6" [dir=forward tooltip="usage"] "5" -> "8" [dir=forward tooltip="usage"] "2" -> "3" [dir=forward tooltip="usage"] "2" -> "5" [dir=forward tooltip="usage"] "2" -> "10" [dir=forward tooltip="usage"] "1" -> "2" [dir=forward tooltip="public-inheritance"] "1" -> "11" [dir=forward tooltip="usage"] "1" -> "13" [dir=forward tooltip="usage"] "1" -> "14" [dir=forward tooltip="usage"] "1" -> "25" [dir=forward tooltip="usage"] "17" -> "18" [dir=forward tooltip="public-inheritance"] "14" -> "15" [dir=forward tooltip="usage"] "14" -> "19" [dir=forward tooltip="usage"] "14" -> "21" [dir=forward tooltip="usage"] "14" -> "23" [dir=forward tooltip="usage"] }

end user class handling numerical representation of any linear form (LinearForm).

Public Functions

TermVector(const LcTerm<TermVector> &lctv)#

constructor from a linear combination of TermVector’s

TermVector(const LinearForm &lf, const EssentialConditions &ecs, const string_t &na)#

constructor with one essential boundary conditions

TermVector(const LinearForm &lf, const string_t &na)#

constructor with no essential boundary conditions

TermVector(const string_t &na = "")#

default constructor

TermVector(const SuTermVector &sutv, const string_t &na = "")#

constructor of a TermVector from a SuTermVector (full copy)

TermVector(const TermVector &tv, const string_t &na = "")#

copy constructor

inline TermVector(const TermVector &tv, const SymbolicFunction &sf)#

sf(TermVector)

inline TermVector(const TermVector &tv, const SymbolicFunction &sf, const char *na)#

sf(TermVector)

TermVector(const TermVector &tv, const SymbolicFunction &sf, const Parameter &p1)#

sf(TermVector)

inline TermVector(const TermVector &tv, const SymbolicFunction &sf, const string_t &na)#

sf(TermVector)

template<typename T>
TermVector(const TermVector &tv, const T&, const string_t &na)#

copy constructor with constant value

copy constructor with values set to a constant value (full copy of entries if not null)

inline TermVector(const TermVector &tv, funSC1_t &f)#

f(TermVector), complex, single unknown

inline TermVector(const TermVector &tv, funSC1_t &f, const char *na)#

f(TermVector), complex, single unknown

TermVector(const TermVector &tv, funSC1_t &f, const Parameter &p1)#

f(TermVector), complex, single unknown

inline TermVector(const TermVector &tv, funSC1_t &f, const string_t &na)#

f(TermVector), complex, single unknown

inline TermVector(const TermVector &tv, funSR1_t &f)#

f(TermVector), real, single unknown

inline TermVector(const TermVector &tv, funSR1_t &f, const char *na)#

f(TermVector), real, single unknown

TermVector(const TermVector &tv, funSR1_t &f, const Parameter &p1)#

f(TermVector), real, single unknown

inline TermVector(const TermVector &tv, funSR1_t &f, const string_t &na)#

f(TermVector), real, single unknown

inline TermVector(const TermVector &tv1, const TermVector &tv2, const SymbolicFunction &sf)#

sf(TermVector, TermVector)

inline TermVector(const TermVector &tv1, const TermVector &tv2, const SymbolicFunction &sf, const char *na)#

sf(TermVector, TermVector)

TermVector(const TermVector &tv1, const TermVector &tv2, const SymbolicFunction &sf, const Parameter &p1)#

sf(TermVector, TermVector)

inline TermVector(const TermVector &tv1, const TermVector &tv2, const SymbolicFunction &sf, const string_t &na)#

sf(TermVector, TermVector)

inline TermVector(const TermVector &tv1, const TermVector &tv2, const TermVector &tv3, const SymbolicFunction &sf)#

sf(TermVector, TermVector, TermVector)

inline TermVector(const TermVector &tv1, const TermVector &tv2, const TermVector &tv3, const SymbolicFunction &sf, const char *na)#

sf(TermVector, TermVector, TermVector)

TermVector(const TermVector &tv1, const TermVector &tv2, const TermVector &tv3, const SymbolicFunction &sf, const Parameter &p1)#

sf(TermVector, TermVector, TermVector)

inline TermVector(const TermVector &tv1, const TermVector &tv2, const TermVector &tv3, const SymbolicFunction &sf, const string_t &na = "")#

sf(TermVector, TermVector, TermVector)

inline TermVector(const TermVector &tv1, TermVector &tv2, funSC2_t &f)#

f(TermVector, TermVector), complex, single unknown

inline TermVector(const TermVector &tv1, TermVector &tv2, funSC2_t &f, const char *na)#

f(TermVector, TermVector), complex, single unknown

TermVector(const TermVector &tv1, TermVector &tv2, funSC2_t &f, const Parameter &p1)#

f(TermVector, TermVector), complex, single unknown

inline TermVector(const TermVector &tv1, TermVector &tv2, funSC2_t &f, const string_t &na)#

f(TermVector, TermVector), complex, single unknown

inline TermVector(const TermVector &tv1, TermVector &tv2, funSR2_t &f)#

f(TermVector, TermVector), real, single unknown

inline TermVector(const TermVector &tv1, TermVector &tv2, funSR2_t &f, const char *na)#

f(TermVector, TermVector), real, single unknown

TermVector(const TermVector &tv1, TermVector &tv2, funSR2_t &f, const Parameter &p1)#

f(TermVector, TermVector), real, single unknown

inline TermVector(const TermVector &tv1, TermVector &tv2, funSR2_t &f, const string_t &na)#

f(TermVector, TermVector), real, single unknown

inline TermVector(const Unknown &u, const GeomDomain &dom, const Function &f, const Function &gf, const char *na)#

interpolation value constructor for interpolation involving first derivative dofs

inline TermVector(const Unknown &u, const GeomDomain &dom, const Function &f, const Function &gf, const Function &g2f, const char *na)#

interpolation value constructor for interpolation involving second derivative dofs

inline TermVector(const Unknown &u, const GeomDomain &dom, const Function &f, const Function &gf, const Function &g2f, const string_t &na = "")#

interpolation value constructor for interpolation involving second derivative dofs

inline TermVector(const Unknown &u, const GeomDomain &dom, const Function &f, const Function &gf, const string_t &na = "")#

interpolation value constructor for interpolation involving first derivative dofs

TermVector(const Unknown &u, const GeomDomain &dom, const SuTermVector &sut, const string_t &na = "", bool useNearest = false, const Function *fmap = nullptr, bool errorOnOutDom = false, real_t tol = theLocateToleranceFactor)#

create a single unknown TermVector from a SuTermVector : tv(u)[i] = sut(Mi) with Mi nodes of u-interpolation designed to work with different interpolation or mesh (use interpolate function of tv) if Mi does not belong to the domain of tv, the projection Pi on the sut-domain is computed and used tv(u)[i]=sut(Pi) if d(Mi,Pi)<tol*elt_size

do not use if sut is defined on u-interpolation, use the ‘copy’ constructor TermVector(SuTermVector)

u : single unknown of the resulting TermVector d : domain where evaluate sut : SuTermVector source na : name of the TermVector (default=””) fmap : optional map function (default=0) errorOnOutDomain : if true stop construction if a node is not located else emit a warning (default=false) tol : tolerance factor controlling error/warning (default=theLocateToleranceFactor)

template<typename T>
inline TermVector(const Unknown &u, const GeomDomain &dom, const T &v)#

interpolation value constructor (anything), see SutermVector specialisation

template<typename T>
inline TermVector(const Unknown &u, const GeomDomain &dom, const T &v, const char *na)#

interpolation value constructor (anything), see SutermVector specialisation

inline TermVector(const Unknown &u, const TermVector &tv1, const TermVector &tv2)#

concatenate 2 scalar single unknown TermVector’s in a vector TermVector

inline TermVector(const Unknown &u, const TermVector &tv1, const TermVector &tv2, const char *na = "")#

concatenate 2 scalar single unknown TermVector’s in a vector TermVector

TermVector(const Unknown &u, const TermVector &tv1, const TermVector &tv2, const Parameter &p1)#

concatenate 2 scalar single unknown TermVector’s in a vector TermVector

construct vector TermVector from 2 scalar single unknown TermVector’s scalar TermVector’s have to be defined on the same space vu has to be a vector unknown at least d=2

inline TermVector(const Unknown &u, const TermVector &tv1, const TermVector &tv2, const string_t &na)#

concatenate 2 scalar single unknown TermVector’s in a vector TermVector

inline TermVector(const Unknown &u, const TermVector &tv1, const TermVector &tv2, const TermVector &tv3)#

concatenate 3 scalar single unknown TermVector’s in a vector TermVector

inline TermVector(const Unknown &u, const TermVector &tv1, const TermVector &tv2, const TermVector &tv3, const char *na)#

concatenate 3 scalar single unknown TermVector’s in a vector TermVector

TermVector(const Unknown &u, const TermVector &tv1, const TermVector &tv2, const TermVector &tv3, const Parameter &p1)#

concatenate 3 scalar single unknown TermVector’s in a vector TermVector

construct vector TermVector from 3 scalar single unknown TermVector’s scalar TermVector’s have to be defined on the same space vu has to be a vector unknown at least d=3

inline TermVector(const Unknown &u, const TermVector &tv1, const TermVector &tv2, const TermVector &tv3, const string_t &na)#

concatenate 3 scalar single unknown TermVector’s in a vector TermVector

inline TermVector(const Unknown &u, const TermVector &tv1, const TermVector &tv2, const TermVector &tv3, const TermVector &tv4)#

concatenate 4 scalar single unknown TermVector’s in a vector TermVector

inline TermVector(const Unknown &u, const TermVector &tv1, const TermVector &tv2, const TermVector &tv3, const TermVector &tv4, const char *na)#

concatenate 4 scalar single unknown TermVector’s in a vector TermVector

TermVector(const Unknown &u, const TermVector &tv1, const TermVector &tv2, const TermVector &tv3, const TermVector &tv4, const Parameter &p1)#

concatenate 4 scalar single unknown TermVector’s in a vector TermVector

construct vector TermVector from 4 scalar single unknown TermVector’s scalar TermVector’s have to be defined on the same space vu has to be a vector unknown at least d=4

inline TermVector(const Unknown &u, const TermVector &tv1, const TermVector &tv2, const TermVector &tv3, const TermVector &tv4, const string_t &na)#

concatenate 4 scalar single unknown TermVector’s in a vector TermVector

TermVector(SuTermVector *sutv, const string_t &na = "")#

constructor of a TermVector from a SuTermVector * (pointer copy)

virtual ~TermVector()#

destructor

VectorEntry *actual_entries() const#

return the actual pointer to entries (priority to scalar entry)

void adjustScalarEntries(const std::vector<DofComponent> &newcdofs)#

adjust global scalar entries to cdofs numbering given

adjust the global scalar entries to the cdofs numbering newcdofs when TermVector cdofs is included in newcdofs, new zeros are introduced (extension) when newcdofs is included in cdofs Termvector, coefficients are removed (restriction) else it is in a same time a restriction (removed cdofs) and an extension (omitted cdof) in any case, the coefficient may be permuted and cdofs TermVector = newcdofs at the end Note: unknowns and SuTermVectors are NOT updated

inline TermVector &applyBoundaryConditions(const EssentialConditions &ecs, const ReductionMethod &rm = ReductionMethod())#

apply essential conditions to a TermVector

TermVector &applyEssentialConditions(const EssentialConditions &ecs, const ReductionMethod &rm = ReductionMethod())#

apply essential conditions to a TermVector

TermVector &applyEssentialConditions(const SetOfConstraints &soc, const ReductionMethod &rm = ReductionMethod())#

< apply essential conditions to a TermVector (user tool); ReductionMethod not yet managed

Vector<complex_t> asComplexVector() const#

reinterpret TermVector as a complex Vector

Vector<real_t> asRealVector() const#

reinterpret TermVector as a real Vector

template<typename T>
Vector<T> &asVector(Vector<T> &v) const#

reinterpret TermVector as a raw Vector

inline it_mustv begin()#

iterator to the first element of the SuTermVector map

inline cit_mustv begin() const#

iterator to the first element of the SuTermVector map (const)

void build(const LinearForm &bf, const EssentialConditions *ecs, const std::vector<Parameter> &ps)#

effective constructor from bilinear form, essential conditions and options

template<typename T>
void buildTFromFct(const Unknown &u, const GeomDomain &dom, const T &v, const std::vector<Parameter> &ps)#

create a single unknown termvector

inline std::vector<DofComponent> &cdofs()#

access to cdofs_r vector (r/w)

inline const std::vector<DofComponent> &cdofs() const#

access to cdofs_r vector (r)

void changeUnknown(const Unknown &u, const Unknown &v, const Vector<number_t> &ci = Vector<number_t>(0))#

move SuTermVector unknown to an other

move SuTermVector unknown to an other consist in changing the unknown u of SutermVector by the unknown v (u and v must be defined on the same Space!) with an optional management of components of unknown, examples u a scalar unknown and v a scalar unknown: SuTermVector if not modified u a scalar unknown and v a 3 vector unknown, ci ={2} the SutermVector is changed to a 3 column vector: new sutv=[ [0 …0] [sutv] [0…0] ] u a 3-vector unknown and v a 3-vector unknown, ci ={2 3 1} the SutermVector is changed columns are permuted: new sutv=[ [sutv2] [sutv3] [sutv1] ] v may be equal to u in that case u a 4-vector unknown and v a 2-vector unknown, ci ={2 4} the SutermVector is changed columns are permuted: new sutv=[ [sutv2] [sutv4] ] u is replaced by v, v may be equal to u but be cautious if the result is not of the dimension of v because many operations are not supported in doubt, create a new unknown of the consistent dimension

inline void changeUnknown(const Unknown &u, number_t i)#

move SuTermVector unknown to an other (single unknown term)

inline void changeUnknown(const Unknown &u, number_t i, number_t j)#

move SuTermVector unknown to an other (single unknown term)

inline void changeUnknown(const Unknown &u, number_t i, number_t j, number_t k)#

move SuTermVector unknown to an other (single unknown term)

void changeUnknown(const Unknown &v, const Vector<number_t> &ci = Vector<number_t>(0))#

move SuTermVector unknown to an other (single unknown term)

virtual void clear()#

deallocate memory used by a TermVector

virtual void compute()#

compute TermVector

void compute(const LcTerm<TermVector> &lctv)#

compute TermVector from a linear combination

compute a LcTerm (linear combination of TermVectors) to a TermVector all the termvector’s have to be computed before and the current termvector is ‘void’ Note: when combination involved terms with component unknowns, it they are few to refer the same vector unknown they will be merged in the same term with vector unknown: suT_u1 + suT_u3 -> suT_u with [suT]_2=0 if only one component unknwow in term, it stay the same, say suT_2 -> suT_2

inline const Point &coords(const Unknown &u, number_t n) const#

< return n-th dof coords of unknown

inline const Point &coords(number_t n) const#

< return n-th dof coords of first unknown

void copy(const TermVector &tv, const string_t &na)#

copy a TermVector with renaming

const Dof &dof(const Unknown &u, number_t n) const#

return n-th dof of unknown

inline const Dof &dof(number_t n) const#

< return n-th dof of first unknown

number_t dofRank(const Dof &dof) const#

rank in first SuTermVector of a given dof

number_t dofRank(const Unknown &u, const Dof &dof) const#

rank in u-SuTermVector of a given dof

inline it_mustv end()#

iterator to the first element of the SuTermVector map

inline cit_mustv end() const#

iterator to the first element of the SuTermVector map (const)

inline VectorEntry *&entries()#

access to entries pointer (r/w)

inline const VectorEntry *entries() const#

access to entries pointer (r)

Value evaluate(const Point &P, bool useNearest = false, bool errorOnOutDom = true) const#

evaluate single unknown at a point (use interpolation method)

evaluate unknown at a point (use interpolation method) and return a value that may be a real/complex scalar or a real/complex vector

Value evaluate(const Point &P, const Element &elt) const#

evaluate single unknown at a point, element known (use interpolation method), faster

evaluate unknown at a point (use interpolation method) and return a value that may be a real/complex scalar or a real/complex vector

Value evaluate(const Unknown &u, const Point &P, bool useNearest = false, bool errorOnOutDom = true) const#

evaluate unknown at a point (use interpolation method)

evaluate unknown at a point (use interpolation method) and return a value that may be a real/complex scalar or a real/complex vector

Value evaluate(const Unknown &u, const Point &P, const Element &elt) const#

evaluate unknown at a point, element known (use interpolation method), faster

evaluate unknown at a point (use interpolation method) and return a value that may be a real/complex scalar or a real/complex vector

inline SuTermVector *firstSut()#

first SuTermVector as pointer, 0 if void TermVector

inline SuTermVector *firstSut() const#

first SuTermVector as pointer, 0 if void TermVector (const)

inline Value getValue(const Dof &dof) const#

access to vector component of first unknown term using dof

inline Value getValue(const Unknown &u, const Dof &dof) const#

access to vector component of unknown term using dof

Value getValue(const Unknown &u, number_t n) const#

access to vector component of unknown term (n>=1)

return value ot the n-th component of u-vector

inline Value getValue(number_t n) const#

access to vector component of first unknown term (n>=1)

bool hasBlock(const Unknown &u) const#

true if TermVector has a block (u)

void insert(const SuTermVector &sutv)#

insert a SuTermVector with full copy

void insert(const Unknown *u, SuTermVector *sutv)#

insert a SuTermVector in SuTerms map

void insert(SuTermVector *sutv)#

insert a SuTermVector with pointer copy

inline bool isSingleUnknown() const#

number of unknowns

inline bool isVoid() const#

true if no SuTermVector

inline const LinearForm &linearForm() const#

read access to linear form

Element &locateElement(const Point &P, bool useNearest = false, bool errorOnOutDom = true) const#

locate element of the single unknown TermVector Space containing P

Element &locateElement(const Unknown &u, const Point &P, bool useNearest = false, bool errorOnOutDom = true) const#

locate element of the unknown SuTermVector Space containing P

Element *locateElementP(const Point &P, bool useNearest = false, bool errorOnOutDom = false) const#

locate element of the single unknown TermVector Space containing P (pointer)

locate element of the single unknown TermVector Space containing P

Element *locateElementP(const Unknown &u, const Point &P, bool useNearest = false, bool errorOnOutDom = false) const#

locate element of the unknown SuTermVector Space containing P (pointer)

locate element of the unknown SuTermVector Space containing P

TermVector mapTo(const GeomDomain &dom, const Unknown &u, bool useNearest = false, bool errOutDom = true, Function *fmap = nullptr, real_t tol = theLocateToleranceFactor) const#

produce the mapped TermVector from current GeomDomains to a GeomDomain

produce the mapped TermVector from current GeomDomains to other GeomDomain the maps from dom to domains of current TermVector must be already defined, if not id is assumed

dom : arriving domain u : arriving unknown errorOnOutDom : if true the program stop on locating error, else the interpolated value is set to 0 fmap : optional mapping function from starting domain to arriving domain tol : tolerance factor used by locating error : d(P,dom) > tol * elt.size

it produces a new TermVector, act on SuTermVector’s, do not work for global representation !

void markAsComputed(bool = true)#

TermVector and SutermVector’s computed state = true or false.

complex_t maxValAbs() const#

return the value (in complex) of component being the largest one in absolute value

TermVector &merge(const TermVector &tv)#

merge a TermVector with preserving the current value when common dofs

merge a TermVector with preserving the current value when common dofs merge only SuTermVectors not global representation !!!

void mergeBlocks()#

tool to merge blocks related to the components of a same unknown

merge blocks referring to same vector unknown

  • when a block has a component of unknown, it is convert to its vector representation

  • when some blocks have different components of same unknown the blocks are really merged into a block with vector unknowns

virtual void name(const string_t &nam)#

update the name of a TermVector and its SuTermVectors

update the name of a TermVector and its SuTermVectors SuTermVector name is defined as follows: name(TermVector)_name(Unknown)

number_t nbDofs() const#

size of Termvector counted in dofs

number_t nbDofs(const Unknown &u) const#

return number of u-dofs

inline number_t nbOfUnknowns() const#

number of unknowns

real_t norm2() const#

quadratic norm

TermVector onDomain(const GeomDomain &dom) const#

restrict TermVector to a GeomDomain

template<typename T>
T &operator()(const std::vector<real_t> &p, T &v) const#

compute interpolated value of unknown at point (single unknown term)

TermVector operator()(const Unknown &u) const#

access to single unknown term vector as a TermVector

return single unknown term vector as TermVector (copy constructor like), useful to extract single unknown term from multiple unknowns term induce full copy

template<typename T>
T &operator()(const Unknown &u, const std::vector<real_t> &p, T &v) const#

compute interpolated value of unknown at point

template<typename T>
TermVector &operator*=(const T &t)#

operation U*=t

template algebraic operation on TermVectors

TermVector &operator+=(const TermVector &tv)#

operation U+=V

algebraic operations on TermVector for += and -= operations work as follows assumed that u=[t_u1 t_u2] v=[s_u1 s_u3] where u_i is the unknown related to a block of vector then u+=v => u=[(t_u1+s_u1) t_u2 s_u3] it means that += add blocks having the same unknown but also performs an union of blocks Note: these operations does not update scalar representation !!!

TermVector &operator-=(const TermVector &tv)#

operation U+=V

template<typename T>
TermVector &operator/=(const T &t)#

operation U*=t

EssentialCondition operator=(const complex_t &c)#

construct essential condition tv=c

TermVector &operator=(const LcTerm<TermVector> &lctv)#

assign operator from a linear combination of TermVector’s

TermVector &operator=(const TermVector &tv)#

assign operator

virtual void print(std::ostream &out) const#

print TermVector

TermVector &roundToZero(real_t aszero = std::sqrt(theEpsilon))#

round to zero all coefficients close to 0 (|.

| < aszero) apply constraints to a TermVector (not end user)

inline void saveToFile(const string_t &filename, bool encode) const#

save TermVector to file

void saveToFile(const string_t &filename, number_t prec = fullPrec, bool encode = false) const#

save TermVector to file

save TermVector to file in a raw format (values as columns ) if encodeName is true, the name of file includes some additionnal matrix informations newname = name(m_ValueType_StructType_p).ext m size of vector, p size of subvectors if StrucType=_vector

inline VectorEntry *&scalar_entries()#

access to entries pointer (r/w)

inline const VectorEntry *scalar_entries() const#

access to entries pointer (r)

void setUnknown(const Unknown &u)#

set the unknown of single unknown TermVector

inline void setValue(const Dof &dof, const Value &v)#

set value to vector component of first unknown term using dof

template<typename T>
inline void setValue(const GeomDomain &d, const T &t)#

set values of TermVector from T object, restricted to first unknown and a domain

inline void setValue(const GeomDomain &d, const TermVector &t)#

set values of TermVector from TermVector, restricted to first unknown and a domain

inline void setValue(const TermVector &t)#

set values of TermVector from TermVector, restricted to first unknown

inline void setValue(const Unknown &u, const Dof &dof, const Value &v)#

set value to vector component of unknown term using dof

template<typename T>
void setValue(const Unknown &u, const GeomDomain &dom, const T &val)#

set values of TermVector from T object, restricted to an unknown and a domain

inline void setValue(const Unknown &u, const GeomDomain &dom, const TermVector &tv)#

set values of TermVector from TermVector, restricted to an unknown and a domain

inline void setValue(const Unknown &u, const TermVector &tv)#

set values of TermVector from TermVector, restricted to an unknown

void setValue(const Unknown &u, number_t n, const complex_t &c)#

set complex value to vector component of unknown term (n>=1)

void setValue(const Unknown &u, number_t n, const real_t &r)#

set real value to vector component of unknown term (n>=1)

void setValue(const Unknown &u, number_t n, const std::vector<complex_t> &vc)#

set complex vector value to vector component of unknown term (n>=1)

void setValue(const Unknown &u, number_t n, const std::vector<real_t> &vr)#

set real vector value to vector component of unknown term (n>=1)

void setValue(const Unknown &u, number_t n, const Value &val)#

set value to vector component of unknown term (n>=1)

inline void setValue(number_t n, const complex_t &c)#

set complex value to vector component of first unknown term (n>=1)

inline void setValue(number_t n, const real_t &r)#

set real value to vector component of first unknown term (n>=1)

inline void setValue(number_t n, const std::vector<complex_t> &cv)#

set complex vector value to vector component of first unknown term (n>=1)

inline void setValue(number_t n, const std::vector<real_t> &rv)#

set real vector value to vector component of first unknown term (n>=1)

inline void setValue(number_t n, const Value &v)#

set value to vector component of first unknown term (n>=1)

number_t size() const#

size of Termvector counted in scalar

SuTermVector &subVector()#

access to first unknown term vector

const SuTermVector &subVector() const#

access to first unknown term vector (const)

SuTermVector &subVector(const Unknown &u)#

access to single unknown term vector

const SuTermVector &subVector(const Unknown &u) const#

access to single unknown term vector (const)

SuTermVector &subVector(const Unknown *u)#

access to single unknown term vector

const SuTermVector &subVector(const Unknown *u) const#

access to single unknown term vector (const)

SuTermVector *subVector_p(const Unknown *u)#

access to single unknown term vector pointer

const SuTermVector *subVector_p(const Unknown *u) const#

access to single unknown term vector pointer (const)

TermVector &toAbs()#

change to abs(U)

TermVector &toComplex()#

change representation to complex

TermVector &toConj()#

change to conj(U)

const Function &toFunction() const#

return a function handling the TermVector (restrict to single unknown TermVector)

void toGlobal(bool keepSuTerms = false)#

go to global scalar representation of TermVector

create scalar global representation of TermVector make scalar representations of SuTermVectors’s if not exist, and merge it in a scalar global representation by allocating scalar_entries_p and setting the cdofs vectors keepSuterms: if false (default value), SutermVector entries are deleted

TermVector &toImag()#

change to imaginary part of U

void toLocal(bool keepGlobal = false)#

go to local representation of TermVector

create local representation of TermVector from global scalar representation from global scalar representation reallocate the SuTermVector’s in their standard representation (vector if it is) keepGlobal: if false (default value), scalar_entries is deallocated

TermVector &toReal()#

change to real part of U

void toScalar(bool keepEntries = false)#

go to scalar representation of TermVector (done on SuTermVectors)

create scalar representation of TermVector for each SuTermVector (if computed, entries_!=nullptr), if not exists create its scalar representation (set scalar_entries_p and cdofs vectors) if SuTermVector is already scalar, scalar_entries_p = entries_p NOTE: scalar_entries_p of TermVector is not update by this function (see toGlobal function) keepEntries: if false (default value), SutermVector non scalar entries are deleted

void toVector(bool keepEntries = false)#

return to vector representations from scalar representations (done on SuTermVectors)

create vector representation of each SuTermVectors (if vector uknown) from their scalar representation (have to exist) if SuTermVector has a scalar unknown, entries_p = scalar_entries_p keepEntries: if false (default value), SutermVector scalar entries are deleted

const Unknown *unknown(number_t i = 1) const#

return ith unknown as pointer (i>=1)

std::set<const Unknown*> unknowns() const#

return set of Unknowns

virtual std::set<const Space*> unknownSpaces() const#

list of involved unknown spaces

ValueType valueType() const#

return value type (_real if all SuTermVector’s are real else _complex)