Added or adjusted documentation to match toolbox requirements

parent 9d7e4523
......@@ -4,6 +4,16 @@ classdef (Abstract)itaAbstract3DModelVisualizer < handle
% Parameters for the plot are defined using class properties.
% Adjusting these leads to a real-time update the plot (if
% autoRefresh is set to true).
%
% See also itaAc3dVisualizer, itaComsolModelVisualizer
%
% Reference page in Help browser
% <a href="matlab:doc itaAbstract3DModelVisualizer">doc itaAbstract3DModelVisualizer</a>
% <ITA-Toolbox>
% This file is part of the ITA-Toolbox. Some rights reserved.
% You can find the license for this m-file in the license.txt file in the ITA-Toolbox folder.
% </ITA-Toolbox>
properties(Access = protected)
mModel; %Stores the model which is to be visualized
......
classdef itaAc3dVisualizer < itaAbstract3DModelVisualizer
%itaAc3dVisualizer This class is used to visualize an AC3D model.
%itaAc3dVisualizer This class is used to visualize an itaAc3dModel.
% Parameters for the plot are defined using class properties.
% Adjusting these leads to a real-time update the plot (if
% autoRefresh is set to true).
%
% See also itaAc3dVisualizer, itaAc3dModel
%
% Reference page in Help browser
% <a href="matlab:doc itaAc3dVisualizer">doc itaAc3dVisualizer</a>
% <ITA-Toolbox>
% This file is part of the ITA-Toolbox. Some rights reserved.
% You can find the license for this m-file in the license.txt file in the ITA-Toolbox folder.
% </ITA-Toolbox>
properties(Hidden = true)
axesMapping = [1 -3 2]; %Maps data from .ac3d file to fit to the plot (default is no transform)
......
classdef itaComsolModelVisualizer < itaAbstract3DModelVisualizer
%itaComsolModelVisualizer Summary of this class goes here
% Detailed explanation goes here
%itaComsolModelVisualizer This class is used to visualize an itaComsolModel.
% Parameters for the plot are defined using class properties.
% Adjusting these leads to a real-time update the plot (if
% autoRefresh is set to true).
%
%
% See also itaAc3dVisualizer, itaComsolModel, itaComsolServer
%
% Reference page in Help browser
% <a href="matlab:doc itaComsolModelVisualizer">doc itaComsolModelVisualizer</a>
% <ITA-Toolbox>
% This file is part of the ITA-Toolbox. Some rights reserved.
% You can find the license for this m-file in the license.txt file in the ITA-Toolbox folder.
% </ITA-Toolbox>
properties(Access = private)
mMeshPlotHandles;
......
......@@ -6,6 +6,17 @@ classdef itaComsolImpedance < handle
% itaMaterial or itaSuper.Therefore. suitable physics and interpolation
% nodes are created and linked apropriately. All comsol nodes
% representing this impedance are stored for later modification.
%
% See also itaComsolModel, itaComsolServer, itaComsolSource,
% itaComsolReceiver
%
% Reference page in Help browser
% <a href="matlab:doc itaComsolImpedance">doc itaComsolImpedance</a>
% <ITA-Toolbox>
% This file is part of the ITA-Toolbox. Some rights reserved.
% You can find the license for this m-file in the license.txt file in the ITA-Toolbox folder.
% </ITA-Toolbox>
properties(Access = private)
mModel;
......
classdef itaComsolModel < handle
%itaComsolModel Interface to adjust work with comsol model
% This class takes an existing comsol model and provides interfaces
% to adjust certain parameters such as boundary conditions
% (impedances) and sources. Also provides the function to run a
% simulation and gather results in ita-formats.
%
%itaComsolModel Interface to adjust and work with Comsol models
% This class represents a model tree similar to the one within
% Comsol. Each child node of a model is represented by a particular
% class (e.g. the physics node is represented by itaComsolPhysics).
% Through these sub-classes it provides interfaces to adjust certain
% parameters or access data. An overview is given below. More details
% can be found in the documentation of the respective classes.
%
% Note, that it is crucial to define the basis of the comsol model in
% Comsol itself. This includes:
% -Geometry
......@@ -15,7 +17,7 @@ classdef itaComsolModel < handle
% -Mesh
% -Study
%
% This class is able to create/adjust:
% Using an itaComsolModel and its related classes, it is possible to create/adjust:
% -Global Definitions
% -Interpolations
% -Geometry
......@@ -26,11 +28,22 @@ classdef itaComsolModel < handle
% -frequency dependent values for boundary impedances
% -frequency dependent source parameters (velocity / pressure)
% -Mesh
% -... ()
% -mesh size
% -Result
% -retrieve results in ita-formats
% -Study
% -frequency vector
% -run simulation
% -Batch
% -...
% -create batch commands to run simulation
%
% See also itaComsolServer, itaComsolBatch, itaComsolExport,
% itaComsolFunction, itaComsolGeometry, itaComsolMaterial,
% itaComsolMesh, itaComsolParameters, itaComsolPhysics,
% itaComsolResult, itaComsolSelection, itaComsolStudy
%
% Reference page in Help browser
% <a href="matlab:doc itaComsolModel">doc itaComsolModel</a>
% <ITA-Toolbox>
% This file is part of the ITA-Toolbox. Some rights reserved.
......
......@@ -4,6 +4,17 @@ classdef itaComsolReceiver < handle
% for a given itaComsolModel using an itaReceiver. Therefore depending
% on the receiver type, suitable geometry nodes are created. All comsol
% nodes representing this receiver are stored for later modification.
%
% See also itaComsolModel, itaComsolServer, itaComsolSource,
% itaComsolImpedance
%
% Reference page in Help browser
% <a href="matlab:doc itaComsolReceiver">doc itaComsolReceiver</a>
% <ITA-Toolbox>
% This file is part of the ITA-Toolbox. Some rights reserved.
% You can find the license for this m-file in the license.txt file in the ITA-Toolbox folder.
% </ITA-Toolbox>
properties(Access = private)
mModel;
......
classdef itaComsolServer < handle
%itaComsolServer Interface to start/stop and connect/disconnect
%Comsol Server via Matlab LiveLink
% Also allows to remove comsol models from the server
% Also allows to remove comsol models from the server.
%
% Information on the server and LiveLink path are stored in an ini-file.
% This file is created the first time a connection is established.
%
% See also itaComsolModel
%
% Reference page in Help browser
% <a href="matlab:doc itaComsolServer">doc itaComsolServer</a>
% <ITA-Toolbox>
% This file is part of the ITA-Toolbox. Some rights reserved.
......
......@@ -5,6 +5,17 @@ classdef itaComsolSource < handle
% on the source type, suitable physics, geometry and interpolation
% nodes are created and linked apropriately. All comsol nodes
% representing this source are stored for later modification.
%
% See also itaComsolModel, itaComsolServer, itaComsolReceiver,
% itaComsolImpedance
%
% Reference page in Help browser
% <a href="matlab:doc itaComsolSource">doc itaComsolSource</a>
% <ITA-Toolbox>
% This file is part of the ITA-Toolbox. Some rights reserved.
% You can find the license for this m-file in the license.txt file in the ITA-Toolbox folder.
% </ITA-Toolbox>
properties(Access = private)
mModel;
......
......@@ -3,6 +3,16 @@ classdef itaComsolBatch < itaComsolNode
%to run models in batch mode
% Note, that this class also provides static functions to create and
% execute windows command lines to simulate Comsol models from batch.
%
% See also itaComsolModel, itaComsolNode
%
% Reference page in Help browser
% <a href="matlab:doc itaComsolBatch">doc itaComsolBatch</a>
% <ITA-Toolbox>
% This file is part of the ITA-Toolbox. Some rights reserved.
% You can find the license for this m-file in the license.txt file in the ITA-Toolbox folder.
% </ITA-Toolbox>
%% Constructor
methods
......
classdef itaComsolExport < itaComsolNode
%itaComsolExport Interface to the result.export nodes of an itaComsolModel
% ...
% Can run child nodes to export Comsol data to files (e.g. csv)
%
% See also itaComsolModel, itaComsolNode, ita_read_comsol_csv
%
% Reference page in Help browser
% <a href="matlab:doc itaComsolExport">doc itaComsolExport</a>
% <ITA-Toolbox>
% This file is part of the ITA-Toolbox. Some rights reserved.
% You can find the license for this m-file in the license.txt file in the ITA-Toolbox folder.
% </ITA-Toolbox>
%% Constructor
methods
......
classdef itaComsolFunction < itaComsolNode
%itaComsolFunction Interface to the func (=function) nodes of an itaComsolModel
% ...
% Can be used to create interpolation nodes in Comsol that represent
% frequency dependent functions. Can also represent complex-valued
% functions using one interpolation for the real and one for the
% imaginary part.
%
% See also itaComsolModel, itaComsolNode
%
% Reference page in Help browser
% <a href="matlab:doc itaComsolFunction">doc itaComsolFunction</a>
% <ITA-Toolbox>
% This file is part of the ITA-Toolbox. Some rights reserved.
% You can find the license for this m-file in the license.txt file in the ITA-Toolbox folder.
% </ITA-Toolbox>
%% Constructor
methods
......@@ -86,6 +99,9 @@ classdef itaComsolFunction < itaComsolNode
end
methods(Static = true)
function expression = GetComplexFunctionExpression(realInterpolationNode, imagInterpolationNode)
%Returns a function expression giving two interpolation nodes
% The expression will look like this:
% tagReal(freq) + i*tagImag(freq)
realFuncName = char(realInterpolationNode.tag);
imagFuncName = char(imagInterpolationNode.tag);
expression = [realFuncName '(freq) + i*' imagFuncName '(freq)'];
......
classdef itaComsolGeometry < itaComsolNode
%itaComsolGeometry Interface to the geom (=geometry) nodes of an itaComsolModel
% ...
% Can be used to create certain types of geometry that refer to
% objects such as itaSource or itaReceiver. This is done using the
% Create...-functions of this class.
% These functions are given a unique tag. Existing geometries can be
% adjusted by the same function that created them using the same tag.
%
% See also itaComsolModel, itaComsolNode, itaComsolSource,
% itaComsolReceiver
%
% Reference page in Help browser
% <a href="matlab:doc itaComsolGeometry">doc itaComsolGeometry</a>
% <ITA-Toolbox>
% This file is part of the ITA-Toolbox. Some rights reserved.
% You can find the license for this m-file in the license.txt file in the ITA-Toolbox folder.
% </ITA-Toolbox>
%% Constructor
methods
......
classdef itaComsolMaterial < itaComsolNode
%itaComsolMaterial Interface to the material nodes of an itaComsolModel
% ...
% This class is just a place-holder so far and has no functionality.
%
% See also itaComsolModel, itaComsolNode
%
% Reference page in Help browser
% <a href="matlab:doc itaComsolMaterial">doc itaComsolMaterial</a>
% <ITA-Toolbox>
% This file is part of the ITA-Toolbox. Some rights reserved.
% You can find the license for this m-file in the license.txt file in the ITA-Toolbox folder.
% </ITA-Toolbox>
%% Constructor
methods
......
classdef itaComsolMesh < itaComsolNode
%itaComsolMesh Interface to the mesh nodes of an itaComsolModel
% ...
% Can be used to access and adjust the size nodes of a mesh.
%
% See also itaComsolModel, itaComsolNode
%
% Reference page in Help browser
% <a href="matlab:doc itaComsolMesh">doc itaComsolMesh</a>
% <ITA-Toolbox>
% This file is part of the ITA-Toolbox. Some rights reserved.
% You can find the license for this m-file in the license.txt file in the ITA-Toolbox folder.
% </ITA-Toolbox>
%% Constructor
methods
......
......@@ -15,6 +15,16 @@ classdef (Abstract)itaComsolNode < handle
% -Batch
% -Results
% Use mphnavigator() on a comsol model for more information
%
% See also itaComsolModel
%
% Reference page in Help browser
% <a href="matlab:doc itaComsolNode">doc itaComsolNode</a>
% <ITA-Toolbox>
% This file is part of the ITA-Toolbox. Some rights reserved.
% You can find the license for this m-file in the license.txt file in the ITA-Toolbox folder.
% </ITA-Toolbox>
properties(Access = protected)
mModel; %itaComsolModel object
......
classdef itaComsolParameters < itaComsolNode
%itaComsolParameters Interface to the param (=parameter) nodes of an itaComsolModel
% ...
% Allows to list the parameters of the Comsol model and adjust their
% values.
%
% See also itaComsolModel, itaComsolNode
%
% Reference page in Help browser
% <a href="matlab:doc itaComsolParameters">doc itaComsolParameters</a>
% <ITA-Toolbox>
% This file is part of the ITA-Toolbox. Some rights reserved.
% You can find the license for this m-file in the license.txt file in the ITA-Toolbox folder.
% </ITA-Toolbox>
%% Constructor
......
classdef itaComsolPhysics < itaComsolNode
%itaComsolPhysics Interface to the physics node of an itaComsolModel
% ...
% Allows to adjust parameters of a comsol physics node. Also allows
% to create new nodes that represent certain acoustic properties
% (e.g. for sources or boundaries).
% This is done using the Create...-functions of this class. These
% functions are given a unique tag. Existing physic nodes can be
% adjusted by the same function that created them using the same tag.
%
% See also itaComsolModel, itaComsolNode, itaComsolSource,
% itaComsolImpedance
%
% Reference page in Help browser
% <a href="matlab:doc itaComsolPhysics">doc itaComsolPhysics</a>
% <ITA-Toolbox>
% This file is part of the ITA-Toolbox. Some rights reserved.
% You can find the license for this m-file in the license.txt file in the ITA-Toolbox folder.
% </ITA-Toolbox>
%% Constructor
methods
......
classdef itaComsolResult < handle
%itaComsolResult Interface to access simulation results of an
%itaComsolModel object
% Detailed explanation goes here
% Allows to evaluate the results of a study at the mesh nodes or
% given coordintas. The result are then returned as an itaResult
% object with one channel per given coordinate.
%
% Note:
% The direct data import only works for FEM simulation. For BEM,
% simulations data has to be exported to .csv files and before being
% imported into Matlab (see itaComsolExport & ita_read_comsol_csv).
%
% See also itaComsolModel, itaComsolNode
%
% Reference page in Help browser
% <a href="matlab:doc itaComsolResult">doc itaComsolResult</a>
% <ITA-Toolbox>
% This file is part of the ITA-Toolbox. Some rights reserved.
% You can find the license for this m-file in the license.txt file in the ITA-Toolbox folder.
% </ITA-Toolbox>
properties(Access = private)
mModel;
......
classdef itaComsolSelection < itaComsolNode
%itaComsolSelection Interface to the selection nodes of an itaComsolModel
% ...
% Can be used to quickly access all Comsol selection nodes of certain
% dimension (0D, 1D, ..., 3D). Furthermore, it allows to use filters
% to further specify which selections are to be returned (see
% itaComsolSelection.filters). Also allows to access a selection node
% using its name.
%
% See also itaComsolModel, itaComsolNode
%
% Reference page in Help browser
% <a href="matlab:doc itaComsolSelection">doc itaComsolSelection</a>
% <ITA-Toolbox>
% This file is part of the ITA-Toolbox. Some rights reserved.
% You can find the license for this m-file in the license.txt file in the ITA-Toolbox folder.
% </ITA-Toolbox>
%% Constructor
methods
......
classdef itaComsolStudy < itaComsolNode
%itaComsolStudy Interface to the study nodes of an itaComsolModel
% ...
% Allows to run simulations from Matlab and adjust certain study
% parameters such as the frequency vector.
%
% Furthermore it is possible to run a parametric sweep from Matlab:
% Therefore, a series of simulations where a Comsol parameter is a
% changed for each simulation is executed independently. The results
% are stored in different files. This reduces the amount of memory
% compared to running a parametric sweep from Comsol.
%
% See also itaComsolModel, itaComsolNode
%
% Reference page in Help browser
% <a href="matlab:doc itaComsolStudy">doc itaComsolStudy</a>
% <ITA-Toolbox>
% This file is part of the ITA-Toolbox. Some rights reserved.
% You can find the license for this m-file in the license.txt file in the ITA-Toolbox folder.
% </ITA-Toolbox>
%% Constructor
methods
......
......@@ -3,6 +3,11 @@ classdef itaMaterial < itaSimulationInputItem
%used for GA-based and wave-based simulations
% Properties:
% Impedance, absorption, scattering
%
% See also itaSimulationInputItem, ImpedanceType, ScatteringType
%
% Reference page in Help browser
% <a href="matlab:doc itaMaterial">doc itaMaterial</a>
% <ITA-Toolbox>
% This file is part of the ITA-Toolbox. Some rights reserved.
......
......@@ -4,8 +4,11 @@ classdef itaMaterialVisualizer < handle
% This class can plot the impedance, absorption or scattering of all
% given materials in a single plot. Plotting is based on ita_plot_freq()
% function and uses same syntax for input arguments.
%
% See also ita_plot_freq.
%
% See also itaMaterial, ita_plot_freq
%
% Reference page in Help browser
% <a href="matlab:doc itaMaterialVisualizer">doc itaMaterialVisualizer</a>
% <ITA-Toolbox>
% This file is part of the ITA-Toolbox. Some rights reserved.
......
classdef itaReceiver < itaSpatialSimulationInputItem
%itaReceiver Summary of this class goes here
% Detailed explanation goes here
%itaReceiver represents a receiver and its acoustic properties which are
%used for GA-based and wave-based simulations
% Properties:
% Receiver-type, position, orientation, left and right ear position
%
% See also itaSpatialSimulationInputItem, ReceiverType
%
% Reference page in Help browser
% <a href="matlab:doc itaReceiver">doc itaReceiver</a>
% <ITA-Toolbox>
% This file is part of the ITA-Toolbox. Some rights reserved.
% You can find the license for this m-file in the license.txt file in the ITA-Toolbox folder.
% </ITA-Toolbox>
properties(Access = private)
%mFemGroup;
......
classdef (Abstract) itaSimulationInputItem
%itaSimulationInputItem An abstract item that is used in a database for
%acoustic simulations (wave-based and GA-based)
%itaSimulationInputItem An abstract item that is used to represent
%input data for sound field simulations (wave-based and GA-based)
%
% See also itaMaterial, itaSource, itaReceiver
%
% Reference page in Help browser
% <a href="matlab:doc itaSimulationInputItem">doc itaSimulationInputItem</a>
% <ITA-Toolbox>
% This file is part of the ITA-Toolbox. Some rights reserved.
......
......@@ -7,6 +7,11 @@ classdef itaSource < itaSpatialSimulationInputItem
% The wave TF can either represent a point source, a piston or a
% distribution over a surface and is specified in one itaSource's
% subclasses.
%
% See also itaSpatialSimulationInputItem, SourceType, SensitivityType
%
% Reference page in Help browser
% <a href="matlab:doc itaSource">doc itaSource</a>
% <ITA-Toolbox>
% This file is part of the ITA-Toolbox. Some rights reserved.
......@@ -29,17 +34,17 @@ classdef itaSource < itaSpatialSimulationInputItem
velocityCoordinates;%Returns the coordinates of the velocity TF for a surface distribution source
end
properties(Dependent = true)
type; %Iindicates what the wave TF represents - PointSource, Piston, SurfaceDistribution (see SourceType)
sensitivityType; %Switch between a flat frequency response and a user-defined one.
type; %Iindicates what the wave TF represents - PointSource, Piston, SurfaceDistribution (see SourceType)
sensitivityType; %Switch between a flat frequency response and a user-defined one.
volumeFlowTf; %volume flow transfer function of the point source used for wave-based simulations
volumeFlowTf; %volume flow transfer function of the point source used for wave-based simulations
velocityTf;
pressureTf; %pressure transfer function - itaSuper
pressureTf; %pressure transfer function - itaSuper
% directivity; %The directivity loaded from the .daff file - itaSuper
directivityFile;%Name of directivity .daff file
directivityFile; %Name of directivity .daff file
pistonRadius; %Radius used for sources of type Piston
pistonRadius; %Radius used for sources of type Piston
end
%% Source Type
......
classdef (Abstract) itaSpatialSimulationInputItem < itaSimulationInputItem
%itaSpatialSimulationInputItem Base class for simulation input data
%that has spatial information (position & orientation)
% Extension of itaSimulationInputItem.
%
% See also itaSimulationInputItem, itaSource, itaReceiver
%
% Reference page in Help browser
% <a href="matlab:doc itaSpatialSimulationInputItem">doc itaSpatialSimulationInputItem</a>
% <ITA-Toolbox>
% This file is part of the ITA-Toolbox. Some rights reserved.
% You can find the license for this m-file in the license.txt file in the ITA-Toolbox folder.
% </ITA-Toolbox>
properties(Access = protected, Hidden = true)
mPosition; %itaCoordinates
mOrientation; %itaOrientation
......
classdef ImpedanceType
%ImpedanceType Summary of this class goes here
% Detailed explanation goes here
%ImpedanceType Used to distinguish between general and special cases of
%impedances at boundaries
enumeration
UserDefined, SoundHard;
......
classdef ReceiverType
%ReceiverType Used to specify the geometry of an itaReceiver for
%wave-based simulations
% ...
enumeration
Monaural, ITADummyHead, UserDefined
......
classdef ScatteringType
%ScatteringType Summary of this class goes here
% Detailed explanation goes here
%ScatteringType Used to distinguish between general and special cases
%of scattering at boundaries
enumeration
UserDefined, Zero; %, Constant;
......
classdef SensitivityType
%SensitivityType Summary of this class goes here
% Detailed explanation goes here
%SensitivityType Used to distinguish between general and special cases
%of source sensitivities
enumeration
UserDefined, Flat;
......