addGlobalsLevel_FEB

Below is a demonstration of the features of the addGlobalsLevel_FEB function

Contents

clear; close all; clc;

Syntax

[domNode]=addGlobalsLevel_FEB(domNode,FEB_struct);

Description

This function adds the globals information to the input XML data (domNode) based on the input febio structure (FEB_struct).

Examples

Example: Default globals

%Initialize docNode object
domNode = com.mathworks.xml.XMLUtils.createDocument('febio_spec');

%Add boundary condition information
domNode=addGlobalsLevel_FEB(domNode,[]);
Adding Globals level
View example XML string
XML_str = xmlwrite(domNode);
disp(XML_str);
<?xml version="1.0" encoding="utf-8"?>
<febio_spec>
   <Globals>
      <Constants>
         <T>0.0000000e+00</T>
         <R>0.0000000e+00</R>
         <Fc>0.0000000e+00</Fc>
      </Constants>
   </Globals>
</febio_spec>

Example: Manually defined globals

FEB_struct.Globals.Constants.Names={'T','R','Fc'};
FEB_struct.Globals.Constants.Entries={0,0,0};

%Initialize docNode object
domNode = com.mathworks.xml.XMLUtils.createDocument('febio_spec');

%Add boundary condition information
domNode=addGlobalsLevel_FEB(domNode,FEB_struct);
Adding Globals level
View example XML string
XML_str = xmlwrite(domNode);
disp(XML_str);
<?xml version="1.0" encoding="utf-8"?>
<febio_spec>
   <Globals>
      <Constants>
         <T>0.0000000e+00</T>
         <R>0.0000000e+00</R>
         <Fc>0.0000000e+00</Fc>
      </Constants>
   </Globals>
</febio_spec>

GIBBON www.gibboncode.org

Kevin Mattheus Moerman, [email protected]