how to tag boundary/material point

Asked by ceguo

Hi everyone,

The function setTaggedValue seems very convenient to apply different boundary conditions or set different material properties. But how to do the tagging in the script? For example how to tag a boundary which I want to apply a certain condition but its position is changing during the test (I am using Rectangle to construct the domain).

Also to set a different material property like Young's modulus to a certain Gauss point in FunctionSpace, can I tag the Gauss point?

Ning

Question information

Language:
English Edit question
Status:
Solved
For:
esys-escript Edit question
Assignee:
No assignee Edit question
Solved by:
Lutz Gross
Solved:
Last query:
Last reply:
Revision history for this message
Best Lutz Gross (l-gross) said :
#1

A tag stays with the object the tag was assigned to. For the Rectangle the elements on the top face are tagged by "top". If the Rectangle is deformed by setting new coordinates the elements which were on the top face in the initial configuration keep the "top" even if they would now be at the bottom. One could call the a Lagrangian approach. The same applied to the usage of masks which is typically used to set constraints and surface boundary conditions in simple geometrical set-ups, e.g.

   domain=Rectangle(...)
   x=domain.getX()
  top_mask_0=whereZero(x[1]-sup(x[1]))
  top_mask_1=insertTaggedValues(Scalar(0.,ContinuousDomain(domain)), { "top", 1.} )
  domain.setX( ... )

At this point top_mask_0 and top_mask_1 are 1 for all nodes of the mesh which were located on the top face of the rectangle in the initial configuration.

You cannot tag Gauss points but all Gauss points in an element. In the context of what I just said you may not need tagging.

Revision history for this message
ceguo (hhh-guo) said :
#2

Thanks Lutz Gross, that solved my question.