OOF2: The Manual
This section has not yet been updated for OOF2 version 2.1. A partial discussion of the differences between the 2.0 and 2.1 extension APIs may be found at http://www.ctcms.nist.gov/oof/oof2/property_api_21.html.
Finite element problems which lead to a symmetric stiffness matrix can be solved efficiently by the conjugate gradient method. OOF2 needs to be told how to construct a symmetric matrix, though.
Consider a simple elasticity problem. The degrees of freedom are the components of the displacement at each node of the mesh. The equations are the components of the force balance at each node. In the stiffness matrix, degrees of freedom correspond to columns and equations correspond to rows. The matrix will be symmetric if the columns and rows are ordered so that the force component and node of the nth row are the same as the displacement component and node of the nth column.
In general, this correspondence is not trivial. If the stress in the example above came from material properties other than elasticity, the matrix would not necessarily be symmetric. Including thermal expansion can make an elasticity problem asymmetric.
establishes the correspondence between
components that is necessary to build a symmetric matrix. After
conjugatePair like this:
from oof2.SWIG.engine.conjugate import conjugatePair conjugatePair(proptype, equation, eqncomp, field, fieldcomp)
proptype is the
Property that will be symmetrized by this conjugacy
equation is an
field is a
Field object, and
objects or lists of them. For example, the following code
establishes the correspondence between the
x and y components of
the displacement field and the force balance equation
import statements have been omitted for
ForceBalanceEquation = getEquation('Force_Balance') Displacement = getCompoundField('Displacement') x = VectorFieldIndex(0) y = VectorFieldIndex(1) conjugatePair("Elasticity", ForceBalanceEquation, [x,y], Displacement, [x, y])
conjugatePair is necessary but not
sufficient for OOF2 to create symmetric stiffness matrices.
Properties that contribute to the stiffness matrix must
also support symmetry. This is discussed in Section 8.4.
It is not required that
called on all defined fields and equations, but failing to do so
will make the conjugate
gradient solver unavailable for problems involving these
fields and equations.
It is also not necessary to call the
conjugatePair for the predefined fields in
OOF2, since conjugacy is predefined for these fields and
equations in the