addControlLevel_FEB

Below is a demonstration of the features of the addControlLevel_FEB function

Contents

clear; close all; clc;

Syntax

[domNode]=addControlLevel_FEB(domNode,FEB_struct);

Description

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

Examples

Example: Defining control section

%Example data
numSteps=25;

%Control section
FEB_struct.Control.AnalysisType='static';
FEB_struct.Control.Properties={'time_steps','step_size',...
                               'max_refs','max_ups',...
                               'dtol','etol','rtol','lstol'};

FEB_struct.Control.Values={numSteps,1/numSteps,25,0,0.001,0.01,0,0.9};
FEB_struct.Control.TimeStepperProperties={'dtmin','dtmax','max_retries','opt_iter'};
FEB_struct.Control.TimeStepperValues={(1/(100*numSteps)),1/numSteps,5,10};


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

% %Add geometry information (Surfaces)
% domNode=addGeometryLevel_FEB(domNode,FEB_struct);

%Add boundary condition information
domNode=addControlLevel_FEB(domNode,FEB_struct);
Adding Control level
View example XML string
XML_str = xmlwrite(domNode);
disp(XML_str);
<?xml version="1.0" encoding="utf-8"?>
<febio_spec>
   <Control>
      <time_steps>25.000000</time_steps>
      <step_size>0.040000</step_size>
      <max_refs>25.000000</max_refs>
      <max_ups>0.000000</max_ups>
      <dtol>0.001000</dtol>
      <etol>0.010000</etol>
      <rtol>0.000000</rtol>
      <lstol>0.900000</lstol>
      <analysis type="static"/>
      <time_stepper>
         <dtmin>0.000400</dtmin>
         <dtmax>0.040000</dtmax>
         <max_retries>5.000000</max_retries>
         <opt_iter>10.000000</opt_iter>
      </time_stepper>
   </Control>
</febio_spec>

GIBBON www.gibboncode.org

Kevin Mattheus Moerman, [email protected]

GIBBON footer text

License: https://github.com/gibbonCode/GIBBON/blob/master/LICENSE

GIBBON: The Geometry and Image-based Bioengineering add-On. A toolbox for image segmentation, image-based modeling, meshing, and finite element analysis.

Copyright (C) 2017 Kevin Mattheus Moerman

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.