Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Rightclick on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: Steffen Petersen <steffen.petersen@tu...>  20060117 20:55:55

Shengli Xu schrieb: > In example 8 : > ...... > if (fabs(curr_node(2)z_coo) < TOLERANCE) > { > // The global number of the respective degree of freedom. > unsigned int dn = curr_node.dof_number(0,0,0); > > // The penalty parameter. > const Real penalty = 1.e10; > ...... > > the function dof_number(0,0,0) is unsigned int > DofObject::dof_number(const unsigned int s, const unsigned int var, > const unsigned int comp). What is comp? Is it for parallel? Comp is the number of components (for variable var in system s) associated with a specific DofObject. For the Lagrange elements used here, each node has exactly one degree of freedom (and ther is only one variable), which means that there is only one component (0) and we get the corresponding dof number from the call dof_number(0,0,0). Note that for other finite element types more than one degree of freedom can be associated with one node, and there can also be dofs that belong to elements. > For example in 2D , the first defined variable is u, the second defined > variable is v. If I want to set the boundary of v. Is it right that > dof_number(0,1,0)? Yes. > Can libMesh read boundary information from input file? What is the > format ? Is there some examples about it? > Can libMesh read all information from input file. Don't set the node > boundary condition like in Example 8 manually. You may have a look at example 7. In this example the rhs vector is read from a file. In a similar manner other boundary conditions can be defined in such an input file. Steffen 