# initial condition in finite element method

I want to apply the initial condition below to the linear element

c(x; 0) = sin(10πx); if x in [0; 0:1] and c(x; 0) = 0; if x in [0:1; 1].

I tried like

SMTInputData["Threads" -> 1];
plots = {};
nel = 50;
h = 1/nel;
L = 1;
name, {"\[Omega] *" -> 1, "ff*" -> 0}}];
SMTMesh["\[CapitalOmega]", "L1", {1/h}, {{0, 0}, {L, 0}}];
SMTAddInitialBoundary["X" < 0.1 && "X" = 0 &, "AM",
1 -> Function[{n, X}, Sin[10*Pi*X]], "Type" -> "InitialCondition"];
SMTAddInitialBoundary["X" > 0.1 && "X" = 1 &, "AP",
1 -> 0, "Type" -> "InitialCondition"];
SMTAnalysis[];


But it shows the error like the initial condition format is wrong? Thank you in advance.

SMTAddInitialBoundary["X" < 0.1 && "X" = 0 &, "AM",
1 -> Function[{n, X}, Sin[10*Pi*X]], "Type" -> "InitialCondition"]


What is "AM"? It should be

SMTAddInitialBoundary[
"X" < 0.1 && "X" = 0 &,
1 -> Function[{n, X}, Sin[10*Pi*X]],
"Type" -> "InitialCondition"
]

• This is only for x from 0 to 0.1. what about the second range of x i.e 0.1 to 1? Apr 27 at 23:49
• AM is unknown c. Apr 27 at 23:50