Link Search Menu Expand Document
Converted document
 Subsubsection 3.1.3.1: Include Keyword Up Subsection 3.1.3: Multiple Input Files Section 3.2: Module Section 

3.1.3.2 The `from' Attribute

The from attribute can be used to include sections from other files. All the main sections defined in Section 3.1↑ support the from attribute which can be used to load the section from another input file. For example, to load the Material section from the file mat.feb, defining the Material section in the control input file as follows.
<Material from="mat.feb"/>
FEBio will now read the Material section from this child file. The child file must be a valid FEBio input file, meaning it must begin with the febio_spec root section, but does not have to be complete. For example, the file mat.feb only needs to define the Material section. However, the child file may contain other sections. In that case, only the section referenced in the control file will be read from the child file. For example, if the file in.feb contains both the Material and the Mesh section, the control file can read both these sections as follows.
<Material from="in.feb"/>
<Mesh from="in.feb"/>
To give a more concrete example, assume that the Material, Mesh, and Boundary sections are defined in the files mat.feb, geom.feb, and bc.feb respectively. The control input file could then look like the following.
<febio_spec version="3.0">
  <Control>
    <time_steps>10</time_steps>
    <step_size>0.1</step_size>
  </Control>
  <Material from="mat.feb"/>
  <Mesh from="geom.feb"/>
  <Boundary from="bc.feb"/>
</febio_spec>
Notice that the Control section is still defined in the control file. The control file can contain a combination of explicit section definitions and referenced sections using the from attribute. As mentioned above, the control file is used to run the model in FEBio. So, if the control file is called model.feb then the model is run as follows.
>febio –i model.feb
When FEBio parses the control file it will automatically parse the referenced child files it encounters in the control input file.


 Subsubsection 3.1.3.1: Include Keyword Up Subsection 3.1.3: Multiple Input Files Section 3.2: Module Section