Domain Object

The Domain object provides the interface for C++ representations of a domain that is discretized by Finite Elements.

The Domain instance is created and owned by the Model instance. The number of functions of the Domain interface is quite large, but many of the functions are specific to certain kinds of analyses like adaptive refinement or contact analysis. The minimum functionality that a Domain class must provide in order to work in conjunction with a Solver instance is:

  • A forward iterator on the Node instances to compute and initialize the global degree-of-freedom numbering.

  • A forward iterator on the Element instances to assemble the first and/or the second variation.

  • A function to get the linear dependencies between the degrees-of-freedom.

The specialization of the Domain for the B2000++ is found in src/io/b2000_db/b2000_db_v3/b2domain_database. We have a closer look at the Domain::set_model() function. Domain::set_model() loads the domain, i.e the FE model data from the MemCom database in the relevant objects by creating the object with the factory. The function

  1. Loads the transformations.

  2. Sets up the node type table from dataset NODE-PARAMETERS.

  3. Loads the list of all active branches (dataset ADIR).

  4. For each branch (mesh), loads node and element data, and establishes connectivity.

  5. Loads and set up JCTS (branch inter-connectivity).

To demonstrate the factory mechanism, an excerpt from b2domain_database that creates the ElementProperty objects:

// b2domain_database.H:
...
typedef std::map<int, std::pair<MaterialProperty*,
   FortranElementProperty::type_t*> > Materials;
Materials materials;
...

// b2domain_database.C:

...
// Create the ElementProperty factory objects for the materials.
for (Materials::iterator i = materials.begin(); i != materials.end(); ++i) {
    const int mid = i->first;
    try {
         i->second.second = FortranElementProperty::type.get_subtype(
                 dbtypes_mid[mid], element::module);
    } catch (KeyError& e) {
         error...
    }
}
...