6
$\begingroup$

I'm trying to change the Domain of an Element. For that purpose usage of enter image description here makes sense for me. Anyway, it applies I've done a syntax error here. Can anyone tell how to do it right ?

<< AceFEM`;
SMTInputData[];
SMTAddDomain[{
    {"B1", "ML:SEPEQ1DFLEQ1DHooke", {}},
    {"B2", "ML:SEPEQ1DFLEQ1DHooke", {}}
   }];
SMTAddMesh[Polygon[{{0, 0}, {1, 0}, {1, 1}, {0, 1}}], "B1", "Q1", {3, 3}];
SMTAnalysis[];

(*Current Domain of Elmt.5*)
SMTElementData[{5},"Domain"](*evaluates {"B1"}*)

(*Try to set Elmt.5 to Domain "B2"*)
SMTElementData[{5},"Domain",{"B2"}]
$\endgroup$
  • $\begingroup$ I have edited your question to add SMTAnalysis. Without this your example doesn't demonstrate the error you are asking about. I hope you don't mind... $\endgroup$ – Pinti Apr 13 '17 at 9:04
4
$\begingroup$

I agree that according to documentation your code should work. I don't know why it doesn't, but this is a workaround.

SMTElementData["Domain"]
(* {"B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1", "B1"} *)

SMTElementData[{5}, "SpecIndex", SMTDomainData["B2", "SpecIndex"]];

SMTElementData["Domain"]
(* {"B1", "B1", "B1", "B1", "B2", "B1", "B1", "B1", "B1"} *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.