Commit f2aed5f8 authored by Turnhout, M.C. van's avatar Turnhout, M.C. van
Browse files

update elm1d_c in documentation

parent 416020e7
......@@ -19,7 +19,7 @@ function [par1, par2] = elm1d_i(ielem, ~, top, mat, ichois)
% ichois = 5 par1: defintion of location of dofs (vpos)
% par2: defintion of their shape functions (vshp)
%
% See also elm1dcd, elm1d_d, elm1d_s
% See also elm1d, elm1d_d, elm1d_s
% get some element info
imat = top(ielem, end-1);
......
......@@ -81,16 +81,21 @@ parameter & description & comment\\
~\\ The diffusion constant $c$ in \kwo{mat.mat}\texttt{(1)} is passed to the function \kwc{elm1d\_c} together with the integration point coordinate $x$. So the function \kwc{elm1d\_c} can be used to work with a coordinate dependent diffusion constant $c_\mathrm{int}(x)$ based on $c$:
\begin{lstlisting}[language=mlfem]
function c_int = elm1d_c(c, x)
% c_int = elm1d_c(c, x)
%
% function to create a coordinate dependent diffusion constant
%
% See also elm1d, fem1d
if c < 0 % non-constant c
c_int = 1 + x;
else
c_int = c;
else % nothing to see here
c_int = c;
end
% part of mlfem_nac: https://gitlab.tue.nl/STEM/mlfem_nac
end
\end{lstlisting}
The default behavior of \kwc{elm1d\_c} is to use a constant value $c$ for \kwo{mat.mat}\texttt{(1)} $\geq 0$, and to switch to a coordinate dependent value otherwise. You can use a copy of this function (original in \kdir{/library/elmlib}) in your working directory to change this behavior. \\
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment