Utilities

A Saved Mesh

I saved the 400 node “A” mesh as an example. The Cells below define A400NodeData and A400ElData and A400BdryNodes

A400BdryNodes={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,45,61,90,95,96,97,104,105,111,129,139,142,144,146,147,151,157,158,159,162,171,182,183,184,185,186,189,190,196,201,202,203,208,218,219,220,223,224,228,240,248,255,256,274,276,278,282,288,290,297,298,300,302,311,313,320,324,326,328,331,336,345,347,348,349,352,353,356,359,360,361,365,370,371,372,374,375,379,384,386};
A400NodeData={{0.2`,-0.7764`},{0.22`,-0.7732`},{0.2456`,-0.7564`},{0.2776`,-0.702`},{0.4888`,-0.2076`},{0.5048`,-0.2076`},{0.7408`,-0.7396`},{0.756`,-0.7612`},{0.7744`,-0.7724`},{0.8`,-0.7764`},{0.8`,-0.7924`},{0.5792`,-0.7924`},{0.5792`,-0.7764`},{0.6216`,-0.7716`},{0.6336`,-0.7628`},{0.6392`,-0.7444`},{0.6208`,-0.6844`},{0.5872`,-0.6044`},{0.3608`,-0.6044`},{0.3192`,-0.7068`},{0.312`,-0.7396`},{0.3184`,-0.7612`},{0.3344`,-0.7716`},{0.3712`,-0.7764`},{0.3712`,-0.7924`},{0.3744`,-0.57`},{0.5744`,-0.57`},{0.4736`,-0.3308`},{0.2`,-0.7924`},{0.6896`,-0.7924`},{0.6344000000000001`,-0.7924`},{0.28559999999999997`,-0.7924`},{0.6004`,-0.774`},{0.7448`,-0.7924`},{0.5382823037917023`,-0.4619862198068411`},{0.554291112132426`,-0.47103844309843573`},{0.7856375`,-0.7844`},{0.5301863742480535`,-0.32311471547408777`},{0.7658576326622984`,-0.7916612963402017`},{0.3514434782608695`,-0.7844`},{0.6690356340288925`,-0.7635325842696628`},{0.7589476053021699`,-0.7770717912892923`},{0.3124792079207921`,-0.7878166031987814`},{0.6514210749329983`,-0.7581716315013473`},{0.662`,-0.7924`},{0.3204108130642367`,-0.7756141337473281`},{0.3324906789099151`,-0.7921450529443652`},{0.633262606918418`,-0.7787614726655889`},{0.6557446292382233`,-0.7755843479687352`},{0.6482`,-0.7879622421509037`},{0.6130808683853461`,-0.7911810040705562`},{0.5960921936788015`,-0.7904497014125322`},{0.2853116279069768`,-0.7592558139534884`},{0.3009114283700424`,-0.7716185400934481`},{0.30238114914644587`,-0.7541981780306828`},{0.28487293270490543`,-0.7758329783544332`},{0.26479569105006995`,-0.7670072707379605`},{0.29829120473502896`,-0.7857193343642055`},{0.2321045509241285`,-0.7819633457775974`},{0.23436993279315405`,-0.767192278541949`},{0.2428`,-0.7924`},{0.21699737805554667`,-0.7900889354745277`},{0.2480179216551801`,-0.7746969494620696`},{0.2642`,-0.7890870778102597`},{0.271834136884106`,-0.7782451000571114`},{0.724232707774799`,-0.7674066130473637`},{0.7416352234805028`,-0.7720773330092832`},{0.740650648773378`,-0.7558532471594747`},{0.6758`,-0.780472289802937`},{0.6984665883724441`,-0.7681946789415304`},{0.6894553530363648`,-0.7786204057225613`},{0.7119323990328708`,-0.7868539141399089`},{0.729245758470324`,-0.7844144534317572`},{0.6919795208391459`,-0.713386429245846`},{0.7258544060898999`,-0.7475899745848117`},{0.7115078088747262`,-0.7729717745970145`},{0.7119504707946587`,-0.7566534326123081`},{0.6867979765452417`,-0.7466293257498628`},{0.6982956893188283`,-0.754347638146263`},{0.6634840361907516`,-0.7351584825670846`},{0.6530927923206704`,-0.7443797698176835`},{0.6843828435403424`,-0.7618756204314598`},{0.6714857459319485`,-0.7483230462388131`},{0.6602446743326292`,-0.6825424049014669`},{0.6335228236740469`,-0.6932722185426434`},{0.6461202987470294`,-0.7264678544746244`},{0.6615890272058558`,-0.7150586118284853`},{0.6408964859681539`,-0.6628615487290221`},{0.6834514302043533`,-0.7231366976718556`},{0.7113`,-0.6731`},{0.71326352014494`,-0.7059053194111425`},{0.6737756006204085`,-0.6882297677737099`},{0.5856974124647847`,-0.5853777069898476`},{0.6931719059974097`,-0.6822375739248946`},{0.6818`,-0.6066`},{0.6228`,-0.4736`},{0.63`,-0.7143999999999999`},{0.6776879384942954`,-0.7111724942484001`},{0.6475973497379522`,-0.6997909776412572`},{0.6682008638519995`,-0.7018797328191351`},{0.6605043949499483`,-0.5862019977289703`},{0.6868012153990986`,-0.7015128780911135`},{0.6221153476206056`,-0.581687698331297`},{0.6040000000000001`,-0.6444000000000001`},{0.7260500000000001`,-0.70635`},{0.712959708722464`,-0.7430051689105029`},{0.6456271669576084`,-0.6275503014375833`},{0.6319590564749423`,-0.6306788888531888`},{0.69166989746248`,-0.7339506428310639`},{0.6441389709764908`,-0.6414927035299501`},{0.6124`,-0.6644000000000001`},{0.6549364662530369`,-0.6170649664399982`},{0.602893894832839`,-0.6254890514461613`},{0.6139452908416797`,-0.6101035358518585`},{0.6178016296450715`,-0.6371769463214119`},{0.6415329077664857`,-0.6799897091057422`},{0.7102065389529288`,-0.6934816857276482`},{0.67057940550173`,-0.7243502677879275`},{0.6198954935537675`,-0.6230673423326772`},{0.6353692538964816`,-0.6081176740822529`},{0.6288783203644528`,-0.6537899167177702`},{0.5996650112766972`,-0.6115078890047552`},{0.625606215828841`,-0.5266366857117073`},{0.6156117918824133`,-0.6512870474093866`},{0.6275362887429546`,-0.6698067587279591`},{0.6519200092999754`,-0.5977919551969363`},{0.6351236919175426`,-0.5676418969725506`},{0.6546599245175814`,-0.6689688043419539`},{0.6670499999999999`,-0.57335`},{0.6128031961725539`,-0.5536253840080917`},{0.6281610711040475`,-0.5951941569004312`},{0.6449627353635478`,-0.5795671283308624`},{0.5955235028942503`,-0.5663201129659814`},{0.7047646528307077`,-0.7154688471224547`},{0.669013519432278`,-0.6569379911297345`},{0.6841030475222916`,-0.6553198886931189`},{0.6869233481710088`,-0.6693562397183113`},{0.6752609797917346`,-0.635463324497963`},{0.703925`,-0.656475`},{0.6727892701784153`,-0.6716368284911632`},{0.6571469286194466`,-0.6474777513888236`},{0.69655`,-0.63985`},{0.6405661557493798`,-0.5916858824811504`},{0.5638000000000001`,-0.3406`},{0.6317891905769817`,-0.5525455722644822`},{0.6523`,-0.5401`},{0.6744249999999999`,-0.589975`},{0.6059897712920611`,-0.48637972140879`},{0.6146692781769731`,-0.5027512494832954`},{0.6196803744917048`,-0.566919494199539`},{0.6375500000000001`,-0.50685`},{0.6038178145096542`,-0.5826586196602921`},{0.5996993615514322`,-0.5538964987788038`},{0.6055089897660374`,-0.5976255906125597`},{0.5852630488786568`,-0.49041804364669767`},{0.5927410011196408`,-0.5283448687339891`},{0.5492`,-0.5102`},{0.5618000000000001`,-0.5401`},{0.524`,-0.45039999999999997`},{0.6217030698619499`,-0.5412603493627941`},{0.643659868563047`,-0.5240362237201521`},{0.5366`,-0.48029999999999995`},{0.5990444021571003`,-0.5059417552131352`},{0.6144222174183933`,-0.5198857186659257`},{0.6263624020579304`,-0.5135950002805577`},{0.6263681847031228`,-0.49191373761290047`},{0.5679181514447471`,-0.512119950052242`},{0.5850976541450953`,-0.5044440078507709`},{0.6366010472572862`,-0.5376448470582856`},{0.2967092406221409`,-0.7190532479414455`},{0.2616`,-0.7292`},{0.30055402830676314`,-0.7321549998456865`},{0.31465761337740655`,-0.722993134643821`},{0.2822456304765796`,-0.716027456907711`},{0.28991221334172895`,-0.7440065125593421`},{0.2626892606758566`,-0.7481466239269744`},{0.28107095217341377`,-0.7307574114462247`},{0.29102831560586395`,-0.689466950355903`},{0.2725819867687706`,-0.7565897163826605`},{0.3057643600671579`,-0.7089064150958082`},{0.2920366646508595`,-0.7040076193142318`},{0.2908`,-0.6711`},{0.304`,-0.6402`},{0.3832`,-0.4548`},{0.33039999999999997`,-0.5784`},{0.34`,-0.6556`},{0.3186999874589566`,-0.6556143150310105`},{0.3019407453314102`,-0.6801464060421727`},{0.3296`,-0.6812`},{0.2974`,-0.6556500000000001`},{0.3080679358104486`,-0.6663415993470997`},{0.3293571053161064`,-0.6661888240346682`},{0.3154019724951169`,-0.6903445513261413`},{0.3167325480177568`,-0.6768160741255695`},{0.30300681366201376`,-0.6956917214364707`},{0.47400000000000003`,-0.6044`},{0.643660946421798`,-0.7129523552785472`},{0.6664926512463211`,-0.6034421697478727`},{0.6014741286132406`,-0.518713717468814`},{0.3538435399039561`,-0.5817613994969129`},{0.4174`,-0.6044`},{0.3172`,-0.6093`},{0.3891`,-0.6044`},{0.3519854331530982`,-0.5947204660403435`},{0.34132942592750243`,-0.5856067756500313`},{0.31337141699019866`,-0.6259339062870751`},{0.3271184144385832`,-0.5952675750999773`},{0.35040000000000004`,-0.63`},{0.31687352377694444`,-0.6426395979604052`},{0.37147453621359355`,-0.5887317933867695`},{0.37495`,-0.6025698911553452`},{0.33775477995004083`,-0.6133070679062147`},{0.3313917904566239`,-0.6308761243354554`},{0.35192653449376177`,-0.6157076546380907`},{0.3396626503751836`,-0.6000267281669903`},{0.33077226291230394`,-0.6449523426982481`},{0.4511331436897225`,-0.586885137529905`},{0.4494`,-0.57`},{0.4244`,-0.57`},{0.5244`,-0.57`},{0.47037024705842406`,-0.5871554679890515`},{0.4457`,-0.6029659523755483`},{0.47440000000000004`,-0.57`},{0.5306000000000001`,-0.6044`},{0.45996673687209383`,-0.6013792497118013`},{0.46190000000000003`,-0.5761148191144656`},{0.4369`,-0.579814555792308`},{0.5023000000000001`,-0.6044`},{0.42098466445083366`,-0.5872172282312743`},{0.41263699515195507`,-0.576613963774448`},{0.39940000000000003`,-0.5739881764235841`},{0.40325`,-0.5924827297728185`},{0.4312787523289358`,-0.5983300792823796`},{0.3876345321891398`,-0.5883008195081535`},{0.3863766568345337`,-0.5752746800781118`},{0.5057365176055407`,-0.5867880552018585`},{0.48304217214488576`,-0.593492464430553`},{0.5594856278573013`,-0.5893103584364731`},{0.5730500000000001`,-0.5959472290000252`},{0.4994`,-0.57`},{0.5164500000000001`,-0.6011828996890207`},{0.5309457168217477`,-0.5865789696425919`},{0.5447500000000001`,-0.5957606326096336`},{0.5529598658762089`,-0.5756921840702411`},{0.5384424944265936`,-0.574037411914962`},{0.5183021826627849`,-0.5819892195573938`},{0.4920878625733021`,-0.582349769610505`},{0.5589000000000001`,-0.6044`},{0.6530212232537064`,-0.5596766753987318`},{0.6443929238520256`,-0.5501929271434947`},{0.5530585490831506`,-0.49096913985124757`},{0.5101301947433068`,-0.30889809512458766`},{0.5692062176309776`,-0.49334772889406564`},{0.5739752187449249`,-0.47401889600091623`},{0.5933`,-0.4071`},{0.4822`,-0.22305`},{0.5572116193242658`,-0.4393515789350958`},{0.5676872873351202`,-0.4490558227668225`},{0.5563673972178446`,-0.4250967812285595`},{0.594553750674582`,-0.4339405258448909`},{0.5430890918884653`,-0.44146491455546183`},{0.5884928385705479`,-0.44759685951341366`},{0.5527734900929118`,-0.45504049204527475`},{0.5571974686084594`,-0.5244346787803816`},{0.5812311522472622`,-0.5188530690654157`},{0.5775716230868916`,-0.5350150271706322`},{0.5744613235015129`,-0.5523693084910013`},{0.5900467534056791`,-0.5428018656050806`},{0.6056901887235403`,-0.5382376690861094`},{0.5910964170450296`,-0.4743184480463425`},{0.5655978039460415`,-0.4628556092896827`},{0.5807463330348211`,-0.42823217030935573`},{0.577558035716045`,-0.4407393646293704`},{0.60805`,-0.44035`},{0.5827549570433708`,-0.46164355369361604`},{0.5785500000000001`,-0.37385`},{0.6066263227072587`,-0.4703678511986428`},{0.615425`,-0.456975`},{0.6004204414154728`,-0.4567041333872014`},{0.5692347480423781`,-0.42139365812054835`},{0.5824543117875753`,-0.4149519351241322`},{0.4862`,-0.36069999999999997`},{0.5761410940321741`,-0.39481522896317095`},{0.5320832505869894`,-0.38504740708172636`},{0.506184453452313`,-0.40509300623748684`},{0.5554160590819308`,-0.39266084500017445`},{0.5657644343326224`,-0.3830019439934992`},{0.5711750000000001`,-0.357225`},{0.571782002573552`,-0.4072398886028412`},{0.5343`,-0.2741`},{0.5148056116178354`,-0.38401132203634997`},{0.5401411357548097`,-0.3676244330611469`},{0.5056417093896829`,-0.3217283325981442`},{0.5280746076942813`,-0.3583635576845838`},{0.5547865711187603`,-0.35454674664656505`},{0.5615846184197897`,-0.3686682937435079`},{0.512175`,-0.22422500000000004`},{0.51955`,-0.24084999999999998`},{0.4994624646723579`,-0.34298096142344997`},{0.46240000000000003`,-0.2694`},{0.527618676082781`,-0.34064856338837185`},{0.4988`,-0.39059999999999995`},{0.5354803264621707`,-0.42172252276466526`},{0.5142067806169174`,-0.34985711026453425`},{0.5241601180005546`,-0.372594649454099`},{0.5165329198782401`,-0.2766703762162927`},{0.5408555209831508`,-0.3524305340907943`},{0.5465262268346949`,-0.40367692967676816`},{0.5345518493638877`,-0.3980469578093481`},{0.5175448970763694`,-0.33021840150714943`},{0.4925`,-0.37564999999999993`},{0.5029736158141772`,-0.3624339445064002`},{0.436`,-0.3312`},{0.5486918246655457`,-0.3802042037795492`},{0.49696158082031583`,-0.28953198997995344`},{0.5312979932090014`,-0.30527664211029265`},{0.4922479659427763`,-0.25644124631927157`},{0.5056124910573155`,-0.26776917368248876`},{0.5092097698818583`,-0.25256399195294815`},{0.5114000000000001`,-0.4205`},{0.5223297988832059`,-0.40311684746189286`},{0.5583414125588019`,-0.4112191893089305`},{0.5215921679939168`,-0.26352156711870905`},{0.541675`,-0.290725`},{0.4748486601434471`,-0.2564484567603075`},{0.54905`,-0.30735`},{0.5203790394790555`,-0.29022377196041904`},{0.4492`,-0.3003`},{0.4926728236662203`,-0.31458569287978805`},{0.49844934718194417`,-0.3026806013211227`},{0.5564250000000001`,-0.323975`},{0.543428733431475`,-0.31979195283866907`},{0.5452681179971739`,-0.3363576953050148`},{0.4841287265682848`,-0.27183000345780417`},{0.4961582515884813`,-0.27661184509636016`},{0.4756`,-0.2385`},{0.49671237935084905`,-0.2369317081082139`},{0.4972956986227935`,-0.2208772840695879`},{0.48669013704509934`,-0.2449038650876422`},{0.47277569924554647`,-0.2935627610786946`},{0.48386477331505356`,-0.28552386266772223`},{0.45777665070685397`,-0.2856943944767143`},{0.46539514570011903`,-0.3123538834399048`},{0.4484303357789625`,-0.31824062887645`},{0.44880000000000003`,-0.39059999999999995`},{0.47870578504322797`,-0.3174811181268836`},{0.42400000000000004`,-0.45039999999999997`},{0.46740000000000004`,-0.34575`},{0.46120000000000005`,-0.36069999999999997`},{0.43322834744763505`,-0.37869606899513997`},{0.45695476706502225`,-0.3326575789834875`},{0.4228`,-0.3621`},{0.40959999999999996`,-0.393`},{0.44199137944318884`,-0.3611635504417506`},{0.45192005165131`,-0.3743726970058944`},{0.4294`,-0.34665`},{0.45128021621615266`,-0.3478591722936226`},{0.41645732466035223`,-0.3776599250976262`},{0.4426`,-0.40554999999999997`},{0.4364`,-0.4205`},{0.3964`,-0.4239`},{0.43250556725648104`,-0.3940105637607969`},{0.4203547078120676`,-0.4093279574776941`},{0.40355539937459683`,-0.4086872579852647`},{0.4302`,-0.43545`},{0.4110471874349997`,-0.4362676462941136`},{0.4114846733311629`,-0.4213411013590726`},{0.39428262191975394`,-0.441264906451157`},{0.406783411963173`,-0.4525828444615373`},{0.3992`,-0.5102`},{0.4116`,-0.48029999999999995`},{0.41780000000000006`,-0.46534999999999993`},{0.3963993684763148`,-0.46866442883422194`},{0.3568`,-0.5166`},{0.4054`,-0.49524999999999997`},{0.3746583507236621`,-0.49126157354426125`},{0.38948988974506854`,-0.4974124459143428`},{0.39572920009321877`,-0.4837076986289211`},{0.3868`,-0.5401`},{0.3781287770287935`,-0.4728432819231182`},{0.37106286162754876`,-0.5292910277095122`},{0.3752984407916829`,-0.510675139998351`},{0.35427961308609485`,-0.5337927473377492`},{0.3436`,-0.5475`},{0.3637790810118425`,-0.5522079691037889`},{0.33699999999999997`,-0.5629500000000001`},{0.3797922590019923`,-0.5547150171111941`},{0.3734558526714028`,-0.5426675882185236`},{0.35908444298570247`,-0.5670765084785188`},{0.3874963161554597`,-0.522867535796913`},{0.4896239348642128`,-0.33032409345436076`},{0.4820363083573118`,-0.3448497496554472`},{0.5236944477413564`,-0.4161025579057348`},{0.5287359330911154`,-0.4356592424126932`},{0.7058656669192277`,-0.730128797367667`},{0.7256171845564635`,-0.7264386173772079`},{0.6888494232688971`,-0.6233694287754517`},{0.6602004621161589`,-0.6324191230146365`},{0.6713150686208273`,-0.6193970000487916`}};

A400ElData={{62,1,29},{63,59,61},{9,8,42},{77,79,70},{54,43,46},{11,10,37},{41,44,49},{55,54,22},{25,24,40},{40,24,23},{30,69,45},{60,59,63},{171,3,176},{56,58,54},{193,188,195},{182,4,178},{187,209,183},{12,52,13},{69,30,71},{33,52,51},{241,236,228},{180,181,170},{34,11,39},{338,5,256},{47,40,23},{6,338,297},{51,31,48},{9,37,10},{33,51,14},{257,263,258},{39,9,42},{46,47,23},{42,67,34},{48,14,51},{39,37,9},{67,8,68},{14,48,15},{22,46,23},{125,88,121},{232,234,203},{34,39,42},{330,327,315},{102,92,100},{344,313,351},{15,48,49},{44,16,15},{99,87,100},{83,82,78},{116,99,84},{147,101,198},{330,329,252},{11,37,39},{40,47,25},{36,254,271},{41,82,83},{67,42,8},{69,49,45},{21,55,22},{46,43,47},{43,32,47},{32,25,47},{15,49,44},{50,49,48},{50,48,31},{31,45,50},{45,49,50},{12,31,51},{13,52,33},{12,51,52},{55,21,172},{58,56,32},{22,54,46},{54,53,56},{170,174,177},{53,54,55},{177,176,179},{177,179,175},{3,2,60},{56,53,179},{32,43,58},{43,54,58},{29,61,62},{179,65,56},{60,63,3},{61,59,62},{62,59,2},{2,1,62},{61,32,64},{63,64,57},{64,63,61},{59,60,2},{32,56,65},{57,64,65},{32,65,64},{76,77,70},{73,76,72},{68,8,7},{76,73,66},{75,68,7},{66,67,68},{76,71,72},{49,69,41},{68,75,66},{71,82,69},{72,71,30},{71,70,82},{30,34,72},{67,73,34},{66,73,67},{72,34,73},{98,100,87},{44,81,16},{245,242,243},{79,77,106},{77,76,66},{71,76,70},{75,77,66},{136,140,137},{118,78,109},{83,81,44},{77,75,106},{82,79,78},{118,83,78},{16,81,86},{83,44,41},{102,91,117},{82,41,69},{79,82,70},{90,94,117},{81,83,80},{105,90,117},{140,136,135},{81,80,86},{85,116,17},{86,80,87},{86,197,97},{102,117,94},{396,91,134},{105,117,91},{197,87,99},{118,109,89},{98,87,118},{80,118,87},{83,118,80},{141,135,138},{75,7,396},{118,89,98},{148,277,270},{92,102,94},{125,17,116},{121,108,115},{92,137,140},{128,88,116},{109,106,395},{18,122,154},{95,198,399},{134,74,395},{114,154,122},{154,103,152},{97,16,86},{159,162,35},{131,103,154},{84,92,140},{395,74,109},{197,85,97},{84,99,100},{78,79,109},{109,74,89},{87,197,86},{396,395,106},{153,133,130},{100,92,84},{74,98,89},{121,110,108},{113,104,115},{109,79,106},{116,85,99},{104,111,124},{102,74,91},{397,138,142},{119,108,120},{166,149,165},{111,125,121},{112,120,107},{116,88,125},{119,115,108},{124,115,104},{119,113,115},{107,120,108},{18,104,113},{198,101,126},{114,122,113},{88,110,121},{102,100,98},{102,98,74},{110,107,108},{116,84,128},{126,120,112},{113,119,114},{161,169,146},{249,250,127},{111,17,125},{132,126,101},{18,113,122},{129,101,147},{120,143,131},{111,121,124},{115,124,121},{17,97,85},{134,395,396},{126,132,143},{93,18,154},{398,107,110},{130,160,269},{140,135,128},{88,128,141},{27,93,133},{114,119,120},{143,120,126},{150,133,152},{132,129,249},{127,103,132},{145,130,150},{163,155,168},{132,101,129},{198,95,147},{91,74,134},{103,127,150},{138,136,142},{398,110,141},{128,135,141},{103,143,132},{137,94,90},{399,397,95},{142,95,397},{84,140,128},{135,136,138},{139,142,136},{90,139,137},{137,139,136},{141,110,88},{398,112,107},{137,92,94},{150,152,103},{131,154,114},{340,300,342},{153,268,267},{133,150,130},{131,143,103},{399,198,112},{133,93,152},{249,127,132},{114,120,131},{149,163,199},{160,130,145},{199,164,149},{148,149,166},{126,112,198},{265,199,163},{251,157,167},{168,253,167},{266,156,265},{169,160,145},{36,251,253},{123,160,169},{251,167,253},{154,152,93},{133,153,267},{163,149,148},{162,251,36},{165,149,164},{123,164,269},{35,36,263},{168,155,253},{269,199,156},{164,199,269},{150,127,145},{146,151,161},{165,161,151},{96,277,148},{253,155,254},{157,251,162},{156,199,265},{265,163,168},{165,164,123},{161,165,123},{166,165,151},{151,96,166},{268,153,269},{254,155,270},{157,158,264},{148,155,163},{96,148,166},{145,250,169},{123,169,161},{175,55,172},{170,172,173},{55,175,53},{176,177,171},{173,172,21},{171,177,174},{21,20,173},{173,20,180},{57,176,3},{3,63,57},{172,177,175},{179,57,65},{177,172,170},{171,174,4},{179,176,57},{213,202,206},{181,178,4},{188,193,194},{175,179,53},{173,180,170},{174,181,4},{186,192,189},{174,170,181},{205,207,215},{20,193,195},{212,207,202},{191,194,192},{28,343,351},{184,373,369},{188,182,178},{180,195,181},{193,189,194},{187,190,191},{182,191,190},{186,187,192},{188,191,182},{191,192,187},{183,190,187},{188,178,195},{20,189,193},{192,194,189},{188,194,191},{181,195,178},{20,195,180},{210,204,19},{85,197,99},{252,38,316},{157,264,167},{385,383,384},{205,185,207},{219,231,230},{200,204,210},{212,214,215},{233,227,229},{200,210,26},{205,204,200},{386,200,389},{183,209,206},{215,214,204},{185,202,207},{213,206,209},{213,212,202},{202,183,206},{216,187,186},{208,213,216},{19,211,210},{217,218,227},{19,203,211},{229,232,201},{212,208,214},{216,213,209},{208,212,213},{208,19,214},{204,214,19},{205,215,204},{207,212,215},{187,216,209},{208,216,186},{217,227,233},{223,218,226},{211,203,234},{222,196,225},{225,217,222},{225,196,221},{201,232,203},{229,227,219},{238,239,27},{217,226,218},{201,196,222},{221,217,225},{226,217,221},{226,221,223},{241,242,246},{221,237,247},{231,26,235},{227,218,219},{220,246,242},{232,230,231},{229,219,230},{233,229,201},{232,231,234},{221,196,237},{219,26,231},{210,234,235},{230,232,229},{234,210,211},{201,222,233},{233,222,217},{235,234,231},{210,235,26},{247,236,240},{221,247,223},{228,237,196},{247,228,236},{243,248,238},{18,93,239},{244,238,27},{248,239,238},{246,240,236},{240,246,220},{228,224,241},{242,241,224},{239,93,27},{243,238,244},{129,146,249},{248,18,239},{220,245,27},{220,242,245},{224,243,242},{27,245,244},{241,246,236},{223,247,240},{228,247,237},{244,245,243},{224,248,243},{250,249,146},{169,250,146},{127,250,145},{338,337,297},{266,265,264},{289,283,286},{260,273,262},{257,259,261},{275,258,271},{300,334,325},{270,279,275},{162,36,35},{35,261,159},{36,253,254},{261,35,263},{322,280,289},{144,331,333},{283,281,255},{148,270,155},{36,271,263},{273,257,258},{316,332,326},{263,257,261},{255,276,283},{273,272,280},{264,158,266},{168,167,265},{265,167,264},{267,266,158},{153,130,269},{158,27,267},{267,27,133},{156,266,268},{267,268,266},{269,160,123},{156,268,269},{274,255,260},{262,273,275},{263,271,258},{271,254,275},{275,254,270},{96,278,277},{272,273,260},{260,262,274},{281,283,289},{275,273,258},{281,260,255},{279,270,277},{280,257,273},{262,279,274},{274,279,278},{279,277,278},{275,279,262},{257,280,259},{281,280,272},{260,281,272},{303,394,261},{321,284,291},{287,283,276},{283,287,286},{280,281,289},{293,329,391},{303,261,259},{346,391,329},{292,307,294},{252,310,38},{288,144,295},{323,298,319},{292,314,296},{276,288,296},{287,296,314},{287,314,286},{292,296,295},{305,304,312},{309,321,393},{393,321,285},{286,314,309},{310,304,301},{330,315,341},{302,291,311},{309,303,308},{324,327,316},{336,300,325},{276,296,287},{295,296,288},{299,282,312},{295,144,333},{291,305,312},{303,322,308},{307,292,295},{159,261,394},{286,308,322},{394,393,320},{298,323,290},{293,310,252},{327,330,252},{307,333,301},{286,309,308},{304,299,312},{282,311,312},{292,305,284},{393,285,320},{305,291,284},{317,325,334},{337,298,297},{252,316,327},{309,314,284},{312,311,291},{292,294,305},{284,321,309},{322,303,259},{314,292,284},{252,329,293},{299,391,392},{301,38,310},{310,293,299},{294,301,304},{327,306,315},{306,290,323},{301,294,307},{392,391,28},{326,332,331},{290,327,324},{315,335,341},{318,335,306},{317,334,335},{38,332,316},{304,310,299},{326,324,316},{330,340,329},{356,352,354},{285,291,302},{302,320,285},{321,291,285},{280,322,259},{286,322,289},{391,346,28},{346,340,343},{306,323,318},{290,306,327},{298,337,319},{293,391,299},{5,338,6},{323,319,318},{334,341,335},{339,256,336},{295,333,307},{333,38,301},{331,332,333},{333,332,38},{318,317,335},{337,338,256},{306,335,315},{319,317,318},{317,319,337},{339,337,256},{325,339,336},{317,339,325},{317,337,339},{340,341,300},{340,328,343},{300,341,334},{330,341,340},{300,328,342},{328,340,342},{344,343,328},{346,343,28},{328,313,344},{362,363,359},{371,372,373},{353,362,358},{294,304,305},{340,346,329},{351,343,344},{28,351,348},{357,354,349},{313,356,357},{345,349,355},{357,351,313},{353,363,362},{354,352,350},{349,354,355},{350,355,354},{352,358,350},{355,350,345},{348,357,349},{348,351,357},{354,357,356},{352,353,358},{360,359,363},{350,362,345},{353,364,363},{363,364,367},{368,366,361},{345,362,359},{362,350,358},{363,367,360},{353,361,364},{367,365,360},{367,361,366},{376,377,378},{347,365,366},{361,367,364},{365,367,366},{361,184,368},{375,377,370},{184,369,368},{369,366,368},{366,369,347},{369,373,372},{347,369,372},{200,386,205},{385,388,383},{378,371,373},{376,374,382},{184,380,373},{376,378,380},{378,377,375},{382,374,381},{371,378,375},{378,373,380},{374,383,381},{370,377,382},{184,374,380},{374,376,380},{388,379,381},{374,384,383},{386,389,384},{26,379,387},{385,26,387},{382,381,390},{377,376,382},{379,390,381},{205,386,185},{385,389,26},{388,387,379},{383,388,381},{387,388,385},{389,385,384},{200,26,389},{379,370,390},{370,382,390},{28,282,392},{299,392,282},{309,393,303},{393,394,303},{320,159,394},{75,396,106},{7,105,396},{396,105,91},{141,138,398},{398,138,399},{398,399,112},{397,399,138}};

Basic Gradient Computations

BasicGradientComputation[{p1_,p2_,p3_}]:= Module[
{Δp2x,Δp2y,Δp3x,Δp3y},
{{Δp2x,Δp2y},{Δp3x,Δp3y}}={p2-p1,p3-p1};
(* Computes the constant gradient of the slab function *)
(* that is 1 at p1 and zero at the other two points *)
{Δp2y-Δp3y,Δp3x-Δp2x}/(-Δp2y Δp3x+Δp2x Δp3y)
(* LinearSolve[{Δp3,Δp2},{1,1}] *)
(* To compute the gradient of the other slab functions *)
(* on the triangle permute the vertices *)
]
BasicAreaComputation[{p1_,p2_,p3_}]:= Module[
{Δp2x,Δp2y,Δp3x,Δp3y},
{{Δp2x,Δp2y},{Δp3x,Δp3y}}={p2-p1,p3-p1};
(* Computes the area of the triangle *)
0.5* Abs[Δp3x Δp2y-Δp2x Δp3y]
(* More efficient to combine the computations *)
]

Testing the things.

{p1,p2,p3}={{0.1,0.2},{0.3, 0.15},{0.24, 0.4}};
Area=BasicAreaComputation[{p1,p2,p3}]
n=BasicGradientComputation[{p1,p2,p3}]

We can visually check the area to see if it looks plausible!

Show[Graphics[{
{Opacity[0.5],Pink, Polygon[{p1,p2,p3}]},
Circle[(p1+p2+p3)/3,(Sqrt[Area/π])],
Map[Point,{p1,p2,p3,(p1+p2+p3)/3}]
}
],
Frame->True,
PlotRange->All]

we can check if the linear function defined by the gradient and the value 1 at p1 works.

Plane[{x_,y_}]:= 1 +n.({x,y}-p1)
Map[Plane,{p1,p2,p3}]

Back to A

Here is a messh with almost 400 vertices.

Show[
ListPlot[A400NodeData],
Graphics[
Table[
{Hue[RandomReal[]],Polygon[A400NodeData[[A400ElData[[i]]]] ]},
{i, Length[A400ElData]}
]
],
Epilog->{Red, PointSize[0.02], Map[Point,A400NodeData[[A400BdryNodes]]]},
Frame->True,
AspectRatio->Automatic
]

Here is a plot of a function over the same mesh

f[{x_,y_}]:=Cos[10 x y];
fNodeData =Table[
{x,y}=A400NodeData[[i]];
{x,y,f[{x,y}]},
{i, Length[A400NodeData]}
];
Show[
Graphics3D[
Table[
Polygon[fNodeData[[A400ElData[[i]]]]],
{i, Length[A400ElData]}
]
],
Axes->True,
Boxed->True,
BoxRatios->{1,1,0.5},
AxesLabel->{"x","y","z"}
]

We need to be able to to build the stiffness matrix A and load vector b for this mesh. The key is a little bit (in this case one triangle) at a time.

Organization

I see two obvious organizational plans to assemble the stiffness matrix A and the load vector b.

Go through each node.

Work out which triangles are involved for that node

Work out which nodes are adjacent

Build the stiffness and load vectors as you go

This builds the stiffness matrix and load vector row by row and does not move onto the next row untill the current row is complete.

This computes all the off diagonal entries twice and involves searching the list reapetdly to find triangles and neighbours.

Go through each triangle.

The nodes that are involved including neighbours are explicitly in the triangle.

Each triangle contributes to 3 diagonal elements and 6 off diagonal elements. You only need to compute three of them because of symmetry.

Lots of the internal computations are shared. e.g. the area computation.

This builds the stiffness matrix in a funny order but it does not bother a computer.

Building the Stiffness and load vectors for the static version.

For simplicity I am going to apply a Dirichlet condition on the entire boundary.

f[{x_,y_}]:= 1+Cos[x];
NodeCount=Length[A400NodeData];
TriangleCount=Length[A400ElData];
A=SparseArray[{},{NodeCount,NodeCount}];
b=ConstantArray[0,NodeCount];
Do[
(* Grab the triangle data *)
{n1,n2,n3}=A400ElData[[i]];
{p1,p2,p3}=A400NodeData[[{n1,n2,n3}]];
(* Compute the geometric stuff *)
Area=BasicAreaComputation[{p1,p2,p3}];
Grad1=BasicGradientComputation[{p1,p2,p3}];
Grad2=BasicGradientComputation[{p2,p3,p1}];
Grad3=BasicGradientComputation[{p3,p1,p2}];
(* Update the stiffness matrix *)
A[[n1,n1]]+=Area*Grad1.Grad1;
A[[n2,n2]]+=Area*Grad2.Grad2;
A[[n3,n3]]+=Area*Grad3.Grad3;
a12=Area*Grad1.Grad2;A[[n1,n2]]+=a12;A[[n2,n1]]+=a12;
a13=Area*Grad1.Grad3;A[[n1,n3]]+=a13;A[[n3,n1]]+=a13;
a23=Area*Grad2.Grad3;A[[n2,n3]]+=a12;A[[n3,n2]]+=a23;
(* Update the load vector using the midpoint rule *)
(* the Mid Point value of the slab function is 1/3 *)
bTemp=Area*f[(p1+p2+p3)/3.0];
b[[n1]]+=bTemp; b[[n2]]+=bTemp; b[[n3]]+=bTemp,
{i,1,Length[A400ElData]}
]
(* Fixing the Boundary Conditions *)
Det[A]
HUGE=(10^6);
g[{x_,y_}]= 0;
Do[
n=A400BdryNodes[[i]];
A[[n,n]]=HUGE;
b[[n]]=HUGE*g[A400NodeData[[n]]],
{i,1, Length[A400BdryNodes]}];
u=LinearSolve[A,b];

xyuData=Table[
{x,y}=A400NodeData[[i]];
{x,y,u[[i]]},
{i, Length[u]}];
Show[
Graphics3D[
Table[
Polygon[xyuData[[A400ElData[[i]]]]],
{i, Length[A400ElData]}
]
],
Axes->True,
Boxed->True,
BoxRatios->{1,1,0.5},
AxesLabel->{"x","y","z"}
]

Building the Stiffness, Mass and load vectors for the Dynamic version.

I need to make another piece of the puzzle.  I need to compute
	(∫_Ω)(Subscript[ϕ, i])(Subscript[ϕ, j])
for the tent functions i and j.  Pretty easy to modify but now I actually need to do some integrations.  For i=j I need to square the slab functions integrate and add them up over all of the traingles under the tent function.  For i and j adjacent in the mesh I need to multiply the  different slab functions, integrate and add the two overlapping triangles up. If I multiply two slabs together I get a quadratic and I should be able to get a "numerical" integration scheme in 2D that is correct for quadratics.

Clear[x,y]
poly[{x_,y_}]=a0 +a1 x +a2 y + a3 x y + a4 (x^2) + a5 (y^2) ;
pts={{0,0},{1,0},{0,1},{1/2,0},{0,1/2},{1/2,1/2}}
Collect[
Simplify[
Array[α,6].Map[poly, pts]-Integrate[
poly[{x,y}],
{x,0,1},
{y,0,1-x}] 
],
{a0,a1,a2,a3,a4,a5,a6}]

I need to

f[{x_,y_}]:= 1+Cos[x];
NodeCount=Length[A400NodeData];
TriangleCount=Length[A400ElData];
A=SparseArray[{},{NodeCount,NodeCount}];
b=ConstantArray[0,NodeCount];
Do[
(* Grab the triangle data *)
{n1,n2,n3}=A400ElData[[i]];
{p1,p2,p3}=A400NodeData[[{n1,n2,n3}]];
(* Compute the geometric stuff *)
Area=BasicAreaComputation[{p1,p2,p3}];
Grad1=BasicGradientComputation[{p1,p2,p3}];
Grad2=BasicGradientComputation[{p2,p3,p1}];
Grad3=BasicGradientComputation[{p3,p1,p2}];
(* Update the stiffness matrix *)
A[[n1,n1]]+=Area*Grad1.Grad1;
A[[n2,n2]]+=Area*Grad2.Grad2;
A[[n3,n3]]+=Area*Grad3.Grad3;
a12=Area*Grad1.Grad2;A[[n1,n2]]+=a12;A[[n2,n1]]+=a12;
a13=Area*Grad1.Grad3;A[[n1,n3]]+=a13;A[[n3,n1]]+=a13;
a23=Area*Grad2.Grad3;A[[n2,n3]]+=a12;A[[n3,n2]]+=a23;
(* Update the load vector using the midpoint rule *)
(* the Mid Point value of the slab function is 1/3 *)
bTemp=Area*f[(p1+p2+p3)/3.0];
b[[n1]]+=bTemp; b[[n2]]+=bTemp; b[[n3]]+=bTemp,
{i,1,Length[A400ElData]}
]
(* Fixing the Boundary Conditions *)
Det[A]
HUGE=(10^6);
g[{x_,y_}]= 0;
Do[
n=A400BdryNodes[[i]];
A[[n,n]]=HUGE;
b[[n]]=HUGE*g[A400NodeData[[n]]],
{i,1, Length[A400BdryNodes]}];
u=LinearSolve[A,b];

xyuData=Table[
{x,y}=A400NodeData[[i]];
{x,y,u[[i]]},
{i, Length[u]}];
Show[
Graphics3D[
Table[
Polygon[xyuData[[A400ElData[[i]]]]],
{i, Length[A400ElData]}
]
],
Axes->True,
Boxed->True,
BoxRatios->{1,1,0.5},
AxesLabel->{"x","y","z"}
]

Testing!

Max[A]
Min[A]

ListPlot[A[[1]]]

2D Reference Map

So the first thing we need to do is build affine maps to go backwards and forwards between our reference triangle 
	{{0,0},{1,0},{0,1}}
and a general 2D triangle
	{p1,p2,p3}.

As we showed on Friday this is fairly easy and the formula is 
	X->p1+[({{p2-p1, |, p3-p1}})].X

RefToReal2[X_,{p1_,p2_,p3_}]:= p1 + Transpose[{p2-p1,p3-p1}].X
RealToRef2[x_,{p1_,p2_,p3_}]:=Inverse[ Transpose[{p2-p1,p3-p1}]].(x-p1)
{p1,p2,p3}={ {0.2, 0.4},{1.2, 1.4},{-0.2, -0.5}};
pp1=RefToReal2[{0,0},{p1,p2,p3}];
pp2=RefToReal2[{1,0},{p1,p2,p3}];
pp3=RefToReal2[{0,1},{p1,p2,p3}];
{
Show[
Graphics[{
{Pink, Polygon[{p1,p2,p3}]},
Text[1,p1],
Text[2,p2],
Text[3,p3]
}
],
Frame->True,
AspectRatio->Automatic
],
Show[
Graphics[{
{Cyan, Polygon[{pp1,pp2,pp3}]},
Text[1,pp1],
Text[2,pp2],
Text[3,pp3]
}
],
Frame->True,
AspectRatio->Automatic
]
}

The inverse of this map is
	x->(([({{p2-p1, |, p3-p1}})])^(-1)).(x-p1) 
It is easy to check this works.

RealToRef2[x_,{p1_,p2_,p3_}]:=Inverse[ Transpose[{p2-p1,p3-p1}]].(x-p1)
{p1,p2,p3}={ {0.2, 0.4},{1.2, 1.4},{-0.2, -0.5}};
{P1,P2,P3}=Map[RealToRef2[#,{p1,p2,p3}]&,{p1,p2,p3}]
Show[
Graphics[{
{Yellow, Polygon[{P1,P2,P3}]},
Text[1,P1],
Text[2,P2],
Text[3,P3]
}
],
Frame->True,
AspectRatio->Automatic
]

Tent functions are easy on the reference triangle and hard on the real triangle.

Tent[X_]:= 1-{1,1}.X
{
Plot3D[ 
Tent[{X1,X2}],
{X1,0,1},{X2,0,1},
PlotRange->{0,1},
BoxRatios->Automatic],
ParametricPlot3D[ 
{u(1+ v),u(1-  v),Tent[ {u(1+ v),u(1-  v)}]},
{u,0,1/2},{v,-1,1},
BoxRatios->Automatic
]
}

The solution is to pull everything back to the reference triangle and do the integrations there.  For instance, to compute
	(∫_(Subscript[▲, i]))f[x](Subscript[ϕ, i])[x]dx
with the (i^th) triangle described by the vertices {p1,p2,p3} we can compute and then adjust the area by the constant Jacobian of the mapping.

f[{x1_,x2_}]:=12+Sin[ x1 x2]
{p1,p2,p3}={{0.1, 0.3},{0.4,0.6},{0.3, 0.7}}
Abs[Det[Transpose[{p2-p1,p3-p1}]]]NIntegrate[
Evaluate[f[RealToRef2[{X1,X2},{p1,p2,p3}]] Tent[{X1,X2}]],
{X1,0,1},{X2, 0, 1-X1}]

In some sense, the gradients are easier because they are constants.  Make sure you are checking that things are the correct size and plausible.  It is very easy to get the Jacobians upside down.  Is the red correct in the formula above.

Shape Functions

Here is the easy way!

SpecialNodeValue=234;
fNodeData =Table[
{x,y}=A400NodeData[[i]];
{x,y, KroneckerDelta[i,SpecialNodeValue]},
{i, Length[A400NodeData]}
];
Show[
Graphics3D[
Table[
Polygon[fNodeData[[A400ElData[[i]]]]],
{i, Length[A400ElData]}
]
],
Axes->True,
Boxed->True,
AxesLabel->{"x","y","z"},
BoxRatios->{1,1,0.2}
]

To replicate this we need to work out which triangles involve the node we picked.   First, here is how to do check one triangle.

SpecialNodeValue
A400ElData[[12]]
MemberQ[A400ElData[[12]], SpecialNodeValue]

Guess, that one is not in there. Here are all the triangles that do contain it

SpecialTriangles=Select[A400ElData,MemberQ[# , SpecialNodeValue]&]

Lets check!

fNodeData =Table[
{x,y}=A400NodeData[[i]];
{x,y,KroneckerDelta[i, SpecialNodeValue]},
{i, Length[A400NodeData]}
];
Show[
Graphics3D[{
{Red, PointSize[0.02],Point[fNodeData[[SpecialNodeValue]]]},
Table[
{Hue[RandomReal[]],Polygon[fNodeData[[SpecialTriangles[[i]]]]]},
{i, Length[SpecialTriangles]}
]
}
],
Axes->True,
Boxed->True,
AxesLabel->{"x","y","z"},
BoxRatios->{1,1,0.2}
]

fNodeData[[SpecialTriangles[[3]]]]

Each side is a plane with two points with "z=0".  A little geometry gives the normal to the plane in terms of the runs
	(Subscript[Δx, i])=(Subscript[x, 1])-(Subscript[x, i])  and (Subscript[Δy, i])=(Subscript[y, 1])-(Subscript[y, i])
with the rise equal to 1-0. From calc III the normal should be

Clear[Δx2,Δx3,δy2,Δy3,n]
n=Cross[{Δx2,Δy2,1},{Δx3,Δy3,1}]

The picture looks a little weird because the vertical scals is so different from the horizontal scale.

Show[
Graphics3D[{
{Red, PointSize[0.02],Point[fNodeData[[SpecialNodeValue]]]},
Table[
{p2,p3,p1}=fNodeData[[SpecialTriangles[[i]]]];
pBar=(p1+p2+p3)/3;
n=Cross[p2-p1,p3-p1];
{
{Hue[RandomReal[]],Polygon[fNodeData[[SpecialTriangles[[i]]]]]},
Arrowheads[0.002],PointSize[0.02],Point[pBar],Arrow[{pBar,pBar+ n}]
},
{i, Length[SpecialTriangles]}
]
}
],
Axes->True,
Boxed->True,
AxesLabel->{"x","y","z"},
BoxRatios->{1,1,1},
PlotRange->All
]

I really need the gradient not the normal.  Remember  calc III 
	z=f[x,y] ⟺ f[x,y]-z=0
and the normal was {(Subscript[f, x]),(Subscript[f, y]),-1}.  All I need to do is scale the expression I have till I get a -1 in the third entry and then the first two entries are the gradient.

Clear[Δx2,Δx3,δy2,Δy3,n]
n=Cross[{Δx2,Δy2,1},{Δx3,Δy3,1}];
Simplify[-n/n[[3]]]

We also need the area of each trianglular base.  Calc III again! As vectors we have the two sides of the base triangle
	{Δx2,Δy2,0} and {Δx3,Δy3,0}
and the area of the base is the magnitude of the cross product.
	|-Δx3 Δy2+Δx2 Δy3|
which just happens to be the denominator!

Putting it all together.  The integral of the dot product of the gradient with itself over the base of the triangle is
	((((Δx2-Δx3))^2)+(((Δy2-Δy3))^2))/Abs[Δx3 Δy2-Δx2 Δy3].
Now I can put together the recipes for all the other pieces in a similar way.

Putting it together

We need to look at two tent functions.

SpecialNodeValue1=234;
SpecialNodeValue2=235;
fNodeData1 =Table[
{x,y}=A400NodeData[[i]];
{x,y, KroneckerDelta[i,SpecialNodeValue1]},
{i, Length[A400NodeData]}
];
fNodeData2 =Table[
{x,y}=A400NodeData[[i]];
{x,y, KroneckerDelta[i,SpecialNodeValue2]},
{i, Length[A400NodeData]}
];
Show[
Graphics3D[
Table[
{
Polygon[fNodeData1[[A400ElData[[i]]]]],
Polygon[fNodeData2[[A400ElData[[i]]]]]
},
{i, Length[A400ElData]}
]
],
Axes->True,
Boxed->True,
AxesLabel->{"x","y","z"},
BoxRatios->{1,1,0.2}
]

A close up!

SpecialTriangles1=Select[A400ElData,MemberQ[# , SpecialNodeValue1]&]
SpecialTriangles2=Select[A400ElData,MemberQ[# , SpecialNodeValue2]&]

Show[
Graphics3D[{
{Red, PointSize[0.02],
Point[fNodeData1[[SpecialNodeValue1]]],
Point[fNodeData2[[SpecialNodeValue2]]]},
Table[
{Hue[RandomReal[]],Polygon[fNodeData1[[SpecialTriangles1[[i]]]]]},
{i, Length[SpecialTriangles1]}
],
Table[
{Hue[RandomReal[]],Polygon[fNodeData2[[SpecialTriangles2[[i]]]]]},
{i, Length[SpecialTriangles2]}
]
}
],
Axes->True,
Boxed->True,
AxesLabel->{"x","y","z"},
BoxRatios->{1,1,0.2}
]

What are the vertex numbers in the intersection?