83 this.optArgs= varargin;
86 i.KeepUnmatched=
true;
153 if (withtag || ~strcmp(
fieldnames[
k],
" Tag ")) && ~isempty(o.(fieldnames[k]))
155 if isa(o.(fieldnames[k]),
" char ")
158 strs[end+1] = sprintf(fmt,
fieldnames[k],o.(fieldnames[k]));
173 g = this.
FEM.Geometry;
174 g.plot(allnode,elemnr);
182 this.iP.parse(this.optArgs[:]);
187 if isa(geo,
" fem.geometry.Cube27Node ")
188 this.
FEM= fem.HexahedronTriquadratic(geo);
189 elseif isa(geo,
" fem.geometry.Cube20Node ")
190 this.
FEM= fem.HexahedronSerendipity(geo);
191 elseif isa(geo,
" fem.geometry.Cube8Node ")
192 this.FEM= fem.HexahedronTrilinear(geo);
220 this.iP.addParamValue(name,
default, varargin[:]);
241 function [displ_dir , velo_dir , velo_dir_val ] =
getBC() {
243 displ_dir =
false(3,N);
245 velo_dir =
false(3,N);
246 velo_dir_val = zeros(3,N);
249 if any(any(displ_dir & velo_dir))
250 error(
" Cannot impose displacement and velocity dirichlet conditions on same DoF ");
258 ngp = fe.GaussPointsPerElemFace;
259 force = zeros(geo.NumNodes * 3,1);
260 faceswithforce =
false(1,geo.NumFaces);
263 for fn = 1:geo.NumFaces
264 elemidx = geo.Faces(1,fn);
265 faceidx = geo.Faces(2,fn);
266 masterfacenodeidx = geo.MasterFaces(faceidx,:);
270 faceswithforce(fn) =
true;
271 integrand = zeros(3,geo.NodesPerFace);
273 N = geo.FaceNormals(:,faceidx);
277 N = fe.NormalsOnFaceGP(:,gi,fn);
279 PN = (P * N) * fe.Ngpface(:,gi,fn)^
t;
280 integrand = integrand + fe.FaceGaussWeights(gi)*PN*fe.face_detjac(fn,gi);
282 facenodeidx = geo.Elements(elemidx,masterfacenodeidx);
283 facenodeidx = (facenodeidx-1)*3+1;
284 facenodeidx = [facenodeidx; facenodeidx+1; facenodeidx+2];
286 force(facenodeidx(:)) = force(facenodeidx(:)) + integrand(:);
290 nodeidx = find(force);
function init()
% Parse the options
Collection of generally useful functions.
function addOption(name, default, varargin)
function configureModelFinal()
fields
Returns a cell array of string containing the names of public properties.
function [ displ_dir , velo_dir , velo_dir_val ] = getBC()
The base class for any KerMor detailed model.
function plotGeometryInfo(allnode, elemnr)
function [ velo_dir , velo_dir_val ] = setVelocityDirichletBC(velo_dir, velo_dir_val)
Determines the dirichlet velocities.
virtual function displ_dir = setPositionDirichletBC(displ_dir)
function [ force , nodeidx , faceswithforce ] = getSpatialExternalForces()
function prepareSimulation(colvec< double > mu,integer inputidx)
Overload this method to initialize model-specific quantities that are fixed for each simulation...
Matlab's base handle class (documentation generation substitute)
function str = getOptionStr(withtag)
A variable number of input arguments.
fieldnames
Returns a cell array of string containing the names of public properties. See the MATLAB fieldnames f...
VelocityBCTimeFun
Velocity conditions application function.
function configureModel(models.BaseFullModel model)
Overload this method to set model-specific quantities like simulation time etc.
virtual function geo = getGeometry()
Returns the intended geometry for this model config.
static function char str = implode(char|rowvec data,char glue,char format)
Implodes the elements of data using glue.
A MatLab character array.
function P = getBoundaryPressure(elemidx, faceidx)
Determines the neumann forces on the boundary.
char NeumannCoordinateSystem
The coordinate system in which to interpret the applied pressure of neumann boundary conditions...