Modular Modeling >> MmodD Type's > Class p1 > p1

p1

Initialise linear simplicial element.

Calling Sequence

u=p1(th)
u=p1(th,string_expression)

Parameters

th :

a 2d or 3d mesh of type tri2d or tet3d

string_expression :

a string corresponding to an expression to be interpolated on the point of the mesh

u :

a p1_2d or p1_3d variable

Description

This function create a typed list of fields :

Id : a string identity (empty string by default or string_expression )

geo : a string of the name of the mesh

Node : a real array of node values

Examples

th=square2d(5,5)             // square2d is a tri2d
u=p1(th,'sin(x)/(1+x*y)')
vartool(u)
mh=tcube3d(10,10,10)
v=p1(mh)

Opertor overloading

All algebraic operations, combinations with the usual functions are permitted.

r=u^2+1+sqrt(1+abs(u))
w=1/(v^2+1)

Authors

  • T. C.