Files
mfem/examples
..
2020-03-09 18:05:47 -07:00
2020-03-09 18:05:47 -07:00
2018-10-12 15:58:30 -07:00
2020-03-18 09:42:04 -04:00
2020-02-29 09:07:23 -08:00
2020-03-18 09:42:04 -04:00
2020-04-07 09:54:34 -07:00
2020-04-07 09:54:34 -07:00
2020-04-27 22:32:07 -07:00
2020-03-18 09:42:04 -04:00
2020-01-29 15:00:00 -08:00
2020-03-29 12:37:43 -07:00
2020-03-18 09:42:04 -04:00
2020-03-29 12:37:43 -07:00
2020-03-18 09:42:04 -04:00
2020-03-18 09:42:04 -04:00
2020-04-28 16:10:44 -07:00
2018-07-24 19:53:59 -07:00
2020-03-18 09:42:04 -04:00
2019-08-21 16:25:39 -07:00
2019-08-21 16:25:39 -07:00
2020-03-25 17:36:47 -07:00
2020-03-25 17:36:47 -07:00
2020-04-18 18:07:43 -07:00
2020-04-18 18:07:43 -07:00
2020-03-10 09:55:25 -07:00

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html><html lang="en"><head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        
        
        
        <link rel="shortcut icon" href="/img/favicon.ico">
        <meta name="keywords" content="Finite Element Library,Finite Element Code,Finite Element Method Library,Finite Element Method Code,Finite Element C++,Finite Element Method C++,Finite Element Library C++,Finite Element Code C++,FEM Code,FEM Library,FEM C++">
        <meta name="google-site-verification" content="45K56TawSdzbgy-uDtfJdYwp7zaVdL3fIAGYt869wwU">
<!--	<title></title>  -->
        <title>MFEM - Finite Element Discretization Library</title>

        <link href="../doc/web/bootstrap-mfem.min.css" rel="stylesheet">
        <link href="../doc/web/font-awesome-4.0.3.css" rel="stylesheet">
        <link href="../doc/web/highlight.css" rel="stylesheet">
        <link href="../doc/web/base.css" rel="stylesheet">

        <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!--[if lt IE 9]>
            <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
            <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
        <![endif]-->

        
    <style type="text/css">.MathJax_Hover_Frame {border-radius: .25em; -webkit-border-radius: .25em; -moz-border-radius: .25em; -khtml-border-radius: .25em; box-shadow: 0px 0px 15px #83A; -webkit-box-shadow: 0px 0px 15px #83A; -moz-box-shadow: 0px 0px 15px #83A; -khtml-box-shadow: 0px 0px 15px #83A; border: 1px solid #A6D ! important; display: inline-block; position: absolute}
.MathJax_Menu_Button .MathJax_Hover_Arrow {position: absolute; cursor: pointer; display: inline-block; border: 2px solid #AAA; border-radius: 4px; -webkit-border-radius: 4px; -moz-border-radius: 4px; -khtml-border-radius: 4px; font-family: 'Courier New',Courier; font-size: 9px; color: #F0F0F0}
.MathJax_Menu_Button .MathJax_Hover_Arrow span {display: block; background-color: #AAA; border: 1px solid; border-radius: 3px; line-height: 0; padding: 4px}
.MathJax_Hover_Arrow:hover {color: white!important; border: 2px solid #CCC!important}
.MathJax_Hover_Arrow:hover span {background-color: #CCC!important}
</style><style type="text/css">#MathJax_About {position: fixed; left: 50%; width: auto; text-align: center; border: 3px outset; padding: 1em 2em; background-color: #DDDDDD; color: black; cursor: default; font-family: message-box; font-size: 120%; font-style: normal; text-indent: 0; text-transform: none; line-height: normal; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; z-index: 201; border-radius: 15px; -webkit-border-radius: 15px; -moz-border-radius: 15px; -khtml-border-radius: 15px; box-shadow: 0px 10px 20px #808080; -webkit-box-shadow: 0px 10px 20px #808080; -moz-box-shadow: 0px 10px 20px #808080; -khtml-box-shadow: 0px 10px 20px #808080; filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')}
#MathJax_About.MathJax_MousePost {outline: none}
.MathJax_Menu {position: absolute; background-color: white; color: black; width: auto; padding: 5px 0px; border: 1px solid #CCCCCC; margin: 0; cursor: default; font: menu; text-align: left; text-indent: 0; text-transform: none; line-height: normal; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; z-index: 201; border-radius: 5px; -webkit-border-radius: 5px; -moz-border-radius: 5px; -khtml-border-radius: 5px; box-shadow: 0px 10px 20px #808080; -webkit-box-shadow: 0px 10px 20px #808080; -moz-box-shadow: 0px 10px 20px #808080; -khtml-box-shadow: 0px 10px 20px #808080; filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')}
.MathJax_MenuItem {padding: 1px 2em; background: transparent}
.MathJax_MenuArrow {position: absolute; right: .5em; padding-top: .25em; color: #666666; font-size: .75em}
.MathJax_MenuActive .MathJax_MenuArrow {color: white}
.MathJax_MenuArrow.RTL {left: .5em; right: auto}
.MathJax_MenuCheck {position: absolute; left: .7em}
.MathJax_MenuCheck.RTL {right: .7em; left: auto}
.MathJax_MenuRadioCheck {position: absolute; left: .7em}
.MathJax_MenuRadioCheck.RTL {right: .7em; left: auto}
.MathJax_MenuLabel {padding: 1px 2em 3px 1.33em; font-style: italic}
.MathJax_MenuRule {border-top: 1px solid #DDDDDD; margin: 4px 3px}
.MathJax_MenuDisabled {color: GrayText}
.MathJax_MenuActive {background-color: #606872; color: white}
.MathJax_MenuDisabled:focus, .MathJax_MenuLabel:focus {background-color: #E8E8E8}
.MathJax_ContextMenu:focus {outline: none}
.MathJax_ContextMenu .MathJax_MenuItem:focus {outline: none}
#MathJax_AboutClose {top: .2em; right: .2em}
.MathJax_Menu .MathJax_MenuClose {top: -10px; left: -10px}
.MathJax_MenuClose {position: absolute; cursor: pointer; display: inline-block; border: 2px solid #AAA; border-radius: 18px; -webkit-border-radius: 18px; -moz-border-radius: 18px; -khtml-border-radius: 18px; font-family: 'Courier New',Courier; font-size: 24px; color: #F0F0F0}
.MathJax_MenuClose span {display: block; background-color: #AAA; border: 1.5px solid; border-radius: 18px; -webkit-border-radius: 18px; -moz-border-radius: 18px; -khtml-border-radius: 18px; line-height: 0; padding: 8px 0 6px}
.MathJax_MenuClose:hover {color: white!important; border: 2px solid #CCC!important}
.MathJax_MenuClose:hover span {background-color: #CCC!important}
.MathJax_MenuClose:hover:focus {outline: none}
</style><style type="text/css">.MathJax_Preview .MJXf-math {color: inherit!important}
</style><style type="text/css">.MJX_Assistive_MathML {position: absolute!important; top: 0; left: 0; clip: rect(1px, 1px, 1px, 1px); padding: 1px 0 0 0!important; border: 0!important; height: 1px!important; width: 1px!important; overflow: hidden!important; display: block!important; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none}
.MJX_Assistive_MathML.MJX_Assistive_MathML_Block {width: 100%!important}
</style><style type="text/css">#MathJax_Zoom {position: absolute; background-color: #F0F0F0; overflow: auto; display: block; z-index: 301; padding: .5em; border: 1px solid black; margin: 0; font-weight: normal; font-style: normal; text-align: left; text-indent: 0; text-transform: none; line-height: normal; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; box-shadow: 5px 5px 15px #AAAAAA; -webkit-box-shadow: 5px 5px 15px #AAAAAA; -moz-box-shadow: 5px 5px 15px #AAAAAA; -khtml-box-shadow: 5px 5px 15px #AAAAAA; filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')}
#MathJax_ZoomOverlay {position: absolute; left: 0; top: 0; z-index: 300; display: inline-block; width: 100%; height: 100%; border: 0; padding: 0; margin: 0; background-color: white; opacity: 0; filter: alpha(opacity=0)}
#MathJax_ZoomFrame {position: relative; display: inline-block; height: 0; width: 0}
#MathJax_ZoomEventTrap {position: absolute; left: 0; top: 0; z-index: 302; display: inline-block; border: 0; padding: 0; margin: 0; background-color: white; opacity: 0; filter: alpha(opacity=0)}
</style><style type="text/css">.MathJax_Preview {color: #888}
#MathJax_Message {position: fixed; left: 1px; bottom: 2px; background-color: #E6E6E6; border: 1px solid #959595; margin: 0px; padding: 2px 8px; z-index: 102; color: black; font-size: 80%; width: auto; white-space: nowrap}
#MathJax_MSIE_Frame {position: absolute; top: 0; left: 0; width: 0px; z-index: 101; border: 0px; margin: 0px; padding: 0px}
.MathJax_Error {color: #CC0000; font-style: italic}
</style><style type="text/css">.MJXp-script {font-size: .8em}
.MJXp-right {-webkit-transform-origin: right; -moz-transform-origin: right; -ms-transform-origin: right; -o-transform-origin: right; transform-origin: right}
.MJXp-bold {font-weight: bold}
.MJXp-italic {font-style: italic}
.MJXp-scr {font-family: MathJax_Script,'Times New Roman',Times,STIXGeneral,serif}
.MJXp-frak {font-family: MathJax_Fraktur,'Times New Roman',Times,STIXGeneral,serif}
.MJXp-sf {font-family: MathJax_SansSerif,'Times New Roman',Times,STIXGeneral,serif}
.MJXp-cal {font-family: MathJax_Caligraphic,'Times New Roman',Times,STIXGeneral,serif}
.MJXp-mono {font-family: MathJax_Typewriter,'Times New Roman',Times,STIXGeneral,serif}
.MJXp-largeop {font-size: 150%}
.MJXp-largeop.MJXp-int {vertical-align: -.2em}
.MJXp-math {display: inline-block; line-height: 1.2; text-indent: 0; font-family: 'Times New Roman',Times,STIXGeneral,serif; white-space: nowrap; border-collapse: collapse}
.MJXp-display {display: block; text-align: center; margin: 1em 0}
.MJXp-math span {display: inline-block}
.MJXp-box {display: block!important; text-align: center}
.MJXp-box:after {content: " "}
.MJXp-rule {display: block!important; margin-top: .1em}
.MJXp-char {display: block!important}
.MJXp-mo {margin: 0 .15em}
.MJXp-mfrac {margin: 0 .125em; vertical-align: .25em}
.MJXp-denom {display: inline-table!important; width: 100%}
.MJXp-denom > * {display: table-row!important}
.MJXp-surd {vertical-align: top}
.MJXp-surd > * {display: block!important}
.MJXp-script-box > *  {display: table!important; height: 50%}
.MJXp-script-box > * > * {display: table-cell!important; vertical-align: top}
.MJXp-script-box > *:last-child > * {vertical-align: bottom}
.MJXp-script-box > * > * > * {display: block!important}
.MJXp-mphantom {visibility: hidden}
.MJXp-munderover {display: inline-table!important}
.MJXp-over {display: inline-block!important; text-align: center}
.MJXp-over > * {display: block!important}
.MJXp-munderover > * {display: table-row!important}
.MJXp-mtable {vertical-align: .25em; margin: 0 .125em}
.MJXp-mtable > * {display: inline-table!important; vertical-align: middle}
.MJXp-mtr {display: table-row!important}
.MJXp-mtd {display: table-cell!important; text-align: center; padding: .5em 0 0 .5em}
.MJXp-mtr > .MJXp-mtd:first-child {padding-left: 0}
.MJXp-mtr:first-child > .MJXp-mtd {padding-top: 0}
.MJXp-mlabeledtr {display: table-row!important}
.MJXp-mlabeledtr > .MJXp-mtd:first-child {padding-left: 0}
.MJXp-mlabeledtr:first-child > .MJXp-mtd {padding-top: 0}
.MJXp-merror {background-color: #FFFF88; color: #CC0000; border: 1px solid #CC0000; padding: 1px 3px; font-style: normal; font-size: 90%}
.MJXp-scale0 {-webkit-transform: scaleX(.0); -moz-transform: scaleX(.0); -ms-transform: scaleX(.0); -o-transform: scaleX(.0); transform: scaleX(.0)}
.MJXp-scale1 {-webkit-transform: scaleX(.1); -moz-transform: scaleX(.1); -ms-transform: scaleX(.1); -o-transform: scaleX(.1); transform: scaleX(.1)}
.MJXp-scale2 {-webkit-transform: scaleX(.2); -moz-transform: scaleX(.2); -ms-transform: scaleX(.2); -o-transform: scaleX(.2); transform: scaleX(.2)}
.MJXp-scale3 {-webkit-transform: scaleX(.3); -moz-transform: scaleX(.3); -ms-transform: scaleX(.3); -o-transform: scaleX(.3); transform: scaleX(.3)}
.MJXp-scale4 {-webkit-transform: scaleX(.4); -moz-transform: scaleX(.4); -ms-transform: scaleX(.4); -o-transform: scaleX(.4); transform: scaleX(.4)}
.MJXp-scale5 {-webkit-transform: scaleX(.5); -moz-transform: scaleX(.5); -ms-transform: scaleX(.5); -o-transform: scaleX(.5); transform: scaleX(.5)}
.MJXp-scale6 {-webkit-transform: scaleX(.6); -moz-transform: scaleX(.6); -ms-transform: scaleX(.6); -o-transform: scaleX(.6); transform: scaleX(.6)}
.MJXp-scale7 {-webkit-transform: scaleX(.7); -moz-transform: scaleX(.7); -ms-transform: scaleX(.7); -o-transform: scaleX(.7); transform: scaleX(.7)}
.MJXp-scale8 {-webkit-transform: scaleX(.8); -moz-transform: scaleX(.8); -ms-transform: scaleX(.8); -o-transform: scaleX(.8); transform: scaleX(.8)}
.MJXp-scale9 {-webkit-transform: scaleX(.9); -moz-transform: scaleX(.9); -ms-transform: scaleX(.9); -o-transform: scaleX(.9); transform: scaleX(.9)}
.MathJax_PHTML .noError {vertical-align: ; font-size: 90%; text-align: left; color: black; padding: 1px 3px; border: 1px solid}
</style><style type="text/css">.MathJax_SVG_Display {text-align: center; margin: 1em 0em; position: relative; display: block!important; text-indent: 0; max-width: none; max-height: none; min-width: 0; min-height: 0; width: 100%}
.MathJax_SVG .MJX-monospace {font-family: monospace}
.MathJax_SVG .MJX-sans-serif {font-family: sans-serif}
#MathJax_SVG_Tooltip {background-color: InfoBackground; color: InfoText; border: 1px solid black; box-shadow: 2px 2px 5px #AAAAAA; -webkit-box-shadow: 2px 2px 5px #AAAAAA; -moz-box-shadow: 2px 2px 5px #AAAAAA; -khtml-box-shadow: 2px 2px 5px #AAAAAA; padding: 3px 4px; z-index: 401; position: absolute; left: 0; top: 0; width: auto; height: auto; display: none}
.MathJax_SVG {display: inline; font-style: normal; font-weight: normal; line-height: normal; font-size: 100%; font-size-adjust: none; text-indent: 0; text-align: left; text-transform: none; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0; min-height: 0; border: 0; padding: 0; margin: 0}
.MathJax_SVG * {transition: none; -webkit-transition: none; -moz-transition: none; -ms-transition: none; -o-transition: none}
.mjx-svg-href {fill: blue; stroke: blue}
.MathJax_SVG_Processing {visibility: hidden; position: absolute; top: 0; left: 0; width: 0; height: 0; overflow: hidden; display: block!important}
.MathJax_SVG_Processed {display: none!important}
.MathJax_SVG_ExBox {display: block!important; overflow: hidden; width: 1px; height: 60ex; min-height: 0; max-height: none; padding: 0; border: 0; margin: 0}
.MathJax_SVG_LineBox {display: table!important}
.MathJax_SVG_LineBox span {display: table-cell!important; width: 10000em!important; min-width: 0; max-width: none; padding: 0; border: 0; margin: 0}
.MathJax_SVG .noError {vertical-align: ; font-size: 90%; text-align: left; color: black; padding: 1px 3px; border: 1px solid}
</style><script type="text/javascript" src=""></script></head>

    <body style=""><div style="visibility: hidden; overflow: hidden; position: absolute; top: 0px; height: 1px; width: auto; padding: 0px; border: 0px; margin: 0px; text-align: left; text-indent: 0px; text-transform: none; line-height: normal; letter-spacing: normal; word-spacing: normal;"><div id="MathJax_SVG_Hidden"></div><svg><defs id="MathJax_SVG_glyphs"><path stroke-width="1" id="MJMATHI-4C" d="M228 637Q194 637 192 641Q191 643 191 649Q191 673 202 682Q204 683 217 683Q271 680 344 680Q485 680 506 683H518Q524 677 524 674T522 656Q517 641 513 637H475Q406 636 394 628Q387 624 380 600T313 336Q297 271 279 198T252 88L243 52Q243 48 252 48T311 46H328Q360 46 379 47T428 54T478 72T522 106T564 161Q580 191 594 228T611 270Q616 273 628 273H641Q647 264 647 262T627 203T583 83T557 9Q555 4 553 3T537 0T494 -1Q483 -1 418 -1T294 0H116Q32 0 32 10Q32 17 34 24Q39 43 44 45Q48 46 59 46H65Q92 46 125 49Q139 52 144 61Q147 65 216 339T285 628Q285 635 228 637Z"></path><path stroke-width="1" id="MJMAIN-32" d="M109 429Q82 429 66 447T50 491Q50 562 103 614T235 666Q326 666 387 610T449 465Q449 422 429 383T381 315T301 241Q265 210 201 149L142 93L218 92Q375 92 385 97Q392 99 409 186V189H449V186Q448 183 436 95T421 3V0H50V19V31Q50 38 56 46T86 81Q115 113 136 137Q145 147 170 174T204 211T233 244T261 278T284 308T305 340T320 369T333 401T340 431T343 464Q343 527 309 573T212 619Q179 619 154 602T119 569T109 550Q109 549 114 549Q132 549 151 535T170 489Q170 464 154 447T109 429Z"></path><path stroke-width="1" id="MJMATHI-48" d="M228 637Q194 637 192 641Q191 643 191 649Q191 673 202 682Q204 683 219 683Q260 681 355 681Q389 681 418 681T463 682T483 682Q499 682 499 672Q499 670 497 658Q492 641 487 638H485Q483 638 480 638T473 638T464 637T455 637Q416 636 405 634T387 623Q384 619 355 500Q348 474 340 442T328 395L324 380Q324 378 469 378H614L615 381Q615 384 646 504Q674 619 674 627T617 637Q594 637 587 639T580 648Q580 650 582 660Q586 677 588 679T604 682Q609 682 646 681T740 680Q802 680 835 681T871 682Q888 682 888 672Q888 645 876 638H874Q872 638 869 638T862 638T853 637T844 637Q805 636 794 634T776 623Q773 618 704 340T634 58Q634 51 638 51Q646 48 692 46H723Q729 38 729 37T726 19Q722 6 716 0H701Q664 2 567 2Q533 2 504 2T458 2T437 1Q420 1 420 10Q420 15 423 24Q428 43 433 45Q437 46 448 46H454Q481 46 514 49Q520 50 522 50T528 55T534 64T540 82T547 110T558 153Q565 181 569 198Q602 330 602 331T457 332H312L279 197Q245 63 245 58Q245 51 253 49T303 46H334Q340 38 340 37T337 19Q333 6 327 0H312Q275 2 178 2Q144 2 115 2T69 2T48 1Q31 1 31 10Q31 12 34 24Q39 43 44 45Q48 46 59 46H65Q92 46 125 49Q139 52 144 61Q147 65 216 339T285 628Q285 635 228 637Z"></path><path stroke-width="1" id="MJMAIN-31" d="M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z"></path><path stroke-width="1" id="MJMAIN-28" d="M94 250Q94 319 104 381T127 488T164 576T202 643T244 695T277 729T302 750H315H319Q333 750 333 741Q333 738 316 720T275 667T226 581T184 443T167 250T184 58T225 -81T274 -167T316 -220T333 -241Q333 -250 318 -250H315H302L274 -226Q180 -141 137 -14T94 250Z"></path><path stroke-width="1" id="MJMATHI-63" d="M34 159Q34 268 120 355T306 442Q362 442 394 418T427 355Q427 326 408 306T360 285Q341 285 330 295T319 325T330 359T352 380T366 386H367Q367 388 361 392T340 400T306 404Q276 404 249 390Q228 381 206 359Q162 315 142 235T121 119Q121 73 147 50Q169 26 205 26H209Q321 26 394 111Q403 121 406 121Q410 121 419 112T429 98T420 83T391 55T346 25T282 0T202 -11Q127 -11 81 37T34 159Z"></path><path stroke-width="1" id="MJMATHI-75" d="M21 287Q21 295 30 318T55 370T99 420T158 442Q204 442 227 417T250 358Q250 340 216 246T182 105Q182 62 196 45T238 27T291 44T328 78L339 95Q341 99 377 247Q407 367 413 387T427 416Q444 431 463 431Q480 431 488 421T496 402L420 84Q419 79 419 68Q419 43 426 35T447 26Q469 29 482 57T512 145Q514 153 532 153Q551 153 551 144Q550 139 549 130T540 98T523 55T498 17T462 -8Q454 -10 438 -10Q372 -10 347 46Q345 45 336 36T318 21T296 6T267 -6T233 -11Q189 -11 155 7Q103 38 103 113Q103 170 138 262T173 379Q173 380 173 381Q173 390 173 393T169 400T158 404H154Q131 404 112 385T82 344T65 302T57 280Q55 278 41 278H27Q21 284 21 287Z"></path><path stroke-width="1" id="MJMATHI-72" d="M21 287Q22 290 23 295T28 317T38 348T53 381T73 411T99 433T132 442Q161 442 183 430T214 408T225 388Q227 382 228 382T236 389Q284 441 347 441H350Q398 441 422 400Q430 381 430 363Q430 333 417 315T391 292T366 288Q346 288 334 299T322 328Q322 376 378 392Q356 405 342 405Q286 405 239 331Q229 315 224 298T190 165Q156 25 151 16Q138 -11 108 -11Q95 -11 87 -5T76 7T74 17Q74 30 114 189T154 366Q154 405 128 405Q107 405 92 377T68 316T57 280Q55 278 41 278H27Q21 284 21 287Z"></path><path stroke-width="1" id="MJMATHI-6C" d="M117 59Q117 26 142 26Q179 26 205 131Q211 151 215 152Q217 153 225 153H229Q238 153 241 153T246 151T248 144Q247 138 245 128T234 90T214 43T183 6T137 -11Q101 -11 70 11T38 85Q38 97 39 102L104 360Q167 615 167 623Q167 626 166 628T162 632T157 634T149 635T141 636T132 637T122 637Q112 637 109 637T101 638T95 641T94 647Q94 649 96 661Q101 680 107 682T179 688Q194 689 213 690T243 693T254 694Q266 694 266 686Q266 675 193 386T118 83Q118 81 118 75T117 65V59Z"></path><path stroke-width="1" id="MJMAIN-29" d="M60 749L64 750Q69 750 74 750H86L114 726Q208 641 251 514T294 250Q294 182 284 119T261 12T224 -76T186 -143T145 -194T113 -227T90 -246Q87 -249 86 -250H74Q66 -250 63 -250T58 -247T55 -238Q56 -237 66 -225Q221 -64 221 250T66 725Q56 737 55 738Q55 746 60 749Z"></path><path stroke-width="1" id="MJMATHI-64" d="M366 683Q367 683 438 688T511 694Q523 694 523 686Q523 679 450 384T375 83T374 68Q374 26 402 26Q411 27 422 35Q443 55 463 131Q469 151 473 152Q475 153 483 153H487H491Q506 153 506 145Q506 140 503 129Q490 79 473 48T445 8T417 -8Q409 -10 393 -10Q359 -10 336 5T306 36L300 51Q299 52 296 50Q294 48 292 46Q233 -10 172 -10Q117 -10 75 30T33 157Q33 205 53 255T101 341Q148 398 195 420T280 442Q336 442 364 400Q369 394 369 396Q370 400 396 505T424 616Q424 629 417 632T378 637H357Q351 643 351 645T353 664Q358 683 366 683ZM352 326Q329 405 277 405Q242 405 210 374T160 293Q131 214 119 129Q119 126 119 118T118 106Q118 61 136 44T179 26Q233 26 290 98L298 109L352 326Z"></path><path stroke-width="1" id="MJMATHI-69" d="M184 600Q184 624 203 642T247 661Q265 661 277 649T290 619Q290 596 270 577T226 557Q211 557 198 567T184 600ZM21 287Q21 295 30 318T54 369T98 420T158 442Q197 442 223 419T250 357Q250 340 236 301T196 196T154 83Q149 61 149 51Q149 26 166 26Q175 26 185 29T208 43T235 78T260 137Q263 149 265 151T282 153Q302 153 302 143Q302 135 293 112T268 61T223 11T161 -11Q129 -11 102 10T74 74Q74 91 79 106T122 220Q160 321 166 341T173 380Q173 404 156 404H154Q124 404 99 371T61 287Q60 286 59 284T58 281T56 279T53 278T49 278T41 278H27Q21 284 21 287Z"></path><path stroke-width="1" id="MJMATHI-76" d="M173 380Q173 405 154 405Q130 405 104 376T61 287Q60 286 59 284T58 281T56 279T53 278T49 278T41 278H27Q21 284 21 287Q21 294 29 316T53 368T97 419T160 441Q202 441 225 417T249 361Q249 344 246 335Q246 329 231 291T200 202T182 113Q182 86 187 69Q200 26 250 26Q287 26 319 60T369 139T398 222T409 277Q409 300 401 317T383 343T365 361T357 383Q357 405 376 424T417 443Q436 443 451 425T467 367Q467 340 455 284T418 159T347 40T241 -11Q177 -11 139 22Q102 54 102 117Q102 148 110 181T151 298Q173 362 173 380Z"></path><path stroke-width="1" id="MJMAIN-2212" d="M84 237T84 250T98 270H679Q694 262 694 250T679 230H98Q84 237 84 250Z"></path><path stroke-width="1" id="MJMAIN-2F" d="M423 750Q432 750 438 744T444 730Q444 725 271 248T92 -240Q85 -250 75 -250Q68 -250 62 -245T56 -231Q56 -221 230 257T407 740Q411 750 423 750Z"></path><path stroke-width="1" id="MJMAIN-394" d="M51 0Q46 4 46 7Q46 9 215 357T388 709Q391 716 416 716Q439 716 444 709Q447 705 616 357T786 7Q786 4 781 0H51ZM507 344L384 596L137 92L383 91H630Q630 93 507 344Z"></path><path stroke-width="1" id="MJMAIN-3D" d="M56 347Q56 360 70 367H707Q722 359 722 347Q722 336 708 328L390 327H72Q56 332 56 347ZM56 153Q56 168 72 173H708Q722 163 722 153Q722 140 707 133H70Q56 140 56 153Z"></path><path stroke-width="1" id="MJMAIN-64" d="M376 495Q376 511 376 535T377 568Q377 613 367 624T316 637H298V660Q298 683 300 683L310 684Q320 685 339 686T376 688Q393 689 413 690T443 693T454 694H457V390Q457 84 458 81Q461 61 472 55T517 46H535V0Q533 0 459 -5T380 -11H373V44L365 37Q307 -11 235 -11Q158 -11 96 50T34 215Q34 315 97 378T244 442Q319 442 376 393V495ZM373 342Q328 405 260 405Q211 405 173 369Q146 341 139 305T131 211Q131 155 138 120T173 59Q203 26 251 26Q322 26 373 103V342Z"></path><path stroke-width="1" id="MJMAIN-69" d="M69 609Q69 637 87 653T131 669Q154 667 171 652T188 609Q188 579 171 564T129 549Q104 549 87 564T69 609ZM247 0Q232 3 143 3Q132 3 106 3T56 1L34 0H26V46H42Q70 46 91 49Q100 53 102 60T104 102V205V293Q104 345 102 359T88 378Q74 385 41 385H30V408Q30 431 32 431L42 432Q52 433 70 434T106 436Q123 437 142 438T171 441T182 442H185V62Q190 52 197 50T232 46H255V0H247Z"></path><path stroke-width="1" id="MJMAIN-76" d="M338 431Q344 429 422 429Q479 429 503 431H508V385H497Q439 381 423 345Q421 341 356 172T288 -2Q283 -11 263 -11Q244 -11 239 -2Q99 359 98 364Q93 378 82 381T43 385H19V431H25L33 430Q41 430 53 430T79 430T104 429T122 428Q217 428 232 431H240V385H226Q187 384 184 370Q184 366 235 234L286 102L377 341V349Q377 363 367 372T349 383T335 385H331V431H338Z"></path><path stroke-width="1" id="MJMATHI-3C3" d="M184 -11Q116 -11 74 34T31 147Q31 247 104 333T274 430Q275 431 414 431H552Q553 430 555 429T559 427T562 425T565 422T567 420T569 416T570 412T571 407T572 401Q572 357 507 357Q500 357 490 357T476 358H416L421 348Q439 310 439 263Q439 153 359 71T184 -11ZM361 278Q361 358 276 358Q152 358 115 184Q114 180 114 178Q106 141 106 117Q106 67 131 47T188 26Q242 26 287 73Q316 103 334 153T356 233T361 278Z"></path><path stroke-width="1" id="MJMAINB-75" d="M40 442L134 446Q228 450 229 450H235V273V165Q235 90 238 74T254 52Q268 46 304 46H319Q352 46 380 67T419 121L420 123Q424 135 425 199Q425 201 425 207Q425 233 425 249V316Q425 354 423 363T410 376Q396 380 369 380H356V442L554 450V267Q554 84 556 79Q561 62 610 62H623V31Q623 0 622 0Q603 0 527 -3T432 -6Q431 -6 431 25V56L420 45Q373 6 332 -1Q313 -6 281 -6Q208 -6 165 14T109 87L107 98L106 230Q106 358 104 366Q96 380 50 380H37V442H40Z"></path><path stroke-width="1" id="MJMAIN-30" d="M96 585Q152 666 249 666Q297 666 345 640T423 548Q460 465 460 320Q460 165 417 83Q397 41 362 16T301 -15T250 -22Q224 -22 198 -16T137 16T82 83Q39 165 39 320Q39 494 96 585ZM321 597Q291 629 250 629Q208 629 178 597Q153 571 145 525T137 333Q137 175 145 125T181 46Q209 16 250 16Q290 16 318 46Q347 76 354 130T362 333Q362 478 354 524T321 597Z"></path><path stroke-width="1" id="MJMATHI-3BB" d="M166 673Q166 685 183 694H202Q292 691 316 644Q322 629 373 486T474 207T524 67Q531 47 537 34T546 15T551 6T555 2T556 -2T550 -11H482Q457 3 450 18T399 152L354 277L340 262Q327 246 293 207T236 141Q211 112 174 69Q123 9 111 -1T83 -12Q47 -12 47 20Q47 37 61 52T199 187Q229 216 266 252T321 306L338 322Q338 323 288 462T234 612Q214 657 183 657Q166 657 166 673Z"></path><path stroke-width="1" id="MJMATHI-49" d="M43 1Q26 1 26 10Q26 12 29 24Q34 43 39 45Q42 46 54 46H60Q120 46 136 53Q137 53 138 54Q143 56 149 77T198 273Q210 318 216 344Q286 624 286 626Q284 630 284 631Q274 637 213 637H193Q184 643 189 662Q193 677 195 680T209 683H213Q285 681 359 681Q481 681 487 683H497Q504 676 504 672T501 655T494 639Q491 637 471 637Q440 637 407 634Q393 631 388 623Q381 609 337 432Q326 385 315 341Q245 65 245 59Q245 52 255 50T307 46H339Q345 38 345 37T342 19Q338 6 332 0H316Q279 2 179 2Q143 2 113 2T65 2T43 1Z"></path><path stroke-width="1" id="MJMAIN-2B" d="M56 237T56 250T70 270H369V420L370 570Q380 583 389 583Q402 583 409 568V270H707Q722 262 722 250T707 230H409V-68Q401 -82 391 -82H389H387Q375 -82 369 -68V230H70Q56 237 56 250Z"></path><path stroke-width="1" id="MJMATHI-3BC" d="M58 -216Q44 -216 34 -208T23 -186Q23 -176 96 116T173 414Q186 442 219 442Q231 441 239 435T249 423T251 413Q251 401 220 279T187 142Q185 131 185 107V99Q185 26 252 26Q261 26 270 27T287 31T302 38T315 45T327 55T338 65T348 77T356 88T365 100L372 110L408 253Q444 395 448 404Q461 431 491 431Q504 431 512 424T523 412T525 402L449 84Q448 79 448 68Q448 43 455 35T476 26Q485 27 496 35Q517 55 537 131Q543 151 547 152Q549 153 557 153H561Q580 153 580 144Q580 138 575 117T555 63T523 13Q510 0 491 -8Q483 -10 467 -10Q446 -10 429 -4T402 11T385 29T376 44T374 51L368 45Q362 39 350 30T324 12T288 -4T246 -11Q199 -11 153 12L129 -85Q108 -167 104 -180T92 -202Q76 -216 58 -216Z"></path><path stroke-width="1" id="MJMAIN-2207" d="M46 676Q46 679 51 683H781Q786 679 786 676Q786 674 617 326T444 -26Q439 -33 416 -33T388 -26Q385 -22 216 326T46 676ZM697 596Q697 597 445 597T193 596Q195 591 319 336T445 80L697 596Z"></path><path stroke-width="1" id="MJMATHI-54" d="M40 437Q21 437 21 445Q21 450 37 501T71 602L88 651Q93 669 101 677H569H659Q691 677 697 676T704 667Q704 661 687 553T668 444Q668 437 649 437Q640 437 637 437T631 442L629 445Q629 451 635 490T641 551Q641 586 628 604T573 629Q568 630 515 631Q469 631 457 630T439 622Q438 621 368 343T298 60Q298 48 386 46Q418 46 427 45T436 36Q436 31 433 22Q429 4 424 1L422 0Q419 0 415 0Q410 0 363 1T228 2Q99 2 64 0H49Q43 6 43 9T45 27Q49 40 55 46H83H94Q174 46 189 55Q190 56 191 56Q196 59 201 76T241 233Q258 301 269 344Q339 619 339 625Q339 630 310 630H279Q212 630 191 624Q146 614 121 583T67 467Q60 445 57 441T43 437H40Z"></path><path stroke-width="1" id="MJMAIN-22C5" d="M78 250Q78 274 95 292T138 310Q162 310 180 294T199 251Q199 226 182 208T139 190T96 207T78 250Z"></path><path stroke-width="1" id="MJMATHI-6E" d="M21 287Q22 293 24 303T36 341T56 388T89 425T135 442Q171 442 195 424T225 390T231 369Q231 367 232 367L243 378Q304 442 382 442Q436 442 469 415T503 336T465 179T427 52Q427 26 444 26Q450 26 453 27Q482 32 505 65T540 145Q542 153 560 153Q580 153 580 145Q580 144 576 130Q568 101 554 73T508 17T439 -10Q392 -10 371 17T350 73Q350 92 386 193T423 345Q423 404 379 404H374Q288 404 229 303L222 291L189 157Q156 26 151 16Q138 -11 108 -11Q95 -11 87 -5T76 7T74 17Q74 30 112 180T152 343Q153 348 153 366Q153 405 129 405Q91 405 66 305Q60 285 60 284Q58 278 41 278H27Q21 284 21 287Z"></path><path stroke-width="1" id="MJMATHI-66" d="M118 -162Q120 -162 124 -164T135 -167T147 -168Q160 -168 171 -155T187 -126Q197 -99 221 27T267 267T289 382V385H242Q195 385 192 387Q188 390 188 397L195 425Q197 430 203 430T250 431Q298 431 298 432Q298 434 307 482T319 540Q356 705 465 705Q502 703 526 683T550 630Q550 594 529 578T487 561Q443 561 443 603Q443 622 454 636T478 657L487 662Q471 668 457 668Q445 668 434 658T419 630Q412 601 403 552T387 469T380 433Q380 431 435 431Q480 431 487 430T498 424Q499 420 496 407T491 391Q489 386 482 386T428 385H372L349 263Q301 15 282 -47Q255 -132 212 -173Q175 -205 139 -205Q107 -205 81 -186T55 -132Q55 -95 76 -78T118 -61Q162 -61 162 -103Q162 -122 151 -136T127 -157L118 -162Z"></path><path stroke-width="1" id="MJMAIN-D7" d="M630 29Q630 9 609 9Q604 9 587 25T493 118L389 222L284 117Q178 13 175 11Q171 9 168 9Q160 9 154 15T147 29Q147 36 161 51T255 146L359 250L255 354Q174 435 161 449T147 471Q147 480 153 485T168 490Q173 490 175 489Q178 487 284 383L389 278L493 382Q570 459 587 475T609 491Q630 491 630 471Q630 464 620 453T522 355L418 250L522 145Q606 61 618 48T630 29Z"></path><path stroke-width="1" id="MJMATHI-45" d="M492 213Q472 213 472 226Q472 230 477 250T482 285Q482 316 461 323T364 330H312Q311 328 277 192T243 52Q243 48 254 48T334 46Q428 46 458 48T518 61Q567 77 599 117T670 248Q680 270 683 272Q690 274 698 274Q718 274 718 261Q613 7 608 2Q605 0 322 0H133Q31 0 31 11Q31 13 34 25Q38 41 42 43T65 46Q92 46 125 49Q139 52 144 61Q146 66 215 342T285 622Q285 629 281 629Q273 632 228 634H197Q191 640 191 642T193 659Q197 676 203 680H757Q764 676 764 669Q764 664 751 557T737 447Q735 440 717 440H705Q698 445 698 453L701 476Q704 500 704 528Q704 558 697 578T678 609T643 625T596 632T532 634H485Q397 633 392 631Q388 629 386 622Q385 619 355 499T324 377Q347 376 372 376H398Q464 376 489 391T534 472Q538 488 540 490T557 493Q562 493 565 493T570 492T572 491T574 487T577 483L544 351Q511 218 508 216Q505 213 492 213Z"></path><path stroke-width="1" id="MJMAIN-67" d="M329 409Q373 453 429 453Q459 453 472 434T485 396Q485 382 476 371T449 360Q416 360 412 390Q410 404 415 411Q415 412 416 414V415Q388 412 363 393Q355 388 355 386Q355 385 359 381T368 369T379 351T388 325T392 292Q392 230 343 187T222 143Q172 143 123 171Q112 153 112 133Q112 98 138 81Q147 75 155 75T227 73Q311 72 335 67Q396 58 431 26Q470 -13 470 -72Q470 -139 392 -175Q332 -206 250 -206Q167 -206 107 -175Q29 -140 29 -75Q29 -39 50 -15T92 18L103 24Q67 55 67 108Q67 155 96 193Q52 237 52 292Q52 355 102 398T223 442Q274 442 318 416L329 409ZM299 343Q294 371 273 387T221 404Q192 404 171 388T145 343Q142 326 142 292Q142 248 149 227T179 192Q196 182 222 182Q244 182 260 189T283 207T294 227T299 242Q302 258 302 292T299 343ZM403 -75Q403 -50 389 -34T348 -11T299 -2T245 0H218Q151 0 138 -6Q118 -15 107 -34T95 -74Q95 -84 101 -97T122 -127T170 -155T250 -167Q319 -167 361 -139T403 -75Z"></path><path stroke-width="1" id="MJMAIN-72" d="M36 46H50Q89 46 97 60V68Q97 77 97 91T98 122T98 161T98 203Q98 234 98 269T98 328L97 351Q94 370 83 376T38 385H20V408Q20 431 22 431L32 432Q42 433 60 434T96 436Q112 437 131 438T160 441T171 442H174V373Q213 441 271 441H277Q322 441 343 419T364 373Q364 352 351 337T313 322Q288 322 276 338T263 372Q263 381 265 388T270 400T273 405Q271 407 250 401Q234 393 226 386Q179 341 179 207V154Q179 141 179 127T179 101T180 81T180 66V61Q181 59 183 57T188 54T193 51T200 49T207 48T216 47T225 47T235 46T245 46H276V0H267Q249 3 140 3Q37 3 28 0H20V46H36Z"></path><path stroke-width="1" id="MJMAIN-61" d="M137 305T115 305T78 320T63 359Q63 394 97 421T218 448Q291 448 336 416T396 340Q401 326 401 309T402 194V124Q402 76 407 58T428 40Q443 40 448 56T453 109V145H493V106Q492 66 490 59Q481 29 455 12T400 -6T353 12T329 54V58L327 55Q325 52 322 49T314 40T302 29T287 17T269 6T247 -2T221 -8T190 -11Q130 -11 82 20T34 107Q34 128 41 147T68 188T116 225T194 253T304 268H318V290Q318 324 312 340Q290 411 215 411Q197 411 181 410T156 406T148 403Q170 388 170 359Q170 334 154 320ZM126 106Q126 75 150 51T209 26Q247 26 276 49T315 109Q317 116 318 175Q318 233 317 233Q309 233 296 232T251 223T193 203T147 166T126 106Z"></path><path stroke-width="1" id="MJMATHI-3B1" d="M34 156Q34 270 120 356T309 442Q379 442 421 402T478 304Q484 275 485 237V208Q534 282 560 374Q564 388 566 390T582 393Q603 393 603 385Q603 376 594 346T558 261T497 161L486 147L487 123Q489 67 495 47T514 26Q528 28 540 37T557 60Q559 67 562 68T577 70Q597 70 597 62Q597 56 591 43Q579 19 556 5T512 -10H505Q438 -10 414 62L411 69L400 61Q390 53 370 41T325 18T267 -2T203 -11Q124 -11 79 39T34 156ZM208 26Q257 26 306 47T379 90L403 112Q401 255 396 290Q382 405 304 405Q235 405 183 332Q156 292 139 224T121 120Q121 71 146 49T208 26Z"></path><path stroke-width="1" id="MJMATHI-46" d="M48 1Q31 1 31 11Q31 13 34 25Q38 41 42 43T65 46Q92 46 125 49Q139 52 144 61Q146 66 215 342T285 622Q285 629 281 629Q273 632 228 634H197Q191 640 191 642T193 659Q197 676 203 680H742Q749 676 749 669Q749 664 736 557T722 447Q720 440 702 440H690Q683 445 683 453Q683 454 686 477T689 530Q689 560 682 579T663 610T626 626T575 633T503 634H480Q398 633 393 631Q388 629 386 623Q385 622 352 492L320 363H375Q378 363 398 363T426 364T448 367T472 374T489 386Q502 398 511 419T524 457T529 475Q532 480 548 480H560Q567 475 567 470Q567 467 536 339T502 207Q500 200 482 200H470Q463 206 463 212Q463 215 468 234T473 274Q473 303 453 310T364 317H309L277 190Q245 66 245 60Q245 46 334 46H359Q365 40 365 39T363 19Q359 6 353 0H336Q295 2 185 2Q120 2 86 2T48 1Z"></path><path stroke-width="1" id="MJMATHI-3B2" d="M29 -194Q23 -188 23 -186Q23 -183 102 134T186 465Q208 533 243 584T309 658Q365 705 429 705H431Q493 705 533 667T573 570Q573 465 469 396L482 383Q533 332 533 252Q533 139 448 65T257 -10Q227 -10 203 -2T165 17T143 40T131 59T126 65L62 -188Q60 -194 42 -194H29ZM353 431Q392 431 427 419L432 422Q436 426 439 429T449 439T461 453T472 471T484 495T493 524T501 560Q503 569 503 593Q503 611 502 616Q487 667 426 667Q384 667 347 643T286 582T247 514T224 455Q219 439 186 308T152 168Q151 163 151 147Q151 99 173 68Q204 26 260 26Q302 26 349 51T425 137Q441 171 449 214T457 279Q457 337 422 372Q380 358 347 358H337Q258 358 258 389Q258 396 261 403Q275 431 353 431Z"></path><path stroke-width="1" id="MJMATHI-6B" d="M121 647Q121 657 125 670T137 683Q138 683 209 688T282 694Q294 694 294 686Q294 679 244 477Q194 279 194 272Q213 282 223 291Q247 309 292 354T362 415Q402 442 438 442Q468 442 485 423T503 369Q503 344 496 327T477 302T456 291T438 288Q418 288 406 299T394 328Q394 353 410 369T442 390L458 393Q446 405 434 405H430Q398 402 367 380T294 316T228 255Q230 254 243 252T267 246T293 238T320 224T342 206T359 180T365 147Q365 130 360 106T354 66Q354 26 381 26Q429 26 459 145Q461 153 479 153H483Q499 153 499 144Q499 139 496 130Q455 -11 378 -11Q333 -11 305 15T277 90Q277 108 280 121T283 145Q283 167 269 183T234 206T200 217T182 220H180Q168 178 159 139T145 81T136 44T129 20T122 7T111 -2Q98 -11 83 -11Q66 -11 57 -1T48 16Q48 26 85 176T158 471L195 616Q196 629 188 632T149 637H144Q134 637 131 637T124 640T121 647Z"></path><path stroke-width="1" id="MJMATHI-70" d="M23 287Q24 290 25 295T30 317T40 348T55 381T75 411T101 433T134 442Q209 442 230 378L240 387Q302 442 358 442Q423 442 460 395T497 281Q497 173 421 82T249 -10Q227 -10 210 -4Q199 1 187 11T168 28L161 36Q160 35 139 -51T118 -138Q118 -144 126 -145T163 -148H188Q194 -155 194 -157T191 -175Q188 -187 185 -190T172 -194Q170 -194 161 -194T127 -193T65 -192Q-5 -192 -24 -194H-32Q-39 -187 -39 -183Q-37 -156 -26 -148H-6Q28 -147 33 -136Q36 -130 94 103T155 350Q156 355 156 364Q156 405 131 405Q109 405 94 377T71 316T59 280Q57 278 43 278H29Q23 284 23 287ZM178 102Q200 26 252 26Q282 26 310 49T356 107Q374 141 392 215T411 325V331Q411 405 350 405Q339 405 328 402T306 393T286 380T269 365T254 350T243 336T235 326L232 322Q232 321 229 308T218 264T204 212Q178 106 178 102Z"></path><path stroke-width="1" id="MJMATHI-67" d="M311 43Q296 30 267 15T206 0Q143 0 105 45T66 160Q66 265 143 353T314 442Q361 442 401 394L404 398Q406 401 409 404T418 412T431 419T447 422Q461 422 470 413T480 394Q480 379 423 152T363 -80Q345 -134 286 -169T151 -205Q10 -205 10 -137Q10 -111 28 -91T74 -71Q89 -71 102 -80T116 -111Q116 -121 114 -130T107 -144T99 -154T92 -162L90 -164H91Q101 -167 151 -167Q189 -167 211 -155Q234 -144 254 -122T282 -75Q288 -56 298 -13Q311 35 311 43ZM384 328L380 339Q377 350 375 354T369 368T359 382T346 393T328 402T306 405Q262 405 221 352Q191 313 171 233T151 117Q151 38 213 38Q269 38 323 108L331 118L384 328Z"></path><path stroke-width="1" id="MJMAIN-2C" d="M78 35T78 60T94 103T137 121Q165 121 187 96T210 8Q210 -27 201 -60T180 -117T154 -158T130 -185T117 -194Q113 -194 104 -185T95 -172Q95 -168 106 -156T131 -126T157 -76T173 -3V9L172 8Q170 7 167 6T161 3T152 1T140 0Q113 0 96 17Z"></path><path stroke-width="1" id="MJMAIN-2E" d="M78 60Q78 84 95 102T138 120Q162 120 180 104T199 61Q199 36 182 18T139 0T96 17T78 60Z"></path><path stroke-width="1" id="MJMAIN-2202" d="M202 508Q179 508 169 520T158 547Q158 557 164 577T185 624T230 675T301 710L333 715H345Q378 715 384 714Q447 703 489 661T549 568T566 457Q566 362 519 240T402 53Q321 -22 223 -22Q123 -22 73 56Q42 102 42 148V159Q42 276 129 370T322 465Q383 465 414 434T455 367L458 378Q478 461 478 515Q478 603 437 639T344 676Q266 676 223 612Q264 606 264 572Q264 547 246 528T202 508ZM430 306Q430 372 401 400T333 428Q270 428 222 382Q197 354 183 323T150 221Q132 149 132 116Q132 21 232 21Q244 21 250 22Q327 35 374 112Q389 137 409 196T430 306Z"></path><path stroke-width="1" id="MJMATHI-74" d="M26 385Q19 392 19 395Q19 399 22 411T27 425Q29 430 36 430T87 431H140L159 511Q162 522 166 540T173 566T179 586T187 603T197 615T211 624T229 626Q247 625 254 615T261 596Q261 589 252 549T232 470L222 433Q222 431 272 431H323Q330 424 330 420Q330 398 317 385H210L174 240Q135 80 135 68Q135 26 162 26Q197 26 230 60T283 144Q285 150 288 151T303 153H307Q322 153 322 145Q322 142 319 133Q314 117 301 95T267 48T216 6T155 -11Q125 -11 98 4T59 56Q57 64 57 83V101L92 241Q127 382 128 383Q128 385 77 385H26Z"></path><path stroke-width="1" id="MJMATHI-78" d="M52 289Q59 331 106 386T222 442Q257 442 286 424T329 379Q371 442 430 442Q467 442 494 420T522 361Q522 332 508 314T481 292T458 288Q439 288 427 299T415 328Q415 374 465 391Q454 404 425 404Q412 404 406 402Q368 386 350 336Q290 115 290 78Q290 50 306 38T341 26Q378 26 414 59T463 140Q466 150 469 151T485 153H489Q504 153 504 145Q504 144 502 134Q486 77 440 33T333 -11Q263 -11 227 52Q186 -10 133 -10H127Q78 -10 57 16T35 71Q35 103 54 123T99 143Q142 143 142 101Q142 81 130 66T107 46T94 41L91 40Q91 39 97 36T113 29T132 26Q168 26 194 71Q203 87 217 139T245 247T261 313Q266 340 266 352Q266 380 251 392T217 404Q177 404 142 372T93 290Q91 281 88 280T72 278H58Q52 284 52 289Z"></path><path stroke-width="1" id="MJMATHI-53" d="M308 24Q367 24 416 76T466 197Q466 260 414 284Q308 311 278 321T236 341Q176 383 176 462Q176 523 208 573T273 648Q302 673 343 688T407 704H418H425Q521 704 564 640Q565 640 577 653T603 682T623 704Q624 704 627 704T632 705Q645 705 645 698T617 577T585 459T569 456Q549 456 549 465Q549 471 550 475Q550 478 551 494T553 520Q553 554 544 579T526 616T501 641Q465 662 419 662Q362 662 313 616T263 510Q263 480 278 458T319 427Q323 425 389 408T456 390Q490 379 522 342T554 242Q554 216 546 186Q541 164 528 137T492 78T426 18T332 -20Q320 -22 298 -22Q199 -22 144 33L134 44L106 13Q83 -14 78 -18T65 -22Q52 -22 52 -14Q52 -11 110 221Q112 227 130 227H143Q149 221 149 216Q149 214 148 207T144 186T142 153Q144 114 160 87T203 47T255 29T308 24Z"></path><path stroke-width="1" id="MJMATHI-3BA" d="M83 -11Q70 -11 62 -4T51 8T49 17Q49 30 96 217T147 414Q160 442 193 442Q205 441 213 435T223 422T225 412Q225 401 208 337L192 270Q193 269 208 277T235 292Q252 304 306 349T396 412T467 431Q489 431 500 420T512 391Q512 366 494 347T449 327Q430 327 418 338T405 368Q405 370 407 380L397 375Q368 360 315 315L253 266L240 257H245Q262 257 300 251T366 230Q422 203 422 150Q422 140 417 114T411 67Q411 26 437 26Q484 26 513 137Q516 149 519 151T535 153Q554 153 554 144Q554 121 527 64T457 -7Q447 -10 431 -10Q386 -10 360 17T333 90Q333 108 336 122T339 146Q339 170 320 186T271 209T222 218T185 221H180L155 122Q129 22 126 16Q113 -11 83 -11Z"></path><path stroke-width="1" id="MJMAINB-3D" d="M87 333Q64 343 64 362Q64 383 84 391Q89 393 448 393H807Q808 392 811 390T817 386T823 381T827 374T829 363Q829 345 807 333H87ZM87 109Q64 118 64 139Q64 159 86 168Q89 169 448 169H807L812 166Q816 163 818 162T823 157T827 149T829 139Q829 118 807 109H87Z"></path><path stroke-width="1" id="MJMAINB-44" d="M39 624V686H270H310H408Q500 686 545 680T638 649Q768 584 805 438Q817 388 817 338Q817 171 702 75Q628 17 515 2Q504 1 270 0H39V62H147V624H39ZM655 337Q655 370 655 390T650 442T639 494T616 540T580 580T526 607T451 623Q443 624 368 624H298V62H377H387H407Q445 62 472 65T540 83T606 129Q629 156 640 195T653 262T655 337Z"></path><path stroke-width="1" id="MJMAINB-30" d="M266 654H280H282Q500 654 524 418Q529 370 529 320Q529 125 456 52Q397 -10 287 -10Q110 -10 63 154Q45 212 45 316Q45 504 113 585Q140 618 185 636T266 654ZM374 548Q347 604 286 604Q247 604 218 575Q197 552 193 511T188 311Q188 159 196 116Q202 87 225 64T287 41Q339 41 367 87Q379 107 382 152T386 329Q386 518 374 548Z"></path><path stroke-width="1" id="MJMAINB-46" d="M425 0L228 3Q63 3 51 0H39V62H147V618H39V680H644V676Q647 670 659 552T675 428V424H613Q613 433 605 477Q599 511 589 535T562 574T530 599T488 612T441 617T387 618H368H304V371H333Q389 373 411 390T437 468V488H499V192H437V212Q436 244 430 263T408 292T378 305T333 309H304V62H439V0H425Z"></path><path stroke-width="1" id="MJMAIN-5B" d="M118 -250V750H255V710H158V-210H255V-250H118Z"></path><path stroke-width="1" id="MJMATHI-3C1" d="M58 -216Q25 -216 23 -186Q23 -176 73 26T127 234Q143 289 182 341Q252 427 341 441Q343 441 349 441T359 442Q432 442 471 394T510 276Q510 219 486 165T425 74T345 13T266 -10H255H248Q197 -10 165 35L160 41L133 -71Q108 -168 104 -181T92 -202Q76 -216 58 -216ZM424 322Q424 359 407 382T357 405Q322 405 287 376T231 300Q217 269 193 170L176 102Q193 26 260 26Q298 26 334 62Q367 92 389 158T418 266T424 322Z"></path><path stroke-width="1" id="MJMAIN-5D" d="M22 710V750H159V-250H22V-210H119V710H22Z"></path><path stroke-width="1" id="MJMAIN-74" d="M27 422Q80 426 109 478T141 600V615H181V431H316V385H181V241Q182 116 182 100T189 68Q203 29 238 29Q282 29 292 100Q293 108 293 146V181H333V146V134Q333 57 291 17Q264 -10 221 -10Q187 -10 162 2T124 33T105 68T98 100Q97 107 97 248V385H18V422H27Z"></path><path stroke-width="1" id="MJMAIN-68" d="M41 46H55Q94 46 102 60V68Q102 77 102 91T102 124T102 167T103 217T103 272T103 329Q103 366 103 407T103 482T102 542T102 586T102 603Q99 622 88 628T43 637H25V660Q25 683 27 683L37 684Q47 685 66 686T103 688Q120 689 140 690T170 693T181 694H184V367Q244 442 328 442Q451 442 463 329Q464 322 464 190V104Q464 66 466 59T477 49Q498 46 526 46H542V0H534L510 1Q487 2 460 2T422 3Q319 3 310 0H302V46H318Q379 46 379 62Q380 64 380 200Q379 335 378 343Q372 371 358 385T334 402T308 404Q263 404 229 370Q202 343 195 315T187 232V168V108Q187 78 188 68T191 55T200 49Q221 46 249 46H265V0H257L234 1Q210 2 183 2T145 3Q42 3 33 0H25V46H41Z"></path><path stroke-width="1" id="MJMAINI-69" d="M234 599Q234 620 251 638T292 656Q306 656 319 647T332 617Q332 594 313 577T273 560Q260 560 247 569T234 599ZM75 287Q75 292 82 313T103 362T142 413T196 441H214Q248 441 270 419T293 357Q292 338 289 330T245 208Q193 72 193 46Q193 26 209 26Q228 26 247 43Q273 71 292 136Q295 148 297 150T311 153H317Q327 153 330 153T337 150T340 143Q340 133 330 105T292 41T228 -8Q220 -10 204 -10Q160 -10 141 15T122 71Q122 98 171 227T221 384Q221 396 218 400T203 405Q175 403 156 374T128 312T116 279Q115 278 97 278H81Q75 284 75 287Z"></path><path stroke-width="1" id="MJMATHI-3B4" d="M195 609Q195 656 227 686T302 717Q319 716 351 709T407 697T433 690Q451 682 451 662Q451 644 438 628T403 612Q382 612 348 641T288 671T249 657T235 628Q235 584 334 463Q401 379 401 292Q401 169 340 80T205 -10H198Q127 -10 83 36T36 153Q36 286 151 382Q191 413 252 434Q252 435 245 449T230 481T214 521T201 566T195 609ZM112 130Q112 83 136 55T204 27Q233 27 256 51T291 111T309 178T316 232Q316 267 309 298T295 344T269 400L259 396Q215 381 183 342T137 256T118 179T112 130Z"></path><path stroke-width="1" id="MJMAIN-65" d="M28 218Q28 273 48 318T98 391T163 433T229 448Q282 448 320 430T378 380T406 316T415 245Q415 238 408 231H126V216Q126 68 226 36Q246 30 270 30Q312 30 342 62Q359 79 369 104L379 128Q382 131 395 131H398Q415 131 415 121Q415 117 412 108Q393 53 349 21T250 -11Q155 -11 92 58T28 218ZM333 275Q322 403 238 411H236Q228 411 220 410T195 402T166 381T143 340T127 274V267H333V275Z"></path><path stroke-width="1" id="MJMATHI-6A" d="M297 596Q297 627 318 644T361 661Q378 661 389 651T403 623Q403 595 384 576T340 557Q322 557 310 567T297 596ZM288 376Q288 405 262 405Q240 405 220 393T185 362T161 325T144 293L137 279Q135 278 121 278H107Q101 284 101 286T105 299Q126 348 164 391T252 441Q253 441 260 441T272 442Q296 441 316 432Q341 418 354 401T367 348V332L318 133Q267 -67 264 -75Q246 -125 194 -164T75 -204Q25 -204 7 -183T-12 -137Q-12 -110 7 -91T53 -71Q70 -71 82 -81T95 -112Q95 -148 63 -167Q69 -168 77 -168Q111 -168 139 -140T182 -74L193 -32Q204 11 219 72T251 197T278 308T289 365Q289 372 288 376Z"></path><path stroke-width="1" id="MJMATHI-4B" d="M285 628Q285 635 228 637Q205 637 198 638T191 647Q191 649 193 661Q199 681 203 682Q205 683 214 683H219Q260 681 355 681Q389 681 418 681T463 682T483 682Q500 682 500 674Q500 669 497 660Q496 658 496 654T495 648T493 644T490 641T486 639T479 638T470 637T456 637Q416 636 405 634T387 623L306 305Q307 305 490 449T678 597Q692 611 692 620Q692 635 667 637Q651 637 651 648Q651 650 654 662T659 677Q662 682 676 682Q680 682 711 681T791 680Q814 680 839 681T869 682Q889 682 889 672Q889 650 881 642Q878 637 862 637Q787 632 726 586Q710 576 656 534T556 455L509 418L518 396Q527 374 546 329T581 244Q656 67 661 61Q663 59 666 57Q680 47 717 46H738Q744 38 744 37T741 19Q737 6 731 0H720Q680 3 625 3Q503 3 488 0H478Q472 6 472 9T474 27Q478 40 480 43T491 46H494Q544 46 544 71Q544 75 517 141T485 216L427 354L359 301L291 248L268 155Q245 63 245 58Q245 51 253 49T303 46H334Q340 37 340 35Q340 19 333 5Q328 0 317 0Q314 0 280 1T180 2Q118 2 85 2T49 1Q31 1 31 11Q31 13 34 25Q38 41 42 43T65 46Q92 46 125 49Q139 52 144 61Q147 65 216 339T285 628Z"></path><path stroke-width="1" id="MJMATHI-42" d="M231 637Q204 637 199 638T194 649Q194 676 205 682Q206 683 335 683Q594 683 608 681Q671 671 713 636T756 544Q756 480 698 429T565 360L555 357Q619 348 660 311T702 219Q702 146 630 78T453 1Q446 0 242 0Q42 0 39 2Q35 5 35 10Q35 17 37 24Q42 43 47 45Q51 46 62 46H68Q95 46 128 49Q142 52 147 61Q150 65 219 339T288 628Q288 635 231 637ZM649 544Q649 574 634 600T585 634Q578 636 493 637Q473 637 451 637T416 636H403Q388 635 384 626Q382 622 352 506Q352 503 351 500L320 374H401Q482 374 494 376Q554 386 601 434T649 544ZM595 229Q595 273 572 302T512 336Q506 337 429 337Q311 337 310 336Q310 334 293 263T258 122L240 52Q240 48 252 48T333 46Q422 46 429 47Q491 54 543 105T595 229Z"></path></defs></svg></div><div id="MathJax_Message" style="display: none;"></div>

        <div class="navbar navbar-default navbar-fixed-top" role="navigation">
    <div class="container">

        <!-- Collapsed navigation -->
        <div class="navbar-header">
            <!-- Expander button -->
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>

            <!-- Main title -->
            <a class="navbar-brand" href="http://mfem.org">MFEM</a>
        </div>

        <!-- Expanded navigation -->
        <div class="navbar-collapse collapse">
            <!-- Main navigation -->
            <ul class="nav navbar-nav">
            
            
            
            
            
                <li>
                    <!-- Replace "nav_item.url|url" with "nav_item.url" for older mkdocs (before 1.0) -->
                    <a href="http://mfem.org/features/">Features</a>
                </li>
            
            
            
            
            
                <li class="active">
                    <!-- Replace "nav_item.url|url" with "nav_item.url" for older mkdocs (before 1.0) -->
                    <a href="./">Examples</a>
                </li>
            
            
            
            
            
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Documentation <b class="caret"></b></a>
                    <ul class="dropdown-menu">
                    
                        
                    
                        
                            <li>
                                 <a href="http://mfem.org/building/">Building MFEM</a>
                            </li>
                        
                    
                        
                            <li>
                                 <a href="http://mfem.org/serial-tutorial/">Serial Tutorial</a>
                            </li>
                        
                    
                        
                            <li>
                                 <a href="http://mfem.org/parallel-tutorial/">Parallel Tutorial</a>
                            </li>
                        
                    
                        
                            <li>
                                 <a href="http://mfem.org/fem/">Finite Elements</a>
                            </li>
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                            <li>
                                 <a href="http://mfem.org/electromagnetics/">Electromagnetics</a>
                            </li>
                        
                    
                        
                            <li>
                                 <a href="http://mfem.org/meshing/">Meshing</a>
                            </li>
                        
                    
                        
                    
                        
                    
                        
                            <li>
                                 <a href="http://mfem.org/performance/">Performance</a>
                            </li>
                        
                    
                        
                    
                        
                            <li>
                                 <a href="http://mfem.org/tools/">Tools</a>
                            </li>
                        
                    
                        
                            <li>
                                 <a href="http://mfem.org/toys/">Toys</a>
                            </li>
                        
                    
                        
                            <li>
                                 <a href="http://mfem.org/publications/">Publications</a>
                            </li>
                        
                    
                        
                            <li>
                                 <a href="http://mfem.org/about/">About</a>
                            </li>
                        
                    
                    </ul>
                </li>
            
            
            
            
            
                <li>
                    <!-- Replace "nav_item.url|url" with "nav_item.url" for older mkdocs (before 1.0) -->
                    <a href="http://mfem.org/gallery/">Gallery</a>
                </li>
            
            
            
            
            
                <li>
                    <!-- Replace "nav_item.url|url" with "nav_item.url" for older mkdocs (before 1.0) -->
                    <a href="http://mfem.org/download/">Download</a>
                </li>
            
            
            
            </ul>

            <!-- Search, Navigation and Repo links -->
            <ul class="nav navbar-nav navbar-right">
                
                
                <li>
                    <a href="https://github.com/mfem/mfem/">
                        
                            <i class="fa fa-github-square"></i>
                        
                        GitHub
                    </a>
                </li>
                
            </ul>
        </div>
    </div>
</div>

        <div class="container">
            
            <div class="col-md-12" role="main">

<script type="text/x-mathjax-config;executed=true">
  MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$']]}});
</script>

<script type="text/javascript" src="">
</script>

<h1 id="example-codes-and-miniapps">Example Codes and Miniapps</h1>
<p>This page provides a brief overview of MFEM's example codes and miniapps. For
detailed documentation of the MFEM sources, including the examples, see the
<a href="http://mfem.github.io/doxygen/html/index.html">online Doxygen documentation</a>,
or the <code>doc</code> directory in the distribution.</p>
<p>The goal of the example codes is to provide a step-by-step introduction to MFEM
in simple model settings. The miniapps are more complex, and are intended to be
more representative of the advanced usage of the library in physics/application
codes. We recommend that new users start with the example codes before moving to
the miniapps.</p>
<p>Clicking on any of the categories below displays examples and miniapps that contain the
described feature. <em>All examples support (arbitrarily) high-order meshes and
finite element spaces</em>.
The numerical results from the example codes can be visualized using the
GLVis visualization tool (based on MFEM). See the
<a href="http://glvis.org">GLVis website</a> for more details.</p>
<p>Users are encouraged to submit any example codes and miniapps that they have created and
would like to share. <br>
<em>Contact a member of the MFEM team to report
<a href="https://github.com/mfem/mfem/issues/new?labels=bug">bugs</a>
or post <a href="https://github.com/mfem/mfem/issues/new?labels=question">questions</a> or <a href="https://github.com/mfem/mfem/issues/new?labels=comment">comments</a></em>.</p>
<div class="row">
<p></p><div class="col-sm-6 col-md-2 small" markdown="1">
   <h5><strong>Application (PDE)</strong></h5>
   <label><input type="radio" id="all1" onchange="update(this.id);" checked="checked"> All</label><br>
   <label><input type="radio" id="laplace" onchange="update(this.id);"> Laplace</label><br>
   <label><input type="radio" id="elasticity" onchange="update(this.id);"> Elasticity</label><br>
   <label><input type="radio" id="maxwell" onchange="update(this.id);"> Electromagnetics</label><br>
   <label><input type="radio" id="graddiv" onchange="update(this.id);"> grad-div</label><br>
   <label><input type="radio" id="darcy" onchange="update(this.id);"> Darcy</label><br>
   <label><input type="radio" id="advection" onchange="update(this.id);"> Advection</label><br>
   <label><input type="radio" id="conduction" onchange="update(this.id);"> Conduction</label><br>
   <label><input type="radio" id="wave" onchange="update(this.id);"> Wave</label><br>
   <label><input type="radio" id="hydro" onchange="update(this.id);"> Hydrodynamics</label><br>
   <label><input type="radio" id="meshing" onchange="update(this.id);"> Meshing</label><br>
   <label><input type="radio" id="hpc" onchange="update(this.id);"> High-performance</label><br>
</div>
<div class="col-sm-6 col-md-3 small" markdown="1">
   <h5><strong>Finite Elements</strong></h5>
   <label><input type="radio" id="all2" onchange="update(this.id);" checked="checked"> All</label><br>
   <label><input type="radio" id="l2" onchange="update(this.id);"> <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-1"><span class="MJXp-msubsup" id="MJXp-Span-2"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-3" style="margin-right: 0.05em;">L</span><span class="MJXp-mn MJXp-script" id="MJXp-Span-4" style="vertical-align: -0.4em;">2</span></span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-1-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="2.637ex" height="2.362ex" viewBox="0 -761.8 1135.4 1017.1" role="img" focusable="false" style="vertical-align: -0.593ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-4C" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMAIN-32" x="963" y="-213"></use></g></svg></span><script type="math/tex" id="MathJax-Element-1">L_2</script> discontinuous elements</label><br>
   <label><input type="radio" id="h1" onchange="update(this.id);"> <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-5"><span class="MJXp-msubsup" id="MJXp-Span-6"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-7" style="margin-right: 0.05em;">H</span><span class="MJXp-mn MJXp-script" id="MJXp-Span-8" style="vertical-align: 0.5em;">1</span></span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-2-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="3.158ex" height="2.509ex" viewBox="0 -951.8 1359.6 1080.4" role="img" focusable="false" style="vertical-align: -0.299ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-48" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMAIN-31" x="1280" y="513"></use></g></svg></span><script type="math/tex" id="MathJax-Element-2">H^1</script> nodal elements</label><br>
   <label><input type="radio" id="hcurl" onchange="update(this.id);"> <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-9"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-10">H</span><span class="MJXp-mo" id="MJXp-Span-11" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-12">c</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-13">u</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-14">r</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-15">l</span><span class="MJXp-mo" id="MJXp-Span-16" style="margin-left: 0em; margin-right: 0em;">)</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-3-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="7.951ex" height="2.656ex" viewBox="0 -825.1 3423.5 1143.7" role="img" focusable="false" style="vertical-align: -0.74ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-48" x="0" y="0"></use><use xlink:href="#MJMAIN-28" x="888" y="0"></use><use xlink:href="#MJMATHI-63" x="1278" y="0"></use><use xlink:href="#MJMATHI-75" x="1711" y="0"></use><use xlink:href="#MJMATHI-72" x="2284" y="0"></use><use xlink:href="#MJMATHI-6C" x="2735" y="0"></use><use xlink:href="#MJMAIN-29" x="3034" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-3">H(curl)</script> Nedelec elements</label><br>
   <label><input type="radio" id="hdiv" onchange="update(this.id);"> <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-17"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-18">H</span><span class="MJXp-mo" id="MJXp-Span-19" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-20">d</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-21">i</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-22">v</span><span class="MJXp-mo" id="MJXp-Span-23" style="margin-left: 0em; margin-right: 0em;">)</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-4-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="7.019ex" height="2.656ex" viewBox="0 -825.1 3022 1143.7" role="img" focusable="false" style="vertical-align: -0.74ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-48" x="0" y="0"></use><use xlink:href="#MJMAIN-28" x="888" y="0"></use><use xlink:href="#MJMATHI-64" x="1278" y="0"></use><use xlink:href="#MJMATHI-69" x="1801" y="0"></use><use xlink:href="#MJMATHI-76" x="2147" y="0"></use><use xlink:href="#MJMAIN-29" x="2632" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-4">H(div)</script> Raviart-Thomas elements</label><br>
   <label><input type="radio" id="h12" onchange="update(this.id);"> <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-24"><span class="MJXp-msubsup" id="MJXp-Span-25"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-26" style="margin-right: 0.05em;">H</span><span class="MJXp-mrow MJXp-script" id="MJXp-Span-27" style="vertical-align: 0.5em;"><span class="MJXp-mo" id="MJXp-Span-28"></span><span class="MJXp-mn" id="MJXp-Span-29">1</span><span class="MJXp-mrow" id="MJXp-Span-30"><span class="MJXp-mo" id="MJXp-Span-31">/</span></span><span class="MJXp-mn" id="MJXp-Span-32">2</span></span></span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-5-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="6.08ex" height="2.656ex" viewBox="0 -1015.1 2617.9 1143.7" role="img" focusable="false" style="vertical-align: -0.299ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-48" x="0" y="0"></use><g transform="translate(905,362)"><use transform="scale(0.707)" xlink:href="#MJMAIN-2212" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMAIN-31" x="778" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMAIN-2F" x="1279" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMAIN-32" x="1779" y="0"></use></g></g></svg></span><script type="math/tex" id="MathJax-Element-5">H^{-1/2}</script> interfacial elements</label><br>
</div>
<div class="clearfix hidden-md hidden-lg"></div>
<div class="col-sm-6 col-md-3 small" markdown="1">
   <h5><strong>Discretization</strong></h5>
   <label><input type="radio" id="all3" onchange="update(this.id);" checked="checked"> All</label><br>
   <label><input type="radio" id="galerkin" onchange="update(this.id);"> Galerkin FEM</label><br>
   <label><input type="radio" id="mixed" onchange="update(this.id);"> Mixed FEM</label><br>
   <label><input type="radio" id="dg" onchange="update(this.id);"> Discontinuous Galerkin (DG)</label><br>
   <label><input type="radio" id="dpg" onchange="update(this.id);"> Discont. Petrov-Galerkin (DPG)</label><br>
   <label><input type="radio" id="hybr" onchange="update(this.id);"> Hybridization</label><br>
   <label><input type="radio" id="staticcond" onchange="update(this.id);"> Static condensation</label><br>
   <label><input type="radio" id="nurbs" onchange="update(this.id);"> Isogeometric analysis (NURBS)</label><br>
   <label><input type="radio" id="amr" onchange="update(this.id);"> Adaptive mesh refinement (AMR)</label><br>
</div>
<div class="col-sm-6 col-md-4 small" markdown="1">
   <h5><strong>Solver</strong></h5>
   <label><input type="radio" id="all4" onchange="update(this.id);" checked="checked"> All</label><br>
   <label><input type="radio" id="jacobi" onchange="update(this.id);"> Jacobi</label> <br>
   <label><input type="radio" id="gs" onchange="update(this.id);"> Gauss-Seidel</label> <br>
   <label><input type="radio" id="pcg" onchange="update(this.id);"> PCG</label> <br>
   <label><input type="radio" id="minres" onchange="update(this.id);"> MINRES</label> <br>
   <label><input type="radio" id="gmres" onchange="update(this.id);"> GMRES</label> <br>
   <label><input type="radio" id="amg" onchange="update(this.id);"> Algebraic Multigrid (BoomerAMG)</label> <br>
   <label><input type="radio" id="ams" onchange="update(this.id);"> Auxiliary-space Maxwell Solver (AMS)</label> <br>
   <label><input type="radio" id="ads" onchange="update(this.id);"> Auxiliary-space Divergence Solver (ADS)</label> <br>
   <label><input type="radio" id="superlu" onchange="update(this.id);"> SuperLU/STRUMPACK (parallel direct)</label><br>
   <label><input type="radio" id="umfpack" onchange="update(this.id);"> UMFPACK (serial direct)</label><br>
   <label><input type="radio" id="newton" onchange="update(this.id);"> Newton method (nonlinear solver)</label><br>
   <label><input type="radio" id="rk" onchange="update(this.id);"> Explicit Runge-Kutta (ODE integration)</label><br>
   <label><input type="radio" id="sdirk" onchange="update(this.id);"> Implicit Runge-Kutta (ODE integration)</label><br>
   <label><input type="radio" id="newmark" onchange="update(this.id);"> Newmark (ODE Integration)</label><br>
   <label><input type="radio" id="symplectic" onchange="update(this.id);"> Symplectic Algorithm (ODE Integration)</label><br>
   <label><input type="radio" id="lobpcg" onchange="update(this.id);"> LOBPCG, AME (eigensolvers)</label><br>
   <label><input type="radio" id="sundials" onchange="update(this.id);"> SUNDIALS solvers</label><br>
   <label><input type="radio" id="petsc" onchange="update(this.id);"> PETSc solvers</label><br>
   <label><input type="radio" id="hiop" onchange="update(this.id);"> HiOp solvers</label><br>
</div><p></p>
</div>
<hr>

<!-- ------------------------------------------------------------------------- -->

<div id="ex1" style="display: block;">
<h2 id="example-1-laplace-problem">Example 1: Laplace Problem</h2>
<p><img class="floatright" src="../doc/web/examples/ex1.png"></p>
<p>This example code demonstrates the use of MFEM to define a
simple isoparametric finite element discretization of the
Laplace problem <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-33"><span class="MJXp-mo" id="MJXp-Span-34" style="margin-left: 0em; margin-right: 0.111em;"></span><span class="MJXp-mi" id="MJXp-Span-35">Δ</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-36">u</span><span class="MJXp-mo" id="MJXp-Span-37" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mn" id="MJXp-Span-38">1</span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processed" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-6-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="9.335ex" height="2.302ex" viewBox="0 -824.7 4019.1 991.3" role="img" focusable="false" style="vertical-align: -0.387ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAIN-2212" x="0" y="0"></use><use xlink:href="#MJMAIN-394" x="778" y="0"></use><use xlink:href="#MJMATHI-75" x="1612" y="0"></use><use xlink:href="#MJMAIN-3D" x="2462" y="0"></use><use xlink:href="#MJMAIN-31" x="3518" y="0"></use></g></svg></span></div><script type="math/tex; mode=display" id="MathJax-Element-6">-\Delta u = 1</script> with homogeneous Dirichlet
boundary conditions. Specifically, we discretize with the
finite element space coming from the mesh (linear by default, quadratic
for quadratic curvilinear mesh, NURBS for NURBS mesh, etc.)</p>
<p>The example highlights the use of mesh refinement, finite
element grid functions, as well as linear and bilinear forms
corresponding to the left-hand side and right-hand side of the
discrete linear system. We also cover the explicit elimination
of essential boundary conditions, static condensation, and the optional
connection to the <a href="http://glvis.org">GLVis</a> tool for visualization.</p>
<p><em>The example has a serial (<a href="https://github.com/mfem/mfem/blob/master/examples/ex1.cpp">ex1.cpp</a>),
a parallel (<a href="https://github.com/mfem/mfem/blob/master/examples/ex1p.cpp">ex1p.cpp</a>),
and HPC versions: <a href="https://github.com/mfem/mfem/blob/master/miniapps/performance/ex1.cpp">performance/ex1.cpp</a>,
<a href="https://github.com/mfem/mfem/blob/master/miniapps/performance/ex1p.cpp">performance/ex1p.cpp</a>.
It also has a PETSc modification in <a href="https://github.com/mfem/mfem/blob/master/examples/petsc">examples/petsc</a>
, a PUMI modification in <a href="https://github.com/mfem/mfem/blob/master/examples/pumi">examples/pumi</a> and a Ginkgo modification
in <a href="https://github.com/mfem/mfem/tree/master/examples/ginkgo">examples/ginkgo</a>.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="ex2" style="display: block;">
<h2 id="example-2-linear-elasticity">Example 2: Linear Elasticity</h2>
<p><img class="floatright" src="../doc/web/examples/ex2.png"></p>
<p>This example code solves a simple linear elasticity problem
describing a multi-material cantilever beam.
Specifically, we approximate the weak form of
<span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-39"><span class="MJXp-mo" id="MJXp-Span-40" style="margin-left: 0em; margin-right: 0.111em;"></span><span class="MJXp-mrow" id="MJXp-Span-41"><span class="MJXp-mi" id="MJXp-Span-42">d</span><span class="MJXp-mi" id="MJXp-Span-43">i</span><span class="MJXp-mi" id="MJXp-Span-44">v</span></span><span class="MJXp-mo" id="MJXp-Span-45" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mrow" id="MJXp-Span-46"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-47">σ</span></span><span class="MJXp-mo" id="MJXp-Span-48" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mrow" id="MJXp-Span-49"><span class="MJXp-mi MJXp-bold" id="MJXp-Span-50">u</span></span><span class="MJXp-mo" id="MJXp-Span-51" style="margin-left: 0em; margin-right: 0em;">)</span><span class="MJXp-mo" id="MJXp-Span-52" style="margin-left: 0em; margin-right: 0em;">)</span><span class="MJXp-mo" id="MJXp-Span-53" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mn" id="MJXp-Span-54">0</span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processed" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-7-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="15.669ex" height="2.684ex" viewBox="0 -824.7 6746.6 1155.8" role="img" focusable="false" style="vertical-align: -0.769ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAIN-2212" x="0" y="0"></use><g transform="translate(778,0)"><use xlink:href="#MJMAIN-64" x="0" y="0"></use><use xlink:href="#MJMAIN-69" x="556" y="0"></use><use xlink:href="#MJMAIN-76" x="835" y="0"></use></g><use xlink:href="#MJMAIN-28" x="2142" y="0"></use><use xlink:href="#MJMATHI-3C3" x="2531" y="0"></use><use xlink:href="#MJMAIN-28" x="3104" y="0"></use><use xlink:href="#MJMAINB-75" x="3493" y="0"></use><use xlink:href="#MJMAIN-29" x="4133" y="0"></use><use xlink:href="#MJMAIN-29" x="4522" y="0"></use><use xlink:href="#MJMAIN-3D" x="5189" y="0"></use><use xlink:href="#MJMAIN-30" x="6246" y="0"></use></g></svg></span></div><script type="math/tex; mode=display" id="MathJax-Element-7">-{\rm div}({\sigma}({\bf u})) = 0</script>
where
<span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-55"><span class="MJXp-mrow" id="MJXp-Span-56"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-57">σ</span></span><span class="MJXp-mo" id="MJXp-Span-58" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mrow" id="MJXp-Span-59"><span class="MJXp-mi MJXp-bold" id="MJXp-Span-60">u</span></span><span class="MJXp-mo" id="MJXp-Span-61" style="margin-left: 0em; margin-right: 0em;">)</span><span class="MJXp-mo" id="MJXp-Span-62" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-63">λ</span><span class="MJXp-mspace" id="MJXp-Span-64" style="width: 0.167em; height: 0em;"></span><span class="MJXp-mrow" id="MJXp-Span-65"><span class="MJXp-mi" id="MJXp-Span-66">d</span><span class="MJXp-mi" id="MJXp-Span-67">i</span><span class="MJXp-mi" id="MJXp-Span-68">v</span></span><span class="MJXp-mo" id="MJXp-Span-69" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mrow" id="MJXp-Span-70"><span class="MJXp-mi MJXp-bold" id="MJXp-Span-71">u</span></span><span class="MJXp-mo" id="MJXp-Span-72" style="margin-left: 0em; margin-right: 0em;">)</span><span class="MJXp-mspace" id="MJXp-Span-73" style="width: 0.167em; height: 0em;"></span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-74">I</span><span class="MJXp-mo" id="MJXp-Span-75" style="margin-left: 0.267em; margin-right: 0.267em;">+</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-76">μ</span><span class="MJXp-mspace" id="MJXp-Span-77" style="width: 0.167em; height: 0em;"></span><span class="MJXp-mo" id="MJXp-Span-78" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mi" id="MJXp-Span-79">∇</span><span class="MJXp-mrow" id="MJXp-Span-80"><span class="MJXp-mi MJXp-bold" id="MJXp-Span-81">u</span></span><span class="MJXp-mo" id="MJXp-Span-82" style="margin-left: 0.267em; margin-right: 0.267em;">+</span><span class="MJXp-mi" id="MJXp-Span-83">∇</span><span class="MJXp-msubsup" id="MJXp-Span-84"><span class="MJXp-mrow" id="MJXp-Span-85" style="margin-right: 0.05em;"><span class="MJXp-mi MJXp-bold" id="MJXp-Span-86">u</span></span><span class="MJXp-mi MJXp-italic MJXp-script" id="MJXp-Span-87" style="vertical-align: 0.5em;">T</span></span><span class="MJXp-mo" id="MJXp-Span-88" style="margin-left: 0em; margin-right: 0em;">)</span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processed" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-8-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="34.996ex" height="3.067ex" viewBox="0 -989.3 15067.6 1320.3" role="img" focusable="false" style="vertical-align: -0.769ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-3C3" x="0" y="0"></use><use xlink:href="#MJMAIN-28" x="572" y="0"></use><use xlink:href="#MJMAINB-75" x="962" y="0"></use><use xlink:href="#MJMAIN-29" x="1601" y="0"></use><use xlink:href="#MJMAIN-3D" x="2268" y="0"></use><use xlink:href="#MJMATHI-3BB" x="3325" y="0"></use><g transform="translate(4075,0)"><use xlink:href="#MJMAIN-64" x="0" y="0"></use><use xlink:href="#MJMAIN-69" x="556" y="0"></use><use xlink:href="#MJMAIN-76" x="835" y="0"></use></g><use xlink:href="#MJMAIN-28" x="5438" y="0"></use><use xlink:href="#MJMAINB-75" x="5828" y="0"></use><use xlink:href="#MJMAIN-29" x="6467" y="0"></use><use xlink:href="#MJMATHI-49" x="7023" y="0"></use><use xlink:href="#MJMAIN-2B" x="7750" y="0"></use><use xlink:href="#MJMATHI-3BC" x="8751" y="0"></use><use xlink:href="#MJMAIN-28" x="9521" y="0"></use><use xlink:href="#MJMAIN-2207" x="9911" y="0"></use><use xlink:href="#MJMAINB-75" x="10744" y="0"></use><use xlink:href="#MJMAIN-2B" x="11606" y="0"></use><use xlink:href="#MJMAIN-2207" x="12606" y="0"></use><g transform="translate(13440,0)"><use xlink:href="#MJMAINB-75" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMATHI-54" x="904" y="583"></use></g><use xlink:href="#MJMAIN-29" x="14678" y="0"></use></g></svg></span></div><script type="math/tex; mode=display" id="MathJax-Element-8">{\sigma}({\bf u}) = \lambda\, {\rm div}({\bf u})\,I + \mu\,(\nabla{\bf u} + \nabla{\bf u}^T)</script>
is the stress tensor corresponding to displacement field <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-89"><span class="MJXp-mrow" id="MJXp-Span-90"><span class="MJXp-mi MJXp-bold" id="MJXp-Span-91">u</span></span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-9-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.485ex" height="1.538ex" viewBox="0 -550.5 639.5 662.2" role="img" focusable="false" style="vertical-align: -0.259ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAINB-75" x="0" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-9">{\bf u}</script>, and <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-92"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-93">λ</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-10-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.355ex" height="2.048ex" viewBox="0 -769.9 583.5 881.6" role="img" focusable="false" style="vertical-align: -0.259ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-3BB" x="0" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-10">\lambda</script> and <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-94"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-95">μ</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-11-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.402ex" height="1.92ex" viewBox="0 -550.5 603.5 826.7" role="img" focusable="false" style="vertical-align: -0.642ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-3BC" x="0" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-11">\mu</script>
are the material Lame constants. The boundary conditions are
<span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-96"><span class="MJXp-mrow" id="MJXp-Span-97"><span class="MJXp-mi MJXp-bold" id="MJXp-Span-98">u</span></span><span class="MJXp-mo" id="MJXp-Span-99" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mn" id="MJXp-Span-100">0</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-12-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="5.746ex" height="2.048ex" viewBox="0 -769.9 2474.1 881.6" role="img" focusable="false" style="vertical-align: -0.259ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAINB-75" x="0" y="0"></use><use xlink:href="#MJMAIN-3D" x="917" y="0"></use><use xlink:href="#MJMAIN-30" x="1973" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-12">{\bf u}=0</script> on the fixed part of the boundary with attribute 1, and
<span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-101"><span class="MJXp-mrow" id="MJXp-Span-102"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-103">σ</span></span><span class="MJXp-mo" id="MJXp-Span-104" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mrow" id="MJXp-Span-105"><span class="MJXp-mi MJXp-bold" id="MJXp-Span-106">u</span></span><span class="MJXp-mo" id="MJXp-Span-107" style="margin-left: 0em; margin-right: 0em;">)</span><span class="MJXp-mo" id="MJXp-Span-108" style="margin-left: 0.267em; margin-right: 0.267em;">⋅</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-109">n</span><span class="MJXp-mo" id="MJXp-Span-110" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-111">f</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-13-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="12.075ex" height="2.684ex" viewBox="0 -824.7 5199 1155.8" role="img" focusable="false" style="vertical-align: -0.769ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-3C3" x="0" y="0"></use><use xlink:href="#MJMAIN-28" x="572" y="0"></use><use xlink:href="#MJMAINB-75" x="962" y="0"></use><use xlink:href="#MJMAIN-29" x="1601" y="0"></use><use xlink:href="#MJMAIN-22C5" x="2213" y="0"></use><use xlink:href="#MJMATHI-6E" x="2713" y="0"></use><use xlink:href="#MJMAIN-3D" x="3592" y="0"></use><use xlink:href="#MJMATHI-66" x="4648" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-13">{\sigma}({\bf u})\cdot n = f</script> on the remainder with <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-112"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-113">f</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-14-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.279ex" height="2.43ex" viewBox="0 -769.9 550.5 1046.1" role="img" focusable="false" style="vertical-align: -0.642ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-66" x="0" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-14">f</script> being
a constant pull down vector on boundary elements with attribute 2, and zero
otherwise. The geometry of the domain is assumed to be as follows:</p>
<p><img alt="" src="../doc/web/examples/ex2-domain.png"></p>
<p>The example demonstrates the use of high-order and NURBS vector
finite element spaces with the linear elasticity bilinear form,
meshes with curved elements, and the definition of piece-wise
constant and vector coefficient objects. Static condensation is
also illustrated.</p>
<p><em>The example has a serial (<a href="https://github.com/mfem/mfem/blob/master/examples/ex2.cpp">ex2.cpp</a>)
and a parallel (<a href="https://github.com/mfem/mfem/blob/master/examples/ex2p.cpp">ex2p.cpp</a>) version.
It also has a PETSc modification in <a href="https://github.com/mfem/mfem/blob/master/examples/petsc">examples/petsc</a>
and a PUMI modification in <a href="https://github.com/mfem/mfem/blob/master/examples/pumi">examples/pumi</a>.
We recommend viewing Example 1 before viewing this example.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="ex3" style="display: block;">
<h2 id="example-3-definite-maxwell-problem">Example 3: Definite Maxwell Problem</h2>
<p><img class="floatright" src="../doc/web/examples/ex3.png"></p>
<p>This example code solves a simple 3D electromagnetic diffusion
problem corresponding to the second order definite Maxwell
equation <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-114"><span class="MJXp-mi" id="MJXp-Span-115">∇</span><span class="MJXp-mo" id="MJXp-Span-116" style="margin-left: 0.267em; margin-right: 0.267em;">×</span><span class="MJXp-mi" id="MJXp-Span-117">∇</span><span class="MJXp-mo" id="MJXp-Span-118" style="margin-left: 0.267em; margin-right: 0.267em;">×</span><span class="MJXp-mspace" id="MJXp-Span-119" style="width: 0.167em; height: 0em;"></span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-120">E</span><span class="MJXp-mo" id="MJXp-Span-121" style="margin-left: 0.267em; margin-right: 0.267em;">+</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-122">E</span><span class="MJXp-mo" id="MJXp-Span-123" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-124">f</span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processed" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-15-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="20.708ex" height="2.43ex" viewBox="0 -769.9 8916.1 1046.1" role="img" focusable="false" style="vertical-align: -0.642ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAIN-2207" x="0" y="0"></use><use xlink:href="#MJMAIN-D7" x="1055" y="0"></use><use xlink:href="#MJMAIN-2207" x="2056" y="0"></use><use xlink:href="#MJMAIN-D7" x="3112" y="0"></use><use xlink:href="#MJMATHI-45" x="4279" y="0"></use><use xlink:href="#MJMAIN-2B" x="5266" y="0"></use><use xlink:href="#MJMATHI-45" x="6267" y="0"></use><use xlink:href="#MJMAIN-3D" x="7309" y="0"></use><use xlink:href="#MJMATHI-66" x="8365" y="0"></use></g></svg></span></div><script type="math/tex; mode=display" id="MathJax-Element-15">\nabla\times\nabla\times\, E + E = f</script>
with boundary condition <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-125"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-126">E</span><span class="MJXp-mo" id="MJXp-Span-127" style="margin-left: 0.267em; margin-right: 0.267em;">×</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-128">n</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-16-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="6.011ex" height="2.048ex" viewBox="0 -769.9 2587.9 881.6" role="img" focusable="false" style="vertical-align: -0.259ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-45" x="0" y="0"></use><use xlink:href="#MJMAIN-D7" x="986" y="0"></use><use xlink:href="#MJMATHI-6E" x="1987" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-16"> E \times n </script> = "given tangential field".
Here, we use a given exact solution <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-129"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-130">E</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-17-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.776ex" height="2.048ex" viewBox="0 -769.9 764.5 881.6" role="img" focusable="false" style="vertical-align: -0.259ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-45" x="0" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-17">E</script> and compute the corresponding r.h.s.
<span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-131"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-132">f</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-18-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.279ex" height="2.43ex" viewBox="0 -769.9 550.5 1046.1" role="img" focusable="false" style="vertical-align: -0.642ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-66" x="0" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-18">f</script>. We discretize with Nedelec finite elements in 2D or 3D.</p>
<p>The example demonstrates the use of <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-133"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-134">H</span><span class="MJXp-mo" id="MJXp-Span-135" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-136">c</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-137">u</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-138">r</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-139">l</span><span class="MJXp-mo" id="MJXp-Span-140" style="margin-left: 0em; margin-right: 0em;">)</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-19-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="7.951ex" height="2.684ex" viewBox="0 -824.7 3423.5 1155.8" role="img" focusable="false" style="vertical-align: -0.769ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-48" x="0" y="0"></use><use xlink:href="#MJMAIN-28" x="888" y="0"></use><use xlink:href="#MJMATHI-63" x="1278" y="0"></use><use xlink:href="#MJMATHI-75" x="1711" y="0"></use><use xlink:href="#MJMATHI-72" x="2284" y="0"></use><use xlink:href="#MJMATHI-6C" x="2735" y="0"></use><use xlink:href="#MJMAIN-29" x="3034" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-19">H(curl)</script> finite element
spaces with the curl-curl and the (vector finite element) mass
bilinear form, as well as the computation of discretization
error when the exact solution is known. Static condensation is
also illustrated.</p>
<p><em>The example has a serial (<a href="https://github.com/mfem/mfem/blob/master/examples/ex3.cpp">ex3.cpp</a>)
and a parallel (<a href="https://github.com/mfem/mfem/blob/master/examples/ex3p.cpp">ex3p.cpp</a>) version.
It also has a PETSc modification in <a href="https://github.com/mfem/mfem/blob/master/examples/petsc">examples/petsc</a>.
We recommend viewing examples 1-2 before viewing this example.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="ex4" style="display: block;">
<h2 id="example-4-grad-div-problem">Example 4: Grad-div Problem</h2>
<p><img class="floatright" src="../doc/web/examples/ex4.png"></p>
<p>This example code solves a simple 2D/3D <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-141"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-142">H</span><span class="MJXp-mo" id="MJXp-Span-143" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-144">d</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-145">i</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-146">v</span><span class="MJXp-mo" id="MJXp-Span-147" style="margin-left: 0em; margin-right: 0em;">)</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-20-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="7.019ex" height="2.684ex" viewBox="0 -824.7 3022 1155.8" role="img" focusable="false" style="vertical-align: -0.769ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-48" x="0" y="0"></use><use xlink:href="#MJMAIN-28" x="888" y="0"></use><use xlink:href="#MJMATHI-64" x="1278" y="0"></use><use xlink:href="#MJMATHI-69" x="1801" y="0"></use><use xlink:href="#MJMATHI-76" x="2147" y="0"></use><use xlink:href="#MJMAIN-29" x="2632" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-20">H(div)</script>
diffusion problem corresponding to the second order definite equation
<span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-148"><span class="MJXp-mo" id="MJXp-Span-149" style="margin-left: 0em; margin-right: 0.111em;"></span><span class="MJXp-mrow" id="MJXp-Span-150"><span class="MJXp-mi" id="MJXp-Span-151">g</span><span class="MJXp-mi" id="MJXp-Span-152">r</span><span class="MJXp-mi" id="MJXp-Span-153">a</span><span class="MJXp-mi" id="MJXp-Span-154">d</span></span><span class="MJXp-mo" id="MJXp-Span-155" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-156">α</span><span class="MJXp-mspace" id="MJXp-Span-157" style="width: 0.167em; height: 0em;"></span><span class="MJXp-mrow" id="MJXp-Span-158"><span class="MJXp-mi" id="MJXp-Span-159">d</span><span class="MJXp-mi" id="MJXp-Span-160">i</span><span class="MJXp-mi" id="MJXp-Span-161">v</span></span><span class="MJXp-mo" id="MJXp-Span-162" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-163">F</span><span class="MJXp-mo" id="MJXp-Span-164" style="margin-left: 0em; margin-right: 0em;">)</span><span class="MJXp-mo" id="MJXp-Span-165" style="margin-left: 0em; margin-right: 0em;">)</span><span class="MJXp-mo" id="MJXp-Span-166" style="margin-left: 0.267em; margin-right: 0.267em;">+</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-167">β</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-168">F</span><span class="MJXp-mo" id="MJXp-Span-169" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-170">f</span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processed" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-21-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="27.028ex" height="2.684ex" viewBox="0 -824.7 11637.2 1155.8" role="img" focusable="false" style="vertical-align: -0.769ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAIN-2212" x="0" y="0"></use><g transform="translate(778,0)"><use xlink:href="#MJMAIN-67" x="0" y="0"></use><use xlink:href="#MJMAIN-72" x="500" y="0"></use><use xlink:href="#MJMAIN-61" x="893" y="0"></use><use xlink:href="#MJMAIN-64" x="1393" y="0"></use></g><use xlink:href="#MJMAIN-28" x="2728" y="0"></use><use xlink:href="#MJMATHI-3B1" x="3118" y="0"></use><g transform="translate(3925,0)"><use xlink:href="#MJMAIN-64" x="0" y="0"></use><use xlink:href="#MJMAIN-69" x="556" y="0"></use><use xlink:href="#MJMAIN-76" x="835" y="0"></use></g><use xlink:href="#MJMAIN-28" x="5288" y="0"></use><use xlink:href="#MJMATHI-46" x="5678" y="0"></use><use xlink:href="#MJMAIN-29" x="6427" y="0"></use><use xlink:href="#MJMAIN-29" x="6817" y="0"></use><use xlink:href="#MJMAIN-2B" x="7428" y="0"></use><use xlink:href="#MJMATHI-3B2" x="8429" y="0"></use><use xlink:href="#MJMATHI-46" x="9003" y="0"></use><use xlink:href="#MJMAIN-3D" x="10030" y="0"></use><use xlink:href="#MJMATHI-66" x="11086" y="0"></use></g></svg></span></div><script type="math/tex; mode=display" id="MathJax-Element-21">-{\rm grad}(\alpha\,{\rm div}(F)) + \beta F = f</script>
with boundary condition <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-171"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-172">F</span><span class="MJXp-mo" id="MJXp-Span-173" style="margin-left: 0.267em; margin-right: 0.267em;">⋅</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-174">n</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-22-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="4.815ex" height="2.048ex" viewBox="0 -769.9 2072.9 881.6" role="img" focusable="false" style="vertical-align: -0.259ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-46" x="0" y="0"></use><use xlink:href="#MJMAIN-22C5" x="971" y="0"></use><use xlink:href="#MJMATHI-6E" x="1472" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-22">F \cdot n</script> = "given normal field".
Here we use a given exact solution <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-175"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-176">F</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-23-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.741ex" height="2.048ex" viewBox="0 -769.9 749.5 881.6" role="img" focusable="false" style="vertical-align: -0.259ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-46" x="0" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-23">F</script> and compute the corresponding
right hand side <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-177"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-178">f</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-24-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.279ex" height="2.43ex" viewBox="0 -769.9 550.5 1046.1" role="img" focusable="false" style="vertical-align: -0.642ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-66" x="0" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-24">f</script>.  We discretize with the Raviart-Thomas finite elements.</p>
<p>The example demonstrates the use of <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-179"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-180">H</span><span class="MJXp-mo" id="MJXp-Span-181" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-182">d</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-183">i</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-184">v</span><span class="MJXp-mo" id="MJXp-Span-185" style="margin-left: 0em; margin-right: 0em;">)</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-25-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="7.019ex" height="2.684ex" viewBox="0 -824.7 3022 1155.8" role="img" focusable="false" style="vertical-align: -0.769ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-48" x="0" y="0"></use><use xlink:href="#MJMAIN-28" x="888" y="0"></use><use xlink:href="#MJMATHI-64" x="1278" y="0"></use><use xlink:href="#MJMATHI-69" x="1801" y="0"></use><use xlink:href="#MJMATHI-76" x="2147" y="0"></use><use xlink:href="#MJMAIN-29" x="2632" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-25">H(div)</script>
finite element spaces with the grad-div and <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-186"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-187">H</span><span class="MJXp-mo" id="MJXp-Span-188" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-189">d</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-190">i</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-191">v</span><span class="MJXp-mo" id="MJXp-Span-192" style="margin-left: 0em; margin-right: 0em;">)</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-26-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="7.019ex" height="2.684ex" viewBox="0 -824.7 3022 1155.8" role="img" focusable="false" style="vertical-align: -0.769ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-48" x="0" y="0"></use><use xlink:href="#MJMAIN-28" x="888" y="0"></use><use xlink:href="#MJMATHI-64" x="1278" y="0"></use><use xlink:href="#MJMATHI-69" x="1801" y="0"></use><use xlink:href="#MJMATHI-76" x="2147" y="0"></use><use xlink:href="#MJMAIN-29" x="2632" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-26">H(div)</script>
vector finite element mass bilinear form, as well as the computation of discretization
error when the exact solution is known.
Bilinear form hybridization and static condensation are also illustrated.</p>
<p><em>The example has a serial (<a href="https://github.com/mfem/mfem/blob/master/examples/ex4.cpp">ex4.cpp</a>)
and a parallel (<a href="https://github.com/mfem/mfem/blob/master/examples/ex4p.cpp">ex4p.cpp</a>) version.
It also has a PETSc modification in <a href="https://github.com/mfem/mfem/blob/master/examples/petsc">examples/petsc</a>.
We recommend viewing examples 1-3 before viewing this example.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="ex5" style="display: block;">
<h2 id="example-5-darcy-problem">Example 5: Darcy Problem</h2>
<p><img class="floatright" src="../doc/web/examples/ex5.png"></p>
<p>This example code solves a simple 2D/3D mixed Darcy problem
corresponding to the saddle point system
<span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-193"><span class="MJXp-mtable" id="MJXp-Span-194"><span><span class="MJXp-mtr" id="MJXp-Span-195" style="vertical-align: baseline;"><span class="MJXp-mtd" id="MJXp-Span-196" style="text-align: right;"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-197">k</span><span class="MJXp-mspace" id="MJXp-Span-198" style="width: 0.167em; height: 0em;"></span><span class="MJXp-mrow" id="MJXp-Span-199"><span class="MJXp-mi MJXp-bold" id="MJXp-Span-200">u</span></span><span class="MJXp-mo" id="MJXp-Span-201" style="margin-left: 0.267em; margin-right: 0.267em;">+</span><span class="MJXp-mrow" id="MJXp-Span-202"><span class="MJXp-mi" id="MJXp-Span-203">g</span><span class="MJXp-mi" id="MJXp-Span-204">r</span><span class="MJXp-mi" id="MJXp-Span-205">a</span><span class="MJXp-mi" id="MJXp-Span-206">d</span></span><span class="MJXp-mspace" id="MJXp-Span-207" style="width: 0.167em; height: 0em;"></span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-208">p</span></span><span class="MJXp-mtd" id="MJXp-Span-209" style="padding-left: 1em; text-align: center;"><span class="MJXp-mo" id="MJXp-Span-210" style="margin-left: 0.333em; margin-right: 0.333em;">=</span></span><span class="MJXp-mtd" id="MJXp-Span-211" style="padding-left: 1em; text-align: left;"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-212">f</span></span></span><span class="MJXp-mtr" id="MJXp-Span-213" style="vertical-align: baseline;"><span class="MJXp-mtd" id="MJXp-Span-214" style="padding-top: 0.4em; text-align: right;"><span class="MJXp-mo" id="MJXp-Span-215" style="margin-left: 0em; margin-right: 0.111em;"></span><span class="MJXp-mrow" id="MJXp-Span-216"><span class="MJXp-mi" id="MJXp-Span-217">d</span><span class="MJXp-mi" id="MJXp-Span-218">i</span><span class="MJXp-mi" id="MJXp-Span-219">v</span></span><span class="MJXp-mspace" id="MJXp-Span-220" style="width: 0.167em; height: 0em;"></span><span class="MJXp-mrow" id="MJXp-Span-221"><span class="MJXp-mi MJXp-bold" id="MJXp-Span-222">u</span></span></span><span class="MJXp-mtd" id="MJXp-Span-223" style="padding-left: 1em; padding-top: 0.4em; text-align: center;"><span class="MJXp-mo" id="MJXp-Span-224" style="margin-left: 0.333em; margin-right: 0.333em;">=</span></span><span class="MJXp-mtd" id="MJXp-Span-225" style="padding-left: 1em; padding-top: 0.4em; text-align: left;"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-226">g</span></span></span></span></span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processed" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-27-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="20.485ex" height="5.997ex" viewBox="0 -1537.7 8820.1 2581.8" role="img" focusable="false" style="vertical-align: -2.425ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><g transform="translate(167,0)"><g transform="translate(-14,0)"><g transform="translate(0,656)"><use xlink:href="#MJMATHI-6B" x="0" y="0"></use><use xlink:href="#MJMAINB-75" x="688" y="0"></use><use xlink:href="#MJMAIN-2B" x="1549" y="0"></use><g transform="translate(2550,0)"><use xlink:href="#MJMAIN-67" x="0" y="0"></use><use xlink:href="#MJMAIN-72" x="500" y="0"></use><use xlink:href="#MJMAIN-61" x="893" y="0"></use><use xlink:href="#MJMAIN-64" x="1393" y="0"></use></g><use xlink:href="#MJMATHI-70" x="4667" y="0"></use></g><g transform="translate(2222,-751)"><use xlink:href="#MJMAIN-2212" x="0" y="0"></use><g transform="translate(778,0)"><use xlink:href="#MJMAIN-64" x="0" y="0"></use><use xlink:href="#MJMAIN-69" x="556" y="0"></use><use xlink:href="#MJMAIN-76" x="835" y="0"></use></g><use xlink:href="#MJMAINB-75" x="2308" y="0"></use></g></g><g transform="translate(6157,0)"><use xlink:href="#MJMAIN-3D" x="0" y="656"></use><use xlink:href="#MJMAIN-3D" x="0" y="-751"></use></g><g transform="translate(7935,0)"><use xlink:href="#MJMATHI-66" x="0" y="656"></use><use xlink:href="#MJMATHI-67" x="0" y="-751"></use></g></g></g></svg></span></div><script type="math/tex; mode=display" id="MathJax-Element-27"> \begin{array}{rcl}
   k\,{\bf u} + {\rm grad}\,p &=& f \\
   -{\rm div}\,{\bf u} &=& g
\end{array} </script>
with natural boundary condition <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-227"><span class="MJXp-mo" id="MJXp-Span-228" style="margin-left: 0em; margin-right: 0.111em;"></span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-229">p</span><span class="MJXp-mo" id="MJXp-Span-230" style="margin-left: 0.333em; margin-right: 0.333em;">=</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-28-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="5.431ex" height="2.175ex" viewBox="0 -660.2 2338.3 936.4" role="img" focusable="false" style="vertical-align: -0.642ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAIN-2212" x="0" y="0"></use><use xlink:href="#MJMATHI-70" x="778" y="0"></use><use xlink:href="#MJMAIN-3D" x="1559" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-28">-p = </script> "given pressure".
Here we use a given exact solution <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-231"><span class="MJXp-mo" id="MJXp-Span-232" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mrow" id="MJXp-Span-233"><span class="MJXp-mi MJXp-bold" id="MJXp-Span-234">u</span></span><span class="MJXp-mo" id="MJXp-Span-235" style="margin-left: 0em; margin-right: 0.222em;">,</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-236">p</span><span class="MJXp-mo" id="MJXp-Span-237" style="margin-left: 0em; margin-right: 0em;">)</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-29-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="5.498ex" height="2.684ex" viewBox="0 -824.7 2367.2 1155.8" role="img" focusable="false" style="vertical-align: -0.769ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAIN-28" x="0" y="0"></use><use xlink:href="#MJMAINB-75" x="389" y="0"></use><use xlink:href="#MJMAIN-2C" x="1029" y="0"></use><use xlink:href="#MJMATHI-70" x="1474" y="0"></use><use xlink:href="#MJMAIN-29" x="1977" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-29">({\bf u},p)</script> and compute the
corresponding right hand side <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-238"><span class="MJXp-mo" id="MJXp-Span-239" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-240">f</span><span class="MJXp-mo" id="MJXp-Span-241" style="margin-left: 0em; margin-right: 0.222em;">,</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-242">g</span><span class="MJXp-mo" id="MJXp-Span-243" style="margin-left: 0em; margin-right: 0em;">)</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-30-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="5.238ex" height="2.684ex" viewBox="0 -824.7 2255.2 1155.8" role="img" focusable="false" style="vertical-align: -0.769ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAIN-28" x="0" y="0"></use><use xlink:href="#MJMATHI-66" x="389" y="0"></use><use xlink:href="#MJMAIN-2C" x="940" y="0"></use><use xlink:href="#MJMATHI-67" x="1385" y="0"></use><use xlink:href="#MJMAIN-29" x="1865" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-30">(f, g)</script>. We discretize with Raviart-Thomas
finite elements (velocity <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-244"><span class="MJXp-mi MJXp-bold" id="MJXp-Span-245">u</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-31-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.485ex" height="1.538ex" viewBox="0 -550.5 639.5 662.2" role="img" focusable="false" style="vertical-align: -0.259ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAINB-75" x="0" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-31">\bf u</script>) and piecewise discontinuous
polynomials (pressure <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-246"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-247">p</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-32-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.259ex" height="1.92ex" viewBox="-38.5 -550.5 542 826.7" role="img" focusable="false" style="vertical-align: -0.642ex; margin-left: -0.089ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-70" x="0" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-32">p</script>).</p>
<p>The example demonstrates the use of the BlockMatrix and BlockOperator
classes, as well as the collective saving of several grid functions in
<a href="http://visit.llnl.gov">VisIt</a> and <a href="https://www.paraview.org">ParaView</a>
formats.</p>
<p><em>The example has a serial (<a href="https://github.com/mfem/mfem/blob/master/examples/ex5.cpp">ex5.cpp</a>)
and a parallel (<a href="https://github.com/mfem/mfem/blob/master/examples/ex5p.cpp">ex5p.cpp</a>) version.
It also has a PETSc modification in <a href="https://github.com/mfem/mfem/blob/master/examples/petsc">examples/petsc</a>.
We recommend viewing examples 1-4 before viewing this example.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="ex6" style="display: block;">
<h2 id="example-6-laplace-problem-with-amr">Example 6: Laplace Problem with AMR</h2>
<p><img class="floatright" src="../doc/web/examples/ex6.png"></p>
<p>This is a version of Example 1 with a simple adaptive mesh
refinement loop. The problem being solved is again the Laplace
equation <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-248"><span class="MJXp-mo" id="MJXp-Span-249" style="margin-left: 0em; margin-right: 0.111em;"></span><span class="MJXp-mi" id="MJXp-Span-250">Δ</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-251">u</span><span class="MJXp-mo" id="MJXp-Span-252" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mn" id="MJXp-Span-253">1</span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processed" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-33-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="9.335ex" height="2.302ex" viewBox="0 -824.7 4019.1 991.3" role="img" focusable="false" style="vertical-align: -0.387ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAIN-2212" x="0" y="0"></use><use xlink:href="#MJMAIN-394" x="778" y="0"></use><use xlink:href="#MJMATHI-75" x="1612" y="0"></use><use xlink:href="#MJMAIN-3D" x="2462" y="0"></use><use xlink:href="#MJMAIN-31" x="3518" y="0"></use></g></svg></span></div><script type="math/tex; mode=display" id="MathJax-Element-33">-\Delta u = 1</script> with homogeneous Dirichlet boundary
conditions. The problem is solved on a sequence of meshes which
are locally refined in a conforming (triangles, tetrahedrons)
or non-conforming (quadrilaterals, hexahedra) manner according
to a simple ZZ error estimator.</p>
<p>The example demonstrates MFEM's capability to work with both
conforming and nonconforming refinements, in 2D and 3D, on
linear, curved and surface meshes. Interpolation of functions
from coarse to fine meshes, as well as persistent <a href="http://glvis.org">GLVis</a>
visualization are also illustrated.</p>
<p><em>The example has a serial (<a href="https://github.com/mfem/mfem/blob/master/examples/ex6.cpp">ex6.cpp</a>)
and a parallel (<a href="https://github.com/mfem/mfem/blob/master/examples/ex6p.cpp">ex6p.cpp</a>) version.
It also has a PETSc modification in <a href="https://github.com/mfem/mfem/blob/master/examples/petsc">examples/petsc</a>
and a PUMI modification in <a href="https://github.com/mfem/mfem/blob/master/examples/pumi">examples/pumi</a>.
We recommend viewing Example 1 before viewing this example.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="ex7" style="display: block;">
<h2 id="example-7-surface-meshes">Example 7: Surface Meshes</h2>
<p><img class="floatright" src="../doc/web/examples/ex7.png"></p>
<p>This example code demonstrates the use of MFEM to define a
triangulation of a unit sphere and a simple isoparametric
finite element discretization of the Laplace problem with mass
term, <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-254"><span class="MJXp-mo" id="MJXp-Span-255" style="margin-left: 0em; margin-right: 0.111em;"></span><span class="MJXp-mi" id="MJXp-Span-256">Δ</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-257">u</span><span class="MJXp-mo" id="MJXp-Span-258" style="margin-left: 0.267em; margin-right: 0.267em;">+</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-259">u</span><span class="MJXp-mo" id="MJXp-Span-260" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-261">f</span><span class="MJXp-mo" id="MJXp-Span-262" style="margin-left: 0em; margin-right: 0.222em;">.</span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processed" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-34-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="14.268ex" height="2.557ex" viewBox="0 -824.7 6143 1101" role="img" focusable="false" style="vertical-align: -0.642ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAIN-2212" x="0" y="0"></use><use xlink:href="#MJMAIN-394" x="778" y="0"></use><use xlink:href="#MJMATHI-75" x="1612" y="0"></use><use xlink:href="#MJMAIN-2B" x="2406" y="0"></use><use xlink:href="#MJMATHI-75" x="3407" y="0"></use><use xlink:href="#MJMAIN-3D" x="4257" y="0"></use><use xlink:href="#MJMATHI-66" x="5313" y="0"></use><use xlink:href="#MJMAIN-2E" x="5864" y="0"></use></g></svg></span></div><script type="math/tex; mode=display" id="MathJax-Element-34">-\Delta u + u = f.</script></p>
<p>The example highlights mesh generation, the use of mesh
refinement, high-order meshes and finite elements, as well as
surface-based linear and bilinear forms corresponding to the
left-hand side and right-hand side of the discrete linear
system. Simple local mesh refinement is also demonstrated.</p>
<p><em>The example has a serial (<a href="https://github.com/mfem/mfem/blob/master/examples/ex7.cpp">ex7.cpp</a>)
and a parallel (<a href="https://github.com/mfem/mfem/blob/master/examples/ex7p.cpp">ex7p.cpp</a>) version.
We recommend viewing Example 1 before viewing this example.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="ex8" style="display: block;">
<h2 id="example-8-dpg-for-the-laplace-problem">Example 8: DPG for the Laplace Problem</h2>
<p><img class="floatright" src="../doc/web/examples/ex8.png"></p>
<p>This example code demonstrates the use of the Discontinuous
Petrov-Galerkin (DPG) method in its primal 2x2 block form as a
simple finite element discretization of the Laplace problem
<span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-263"><span class="MJXp-mo" id="MJXp-Span-264" style="margin-left: 0em; margin-right: 0.111em;"></span><span class="MJXp-mi" id="MJXp-Span-265">Δ</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-266">u</span><span class="MJXp-mo" id="MJXp-Span-267" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-268">f</span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processed" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-35-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="9.451ex" height="2.557ex" viewBox="0 -824.7 4069.1 1101" role="img" focusable="false" style="vertical-align: -0.642ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAIN-2212" x="0" y="0"></use><use xlink:href="#MJMAIN-394" x="778" y="0"></use><use xlink:href="#MJMATHI-75" x="1612" y="0"></use><use xlink:href="#MJMAIN-3D" x="2462" y="0"></use><use xlink:href="#MJMATHI-66" x="3518" y="0"></use></g></svg></span></div><script type="math/tex; mode=display" id="MathJax-Element-35">-\Delta u = f</script> with homogeneous Dirichlet boundary conditions. We
use high-order continuous trial space, a high-order interfacial
(trace) space, and a high-order discontinuous test space
defining a local dual (<span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-269"><span class="MJXp-msubsup" id="MJXp-Span-270"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-271" style="margin-right: 0.05em;">H</span><span class="MJXp-mrow MJXp-script" id="MJXp-Span-272" style="vertical-align: 0.5em;"><span class="MJXp-mo" id="MJXp-Span-273"></span><span class="MJXp-mn" id="MJXp-Span-274">1</span></span></span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-36-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="4.436ex" height="2.43ex" viewBox="0 -934.4 1910 1046.1" role="img" focusable="false" style="vertical-align: -0.259ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-48" x="0" y="0"></use><g transform="translate(905,362)"><use transform="scale(0.707)" xlink:href="#MJMAIN-2212" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMAIN-31" x="778" y="0"></use></g></g></svg></span><script type="math/tex" id="MathJax-Element-36">H^{-1}</script>) norm.
We use the primal form of DPG, see
<a href="http://dx.doi.org/10.1016/j.camwa.2013.06.029">"A primal DPG method without a first-order reformulation"</a>,
Demkowicz and Gopalakrishnan, CAM 2013.</p>
<p>The example highlights the use of interfacial (trace) finite
elements and spaces, trace face integrators and the definition
of block operators and preconditioners.</p>
<p><em>The example has a serial (<a href="https://github.com/mfem/mfem/blob/master/examples/ex8.cpp">ex8.cpp</a>)
and a parallel (<a href="https://github.com/mfem/mfem/blob/master/examples/ex8p.cpp">ex8p.cpp</a>) version.
We recommend viewing examples 1-5 before viewing this example.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="ex9" style="display: block;">
<h2 id="example-9-dg-advection">Example 9: DG Advection</h2>
<p><img class="floatright" src="../doc/web/examples/ex9.png"></p>
<p>This example code solves the time-dependent advection equation
<span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-275"><span class="MJXp-mfrac" id="MJXp-Span-276" style="vertical-align: 0.25em;"><span class="MJXp-box"><span class="MJXp-mi" id="MJXp-Span-277">∂</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-278">u</span></span><span class="MJXp-box" style="margin-top: -0.9em;"><span class="MJXp-denom"><span><span class="MJXp-rule" style="height: 1em; border-top-style: none; border-bottom-width: 1px; border-bottom-style: solid; margin: 0.1em 0px;"></span></span><span><span class="MJXp-box"><span class="MJXp-mi" id="MJXp-Span-279">∂</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-280">t</span></span></span></span></span></span><span class="MJXp-mo" id="MJXp-Span-281" style="margin-left: 0.267em; margin-right: 0.267em;">+</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-282">v</span><span class="MJXp-mo" id="MJXp-Span-283" style="margin-left: 0.267em; margin-right: 0.267em;">⋅</span><span class="MJXp-mi" id="MJXp-Span-284">∇</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-285">u</span><span class="MJXp-mo" id="MJXp-Span-286" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mn" id="MJXp-Span-287">0</span><span class="MJXp-mo" id="MJXp-Span-288" style="margin-left: 0em; margin-right: 0.222em;">,</span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processed" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-37-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="17.304ex" height="5.36ex" viewBox="0 -1482.9 7450.4 2307.6" role="img" focusable="false" style="vertical-align: -1.915ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><g transform="translate(120,0)"><rect stroke="none" width="1260" height="60" x="0" y="220"></rect><g transform="translate(60,676)"><use xlink:href="#MJMAIN-2202" x="0" y="0"></use><use xlink:href="#MJMATHI-75" x="567" y="0"></use></g><g transform="translate(165,-694)"><use xlink:href="#MJMAIN-2202" x="0" y="0"></use><use xlink:href="#MJMATHI-74" x="567" y="0"></use></g></g><use xlink:href="#MJMAIN-2B" x="1722" y="0"></use><use xlink:href="#MJMATHI-76" x="2722" y="0"></use><use xlink:href="#MJMAIN-22C5" x="3430" y="0"></use><use xlink:href="#MJMAIN-2207" x="3931" y="0"></use><use xlink:href="#MJMATHI-75" x="4764" y="0"></use><use xlink:href="#MJMAIN-3D" x="5615" y="0"></use><use xlink:href="#MJMAIN-30" x="6671" y="0"></use><use xlink:href="#MJMAIN-2C" x="7171" y="0"></use></g></svg></span></div><script type="math/tex; mode=display" id="MathJax-Element-37">\frac{\partial u}{\partial t} + v \cdot \nabla u = 0,</script> where <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-289"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-290">v</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-38-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.128ex" height="1.538ex" viewBox="0 -550.5 485.5 662.2" role="img" focusable="false" style="vertical-align: -0.259ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-76" x="0" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-38">v</script> is a given fluid
velocity, and <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-291"><span class="MJXp-msubsup" id="MJXp-Span-292"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-293" style="margin-right: 0.05em;">u</span><span class="MJXp-mn MJXp-script" id="MJXp-Span-294" style="vertical-align: -0.4em;">0</span></span><span class="MJXp-mo" id="MJXp-Span-295" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-296">x</span><span class="MJXp-mo" id="MJXp-Span-297" style="margin-left: 0em; margin-right: 0em;">)</span><span class="MJXp-mo" id="MJXp-Span-298" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-299">u</span><span class="MJXp-mo" id="MJXp-Span-300" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mn" id="MJXp-Span-301">0</span><span class="MJXp-mo" id="MJXp-Span-302" style="margin-left: 0em; margin-right: 0.222em;">,</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-303">x</span><span class="MJXp-mo" id="MJXp-Span-304" style="margin-left: 0em; margin-right: 0em;">)</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-39-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="15.286ex" height="2.684ex" viewBox="0 -824.7 6581.6 1155.8" role="img" focusable="false" style="vertical-align: -0.769ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-75" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMAIN-30" x="809" y="-213"></use><use xlink:href="#MJMAIN-28" x="1026" y="0"></use><use xlink:href="#MJMATHI-78" x="1415" y="0"></use><use xlink:href="#MJMAIN-29" x="1988" y="0"></use><use xlink:href="#MJMAIN-3D" x="2655" y="0"></use><use xlink:href="#MJMATHI-75" x="3711" y="0"></use><use xlink:href="#MJMAIN-28" x="4284" y="0"></use><use xlink:href="#MJMAIN-30" x="4673" y="0"></use><use xlink:href="#MJMAIN-2C" x="5174" y="0"></use><use xlink:href="#MJMATHI-78" x="5619" y="0"></use><use xlink:href="#MJMAIN-29" x="6192" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-39">u_0(x)=u(0,x)</script> is a given initial condition.</p>
<p>The example demonstrates the use of Discontinuous Galerkin (DG) bilinear forms
in MFEM (face integrators), the use of explicit and implicit (with block ILU
preconditioning) ODE time integrators, the definition of periodic boundary
conditions through periodic meshes, as well as the use of
<a href="http://glvis.org">GLVis</a> for persistent visualization of a time-evolving
solution. The saving of time-dependent data files for external visualization
with <a href="http://visit.llnl.gov">VisIt</a> and <a href="https://www.paraview.org">ParaView</a> is also illustrated.</p>
<p><em>The example has a serial (<a href="https://github.com/mfem/mfem/blob/master/examples/ex9.cpp">ex9.cpp</a>)
and a parallel (<a href="https://github.com/mfem/mfem/blob/master/examples/ex9p.cpp">ex9p.cpp</a>) version.
It also has a SUNDIALS modification in <a href="https://github.com/mfem/mfem/blob/master/examples/sundials">examples/sundials</a>
, a PETSc modification in <a href="https://github.com/mfem/mfem/blob/master/examples/petsc">examples/petsc</a>,
and a HiOp modification in <a href="https://github.com/mfem/mfem/blob/master/examples/hiop">examples/hiop</a>.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="ex10" style="display: block;">
<h2 id="example-10-nonlinear-elasticity">Example 10: Nonlinear Elasticity</h2>
<p><img class="floatright" src="../doc/web/examples/ex10.png"></p>
<p>This example solves a time dependent nonlinear elasticity problem of the form
<span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-305"><span class="MJXp-mfrac" id="MJXp-Span-306" style="vertical-align: 0.25em;"><span class="MJXp-box"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-307">d</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-308">v</span></span><span class="MJXp-box" style="margin-top: -0.9em;"><span class="MJXp-denom"><span><span class="MJXp-rule" style="height: 1em; border-top-style: none; border-bottom-width: 1px; border-bottom-style: solid; margin: 0.1em 0px;"></span></span><span><span class="MJXp-box"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-309">d</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-310">t</span></span></span></span></span></span><span class="MJXp-mo" id="MJXp-Span-311" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-312">H</span><span class="MJXp-mo" id="MJXp-Span-313" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-314">x</span><span class="MJXp-mo" id="MJXp-Span-315" style="margin-left: 0em; margin-right: 0em;">)</span><span class="MJXp-mo" id="MJXp-Span-316" style="margin-left: 0.267em; margin-right: 0.267em;">+</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-317">S</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-318">v</span><span class="MJXp-mspace" id="MJXp-Span-319" style="width: 0.167em; height: 0em;"></span><span class="MJXp-mo" id="MJXp-Span-320" style="margin-left: 0em; margin-right: 0.222em;">,</span><span class="MJXp-mspace" id="MJXp-Span-321" style="width: 2em; height: 0em;"></span><span class="MJXp-mfrac" id="MJXp-Span-322" style="vertical-align: 0.25em;"><span class="MJXp-box"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-323">d</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-324">x</span></span><span class="MJXp-box" style="margin-top: -0.9em;"><span class="MJXp-denom"><span><span class="MJXp-rule" style="height: 1em; border-top-style: none; border-bottom-width: 1px; border-bottom-style: solid; margin: 0.1em 0px;"></span></span><span><span class="MJXp-box"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-325">d</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-326">t</span></span></span></span></span></span><span class="MJXp-mo" id="MJXp-Span-327" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-328">v</span><span class="MJXp-mspace" id="MJXp-Span-329" style="width: 0.167em; height: 0em;"></span><span class="MJXp-mo" id="MJXp-Span-330" style="margin-left: 0em; margin-right: 0.222em;">,</span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processed" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-40-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="31.656ex" height="5.232ex" viewBox="0 -1482.9 13629.6 2252.8" role="img" focusable="false" style="vertical-align: -1.788ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><g transform="translate(120,0)"><rect stroke="none" width="1129" height="60" x="0" y="220"></rect><g transform="translate(60,676)"><use xlink:href="#MJMATHI-64" x="0" y="0"></use><use xlink:href="#MJMATHI-76" x="523" y="0"></use></g><g transform="translate(122,-686)"><use xlink:href="#MJMATHI-64" x="0" y="0"></use><use xlink:href="#MJMATHI-74" x="523" y="0"></use></g></g><use xlink:href="#MJMAIN-3D" x="1646" y="0"></use><use xlink:href="#MJMATHI-48" x="2703" y="0"></use><use xlink:href="#MJMAIN-28" x="3591" y="0"></use><use xlink:href="#MJMATHI-78" x="3981" y="0"></use><use xlink:href="#MJMAIN-29" x="4553" y="0"></use><use xlink:href="#MJMAIN-2B" x="5165" y="0"></use><use xlink:href="#MJMATHI-53" x="6166" y="0"></use><use xlink:href="#MJMATHI-76" x="6811" y="0"></use><use xlink:href="#MJMAIN-2C" x="7463" y="0"></use><g transform="translate(9742,0)"><g transform="translate(286,0)"><rect stroke="none" width="1216" height="60" x="0" y="220"></rect><g transform="translate(60,676)"><use xlink:href="#MJMATHI-64" x="0" y="0"></use><use xlink:href="#MJMATHI-78" x="523" y="0"></use></g><g transform="translate(165,-686)"><use xlink:href="#MJMATHI-64" x="0" y="0"></use><use xlink:href="#MJMATHI-74" x="523" y="0"></use></g></g></g><use xlink:href="#MJMAIN-3D" x="11642" y="0"></use><use xlink:href="#MJMATHI-76" x="12698" y="0"></use><use xlink:href="#MJMAIN-2C" x="13351" y="0"></use></g></svg></span></div><script type="math/tex; mode=display" id="MathJax-Element-40"> \frac{dv}{dt} = H(x) + S v\,,\qquad \frac{dx}{dt} = v\,, </script>
where <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-331"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-332">H</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-41-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="2.064ex" height="2.048ex" viewBox="0 -769.9 888.5 881.6" role="img" focusable="false" style="vertical-align: -0.259ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-48" x="0" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-41">H</script> is a hyperelastic model and <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-333"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-334">S</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-42-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.499ex" height="2.048ex" viewBox="0 -769.9 645.5 881.6" role="img" focusable="false" style="vertical-align: -0.259ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-53" x="0" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-42">S</script> is a viscosity operator of
Laplacian type. The geometry of the domain is assumed to be as follows:</p>
<p><img alt="" src="../doc/web/examples/ex10-domain.png"></p>
<p>The example demonstrates the use of nonlinear operators, as well as their
implicit time integration using a Newton method for solving an associated
reduced backward-Euler type nonlinear equation. Each Newton step requires the
inversion of a Jacobian matrix, which is done through a (preconditioned) inner
solver.</p>
<p><em>The example has a serial (<a href="https://github.com/mfem/mfem/blob/master/examples/ex10.cpp">ex10.cpp</a>)
and a parallel (<a href="https://github.com/mfem/mfem/blob/master/examples/ex10p.cpp">ex10p.cpp</a>) version.
It also has a SUNDIALS modification in <a href="https://github.com/mfem/mfem/blob/master/examples/sundials">examples/sundials</a>
and a PETSc modification in <a href="https://github.com/mfem/mfem/blob/master/examples/petsc">examples/petsc</a>.
We recommend viewing examples 2 and 9 before viewing this example.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="ex11" style="display: block;">
<h2 id="example-11-laplace-eigenproblem">Example 11: Laplace Eigenproblem</h2>
<p><img class="floatright" src="../doc/web/examples/ex11.png"></p>
<p>This example code demonstrates the use of MFEM to solve the eigenvalue problem
<span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-335"><span class="MJXp-mo" id="MJXp-Span-336" style="margin-left: 0em; margin-right: 0.111em;"></span><span class="MJXp-mi" id="MJXp-Span-337">Δ</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-338">u</span><span class="MJXp-mo" id="MJXp-Span-339" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-340">λ</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-341">u</span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processed" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-43-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="10.857ex" height="2.302ex" viewBox="0 -824.7 4674.6 991.3" role="img" focusable="false" style="vertical-align: -0.387ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAIN-2212" x="0" y="0"></use><use xlink:href="#MJMAIN-394" x="778" y="0"></use><use xlink:href="#MJMATHI-75" x="1612" y="0"></use><use xlink:href="#MJMAIN-3D" x="2462" y="0"></use><use xlink:href="#MJMATHI-3BB" x="3518" y="0"></use><use xlink:href="#MJMATHI-75" x="4102" y="0"></use></g></svg></span></div><script type="math/tex; mode=display" id="MathJax-Element-43">-\Delta u = \lambda u</script> with homogeneous Dirichlet boundary conditions.</p>
<p>We compute a number of the lowest eigenmodes by discretizing the Laplacian and
Mass operators using a finite element space of the specified order, or an
isoparametric/isogeometric space if order &lt; 1 (quadratic for quadratic
curvilinear mesh, NURBS for NURBS mesh, etc.)</p>
<p>The example highlights the use of the LOBPCG eigenvalue solver together with the
BoomerAMG preconditioner in HYPRE, as well as optionally the SuperLU or
STRUMPACK parallel direct solvers. Reusing a single <a href="http://glvis.org">GLVis</a>
visualization window for multiple eigenfunctions is also illustrated.</p>
<p><em>The example has only a parallel
(<a href="https://github.com/mfem/mfem/blob/master/examples/ex11p.cpp">ex11p.cpp</a>) version.
We recommend viewing Example 1 before viewing this example.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="ex12" style="display: block;">
<h2 id="example-12-linear-elasticity-eigenproblem">Example 12: Linear Elasticity Eigenproblem</h2>
<p><img class="floatright" src="../doc/web/examples/ex12.png"></p>
<p>This example code solves the linear elasticity eigenvalue
problem for a multi-material cantilever beam.
Specifically, we compute a number of the lowest eigenmodes by approximating the weak form of
<span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-342"><span class="MJXp-mo" id="MJXp-Span-343" style="margin-left: 0em; margin-right: 0.111em;"></span><span class="MJXp-mrow" id="MJXp-Span-344"><span class="MJXp-mi" id="MJXp-Span-345">d</span><span class="MJXp-mi" id="MJXp-Span-346">i</span><span class="MJXp-mi" id="MJXp-Span-347">v</span></span><span class="MJXp-mo" id="MJXp-Span-348" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mrow" id="MJXp-Span-349"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-350">σ</span></span><span class="MJXp-mo" id="MJXp-Span-351" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mrow" id="MJXp-Span-352"><span class="MJXp-mi MJXp-bold" id="MJXp-Span-353">u</span></span><span class="MJXp-mo" id="MJXp-Span-354" style="margin-left: 0em; margin-right: 0em;">)</span><span class="MJXp-mo" id="MJXp-Span-355" style="margin-left: 0em; margin-right: 0em;">)</span><span class="MJXp-mo" id="MJXp-Span-356" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-357">λ</span><span class="MJXp-mrow" id="MJXp-Span-358"><span class="MJXp-mi MJXp-bold" id="MJXp-Span-359">u</span></span><span class="MJXp-mspace" id="MJXp-Span-360" style="width: 0.167em; height: 0em;"></span><span class="MJXp-mo" id="MJXp-Span-361" style="margin-left: 0em; margin-right: 0.222em;">,</span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processed" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-44-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="18.381ex" height="2.684ex" viewBox="0 -824.7 7914.2 1155.8" role="img" focusable="false" style="vertical-align: -0.769ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAIN-2212" x="0" y="0"></use><g transform="translate(778,0)"><use xlink:href="#MJMAIN-64" x="0" y="0"></use><use xlink:href="#MJMAIN-69" x="556" y="0"></use><use xlink:href="#MJMAIN-76" x="835" y="0"></use></g><use xlink:href="#MJMAIN-28" x="2142" y="0"></use><use xlink:href="#MJMATHI-3C3" x="2531" y="0"></use><use xlink:href="#MJMAIN-28" x="3104" y="0"></use><use xlink:href="#MJMAINB-75" x="3493" y="0"></use><use xlink:href="#MJMAIN-29" x="4133" y="0"></use><use xlink:href="#MJMAIN-29" x="4522" y="0"></use><use xlink:href="#MJMAIN-3D" x="5189" y="0"></use><use xlink:href="#MJMATHI-3BB" x="6246" y="0"></use><use xlink:href="#MJMAINB-75" x="6829" y="0"></use><use xlink:href="#MJMAIN-2C" x="7635" y="0"></use></g></svg></span></div><script type="math/tex; mode=display" id="MathJax-Element-44">-{\rm div}({\sigma}({\bf u})) = \lambda {\bf u} \,,</script>
where
<span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-362"><span class="MJXp-mrow" id="MJXp-Span-363"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-364">σ</span></span><span class="MJXp-mo" id="MJXp-Span-365" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mrow" id="MJXp-Span-366"><span class="MJXp-mi MJXp-bold" id="MJXp-Span-367">u</span></span><span class="MJXp-mo" id="MJXp-Span-368" style="margin-left: 0em; margin-right: 0em;">)</span><span class="MJXp-mo" id="MJXp-Span-369" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-370">λ</span><span class="MJXp-mspace" id="MJXp-Span-371" style="width: 0.167em; height: 0em;"></span><span class="MJXp-mrow" id="MJXp-Span-372"><span class="MJXp-mi" id="MJXp-Span-373">d</span><span class="MJXp-mi" id="MJXp-Span-374">i</span><span class="MJXp-mi" id="MJXp-Span-375">v</span></span><span class="MJXp-mo" id="MJXp-Span-376" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mrow" id="MJXp-Span-377"><span class="MJXp-mi MJXp-bold" id="MJXp-Span-378">u</span></span><span class="MJXp-mo" id="MJXp-Span-379" style="margin-left: 0em; margin-right: 0em;">)</span><span class="MJXp-mspace" id="MJXp-Span-380" style="width: 0.167em; height: 0em;"></span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-381">I</span><span class="MJXp-mo" id="MJXp-Span-382" style="margin-left: 0.267em; margin-right: 0.267em;">+</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-383">μ</span><span class="MJXp-mspace" id="MJXp-Span-384" style="width: 0.167em; height: 0em;"></span><span class="MJXp-mo" id="MJXp-Span-385" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mi" id="MJXp-Span-386">∇</span><span class="MJXp-mrow" id="MJXp-Span-387"><span class="MJXp-mi MJXp-bold" id="MJXp-Span-388">u</span></span><span class="MJXp-mo" id="MJXp-Span-389" style="margin-left: 0.267em; margin-right: 0.267em;">+</span><span class="MJXp-mi" id="MJXp-Span-390">∇</span><span class="MJXp-msubsup" id="MJXp-Span-391"><span class="MJXp-mrow" id="MJXp-Span-392" style="margin-right: 0.05em;"><span class="MJXp-mi MJXp-bold" id="MJXp-Span-393">u</span></span><span class="MJXp-mi MJXp-italic MJXp-script" id="MJXp-Span-394" style="vertical-align: 0.5em;">T</span></span><span class="MJXp-mo" id="MJXp-Span-395" style="margin-left: 0em; margin-right: 0em;">)</span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processed" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-45-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="34.996ex" height="3.067ex" viewBox="0 -989.3 15067.6 1320.3" role="img" focusable="false" style="vertical-align: -0.769ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-3C3" x="0" y="0"></use><use xlink:href="#MJMAIN-28" x="572" y="0"></use><use xlink:href="#MJMAINB-75" x="962" y="0"></use><use xlink:href="#MJMAIN-29" x="1601" y="0"></use><use xlink:href="#MJMAIN-3D" x="2268" y="0"></use><use xlink:href="#MJMATHI-3BB" x="3325" y="0"></use><g transform="translate(4075,0)"><use xlink:href="#MJMAIN-64" x="0" y="0"></use><use xlink:href="#MJMAIN-69" x="556" y="0"></use><use xlink:href="#MJMAIN-76" x="835" y="0"></use></g><use xlink:href="#MJMAIN-28" x="5438" y="0"></use><use xlink:href="#MJMAINB-75" x="5828" y="0"></use><use xlink:href="#MJMAIN-29" x="6467" y="0"></use><use xlink:href="#MJMATHI-49" x="7023" y="0"></use><use xlink:href="#MJMAIN-2B" x="7750" y="0"></use><use xlink:href="#MJMATHI-3BC" x="8751" y="0"></use><use xlink:href="#MJMAIN-28" x="9521" y="0"></use><use xlink:href="#MJMAIN-2207" x="9911" y="0"></use><use xlink:href="#MJMAINB-75" x="10744" y="0"></use><use xlink:href="#MJMAIN-2B" x="11606" y="0"></use><use xlink:href="#MJMAIN-2207" x="12606" y="0"></use><g transform="translate(13440,0)"><use xlink:href="#MJMAINB-75" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMATHI-54" x="904" y="583"></use></g><use xlink:href="#MJMAIN-29" x="14678" y="0"></use></g></svg></span></div><script type="math/tex; mode=display" id="MathJax-Element-45">{\sigma}({\bf u}) = \lambda\, {\rm div}({\bf u})\,I + \mu\,(\nabla{\bf u} + \nabla{\bf u}^T)</script>
is the stress tensor corresponding to displacement field <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-396"><span class="MJXp-mi MJXp-bold" id="MJXp-Span-397">u</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-46-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.485ex" height="1.538ex" viewBox="0 -550.5 639.5 662.2" role="img" focusable="false" style="vertical-align: -0.259ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAINB-75" x="0" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-46">\bf u</script>, and <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-398"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-399">λ</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-47-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.355ex" height="2.048ex" viewBox="0 -769.9 583.5 881.6" role="img" focusable="false" style="vertical-align: -0.259ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-3BB" x="0" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-47">\lambda</script> and <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-400"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-401">μ</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-48-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.402ex" height="1.92ex" viewBox="0 -550.5 603.5 826.7" role="img" focusable="false" style="vertical-align: -0.642ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-3BC" x="0" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-48">\mu</script>
are the material Lame constants. The boundary conditions are
<span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-402"><span class="MJXp-mrow" id="MJXp-Span-403"><span class="MJXp-mi MJXp-bold" id="MJXp-Span-404">u</span></span><span class="MJXp-mo" id="MJXp-Span-405" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mn" id="MJXp-Span-406">0</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-49-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="5.746ex" height="2.048ex" viewBox="0 -769.9 2474.1 881.6" role="img" focusable="false" style="vertical-align: -0.259ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAINB-75" x="0" y="0"></use><use xlink:href="#MJMAIN-3D" x="917" y="0"></use><use xlink:href="#MJMAIN-30" x="1973" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-49">{\bf u}=0</script> on the fixed part of the boundary with attribute 1, and
<span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-407"><span class="MJXp-mrow" id="MJXp-Span-408"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-409">σ</span></span><span class="MJXp-mo" id="MJXp-Span-410" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mrow" id="MJXp-Span-411"><span class="MJXp-mi MJXp-bold" id="MJXp-Span-412">u</span></span><span class="MJXp-mo" id="MJXp-Span-413" style="margin-left: 0em; margin-right: 0em;">)</span><span class="MJXp-mo" id="MJXp-Span-414" style="margin-left: 0.267em; margin-right: 0.267em;">⋅</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-415">n</span><span class="MJXp-mo" id="MJXp-Span-416" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-417">f</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-50-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="12.075ex" height="2.684ex" viewBox="0 -824.7 5199 1155.8" role="img" focusable="false" style="vertical-align: -0.769ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-3C3" x="0" y="0"></use><use xlink:href="#MJMAIN-28" x="572" y="0"></use><use xlink:href="#MJMAINB-75" x="962" y="0"></use><use xlink:href="#MJMAIN-29" x="1601" y="0"></use><use xlink:href="#MJMAIN-22C5" x="2213" y="0"></use><use xlink:href="#MJMATHI-6E" x="2713" y="0"></use><use xlink:href="#MJMAIN-3D" x="3592" y="0"></use><use xlink:href="#MJMATHI-66" x="4648" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-50">{\sigma}({\bf u})\cdot n = f</script> on the remainder.
The geometry of the domain is assumed to be as follows:</p>
<p><img alt="" src="../doc/web/examples/ex12-domain.png"></p>
<p>The example highlights the use of the LOBPCG eigenvalue solver together with the
BoomerAMG preconditioner in HYPRE.
Reusing a single <a href="http://glvis.org">GLVis</a> visualization window for multiple
eigenfunctions is also illustrated.</p>
<p><em>The example has only a parallel
(<a href="https://github.com/mfem/mfem/blob/master/examples/ex12p.cpp">ex12p.cpp</a>) version.
We recommend viewing examples 2 and 11 before viewing this example.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="ex13" style="display: block;">
<h2 id="example-13-maxwell-eigenproblem">Example 13: Maxwell Eigenproblem</h2>
<p><img class="floatright" src="../doc/web/examples/ex13.png"></p>
<p>This example code solves the Maxwell (electromagnetic)
eigenvalue problem
<span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-418"><span class="MJXp-mi" id="MJXp-Span-419">∇</span><span class="MJXp-mo" id="MJXp-Span-420" style="margin-left: 0.267em; margin-right: 0.267em;">×</span><span class="MJXp-mi" id="MJXp-Span-421">∇</span><span class="MJXp-mo" id="MJXp-Span-422" style="margin-left: 0.267em; margin-right: 0.267em;">×</span><span class="MJXp-mspace" id="MJXp-Span-423" style="width: 0.167em; height: 0em;"></span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-424">E</span><span class="MJXp-mo" id="MJXp-Span-425" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-426">λ</span><span class="MJXp-mspace" id="MJXp-Span-427" style="width: 0.167em; height: 0em;"></span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-428">E</span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processed" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-51-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="18.332ex" height="2.048ex" viewBox="0 -769.9 7892.8 881.6" role="img" focusable="false" style="vertical-align: -0.259ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAIN-2207" x="0" y="0"></use><use xlink:href="#MJMAIN-D7" x="1055" y="0"></use><use xlink:href="#MJMAIN-2207" x="2056" y="0"></use><use xlink:href="#MJMAIN-D7" x="3112" y="0"></use><use xlink:href="#MJMATHI-45" x="4279" y="0"></use><use xlink:href="#MJMAIN-3D" x="5321" y="0"></use><use xlink:href="#MJMATHI-3BB" x="6378" y="0"></use><use xlink:href="#MJMATHI-45" x="7128" y="0"></use></g></svg></span></div><script type="math/tex; mode=display" id="MathJax-Element-51">\nabla\times\nabla\times\, E = \lambda\, E </script>
with  homogeneous Dirichlet boundary conditions <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-429"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-430">E</span><span class="MJXp-mo" id="MJXp-Span-431" style="margin-left: 0.267em; margin-right: 0.267em;">×</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-432">n</span><span class="MJXp-mo" id="MJXp-Span-433" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mn" id="MJXp-Span-434">0</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-52-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="10.272ex" height="2.048ex" viewBox="0 -769.9 4422.5 881.6" role="img" focusable="false" style="vertical-align: -0.259ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-45" x="0" y="0"></use><use xlink:href="#MJMAIN-D7" x="986" y="0"></use><use xlink:href="#MJMATHI-6E" x="1987" y="0"></use><use xlink:href="#MJMAIN-3D" x="2865" y="0"></use><use xlink:href="#MJMAIN-30" x="3922" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-52">E \times n = 0</script>.</p>
<p>We compute a number of the lowest nonzero eigenmodes by
discretizing the curl curl operator using a Nedelec finite element space of
the specified order in 2D or 3D.</p>
<p>The example highlights the use of the AME subspace eigenvalue
solver from HYPRE, which uses LOBPCG and AMS internally.
Reusing a single <a href="http://glvis.org">GLVis</a> visualization window for multiple
eigenfunctions is also illustrated.</p>
<p><em>The example has only a parallel
(<a href="https://github.com/mfem/mfem/blob/master/examples/ex13p.cpp">ex13p.cpp</a>) version.
We recommend viewing examples 3 and 11 before viewing this example.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="ex14" style="display: block;">
<h2 id="example-14-dg-diffusion">Example 14: DG Diffusion</h2>
<p><img class="floatright" src="../doc/web/examples/ex14.png"></p>
<p>This example code demonstrates the use of MFEM to define a
discontinuous Galerkin (DG) finite element discretization of
the Laplace problem  <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-435"><span class="MJXp-mo" id="MJXp-Span-436" style="margin-left: 0em; margin-right: 0.111em;"></span><span class="MJXp-mi" id="MJXp-Span-437">Δ</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-438">u</span><span class="MJXp-mo" id="MJXp-Span-439" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mn" id="MJXp-Span-440">1</span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processed" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-53-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="9.335ex" height="2.302ex" viewBox="0 -824.7 4019.1 991.3" role="img" focusable="false" style="vertical-align: -0.387ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAIN-2212" x="0" y="0"></use><use xlink:href="#MJMAIN-394" x="778" y="0"></use><use xlink:href="#MJMATHI-75" x="1612" y="0"></use><use xlink:href="#MJMAIN-3D" x="2462" y="0"></use><use xlink:href="#MJMAIN-31" x="3518" y="0"></use></g></svg></span></div><script type="math/tex; mode=display" id="MathJax-Element-53">-\Delta u = 1</script> with homogeneous Dirichlet
boundary conditions. Finite element spaces of any order,
including zero on regular grids, are supported. The example highlights the use
of discontinuous spaces and DG-specific face integrators.</p>
<p><em>The example has a serial (<a href="https://github.com/mfem/mfem/blob/master/examples/ex14.cpp">ex14.cpp</a>)
and a parallel (<a href="https://github.com/mfem/mfem/blob/master/examples/ex14p.cpp">ex14p.cpp</a>) version.
We recommend viewing examples 1 and 9 before viewing this example.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="ex15" style="display: block;">
<h2 id="example-15-dynamic-amr">Example 15: Dynamic AMR</h2>
<p><img class="floatright" src="../doc/web/examples/ex15.png"></p>
<p>Building on <a href="#ex6">Example 6</a>, this example demonstrates dynamic adaptive mesh refinement.
The mesh is adapted to a time-dependent solution by refinement
as well as by derefinement. For simplicity, the solution is
prescribed and no time integration is done. However, the error
estimation and refinement/derefinement decisions are realistic.</p>
<p>At each outer iteration the right hand side function is changed
to mimic a time dependent problem.  Within each inner iteration
the problem is solved on a sequence of meshes which are locally
refined according to a simple ZZ error estimator.  At the end
of the inner iteration the error estimates are also used to
identify any elements which may be over-refined and a single
derefinement step is performed.  After each refinement or
derefinement step a rebalance operation is performed to keep
the mesh evenly distributed among the available processors.</p>
<p>The example demonstrates MFEM's capability to refine, derefine
and load balance nonconforming meshes, in 2D and 3D, and on
linear, curved and surface meshes. Interpolation of functions
between coarse and fine meshes, persistent <a href="http://glvis.org">GLVis</a> visualization,
and saving of time-dependent fields for external visualization
with <a href="http://visit.llnl.gov">VisIt</a> are also illustrated.</p>
<p><em>The example has a serial (<a href="https://github.com/mfem/mfem/blob/master/examples/ex15.cpp">ex15.cpp</a>)
and a parallel (<a href="https://github.com/mfem/mfem/blob/master/examples/ex15p.cpp">ex15p.cpp</a>) version.
We recommend viewing examples 1, 6 and 9 before viewing this example.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="ex16" style="display: block;">
<h2 id="example-16-time-dependent-heat-conduction">Example 16: Time Dependent Heat Conduction</h2>
<p><img class="floatright" src="../doc/web/examples/ex16.png"></p>
<p>This example code solves a simple 2D/3D time dependent nonlinear heat conduction problem
<span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-441"><span class="MJXp-mfrac" id="MJXp-Span-442" style="vertical-align: 0.25em;"><span class="MJXp-box"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-443">d</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-444">u</span></span><span class="MJXp-box" style="margin-top: -0.9em;"><span class="MJXp-denom"><span><span class="MJXp-rule" style="height: 1em; border-top-style: none; border-bottom-width: 1px; border-bottom-style: solid; margin: 0.1em 0px;"></span></span><span><span class="MJXp-box"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-445">d</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-446">t</span></span></span></span></span></span><span class="MJXp-mo" id="MJXp-Span-447" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mi" id="MJXp-Span-448">∇</span><span class="MJXp-mo" id="MJXp-Span-449" style="margin-left: 0.267em; margin-right: 0.267em;">⋅</span><span class="MJXp-mrow" id="MJXp-Span-450"><span class="MJXp-mo" id="MJXp-Span-451" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-452">κ</span><span class="MJXp-mo" id="MJXp-Span-453" style="margin-left: 0.267em; margin-right: 0.267em;">+</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-454">α</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-455">u</span><span class="MJXp-mo" id="MJXp-Span-456" style="margin-left: 0em; margin-right: 0em;">)</span></span><span class="MJXp-mi" id="MJXp-Span-457">∇</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-458">u</span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processed" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-54-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="22.554ex" height="5.232ex" viewBox="0 -1482.9 9710.6 2252.8" role="img" focusable="false" style="vertical-align: -1.788ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><g transform="translate(120,0)"><rect stroke="none" width="1216" height="60" x="0" y="220"></rect><g transform="translate(60,676)"><use xlink:href="#MJMATHI-64" x="0" y="0"></use><use xlink:href="#MJMATHI-75" x="523" y="0"></use></g><g transform="translate(165,-686)"><use xlink:href="#MJMATHI-64" x="0" y="0"></use><use xlink:href="#MJMATHI-74" x="523" y="0"></use></g></g><use xlink:href="#MJMAIN-3D" x="1733" y="0"></use><use xlink:href="#MJMAIN-2207" x="2790" y="0"></use><use xlink:href="#MJMAIN-22C5" x="3845" y="0"></use><g transform="translate(4346,0)"><use xlink:href="#MJMAIN-28" x="0" y="0"></use><g transform="translate(389,0)"><use xlink:href="#MJMATHI-3BA" x="0" y="0"></use><use xlink:href="#MJMAIN-2B" x="798" y="0"></use><use xlink:href="#MJMATHI-3B1" x="1799" y="0"></use><use xlink:href="#MJMATHI-75" x="2439" y="0"></use></g><use xlink:href="#MJMAIN-29" x="3401" y="0"></use></g><use xlink:href="#MJMAIN-2207" x="8304" y="0"></use><use xlink:href="#MJMATHI-75" x="9138" y="0"></use></g></svg></span></div><script type="math/tex; mode=display" id="MathJax-Element-54">\frac{du}{dt} = \nabla \cdot \left( \kappa + \alpha u \right) \nabla u</script>
with a natural insulating boundary condition <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-459"><span class="MJXp-mfrac" id="MJXp-Span-460" style="vertical-align: 0.25em;"><span class="MJXp-box MJXp-script"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-461">d</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-462">u</span></span><span class="MJXp-box" style="margin-top: -0.9em;"><span class="MJXp-denom"><span><span class="MJXp-rule" style="height: 1em; border-top-style: none; border-bottom-width: 1px; border-bottom-style: solid; margin: 0.1em 0px;"></span></span><span><span class="MJXp-box MJXp-script"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-463">d</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-464">n</span></span></span></span></span></span><span class="MJXp-mo" id="MJXp-Span-465" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mn" id="MJXp-Span-466">0</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-55-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="6.943ex" height="3.449ex" viewBox="0 -989.3 2989.3 1484.9" role="img" focusable="false" style="vertical-align: -1.151ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><g transform="translate(120,0)"><rect stroke="none" width="914" height="60" x="0" y="220"></rect><g transform="translate(69,421)"><use transform="scale(0.707)" xlink:href="#MJMATHI-64" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMATHI-75" x="523" y="0"></use></g><g transform="translate(60,-405)"><use transform="scale(0.707)" xlink:href="#MJMATHI-64" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMATHI-6E" x="523" y="0"></use></g></g><use xlink:href="#MJMAIN-3D" x="1432" y="0"></use><use xlink:href="#MJMAIN-30" x="2488" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-55">\frac{du}{dn} = 0</script>.
We linearize the problem by using the temperature field <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-467"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-468">u</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-56-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.33ex" height="1.538ex" viewBox="0 -550.5 572.5 662.2" role="img" focusable="false" style="vertical-align: -0.259ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-75" x="0" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-56">u</script> from the previous time
step to compute the conductivity coefficient.</p>
<p>This example demonstrates both implicit and explicit time integration as well as a single
Picard step method for linearization. The saving of time dependent data files for external
visualization with <a href="http://visit.llnl.gov">VisIt</a> is also illustrated.</p>
<p><em>The example has a serial (<a href="https://github.com/mfem/mfem/blob/master/examples/ex16.cpp">ex16.cpp</a>)
and a parallel (<a href="https://github.com/mfem/mfem/blob/master/examples/ex16p.cpp">ex16p.cpp</a>) version.
We recommend viewing examples 2, 9, and 10 before viewing this example.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="ex17" style="display: block;">
<h2 id="example-17-dg-linear-elasticity">Example 17: DG Linear Elasticity</h2>
<p><img class="floatright" src="../doc/web/examples/ex17.png"></p>
<p>This example code solves a simple linear elasticity problem
describing a multi-material cantilever beam using symmetric or
non-symmetric discontinuous Galerkin (DG) formulation.</p>
<p>Specifically, we approximate the weak form of
<span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-469"><span class="MJXp-mo" id="MJXp-Span-470" style="margin-left: 0em; margin-right: 0.111em;"></span><span class="MJXp-mrow" id="MJXp-Span-471"><span class="MJXp-mi" id="MJXp-Span-472">d</span><span class="MJXp-mi" id="MJXp-Span-473">i</span><span class="MJXp-mi" id="MJXp-Span-474">v</span></span><span class="MJXp-mo" id="MJXp-Span-475" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mrow" id="MJXp-Span-476"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-477">σ</span></span><span class="MJXp-mo" id="MJXp-Span-478" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mrow" id="MJXp-Span-479"><span class="MJXp-mi MJXp-bold" id="MJXp-Span-480">u</span></span><span class="MJXp-mo" id="MJXp-Span-481" style="margin-left: 0em; margin-right: 0em;">)</span><span class="MJXp-mo" id="MJXp-Span-482" style="margin-left: 0em; margin-right: 0em;">)</span><span class="MJXp-mo" id="MJXp-Span-483" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mn" id="MJXp-Span-484">0</span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processed" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-57-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="15.669ex" height="2.684ex" viewBox="0 -824.7 6746.6 1155.8" role="img" focusable="false" style="vertical-align: -0.769ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAIN-2212" x="0" y="0"></use><g transform="translate(778,0)"><use xlink:href="#MJMAIN-64" x="0" y="0"></use><use xlink:href="#MJMAIN-69" x="556" y="0"></use><use xlink:href="#MJMAIN-76" x="835" y="0"></use></g><use xlink:href="#MJMAIN-28" x="2142" y="0"></use><use xlink:href="#MJMATHI-3C3" x="2531" y="0"></use><use xlink:href="#MJMAIN-28" x="3104" y="0"></use><use xlink:href="#MJMAINB-75" x="3493" y="0"></use><use xlink:href="#MJMAIN-29" x="4133" y="0"></use><use xlink:href="#MJMAIN-29" x="4522" y="0"></use><use xlink:href="#MJMAIN-3D" x="5189" y="0"></use><use xlink:href="#MJMAIN-30" x="6246" y="0"></use></g></svg></span></div><script type="math/tex; mode=display" id="MathJax-Element-57">-{\rm div}({\sigma}({\bf u})) = 0</script>
where
<span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-485"><span class="MJXp-mrow" id="MJXp-Span-486"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-487">σ</span></span><span class="MJXp-mo" id="MJXp-Span-488" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mrow" id="MJXp-Span-489"><span class="MJXp-mi MJXp-bold" id="MJXp-Span-490">u</span></span><span class="MJXp-mo" id="MJXp-Span-491" style="margin-left: 0em; margin-right: 0em;">)</span><span class="MJXp-mo" id="MJXp-Span-492" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-493">λ</span><span class="MJXp-mspace" id="MJXp-Span-494" style="width: 0.167em; height: 0em;"></span><span class="MJXp-mrow" id="MJXp-Span-495"><span class="MJXp-mi" id="MJXp-Span-496">d</span><span class="MJXp-mi" id="MJXp-Span-497">i</span><span class="MJXp-mi" id="MJXp-Span-498">v</span></span><span class="MJXp-mo" id="MJXp-Span-499" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mrow" id="MJXp-Span-500"><span class="MJXp-mi MJXp-bold" id="MJXp-Span-501">u</span></span><span class="MJXp-mo" id="MJXp-Span-502" style="margin-left: 0em; margin-right: 0em;">)</span><span class="MJXp-mspace" id="MJXp-Span-503" style="width: 0.167em; height: 0em;"></span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-504">I</span><span class="MJXp-mo" id="MJXp-Span-505" style="margin-left: 0.267em; margin-right: 0.267em;">+</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-506">μ</span><span class="MJXp-mspace" id="MJXp-Span-507" style="width: 0.167em; height: 0em;"></span><span class="MJXp-mo" id="MJXp-Span-508" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mi" id="MJXp-Span-509">∇</span><span class="MJXp-mrow" id="MJXp-Span-510"><span class="MJXp-mi MJXp-bold" id="MJXp-Span-511">u</span></span><span class="MJXp-mo" id="MJXp-Span-512" style="margin-left: 0.267em; margin-right: 0.267em;">+</span><span class="MJXp-mi" id="MJXp-Span-513">∇</span><span class="MJXp-msubsup" id="MJXp-Span-514"><span class="MJXp-mrow" id="MJXp-Span-515" style="margin-right: 0.05em;"><span class="MJXp-mi MJXp-bold" id="MJXp-Span-516">u</span></span><span class="MJXp-mi MJXp-italic MJXp-script" id="MJXp-Span-517" style="vertical-align: 0.5em;">T</span></span><span class="MJXp-mo" id="MJXp-Span-518" style="margin-left: 0em; margin-right: 0em;">)</span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processed" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-58-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="34.996ex" height="3.067ex" viewBox="0 -989.3 15067.6 1320.3" role="img" focusable="false" style="vertical-align: -0.769ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-3C3" x="0" y="0"></use><use xlink:href="#MJMAIN-28" x="572" y="0"></use><use xlink:href="#MJMAINB-75" x="962" y="0"></use><use xlink:href="#MJMAIN-29" x="1601" y="0"></use><use xlink:href="#MJMAIN-3D" x="2268" y="0"></use><use xlink:href="#MJMATHI-3BB" x="3325" y="0"></use><g transform="translate(4075,0)"><use xlink:href="#MJMAIN-64" x="0" y="0"></use><use xlink:href="#MJMAIN-69" x="556" y="0"></use><use xlink:href="#MJMAIN-76" x="835" y="0"></use></g><use xlink:href="#MJMAIN-28" x="5438" y="0"></use><use xlink:href="#MJMAINB-75" x="5828" y="0"></use><use xlink:href="#MJMAIN-29" x="6467" y="0"></use><use xlink:href="#MJMATHI-49" x="7023" y="0"></use><use xlink:href="#MJMAIN-2B" x="7750" y="0"></use><use xlink:href="#MJMATHI-3BC" x="8751" y="0"></use><use xlink:href="#MJMAIN-28" x="9521" y="0"></use><use xlink:href="#MJMAIN-2207" x="9911" y="0"></use><use xlink:href="#MJMAINB-75" x="10744" y="0"></use><use xlink:href="#MJMAIN-2B" x="11606" y="0"></use><use xlink:href="#MJMAIN-2207" x="12606" y="0"></use><g transform="translate(13440,0)"><use xlink:href="#MJMAINB-75" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMATHI-54" x="904" y="583"></use></g><use xlink:href="#MJMAIN-29" x="14678" y="0"></use></g></svg></span></div><script type="math/tex; mode=display" id="MathJax-Element-58">{\sigma}({\bf u}) = \lambda\, {\rm div}({\bf u})\,I + \mu\,(\nabla{\bf u} + \nabla{\bf u}^T)</script>
is the stress tensor corresponding to displacement field <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-519"><span class="MJXp-mrow" id="MJXp-Span-520"><span class="MJXp-mi MJXp-bold" id="MJXp-Span-521">u</span></span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-59-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.485ex" height="1.538ex" viewBox="0 -550.5 639.5 662.2" role="img" focusable="false" style="vertical-align: -0.259ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAINB-75" x="0" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-59">{\bf u}</script>, and <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-522"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-523">λ</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-60-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.355ex" height="2.048ex" viewBox="0 -769.9 583.5 881.6" role="img" focusable="false" style="vertical-align: -0.259ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-3BB" x="0" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-60">\lambda</script> and <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-524"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-525">μ</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-61-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.402ex" height="1.92ex" viewBox="0 -550.5 603.5 826.7" role="img" focusable="false" style="vertical-align: -0.642ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-3BC" x="0" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-61">\mu</script>
are the material Lame constants. The boundary conditions are
Dirichlet, <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-526"><span class="MJXp-mrow" id="MJXp-Span-527"><span class="MJXp-mi MJXp-bold" id="MJXp-Span-528">u</span></span><span class="MJXp-mo MJXp-bold" id="MJXp-Span-529" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mrow" id="MJXp-Span-530"><span class="MJXp-msubsup" id="MJXp-Span-531"><span class="MJXp-mi MJXp-bold" id="MJXp-Span-532" style="margin-right: 0.05em;">u</span><span class="MJXp-mi MJXp-bold MJXp-script" id="MJXp-Span-533" style="vertical-align: -0.4em;">D</span></span></span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-62-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="8.02ex" height="1.793ex" viewBox="0 -550.5 3453.1 771.9" role="img" focusable="false" style="vertical-align: -0.514ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAINB-75" x="0" y="0"></use><use xlink:href="#MJMAINB-3D" x="917" y="0"></use><g transform="translate(2089,0)"><use xlink:href="#MJMAINB-75" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMAINB-44" x="904" y="-213"></use></g></g></svg></span><script type="math/tex" id="MathJax-Element-62">\bf{u}=\bf{u_D}</script>, on the fixed part of the boundary, namely
boundary attributes 1 and 2; on the rest of the boundary we use
<span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-534"><span class="MJXp-mrow" id="MJXp-Span-535"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-536">σ</span></span><span class="MJXp-mo" id="MJXp-Span-537" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mrow" id="MJXp-Span-538"><span class="MJXp-mi MJXp-bold" id="MJXp-Span-539">u</span></span><span class="MJXp-mo" id="MJXp-Span-540" style="margin-left: 0em; margin-right: 0em;">)</span><span class="MJXp-mo" id="MJXp-Span-541" style="margin-left: 0.267em; margin-right: 0.267em;">⋅</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-542">n</span><span class="MJXp-mo" id="MJXp-Span-543" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mrow" id="MJXp-Span-544"><span class="MJXp-mn MJXp-bold" id="MJXp-Span-545">0</span></span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-63-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="12.133ex" height="2.684ex" viewBox="0 -824.7 5224 1155.8" role="img" focusable="false" style="vertical-align: -0.769ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-3C3" x="0" y="0"></use><use xlink:href="#MJMAIN-28" x="572" y="0"></use><use xlink:href="#MJMAINB-75" x="962" y="0"></use><use xlink:href="#MJMAIN-29" x="1601" y="0"></use><use xlink:href="#MJMAIN-22C5" x="2213" y="0"></use><use xlink:href="#MJMATHI-6E" x="2713" y="0"></use><use xlink:href="#MJMAIN-3D" x="3592" y="0"></use><use xlink:href="#MJMAINB-30" x="4648" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-63">{\sigma}({\bf u})\cdot n = {\bf 0}</script>. The geometry of the domain is assumed to be
as follows:</p>
<p><img alt="" src="../doc/web/examples/ex17-domain.png"></p>
<p>The example demonstrates the use of high-order DG vector finite
element spaces with the linear DG elasticity bilinear form,
meshes with curved elements, and the definition of piece-wise
constant and function vector-coefficient objects. The use of
non-homogeneous Dirichlet b.c. imposed weakly, is also
illustrated.</p>
<p><em>The example has a serial (<a href="https://github.com/mfem/mfem/blob/master/examples/ex17.cpp">ex17.cpp</a>)
and a parallel (<a href="https://github.com/mfem/mfem/blob/master/examples/ex17p.cpp">ex17p.cpp</a>) version.
We recommend viewing examples 2 and 14 before viewing this example.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="ex18" style="display: block;">
<h2 id="example-18-dg-euler-equations">Example 18: DG Euler Equations</h2>
<p><img class="floatright" src="../doc/web/examples/ex18.png"></p>
<p>This example code solves the compressible Euler system of equations, a model
nonlinear hyperbolic PDE, with a discontinuous Galerkin (DG) formulation. The
primary purpose is to show how a transient system of nonlinear equations can be
formulated in MFEM. The equations are solved in conservative form</p>
<p><span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-546"><span class="MJXp-mfrac" id="MJXp-Span-547" style="vertical-align: 0.25em;"><span class="MJXp-box"><span class="MJXp-mi" id="MJXp-Span-548">∂</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-549">u</span></span><span class="MJXp-box" style="margin-top: -0.9em;"><span class="MJXp-denom"><span><span class="MJXp-rule" style="height: 1em; border-top-style: none; border-bottom-width: 1px; border-bottom-style: solid; margin: 0.1em 0px;"></span></span><span><span class="MJXp-box"><span class="MJXp-mi" id="MJXp-Span-550">∂</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-551">t</span></span></span></span></span></span><span class="MJXp-mo" id="MJXp-Span-552" style="margin-left: 0.267em; margin-right: 0.267em;">+</span><span class="MJXp-mi" id="MJXp-Span-553">∇</span><span class="MJXp-mo" id="MJXp-Span-554" style="margin-left: 0.267em; margin-right: 0.267em;">⋅</span><span class="MJXp-mrow" id="MJXp-Span-555"><span class="MJXp-mi MJXp-bold" id="MJXp-Span-556">F</span></span><span class="MJXp-mo" id="MJXp-Span-557" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-558">u</span><span class="MJXp-mo" id="MJXp-Span-559" style="margin-left: 0em; margin-right: 0em;">)</span><span class="MJXp-mo" id="MJXp-Span-560" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mn" id="MJXp-Span-561">0</span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processed" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-64-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="19.022ex" height="5.36ex" viewBox="0 -1482.9 8189.9 2307.6" role="img" focusable="false" style="vertical-align: -1.915ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><g transform="translate(120,0)"><rect stroke="none" width="1260" height="60" x="0" y="220"></rect><g transform="translate(60,676)"><use xlink:href="#MJMAIN-2202" x="0" y="0"></use><use xlink:href="#MJMATHI-75" x="567" y="0"></use></g><g transform="translate(165,-694)"><use xlink:href="#MJMAIN-2202" x="0" y="0"></use><use xlink:href="#MJMATHI-74" x="567" y="0"></use></g></g><use xlink:href="#MJMAIN-2B" x="1722" y="0"></use><use xlink:href="#MJMAIN-2207" x="2722" y="0"></use><use xlink:href="#MJMAIN-22C5" x="3778" y="0"></use><use xlink:href="#MJMAINB-46" x="4279" y="0"></use><use xlink:href="#MJMAIN-28" x="5003" y="0"></use><use xlink:href="#MJMATHI-75" x="5393" y="0"></use><use xlink:href="#MJMAIN-29" x="5965" y="0"></use><use xlink:href="#MJMAIN-3D" x="6633" y="0"></use><use xlink:href="#MJMAIN-30" x="7689" y="0"></use></g></svg></span></div><script type="math/tex; mode=display" id="MathJax-Element-64">\frac{\partial u}{\partial t} + \nabla \cdot {\bf F}(u) = 0</script></p>
<p>with a state vector <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-562"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-563">u</span><span class="MJXp-mo" id="MJXp-Span-564" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mo" id="MJXp-Span-565" style="margin-left: 0em; margin-right: 0em;">[</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-566">ρ</span><span class="MJXp-mo" id="MJXp-Span-567" style="margin-left: 0em; margin-right: 0.222em;">,</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-568">ρ</span><span class="MJXp-msubsup" id="MJXp-Span-569"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-570" style="margin-right: 0.05em;">v</span><span class="MJXp-mn MJXp-script" id="MJXp-Span-571" style="vertical-align: -0.4em;">0</span></span><span class="MJXp-mo" id="MJXp-Span-572" style="margin-left: 0em; margin-right: 0.222em;">,</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-573">ρ</span><span class="MJXp-msubsup" id="MJXp-Span-574"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-575" style="margin-right: 0.05em;">v</span><span class="MJXp-mn MJXp-script" id="MJXp-Span-576" style="vertical-align: -0.4em;">1</span></span><span class="MJXp-mo" id="MJXp-Span-577" style="margin-left: 0em; margin-right: 0.222em;">,</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-578">ρ</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-579">E</span><span class="MJXp-mo" id="MJXp-Span-580" style="margin-left: 0em; margin-right: 0em;">]</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-65-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="19.771ex" height="2.684ex" viewBox="0 -824.7 8512.4 1155.8" role="img" focusable="false" style="vertical-align: -0.769ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-75" x="0" y="0"></use><use xlink:href="#MJMAIN-3D" x="850" y="0"></use><use xlink:href="#MJMAIN-5B" x="1906" y="0"></use><use xlink:href="#MJMATHI-3C1" x="2185" y="0"></use><use xlink:href="#MJMAIN-2C" x="2702" y="0"></use><use xlink:href="#MJMATHI-3C1" x="3147" y="0"></use><g transform="translate(3665,0)"><use xlink:href="#MJMATHI-76" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMAIN-30" x="686" y="-213"></use></g><use xlink:href="#MJMAIN-2C" x="4604" y="0"></use><use xlink:href="#MJMATHI-3C1" x="5049" y="0"></use><g transform="translate(5567,0)"><use xlink:href="#MJMATHI-76" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMAIN-31" x="686" y="-213"></use></g><use xlink:href="#MJMAIN-2C" x="6506" y="0"></use><use xlink:href="#MJMATHI-3C1" x="6951" y="0"></use><use xlink:href="#MJMATHI-45" x="7469" y="0"></use><use xlink:href="#MJMAIN-5D" x="8233" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-65">u = [ \rho, \rho v_0, \rho v_1, \rho E ]</script>, where <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-581"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-582">ρ</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-66-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.202ex" height="1.92ex" viewBox="0 -550.5 517.5 826.7" role="img" focusable="false" style="vertical-align: -0.642ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-3C1" x="0" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-66">\rho</script> is
the density, <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-583"><span class="MJXp-msubsup" id="MJXp-Span-584"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-585" style="margin-right: 0.05em;">v</span><span class="MJXp-mi MJXp-italic MJXp-script" id="MJXp-Span-586" style="vertical-align: -0.4em;">i</span></span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-67-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.927ex" height="1.793ex" viewBox="0 -550.5 829.8 771.9" role="img" focusable="false" style="vertical-align: -0.514ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-76" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMATHI-69" x="686" y="-213"></use></g></svg></span><script type="math/tex" id="MathJax-Element-67">v_i</script> is the velocity in the <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-587"><span class="MJXp-msubsup" id="MJXp-Span-588"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-589" style="margin-right: 0.05em;">i</span><span class="MJXp-mrow MJXp-script" id="MJXp-Span-590" style="vertical-align: 0.5em;"><span class="MJXp-mi" id="MJXp-Span-591">t</span><span class="MJXp-mi" id="MJXp-Span-592">h</span></span></span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-68-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="2.588ex" height="2.43ex" viewBox="0 -934.4 1114.4 1046.1" role="img" focusable="false" style="vertical-align: -0.259ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-69" x="0" y="0"></use><g transform="translate(345,362)"><use transform="scale(0.707)" xlink:href="#MJMAIN-74" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMAIN-68" x="389" y="0"></use></g></g></svg></span><script type="math/tex" id="MathJax-Element-68">i^{\rm th}</script> direction, <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-593"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-594">E</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-69-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.776ex" height="2.048ex" viewBox="0 -769.9 764.5 881.6" role="img" focusable="false" style="vertical-align: -0.259ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-45" x="0" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-69">E</script> is the
total specific energy, and <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-595"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-596">H</span><span class="MJXp-mo" id="MJXp-Span-597" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-598">E</span><span class="MJXp-mo" id="MJXp-Span-599" style="margin-left: 0.267em; margin-right: 0.267em;">+</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-600">p</span><span class="MJXp-mrow" id="MJXp-Span-601"><span class="MJXp-mo" id="MJXp-Span-602" style="margin-left: 0.111em; margin-right: 0.111em;">/</span></span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-603">ρ</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-70-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="13.312ex" height="2.684ex" viewBox="0 -824.7 5731.5 1155.8" role="img" focusable="false" style="vertical-align: -0.769ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-48" x="0" y="0"></use><use xlink:href="#MJMAIN-3D" x="1166" y="0"></use><use xlink:href="#MJMATHI-45" x="2222" y="0"></use><use xlink:href="#MJMAIN-2B" x="3209" y="0"></use><use xlink:href="#MJMATHI-70" x="4210" y="0"></use><use xlink:href="#MJMAIN-2F" x="4713" y="0"></use><use xlink:href="#MJMATHI-3C1" x="5214" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-70">H = E + p / \rho</script> is the total specific enthalpy.
The pressure, <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-604"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-605">p</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-71-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.259ex" height="1.92ex" viewBox="-38.5 -550.5 542 826.7" role="img" focusable="false" style="vertical-align: -0.642ex; margin-left: -0.089ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-70" x="0" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-71">p</script> is computed through a simple equation of state (EOS) call.
The conservative hydrodynamic flux <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-606"><span class="MJXp-mrow" id="MJXp-Span-607"><span class="MJXp-mi MJXp-bold" id="MJXp-Span-608">F</span></span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-72-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.683ex" height="2.048ex" viewBox="0 -769.9 724.5 881.6" role="img" focusable="false" style="vertical-align: -0.259ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAINB-46" x="0" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-72">{\bf F}</script> in each direction <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-609"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-610">i</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-73-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="0.802ex" height="2.048ex" viewBox="0 -769.9 345.5 881.6" role="img" focusable="false" style="vertical-align: -0.259ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-69" x="0" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-73">i</script> is</p>
<p><span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-611"><span class="MJXp-mrow" id="MJXp-Span-612"><span class="MJXp-msubsup" id="MJXp-Span-613"><span class="MJXp-mi MJXp-bold" id="MJXp-Span-614" style="margin-right: 0.05em;">F</span><span class="MJXp-mrow MJXp-script" id="MJXp-Span-615" style="vertical-align: -0.4em;"><span class="MJXp-mi undefined" id="MJXp-Span-616">i</span></span></span></span><span class="MJXp-mo" id="MJXp-Span-617" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mo" id="MJXp-Span-618" style="margin-left: 0em; margin-right: 0em;">[</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-619">ρ</span><span class="MJXp-msubsup" id="MJXp-Span-620"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-621" style="margin-right: 0.05em;">v</span><span class="MJXp-mi MJXp-italic MJXp-script" id="MJXp-Span-622" style="vertical-align: -0.4em;">i</span></span><span class="MJXp-mo" id="MJXp-Span-623" style="margin-left: 0em; margin-right: 0.222em;">,</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-624">ρ</span><span class="MJXp-msubsup" id="MJXp-Span-625"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-626" style="margin-right: 0.05em;">v</span><span class="MJXp-mn MJXp-script" id="MJXp-Span-627" style="vertical-align: -0.4em;">0</span></span><span class="MJXp-msubsup" id="MJXp-Span-628"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-629" style="margin-right: 0.05em;">v</span><span class="MJXp-mi MJXp-italic MJXp-script" id="MJXp-Span-630" style="vertical-align: -0.4em;">i</span></span><span class="MJXp-mo" id="MJXp-Span-631" style="margin-left: 0.267em; margin-right: 0.267em;">+</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-632">p</span><span class="MJXp-msubsup" id="MJXp-Span-633"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-634" style="margin-right: 0.05em;">δ</span><span class="MJXp-mrow MJXp-script" id="MJXp-Span-635" style="vertical-align: -0.4em;"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-636">i</span><span class="MJXp-mo" id="MJXp-Span-637">,</span><span class="MJXp-mn" id="MJXp-Span-638">0</span></span></span><span class="MJXp-mo" id="MJXp-Span-639" style="margin-left: 0em; margin-right: 0.222em;">,</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-640">ρ</span><span class="MJXp-msubsup" id="MJXp-Span-641"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-642" style="margin-right: 0.05em;">v</span><span class="MJXp-mn MJXp-script" id="MJXp-Span-643" style="vertical-align: -0.4em;">1</span></span><span class="MJXp-msubsup" id="MJXp-Span-644"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-645" style="margin-right: 0.05em;">v</span><span class="MJXp-mi MJXp-italic MJXp-script" id="MJXp-Span-646" style="vertical-align: -0.4em;">i</span></span><span class="MJXp-mo" id="MJXp-Span-647" style="margin-left: 0.267em; margin-right: 0.267em;">+</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-648">p</span><span class="MJXp-msubsup" id="MJXp-Span-649"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-650" style="margin-right: 0.05em;">δ</span><span class="MJXp-mrow MJXp-script" id="MJXp-Span-651" style="vertical-align: -0.4em;"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-652">i</span><span class="MJXp-mo" id="MJXp-Span-653">,</span><span class="MJXp-mn" id="MJXp-Span-654">1</span></span></span><span class="MJXp-mo" id="MJXp-Span-655" style="margin-left: 0em; margin-right: 0.222em;">,</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-656">ρ</span><span class="MJXp-msubsup" id="MJXp-Span-657"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-658" style="margin-right: 0.05em;">v</span><span class="MJXp-mi MJXp-italic MJXp-script" id="MJXp-Span-659" style="vertical-align: -0.4em;">i</span></span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-660">H</span><span class="MJXp-mo" id="MJXp-Span-661" style="margin-left: 0em; margin-right: 0em;">]</span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processed" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-74-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="43.101ex" height="2.812ex" viewBox="0 -824.7 18557.2 1210.6" role="img" focusable="false" style="vertical-align: -0.896ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAINB-46" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMAINI-69" x="1024" y="-213"></use><use xlink:href="#MJMAIN-3D" x="1319" y="0"></use><use xlink:href="#MJMAIN-5B" x="2375" y="0"></use><use xlink:href="#MJMATHI-3C1" x="2654" y="0"></use><g transform="translate(3171,0)"><use xlink:href="#MJMATHI-76" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMATHI-69" x="686" y="-213"></use></g><use xlink:href="#MJMAIN-2C" x="4001" y="0"></use><use xlink:href="#MJMATHI-3C1" x="4446" y="0"></use><g transform="translate(4964,0)"><use xlink:href="#MJMATHI-76" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMAIN-30" x="686" y="-213"></use></g><g transform="translate(5903,0)"><use xlink:href="#MJMATHI-76" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMATHI-69" x="686" y="-213"></use></g><use xlink:href="#MJMAIN-2B" x="6955" y="0"></use><use xlink:href="#MJMATHI-70" x="7956" y="0"></use><g transform="translate(8460,0)"><use xlink:href="#MJMATHI-3B4" x="0" y="0"></use><g transform="translate(444,-150)"><use transform="scale(0.707)" xlink:href="#MJMATHI-69" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMAIN-2C" x="345" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMAIN-30" x="624" y="0"></use></g></g><use xlink:href="#MJMAIN-2C" x="9799" y="0"></use><use xlink:href="#MJMATHI-3C1" x="10244" y="0"></use><g transform="translate(10762,0)"><use xlink:href="#MJMATHI-76" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMAIN-31" x="686" y="-213"></use></g><g transform="translate(11701,0)"><use xlink:href="#MJMATHI-76" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMATHI-69" x="686" y="-213"></use></g><use xlink:href="#MJMAIN-2B" x="12753" y="0"></use><use xlink:href="#MJMATHI-70" x="13754" y="0"></use><g transform="translate(14258,0)"><use xlink:href="#MJMATHI-3B4" x="0" y="0"></use><g transform="translate(444,-150)"><use transform="scale(0.707)" xlink:href="#MJMATHI-69" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMAIN-2C" x="345" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMAIN-31" x="624" y="0"></use></g></g><use xlink:href="#MJMAIN-2C" x="15597" y="0"></use><use xlink:href="#MJMATHI-3C1" x="16042" y="0"></use><g transform="translate(16560,0)"><use xlink:href="#MJMATHI-76" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMATHI-69" x="686" y="-213"></use></g><use xlink:href="#MJMATHI-48" x="17390" y="0"></use><use xlink:href="#MJMAIN-5D" x="18278" y="0"></use></g></svg></span></div><script type="math/tex; mode=display" id="MathJax-Element-74">{\bf F_{\it i}} = [ \rho v_i, \rho v_0 v_i + p \delta_{i,0}, \rho v_1 v_i + p \delta_{i,1}, \rho v_i H ]</script></p>
<p>Specifically, the example solves for an exact solution of the equations whereby
a vortex is transported by a uniform flow. Since all boundaries are periodic
here, the method's accuracy can be assessed by measuring the difference between
the solution and the initial condition at a later time when the vortex returns
to its initial location.</p>
<p>Note that as the order of the spatial discretization increases, the timestep
must become smaller. This example currently uses a simple estimate derived by
<a href="https://link.springer.com/article/10.1023/A:1012873910884">Cockburn and Shu</a>
for the 1D RKDG method. An additional factor can be tuned by passing the <code>--cfl</code>
(or <code>-c</code> shorter) flag.</p>
<p>The example demonstrates user-defined bilinear and nonlinear form integrators
for systems of equations that are defined with block vectors, and how these are
used with an operator for explicit time integrators. In this case the system
also involves an external approximate Riemann solver for the DG interface flux.
It also demonstrates how to use GLVis for in-situ visualization of vector grid
functions.</p>
<p><em>The example has a serial (<a href="https://github.com/mfem/mfem/blob/master/examples/ex18.cpp">ex18.cpp</a>)
and a parallel (<a href="https://github.com/mfem/mfem/blob/master/examples/ex18p.cpp">ex18p.cpp</a>) version.
We recommend viewing examples 9, 14 and 17 before viewing this example.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="ex19" style="display: block;">
<h2 id="example-19-incompressible-nonlinear-elasticity">Example 19: Incompressible Nonlinear Elasticity</h2>
<p><img class="floatright" src="../doc/web/examples/ex19.png"></p>
<p>This example code solves the quasi-static incompressible nonlinear
hyperelasticity equations. Specifically, it solves the nonlinear equation
<span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-662"><span class="MJXp-mi" id="MJXp-Span-663">∇</span><span class="MJXp-mo" id="MJXp-Span-664" style="margin-left: 0.267em; margin-right: 0.267em;">⋅</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-665">σ</span><span class="MJXp-mo" id="MJXp-Span-666" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-667">F</span><span class="MJXp-mo" id="MJXp-Span-668" style="margin-left: 0em; margin-right: 0em;">)</span><span class="MJXp-mo" id="MJXp-Span-669" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mn" id="MJXp-Span-670">0</span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processed" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-75-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="12.756ex" height="2.684ex" viewBox="0 -824.7 5492 1155.8" role="img" focusable="false" style="vertical-align: -0.769ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAIN-2207" x="0" y="0"></use><use xlink:href="#MJMAIN-22C5" x="1055" y="0"></use><use xlink:href="#MJMATHI-3C3" x="1556" y="0"></use><use xlink:href="#MJMAIN-28" x="2128" y="0"></use><use xlink:href="#MJMATHI-46" x="2518" y="0"></use><use xlink:href="#MJMAIN-29" x="3267" y="0"></use><use xlink:href="#MJMAIN-3D" x="3935" y="0"></use><use xlink:href="#MJMAIN-30" x="4991" y="0"></use></g></svg></span></div><script type="math/tex; mode=display" id="MathJax-Element-75">
\nabla \cdot \sigma(F) = 0
</script>
subject to the constraint
<span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-671"><span class="MJXp-mtext" id="MJXp-Span-672">det&nbsp;</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-673">F</span><span class="MJXp-mo" id="MJXp-Span-674" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mn" id="MJXp-Span-675">1</span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processed" style="text-align: center;"><span class="MathJax_SVG" id="MathJax-Element-76-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="9.812ex" height="2.048ex" viewBox="0 -769.9 4224.6 881.6" role="img" focusable="false" style="vertical-align: -0.259ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMAIN-64"></use><use xlink:href="#MJMAIN-65" x="556" y="0"></use><use xlink:href="#MJMAIN-74" x="1001" y="0"></use><use xlink:href="#MJMATHI-46" x="1640" y="0"></use><use xlink:href="#MJMAIN-3D" x="2667" y="0"></use><use xlink:href="#MJMAIN-31" x="3724" y="0"></use></g></svg></span></div><script type="math/tex; mode=display" id="MathJax-Element-76">
\text{det } F = 1
</script>
where <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-676"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-677">σ</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-77-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.33ex" height="1.411ex" viewBox="0 -495.6 572.5 607.3" role="img" focusable="false" style="vertical-align: -0.259ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-3C3" x="0" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-77">\sigma</script> is the Cauchy stress and <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-678"><span class="MJXp-msubsup" id="MJXp-Span-679"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-680" style="margin-right: 0.05em;">F</span><span class="MJXp-mrow MJXp-script" id="MJXp-Span-681" style="vertical-align: -0.4em;"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-682">i</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-683">j</span></span></span><span class="MJXp-mo" id="MJXp-Span-684" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-msubsup" id="MJXp-Span-685"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-686" style="margin-right: 0.05em;">δ</span><span class="MJXp-mrow MJXp-script" id="MJXp-Span-687" style="vertical-align: -0.4em;"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-688">i</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-689">j</span></span></span><span class="MJXp-mo" id="MJXp-Span-690" style="margin-left: 0.267em; margin-right: 0.267em;">+</span><span class="MJXp-msubsup" id="MJXp-Span-691"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-692" style="margin-right: 0.05em;">u</span><span class="MJXp-mrow MJXp-script" id="MJXp-Span-693" style="vertical-align: -0.4em;"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-694">i</span><span class="MJXp-mo" id="MJXp-Span-695">,</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-696">j</span></span></span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-78-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="14.684ex" height="2.812ex" viewBox="0 -824.7 6322.4 1210.6" role="img" focusable="false" style="vertical-align: -0.896ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-46" x="0" y="0"></use><g transform="translate(643,-150)"><use transform="scale(0.707)" xlink:href="#MJMATHI-69" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMATHI-6A" x="345" y="0"></use></g><use xlink:href="#MJMAIN-3D" x="1557" y="0"></use><g transform="translate(2613,0)"><use xlink:href="#MJMATHI-3B4" x="0" y="0"></use><g transform="translate(444,-150)"><use transform="scale(0.707)" xlink:href="#MJMATHI-69" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMATHI-6A" x="345" y="0"></use></g></g><use xlink:href="#MJMAIN-2B" x="3916" y="0"></use><g transform="translate(4916,0)"><use xlink:href="#MJMATHI-75" x="0" y="0"></use><g transform="translate(572,-150)"><use transform="scale(0.707)" xlink:href="#MJMATHI-69" x="0" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMAIN-2C" x="345" y="0"></use><use transform="scale(0.707)" xlink:href="#MJMATHI-6A" x="624" y="0"></use></g></g></g></svg></span><script type="math/tex" id="MathJax-Element-78">F_{ij} = \delta_{ij} + u_{i,j}</script> is the deformation
gradient. To handle the incompressibility constraint, pressure is included as
an independent unknown <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-697"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-698">p</span></span></span><span class="MathJax_SVG MathJax_SVG_Processed" id="MathJax-Element-79-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"><svg xmlns:xlink="http://www.w3.org/1999/xlink" width="1.259ex" height="1.92ex" viewBox="-38.5 -550.5 542 826.7" role="img" focusable="false" style="vertical-align: -0.642ex; margin-left: -0.089ex;"><g stroke="currentColor" fill="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)"><use xlink:href="#MJMATHI-70" x="0" y="0"></use></g></svg></span><script type="math/tex" id="MathJax-Element-79">p</script> and the stress response is modeled as an <a href="http://solidmechanics.org/text/Chapter3_5/Chapter3_5.htm">incompressible
neo-Hookean hyperelastic solid</a>.
The geometry of the domain is assumed to be as follows:</p>
<p><img alt="" src="../doc/web/examples/ex19-domain.png"></p>
<p>This formulation requires solving the saddle point system
<span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-699"><span class="MJXp-mrow" id="MJXp-Span-700"><span class="MJXp-mo" id="MJXp-Span-701" style="margin-left: 0em; margin-right: 0em; vertical-align: -0.617em;"><span class="MJXp-right MJXp-scale4" style="font-size: 3.467em; margin-left: -0.17em;">[</span></span><span class="MJXp-mtable" id="MJXp-Span-702"><span><span class="MJXp-mtr" id="MJXp-Span-703" style="vertical-align: baseline;"><span class="MJXp-mtd" id="MJXp-Span-704" style="text-align: center;"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-705">K</span></span><span class="MJXp-mtd" id="MJXp-Span-706" style="padding-left: 1em; text-align: center;"><span class="MJXp-msubsup" id="MJXp-Span-707"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-708" style="margin-right: 0.05em;">B</span><span class="MJXp-mi MJXp-italic MJXp-script" id="MJXp-Span-709" style="vertical-align: 0.5em;">T</span></span></span></span><span class="MJXp-mtr" id="MJXp-Span-710" style="vertical-align: baseline;"><span class="MJXp-mtd" id="MJXp-Span-711" style="padding-top: 0.4em; text-align: center;"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-712">B</span></span><span class="MJXp-mtd" id="MJXp-Span-713" style="padding-left: 1em; padding-top: 0.4em; text-align: center;"><span class="MJXp-mn" id="MJXp-Span-714">0</span></span></span></span></span><span class="MJXp-mo" id="MJXp-Span-715" style="margin-left: 0em; margin-right: 0em; vertical-align: -0.617em;"><span class="MJXp-right MJXp-scale4" style="font-size: 3.467em; margin-left: -0.17em;">]</span></span></span><span class="MJXp-mrow" id="MJXp-Span-716"><span class="MJXp-mo" id="MJXp-Span-717" style="margin-left: 0em; margin-right: 0em; vertical-align: -0.528em;"><span class="MJXp-right MJXp-scale5" style="font-size: 3.111em; margin-left: -0.13em;">[</span></span><span class="MJXp-mtable" id="MJXp-Span-718"><span><span class="MJXp-mtr" id="MJXp-Span-719" style="vertical-align: baseline;"><span class="MJXp-mtd" id="MJXp-Span-720" style="text-align: center;"><span class="MJXp-mi" id="MJXp-Span-721">Δ</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-722">u</span></span></span><span class="MJXp-mtr" id="MJXp-Span-723" style="vertical-align: baseline;"><span class="MJXp-mtd" id="MJXp-Span-724" style="padding-top: 0.4em; text-align: center;"><span class="MJXp-mi" id="MJXp-Span-725">Δ</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-726">p</span></span></span></span></span><span class="MJXp-mo" id="MJXp-Span-727" style="margin-left: 0em; margin-right: 0em; vertical-align: -0.528em;"><span class="MJXp-right MJXp-scale5" style="font-size: 3.111em; margin-left: -0.13em;">]</span></span></span><span class="MJXp-mo" id="MJXp-Span-728" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mrow" id="MJXp-Span-729"><span class="MJXp-mo" id="MJXp-Span-730" style="margin-left: 0em; margin-right: 0em; vertical-align: -0.717em;"><span class="MJXp-right MJXp-scale4" style="font-size: 3.867em; margin-left: -0.17em;">[</span></span><span class="MJXp-mtable" id="MJXp-Span-731"><span><span class="MJXp-mtr" id="MJXp-Span-732" style="vertical-align: baseline;"><span class="MJXp-mtd" id="MJXp-Span-733" style="text-align: center;"><span class="MJXp-msubsup" id="MJXp-Span-734"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-735" style="margin-right: 0.05em;">R</span><span class="MJXp-mi MJXp-italic MJXp-script" id="MJXp-Span-736" style="vertical-align: -0.4em;">u</span></span></span></span><span class="MJXp-mtr" id="MJXp-Span-737" style="vertical-align: baseline;"><span class="MJXp-mtd" id="MJXp-Span-738" style="padding-top: 0.4em; text-align: center;"><span class="MJXp-msubsup" id="MJXp-Span-739"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-740" style="margin-right: 0.05em;">R</span><span class="MJXp-mi MJXp-italic MJXp-script" id="MJXp-Span-741" style="vertical-align: -0.4em;">p</span></span></span></span></span></span><span class="MJXp-mo" id="MJXp-Span-742" style="margin-left: 0em; margin-right: 0em; vertical-align: -0.717em;"><span class="MJXp-right MJXp-scale4" style="font-size: 3.867em; margin-left: -0.17em;">]</span></span></span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processing"><span class="MathJax_SVG" id="MathJax-Element-80-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span></div><script type="math/tex; mode=display" id="MathJax-Element-80"> \left[ \begin{array}{cc}
   K &B^T \\
   B & 0
\end{array} \right]
\left[\begin{array}{c} \Delta u \\ \Delta p \end{array} \right] =
\left[\begin{array}{c} R_u \\ R_p \end{array} \right]
</script>
at each Newton step. To solve this linear system, we implement a specialized block
preconditioner of the form
<span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-743"><span class="MJXp-msubsup" id="MJXp-Span-744"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-745" style="margin-right: 0.05em;">P</span><span class="MJXp-mrow MJXp-script" id="MJXp-Span-746" style="vertical-align: 0.5em;"><span class="MJXp-mo" id="MJXp-Span-747"></span><span class="MJXp-mn" id="MJXp-Span-748">1</span></span></span><span class="MJXp-mo" id="MJXp-Span-749" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mrow" id="MJXp-Span-750"><span class="MJXp-mo" id="MJXp-Span-751" style="margin-left: 0em; margin-right: 0em; vertical-align: -0.679em;"><span class="MJXp-right MJXp-scale4" style="font-size: 3.716em; margin-left: -0.17em;">[</span></span><span class="MJXp-mtable" id="MJXp-Span-752"><span><span class="MJXp-mtr" id="MJXp-Span-753" style="vertical-align: baseline;"><span class="MJXp-mtd" id="MJXp-Span-754" style="text-align: center;"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-755">I</span></span><span class="MJXp-mtd" id="MJXp-Span-756" style="padding-left: 1em; text-align: center;"><span class="MJXp-mo" id="MJXp-Span-757" style="margin-left: 0em; margin-right: 0.111em;"></span><span class="MJXp-msubsup" id="MJXp-Span-758"><span class="MJXp-mrow" id="MJXp-Span-759" style="margin-right: 0.05em;"><span class="MJXp-munderover" id="MJXp-Span-760"><span><span class="MJXp-over"><span class="" style="margin-bottom: -0.92em;"><span class="MJXp-mo" id="MJXp-Span-762" style="margin-left: 0px; margin-right: 0px;">˜</span></span><span class=""><span class="MJXp-mi MJXp-italic" id="MJXp-Span-761">K</span></span></span></span></span></span><span class="MJXp-mrow MJXp-script" id="MJXp-Span-763" style="vertical-align: 0.724em;"><span class="MJXp-mo" id="MJXp-Span-764"></span><span class="MJXp-mn" id="MJXp-Span-765">1</span></span></span><span class="MJXp-msubsup" id="MJXp-Span-766"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-767" style="margin-right: 0.05em;">B</span><span class="MJXp-mi MJXp-italic MJXp-script" id="MJXp-Span-768" style="vertical-align: 0.5em;">T</span></span></span></span><span class="MJXp-mtr" id="MJXp-Span-769" style="vertical-align: baseline;"><span class="MJXp-mtd" id="MJXp-Span-770" style="padding-top: 0.4em; text-align: center;"><span class="MJXp-mn" id="MJXp-Span-771">0</span></span><span class="MJXp-mtd" id="MJXp-Span-772" style="padding-left: 1em; padding-top: 0.4em; text-align: center;"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-773">I</span></span></span></span></span><span class="MJXp-mo" id="MJXp-Span-774" style="margin-left: 0em; margin-right: 0em; vertical-align: -0.679em;"><span class="MJXp-right MJXp-scale4" style="font-size: 3.716em; margin-left: -0.17em;">]</span></span></span><span class="MJXp-mrow" id="MJXp-Span-775"><span class="MJXp-mo" id="MJXp-Span-776" style="margin-left: 0em; margin-right: 0em; vertical-align: -0.83em;"><span class="MJXp-right MJXp-scale3" style="font-size: 4.32em; margin-left: -0.21em;">[</span></span><span class="MJXp-mtable" id="MJXp-Span-777"><span><span class="MJXp-mtr" id="MJXp-Span-778" style="vertical-align: baseline;"><span class="MJXp-mtd" id="MJXp-Span-779" style="text-align: center;"><span class="MJXp-msubsup" id="MJXp-Span-780"><span class="MJXp-mrow" id="MJXp-Span-781" style="margin-right: 0.05em;"><span class="MJXp-munderover" id="MJXp-Span-782"><span><span class="MJXp-over"><span class="" style="margin-bottom: -0.92em;"><span class="MJXp-mo" id="MJXp-Span-784" style="margin-left: 0px; margin-right: 0px;">˜</span></span><span class=""><span class="MJXp-mi MJXp-italic" id="MJXp-Span-783">K</span></span></span></span></span></span><span class="MJXp-mrow MJXp-script" id="MJXp-Span-785" style="vertical-align: 0.724em;"><span class="MJXp-mo" id="MJXp-Span-786"></span><span class="MJXp-mn" id="MJXp-Span-787">1</span></span></span></span><span class="MJXp-mtd" id="MJXp-Span-788" style="padding-left: 1em; text-align: center;"><span class="MJXp-mn" id="MJXp-Span-789">0</span></span></span><span class="MJXp-mtr" id="MJXp-Span-790" style="vertical-align: baseline;"><span class="MJXp-mtd" id="MJXp-Span-791" style="padding-top: 0.4em; text-align: center;"><span class="MJXp-mn" id="MJXp-Span-792">0</span></span><span class="MJXp-mtd" id="MJXp-Span-793" style="padding-left: 1em; padding-top: 0.4em; text-align: center;"><span class="MJXp-mo" id="MJXp-Span-794" style="margin-left: 0em; margin-right: 0.111em;"></span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-795">γ</span><span class="MJXp-msubsup" id="MJXp-Span-796"><span class="MJXp-mrow" id="MJXp-Span-797" style="margin-right: 0.05em;"><span class="MJXp-munderover" id="MJXp-Span-798"><span><span class="MJXp-over"><span class="" style="margin-bottom: -0.92em;"><span class="MJXp-mo" id="MJXp-Span-800" style="margin-left: 0px; margin-right: 0px;">˜</span></span><span class=""><span class="MJXp-mi MJXp-italic" id="MJXp-Span-799">S</span></span></span></span></span></span><span class="MJXp-mrow MJXp-script" id="MJXp-Span-801" style="vertical-align: 0.724em;"><span class="MJXp-mo" id="MJXp-Span-802"></span><span class="MJXp-mn" id="MJXp-Span-803">1</span></span></span></span></span></span></span><span class="MJXp-mo" id="MJXp-Span-804" style="margin-left: 0em; margin-right: 0em; vertical-align: -0.83em;"><span class="MJXp-right MJXp-scale3" style="font-size: 4.32em; margin-left: -0.21em;">]</span></span></span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processing"><span class="MathJax_SVG" id="MathJax-Element-81-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span></div><script type="math/tex; mode=display" id="MathJax-Element-81">
P^{-1} =
\left[\begin{array}{cc} I & -\tilde{K}^{-1}B^T \\ 0 & I \end{array} \right]
\left[\begin{array}{cc} \tilde{K}^{-1} & 0 \\ 0 & -\gamma \tilde{S}^{-1} \end{array} \right]
</script>
where <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-805"><span class="MJXp-msubsup" id="MJXp-Span-806"><span class="MJXp-mrow" id="MJXp-Span-807" style="margin-right: 0.05em;"><span class="MJXp-munderover" id="MJXp-Span-808"><span><span class="MJXp-over"><span class="" style="margin-bottom: -0.92em;"><span class="MJXp-mo" id="MJXp-Span-810" style="margin-left: 0px; margin-right: 0px;">˜</span></span><span class=""><span class="MJXp-mi MJXp-italic" id="MJXp-Span-809">K</span></span></span></span></span></span><span class="MJXp-mrow MJXp-script" id="MJXp-Span-811" style="vertical-align: 0.724em;"><span class="MJXp-mo" id="MJXp-Span-812"></span><span class="MJXp-mn" id="MJXp-Span-813">1</span></span></span></span></span><span class="MathJax_SVG MathJax_SVG_Processing" id="MathJax-Element-82-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span><script type="math/tex" id="MathJax-Element-82">\tilde{K}^{-1}</script> is an approximation of the inverse of the stiffness matrix <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-814"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-815">K</span></span></span><span class="MathJax_SVG MathJax_SVG_Processing" id="MathJax-Element-83-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span><script type="math/tex" id="MathJax-Element-83">K</script> and
<span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-816"><span class="MJXp-msubsup" id="MJXp-Span-817"><span class="MJXp-mrow" id="MJXp-Span-818" style="margin-right: 0.05em;"><span class="MJXp-munderover" id="MJXp-Span-819"><span><span class="MJXp-over"><span class="" style="margin-bottom: -0.92em;"><span class="MJXp-mo" id="MJXp-Span-821" style="margin-left: 0px; margin-right: 0px;">˜</span></span><span class=""><span class="MJXp-mi MJXp-italic" id="MJXp-Span-820">S</span></span></span></span></span></span><span class="MJXp-mrow MJXp-script" id="MJXp-Span-822" style="vertical-align: 0.724em;"><span class="MJXp-mo" id="MJXp-Span-823"></span><span class="MJXp-mn" id="MJXp-Span-824">1</span></span></span></span></span><span class="MathJax_SVG MathJax_SVG_Processing" id="MathJax-Element-84-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span><script type="math/tex" id="MathJax-Element-84">\tilde{S}^{-1}</script> is an approximation of the inverse of the Schur complement <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-825"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-826">S</span><span class="MJXp-mo" id="MJXp-Span-827" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-828">B</span><span class="MJXp-msubsup" id="MJXp-Span-829"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-830" style="margin-right: 0.05em;">K</span><span class="MJXp-mrow MJXp-script" id="MJXp-Span-831" style="vertical-align: 0.5em;"><span class="MJXp-mo" id="MJXp-Span-832"></span><span class="MJXp-mn" id="MJXp-Span-833">1</span></span></span><span class="MJXp-msubsup" id="MJXp-Span-834"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-835" style="margin-right: 0.05em;">B</span><span class="MJXp-mi MJXp-italic MJXp-script" id="MJXp-Span-836" style="vertical-align: 0.5em;">T</span></span></span></span><span class="MathJax_SVG MathJax_SVG_Processing" id="MathJax-Element-85-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span><script type="math/tex" id="MathJax-Element-85">S = BK^{-1}B^T</script>.
To approximate the Schur complement, we use the mass matrix for the pressure variable <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-837"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-838">p</span></span></span><span class="MathJax_SVG MathJax_SVG_Processing" id="MathJax-Element-86-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span><script type="math/tex" id="MathJax-Element-86">p</script>.</p>
<p>The example demonstrates how to solve nonlinear systems of equations that are defined with
block vectors as well as how to implement specialized block preconditioners for use in
iterative solvers.</p>
<p><em>The example has a serial (<a href="https://github.com/mfem/mfem/blob/master/examples/ex19.cpp">ex19.cpp</a>)
and a parallel (<a href="https://github.com/mfem/mfem/blob/master/examples/ex19p.cpp">ex19p.cpp</a>) version.
We recommend viewing examples 2, 5 and 10 before viewing this example.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="ex20" style="display: block;">
<h2 id="example-20-symplectic-integration-of-hamiltonian-systems">Example 20: Symplectic Integration of Hamiltonian Systems</h2>
<p><img class="floatright" src="../doc/web/examples/ex20.png"></p>
<p>This example demonstrates the use of the variable order, symplectic time
integration algorithm. Symplectic integration algorithms are designed to
conserve energy when integrating systems of ODEs which are derived from
Hamiltonian systems.</p>
<p>Hamiltonian systems define the energy of a system as a function of
time (t), a set of generalized coordinates (q), and their corresponding
generalized momenta (p).
<span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-839"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-840">H</span><span class="MJXp-mo" id="MJXp-Span-841" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-842">q</span><span class="MJXp-mo" id="MJXp-Span-843" style="margin-left: 0em; margin-right: 0.222em;">,</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-844">p</span><span class="MJXp-mo" id="MJXp-Span-845" style="margin-left: 0em; margin-right: 0.222em;">,</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-846">t</span><span class="MJXp-mo" id="MJXp-Span-847" style="margin-left: 0em; margin-right: 0em;">)</span><span class="MJXp-mo" id="MJXp-Span-848" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-849">T</span><span class="MJXp-mo" id="MJXp-Span-850" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-851">p</span><span class="MJXp-mo" id="MJXp-Span-852" style="margin-left: 0em; margin-right: 0em;">)</span><span class="MJXp-mo" id="MJXp-Span-853" style="margin-left: 0.267em; margin-right: 0.267em;">+</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-854">V</span><span class="MJXp-mo" id="MJXp-Span-855" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-856">q</span><span class="MJXp-mo" id="MJXp-Span-857" style="margin-left: 0em; margin-right: 0.222em;">,</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-858">t</span><span class="MJXp-mo" id="MJXp-Span-859" style="margin-left: 0em; margin-right: 0em;">)</span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processing"><span class="MathJax_SVG" id="MathJax-Element-87-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span></div><script type="math/tex; mode=display" id="MathJax-Element-87">
H(q,p,t) = T(p) + V(q,t)
</script>
Hamilton's equations then specify how q and p evolve in time:
<span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-860"><span class="MJXp-mfrac" id="MJXp-Span-861" style="vertical-align: 0.25em;"><span class="MJXp-box"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-862">d</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-863">q</span></span><span class="MJXp-box" style="margin-top: -0.9em;"><span class="MJXp-denom"><span><span class="MJXp-rule" style="height: 1em; border-top-style: none; border-bottom-width: 1px; border-bottom-style: solid; margin: 0.1em 0px;"></span></span><span><span class="MJXp-box"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-864">d</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-865">t</span></span></span></span></span></span><span class="MJXp-mo" id="MJXp-Span-866" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mfrac" id="MJXp-Span-867" style="vertical-align: 0.25em;"><span class="MJXp-box"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-868">d</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-869">H</span></span><span class="MJXp-box" style="margin-top: -0.9em;"><span class="MJXp-denom"><span><span class="MJXp-rule" style="height: 1em; border-top-style: none; border-bottom-width: 1px; border-bottom-style: solid; margin: 0.1em 0px;"></span></span><span><span class="MJXp-box"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-870">d</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-871">p</span></span></span></span></span></span><span class="MJXp-mspace" id="MJXp-Span-872" style="width: 0.167em; height: 0em;"></span><span class="MJXp-mo" id="MJXp-Span-873" style="margin-left: 0em; margin-right: 0.222em;">,</span><span class="MJXp-mspace" id="MJXp-Span-874" style="width: 2em; height: 0em;"></span><span class="MJXp-mfrac" id="MJXp-Span-875" style="vertical-align: 0.25em;"><span class="MJXp-box"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-876">d</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-877">p</span></span><span class="MJXp-box" style="margin-top: -0.9em;"><span class="MJXp-denom"><span><span class="MJXp-rule" style="height: 1em; border-top-style: none; border-bottom-width: 1px; border-bottom-style: solid; margin: 0.1em 0px;"></span></span><span><span class="MJXp-box"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-878">d</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-879">t</span></span></span></span></span></span><span class="MJXp-mo" id="MJXp-Span-880" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mo" id="MJXp-Span-881" style="margin-left: 0.267em; margin-right: 0.267em;"></span><span class="MJXp-mfrac" id="MJXp-Span-882" style="vertical-align: 0.25em;"><span class="MJXp-box"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-883">d</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-884">H</span></span><span class="MJXp-box" style="margin-top: -0.9em;"><span class="MJXp-denom"><span><span class="MJXp-rule" style="height: 1em; border-top-style: none; border-bottom-width: 1px; border-bottom-style: solid; margin: 0.1em 0px;"></span></span><span><span class="MJXp-box"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-885">d</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-886">q</span></span></span></span></span></span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processing"><span class="MathJax_SVG" id="MathJax-Element-88-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span></div><script type="math/tex; mode=display" id="MathJax-Element-88">
\frac{dq}{dt} =  \frac{dH}{dp}\,,\qquad
\frac{dp}{dt} = -\frac{dH}{dq}
</script></p>
<p>To use the symplectic integration classes we need to define an <code>mfem::Operator</code>
<span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-887"><span class="MJXp-mrow" id="MJXp-Span-888"><span class="MJXp-mi MJXp-bold" id="MJXp-Span-889">P</span></span></span></span><span class="MathJax_SVG MathJax_SVG_Processing" id="MathJax-Element-89-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span><script type="math/tex" id="MathJax-Element-89">{\bf P}</script> which evaluates the action of dH/dp, and an
<code>mfem::TimeDependentOperator</code> <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-890"><span class="MJXp-mrow" id="MJXp-Span-891"><span class="MJXp-mi MJXp-bold" id="MJXp-Span-892">F</span></span></span></span><span class="MathJax_SVG MathJax_SVG_Processing" id="MathJax-Element-90-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span><script type="math/tex" id="MathJax-Element-90">{\bf F}</script> which computes -dH/dq.</p>
<p>This example visualizes its results as an evolution in phase space by defining
the axes to be <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-893"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-894">q</span></span></span><span class="MathJax_SVG MathJax_SVG_Processing" id="MathJax-Element-91-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span><script type="math/tex" id="MathJax-Element-91">q</script>, <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-895"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-896">p</span></span></span><span class="MathJax_SVG MathJax_SVG_Processing" id="MathJax-Element-92-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span><script type="math/tex" id="MathJax-Element-92">p</script>, and <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-897"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-898">t</span></span></span><span class="MathJax_SVG MathJax_SVG_Processing" id="MathJax-Element-93-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span><script type="math/tex" id="MathJax-Element-93">t</script> rather than <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-899"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-900">x</span></span></span><span class="MathJax_SVG MathJax_SVG_Processing" id="MathJax-Element-94-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span><script type="math/tex" id="MathJax-Element-94">x</script>, <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-901"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-902">y</span></span></span><span class="MathJax_SVG MathJax_SVG_Processing" id="MathJax-Element-95-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span><script type="math/tex" id="MathJax-Element-95">y</script>, and <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-903"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-904">z</span></span></span><span class="MathJax_SVG MathJax_SVG_Processing" id="MathJax-Element-96-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span><script type="math/tex" id="MathJax-Element-96">z</script>.  In this space
we build a ribbon-like mesh with nodes at <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-905"><span class="MJXp-mo" id="MJXp-Span-906" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mn" id="MJXp-Span-907">0</span><span class="MJXp-mo" id="MJXp-Span-908" style="margin-left: 0em; margin-right: 0.222em;">,</span><span class="MJXp-mn" id="MJXp-Span-909">0</span><span class="MJXp-mo" id="MJXp-Span-910" style="margin-left: 0em; margin-right: 0.222em;">,</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-911">t</span><span class="MJXp-mo" id="MJXp-Span-912" style="margin-left: 0em; margin-right: 0em;">)</span></span></span><span class="MathJax_SVG MathJax_SVG_Processing" id="MathJax-Element-97-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span><script type="math/tex" id="MathJax-Element-97">(0,0,t)</script> and <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-913"><span class="MJXp-mo" id="MJXp-Span-914" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-915">q</span><span class="MJXp-mo" id="MJXp-Span-916" style="margin-left: 0em; margin-right: 0.222em;">,</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-917">p</span><span class="MJXp-mo" id="MJXp-Span-918" style="margin-left: 0em; margin-right: 0.222em;">,</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-919">t</span><span class="MJXp-mo" id="MJXp-Span-920" style="margin-left: 0em; margin-right: 0em;">)</span></span></span><span class="MathJax_SVG MathJax_SVG_Processing" id="MathJax-Element-98-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span><script type="math/tex" id="MathJax-Element-98">(q,p,t)</script>. Finally we
plot the energy as a function of time as a scalar field on this ribbon-like
mesh.  This scheme highlights any variations in the energy of the system.</p>
<p>This example offers five simple 1D Hamiltonians:</p>
<ul>
<li>Simple Harmonic Oscillator (mass on a spring)
  <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-921"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-922">H</span><span class="MJXp-mo" id="MJXp-Span-923" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mfrac" id="MJXp-Span-924" style="vertical-align: 0.25em;"><span class="MJXp-box"><span class="MJXp-mn" id="MJXp-Span-925">1</span></span><span class="MJXp-box" style="margin-top: -0.9em;"><span class="MJXp-denom"><span><span class="MJXp-rule" style="height: 1em; border-top-style: none; border-bottom-width: 1px; border-bottom-style: solid; margin: 0.1em 0px;"></span></span><span><span class="MJXp-box"><span class="MJXp-mn" id="MJXp-Span-926">2</span></span></span></span></span></span><span class="MJXp-mrow" id="MJXp-Span-927"><span class="MJXp-mo" id="MJXp-Span-928" style="margin-left: 0em; margin-right: 0em; vertical-align: -0.678em;"><span class="MJXp-right MJXp-scale4" style="font-size: 3.711em; margin-left: -0.17em;">(</span></span><span class="MJXp-mfrac" id="MJXp-Span-929" style="vertical-align: 0.25em;"><span class="MJXp-box"><span class="MJXp-msubsup" id="MJXp-Span-930"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-931" style="margin-right: 0.05em;">p</span><span class="MJXp-mn MJXp-script" id="MJXp-Span-932" style="vertical-align: 0.5em;">2</span></span></span><span class="MJXp-box" style="margin-top: -0.9em;"><span class="MJXp-denom"><span><span class="MJXp-rule" style="height: 1em; border-top-style: none; border-bottom-width: 1px; border-bottom-style: solid; margin: 0.1em 0px;"></span></span><span><span class="MJXp-box"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-933">m</span></span></span></span></span></span><span class="MJXp-mo" id="MJXp-Span-934" style="margin-left: 0.267em; margin-right: 0.267em;">+</span><span class="MJXp-mfrac" id="MJXp-Span-935" style="vertical-align: 0.25em;"><span class="MJXp-box"><span class="MJXp-msubsup" id="MJXp-Span-936"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-937" style="margin-right: 0.05em;">q</span><span class="MJXp-mn MJXp-script" id="MJXp-Span-938" style="vertical-align: 0.5em;">2</span></span></span><span class="MJXp-box" style="margin-top: -0.9em;"><span class="MJXp-denom"><span><span class="MJXp-rule" style="height: 1em; border-top-style: none; border-bottom-width: 1px; border-bottom-style: solid; margin: 0.1em 0px;"></span></span><span><span class="MJXp-box"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-939">k</span></span></span></span></span></span><span class="MJXp-mo" id="MJXp-Span-940" style="margin-left: 0em; margin-right: 0em; vertical-align: -0.678em;"><span class="MJXp-right MJXp-scale4" style="font-size: 3.711em; margin-left: -0.17em;">)</span></span></span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processing"><span class="MathJax_SVG" id="MathJax-Element-99-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span></div><script type="math/tex; mode=display" id="MathJax-Element-99">H = \frac{1}{2}\left( \frac{p^2}{m} + \frac{q^2}{k} \right)</script></li>
<li>Pendulum
  <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-941"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-942">H</span><span class="MJXp-mo" id="MJXp-Span-943" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mfrac" id="MJXp-Span-944" style="vertical-align: 0.25em;"><span class="MJXp-box"><span class="MJXp-mn" id="MJXp-Span-945">1</span></span><span class="MJXp-box" style="margin-top: -0.9em;"><span class="MJXp-denom"><span><span class="MJXp-rule" style="height: 1em; border-top-style: none; border-bottom-width: 1px; border-bottom-style: solid; margin: 0.1em 0px;"></span></span><span><span class="MJXp-box"><span class="MJXp-mn" id="MJXp-Span-946">2</span></span></span></span></span></span><span class="MJXp-mrow" id="MJXp-Span-947"><span class="MJXp-mo" id="MJXp-Span-948" style="margin-left: 0em; margin-right: 0em; vertical-align: -0.678em;"><span class="MJXp-right MJXp-scale4" style="font-size: 3.711em; margin-left: -0.17em;">[</span></span><span class="MJXp-mfrac" id="MJXp-Span-949" style="vertical-align: 0.25em;"><span class="MJXp-box"><span class="MJXp-msubsup" id="MJXp-Span-950"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-951" style="margin-right: 0.05em;">p</span><span class="MJXp-mn MJXp-script" id="MJXp-Span-952" style="vertical-align: 0.5em;">2</span></span></span><span class="MJXp-box" style="margin-top: -0.9em;"><span class="MJXp-denom"><span><span class="MJXp-rule" style="height: 1em; border-top-style: none; border-bottom-width: 1px; border-bottom-style: solid; margin: 0.1em 0px;"></span></span><span><span class="MJXp-box"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-953">m</span></span></span></span></span></span><span class="MJXp-mo" id="MJXp-Span-954" style="margin-left: 0.267em; margin-right: 0.267em;"></span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-955">k</span><span class="MJXp-mrow" id="MJXp-Span-956"><span class="MJXp-mo" id="MJXp-Span-957" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mn" id="MJXp-Span-958">1</span><span class="MJXp-mo" id="MJXp-Span-959" style="margin-left: 0.267em; margin-right: 0.267em;"></span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-960">c</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-961">o</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-962">s</span><span class="MJXp-mo" id="MJXp-Span-963" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-964">q</span><span class="MJXp-mo" id="MJXp-Span-965" style="margin-left: 0em; margin-right: 0em;">)</span><span class="MJXp-mo" id="MJXp-Span-966" style="margin-left: 0em; margin-right: 0em;">)</span></span><span class="MJXp-mo" id="MJXp-Span-967" style="margin-left: 0em; margin-right: 0em; vertical-align: -0.678em;"><span class="MJXp-right MJXp-scale4" style="font-size: 3.711em; margin-left: -0.17em;">]</span></span></span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processing"><span class="MathJax_SVG" id="MathJax-Element-100-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span></div><script type="math/tex; mode=display" id="MathJax-Element-100">H = \frac{1}{2}\left[ \frac{p^2}{m} - k \left( 1 - cos(q) \right) \right]</script></li>
<li>Gaussian Potential Well
  <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-968"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-969">H</span><span class="MJXp-mo" id="MJXp-Span-970" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mfrac" id="MJXp-Span-971" style="vertical-align: 0.25em;"><span class="MJXp-box"><span class="MJXp-msubsup" id="MJXp-Span-972"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-973" style="margin-right: 0.05em;">p</span><span class="MJXp-mn MJXp-script" id="MJXp-Span-974" style="vertical-align: 0.5em;">2</span></span></span><span class="MJXp-box" style="margin-top: -0.9em;"><span class="MJXp-denom"><span><span class="MJXp-rule" style="height: 1em; border-top-style: none; border-bottom-width: 1px; border-bottom-style: solid; margin: 0.1em 0px;"></span></span><span><span class="MJXp-box"><span class="MJXp-mn" id="MJXp-Span-975">2</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-976">m</span></span></span></span></span></span><span class="MJXp-mo" id="MJXp-Span-977" style="margin-left: 0.267em; margin-right: 0.267em;"></span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-978">k</span><span class="MJXp-msubsup" id="MJXp-Span-979"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-980" style="margin-right: 0.05em;">e</span><span class="MJXp-mrow MJXp-script" id="MJXp-Span-981" style="vertical-align: 0.5em;"><span class="MJXp-mo" id="MJXp-Span-982"></span><span class="MJXp-msubsup" id="MJXp-Span-983"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-984" style="margin-right: 0.05em;">q</span><span class="MJXp-mn MJXp-script" id="MJXp-Span-985" style="vertical-align: 0.5em;">2</span></span><span class="MJXp-mrow" id="MJXp-Span-986"><span class="MJXp-mo" id="MJXp-Span-987">/</span></span><span class="MJXp-mn" id="MJXp-Span-988">2</span></span></span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processing"><span class="MathJax_SVG" id="MathJax-Element-101-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span></div><script type="math/tex; mode=display" id="MathJax-Element-101">H = \frac{p^2}{2m} - k e^{-q^2 / 2}</script></li>
<li>Quartic Potential
  <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-989"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-990">H</span><span class="MJXp-mo" id="MJXp-Span-991" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mfrac" id="MJXp-Span-992" style="vertical-align: 0.25em;"><span class="MJXp-box"><span class="MJXp-mn" id="MJXp-Span-993">1</span></span><span class="MJXp-box" style="margin-top: -0.9em;"><span class="MJXp-denom"><span><span class="MJXp-rule" style="height: 1em; border-top-style: none; border-bottom-width: 1px; border-bottom-style: solid; margin: 0.1em 0px;"></span></span><span><span class="MJXp-box"><span class="MJXp-mn" id="MJXp-Span-994">2</span></span></span></span></span></span><span class="MJXp-mrow" id="MJXp-Span-995"><span class="MJXp-mo" id="MJXp-Span-996" style="margin-left: 0em; margin-right: 0em; vertical-align: -0.678em;"><span class="MJXp-right MJXp-scale4" style="font-size: 3.711em; margin-left: -0.17em;">[</span></span><span class="MJXp-mfrac" id="MJXp-Span-997" style="vertical-align: 0.25em;"><span class="MJXp-box"><span class="MJXp-msubsup" id="MJXp-Span-998"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-999" style="margin-right: 0.05em;">p</span><span class="MJXp-mn MJXp-script" id="MJXp-Span-1000" style="vertical-align: 0.5em;">2</span></span></span><span class="MJXp-box" style="margin-top: -0.9em;"><span class="MJXp-denom"><span><span class="MJXp-rule" style="height: 1em; border-top-style: none; border-bottom-width: 1px; border-bottom-style: solid; margin: 0.1em 0px;"></span></span><span><span class="MJXp-box"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1001">m</span></span></span></span></span></span><span class="MJXp-mo" id="MJXp-Span-1002" style="margin-left: 0.267em; margin-right: 0.267em;">+</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1003">k</span><span class="MJXp-mrow" id="MJXp-Span-1004"><span class="MJXp-mo" id="MJXp-Span-1005" style="margin-left: 0em; margin-right: 0em; vertical-align: -0.289em;"><span class="MJXp-right MJXp-scale6" style="font-size: 2.156em; margin-left: -0.09em;">(</span></span><span class="MJXp-mn" id="MJXp-Span-1006">1</span><span class="MJXp-mo" id="MJXp-Span-1007" style="margin-left: 0.267em; margin-right: 0.267em;">+</span><span class="MJXp-msubsup" id="MJXp-Span-1008"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1009" style="margin-right: 0.05em;">q</span><span class="MJXp-mn MJXp-script" id="MJXp-Span-1010" style="vertical-align: 0.5em;">2</span></span><span class="MJXp-mo" id="MJXp-Span-1011" style="margin-left: 0em; margin-right: 0em; vertical-align: -0.289em;"><span class="MJXp-right MJXp-scale6" style="font-size: 2.156em; margin-left: -0.09em;">)</span></span></span><span class="MJXp-msubsup" id="MJXp-Span-1012"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1013" style="margin-right: 0.05em;">q</span><span class="MJXp-mn MJXp-script" id="MJXp-Span-1014" style="vertical-align: 0.5em;">2</span></span><span class="MJXp-mo" id="MJXp-Span-1015" style="margin-left: 0em; margin-right: 0em; vertical-align: -0.678em;"><span class="MJXp-right MJXp-scale4" style="font-size: 3.711em; margin-left: -0.17em;">]</span></span></span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processing"><span class="MathJax_SVG" id="MathJax-Element-102-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span></div><script type="math/tex; mode=display" id="MathJax-Element-102">H = \frac{1}{2}\left[ \frac{p^2}{m} + k \left( 1 + q^2 \right) q^2 \right]</script></li>
<li>Negative Quartic Potential
  <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-1016"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1017">H</span><span class="MJXp-mo" id="MJXp-Span-1018" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mfrac" id="MJXp-Span-1019" style="vertical-align: 0.25em;"><span class="MJXp-box"><span class="MJXp-mn" id="MJXp-Span-1020">1</span></span><span class="MJXp-box" style="margin-top: -0.9em;"><span class="MJXp-denom"><span><span class="MJXp-rule" style="height: 1em; border-top-style: none; border-bottom-width: 1px; border-bottom-style: solid; margin: 0.1em 0px;"></span></span><span><span class="MJXp-box"><span class="MJXp-mn" id="MJXp-Span-1021">2</span></span></span></span></span></span><span class="MJXp-mrow" id="MJXp-Span-1022"><span class="MJXp-mo" id="MJXp-Span-1023" style="margin-left: 0em; margin-right: 0em; vertical-align: -0.678em;"><span class="MJXp-right MJXp-scale4" style="font-size: 3.711em; margin-left: -0.17em;">[</span></span><span class="MJXp-mfrac" id="MJXp-Span-1024" style="vertical-align: 0.25em;"><span class="MJXp-box"><span class="MJXp-msubsup" id="MJXp-Span-1025"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1026" style="margin-right: 0.05em;">p</span><span class="MJXp-mn MJXp-script" id="MJXp-Span-1027" style="vertical-align: 0.5em;">2</span></span></span><span class="MJXp-box" style="margin-top: -0.9em;"><span class="MJXp-denom"><span><span class="MJXp-rule" style="height: 1em; border-top-style: none; border-bottom-width: 1px; border-bottom-style: solid; margin: 0.1em 0px;"></span></span><span><span class="MJXp-box"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1028">m</span></span></span></span></span></span><span class="MJXp-mo" id="MJXp-Span-1029" style="margin-left: 0.267em; margin-right: 0.267em;">+</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1030">k</span><span class="MJXp-mrow" id="MJXp-Span-1031"><span class="MJXp-mo" id="MJXp-Span-1032" style="margin-left: 0em; margin-right: 0em; vertical-align: -0.678em;"><span class="MJXp-right MJXp-scale4" style="font-size: 3.711em; margin-left: -0.17em;">(</span></span><span class="MJXp-mn" id="MJXp-Span-1033">1</span><span class="MJXp-mo" id="MJXp-Span-1034" style="margin-left: 0.267em; margin-right: 0.267em;"></span><span class="MJXp-mfrac" id="MJXp-Span-1035" style="vertical-align: 0.25em;"><span class="MJXp-box"><span class="MJXp-msubsup" id="MJXp-Span-1036"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1037" style="margin-right: 0.05em;">q</span><span class="MJXp-mn MJXp-script" id="MJXp-Span-1038" style="vertical-align: 0.5em;">2</span></span></span><span class="MJXp-box" style="margin-top: -0.9em;"><span class="MJXp-denom"><span><span class="MJXp-rule" style="height: 1em; border-top-style: none; border-bottom-width: 1px; border-bottom-style: solid; margin: 0.1em 0px;"></span></span><span><span class="MJXp-box"><span class="MJXp-mn" id="MJXp-Span-1039">8</span></span></span></span></span></span><span class="MJXp-mo" id="MJXp-Span-1040" style="margin-left: 0em; margin-right: 0em; vertical-align: -0.678em;"><span class="MJXp-right MJXp-scale4" style="font-size: 3.711em; margin-left: -0.17em;">)</span></span></span><span class="MJXp-msubsup" id="MJXp-Span-1041"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1042" style="margin-right: 0.05em;">q</span><span class="MJXp-mn MJXp-script" id="MJXp-Span-1043" style="vertical-align: 0.5em;">2</span></span><span class="MJXp-mo" id="MJXp-Span-1044" style="margin-left: 0em; margin-right: 0em; vertical-align: -0.678em;"><span class="MJXp-right MJXp-scale4" style="font-size: 3.711em; margin-left: -0.17em;">]</span></span></span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processing"><span class="MathJax_SVG" id="MathJax-Element-103-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span></div><script type="math/tex; mode=display" id="MathJax-Element-103">H = \frac{1}{2}\left[ \frac{p^2}{m} + k \left( 1 - \frac{q^2}{8} \right) q^2 \right]</script></li>
</ul>
<p>In all cases these Hamiltonians are shifted by constant values so that the
energy will remain positive. The mean and standard deviation of the computed
energies at each time step are displayed upon completion.</p>
<p>When run in parallel, each processor integrates the same Hamiltonian
system but starting from different initial conditions.</p>
<p><em>The example has a serial (<a href="https://github.com/mfem/mfem/blob/master/examples/ex20.cpp">ex20.cpp</a>)
and a parallel (<a href="https://github.com/mfem/mfem/blob/master/examples/ex20p.cpp">ex20p.cpp</a>) version.
See the <a href="#maxwell-miniapp-transient-full-wave-electromagnetics">Maxwell</a> miniapp for another
application of symplectic integration.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="ex21" style="display: block;">
<h2 id="example-21-adaptive-mesh-refinement-for-linear-elasticity">Example 21: Adaptive mesh refinement for linear elasticity</h2>
<p><img class="floatright" src="../doc/web/examples/ex21.png"></p>
<p>This is a version of Example 2 with a simple adaptive mesh
refinement loop. The problem being solved is again linear
elasticity describing a multi-material cantilever beam.
The problem is solved on a sequence of meshes which
are locally refined in a conforming (triangles, tetrahedrons)
or non-conforming (quadrilaterals, hexahedra) manner according
to a simple ZZ error estimator.</p>
<p>The example demonstrates MFEM's capability to work with both
conforming and nonconforming refinements, in 2D and 3D, on
linear and curved meshes. Interpolation of functions from
coarse to fine meshes, as well as persistent GLVis
visualization are also illustrated.</p>
<p><em>The example has a serial (<a href="https://github.com/mfem/mfem/blob/master/examples/ex21.cpp">ex21.cpp</a>)
and a parallel (<a href="https://github.com/mfem/mfem/blob/master/examples/ex21p.cpp">ex21p.cpp</a>) version.
We recommend viewing Examples 2 and 6 before viewing this example.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="ex22" style="display: block;">
<h2 id="example-22-complex-linear-systems">Example 22: Complex Linear Systems</h2>
<p><img class="floatright" src="../doc/web/examples/ex22.gif"></p>
<p>This example code demonstrates the use of MFEM to define and
solve a complex-valued linear system. It implements three variants
of a damped harmonic oscillator:</p>
<ul>
<li>
<p>A scalar <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-1045"><span class="MJXp-msubsup" id="MJXp-Span-1046"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1047" style="margin-right: 0.05em;">H</span><span class="MJXp-mn MJXp-script" id="MJXp-Span-1048" style="vertical-align: 0.5em;">1</span></span></span></span><span class="MathJax_SVG MathJax_SVG_Processing" id="MathJax-Element-104-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span><script type="math/tex" id="MathJax-Element-104">H^1</script> field:
  <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-1049"><span class="MJXp-mo" id="MJXp-Span-1050" style="margin-left: 0em; margin-right: 0.111em;"></span><span class="MJXp-mi" id="MJXp-Span-1051">∇</span><span class="MJXp-mo" id="MJXp-Span-1052" style="margin-left: 0.267em; margin-right: 0.267em;">⋅</span><span class="MJXp-mrow" id="MJXp-Span-1053"><span class="MJXp-mo" id="MJXp-Span-1054" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1055">a</span><span class="MJXp-mi" id="MJXp-Span-1056">∇</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1057">u</span><span class="MJXp-mo" id="MJXp-Span-1058" style="margin-left: 0em; margin-right: 0em;">)</span></span><span class="MJXp-mo" id="MJXp-Span-1059" style="margin-left: 0.267em; margin-right: 0.267em;"></span><span class="MJXp-msubsup" id="MJXp-Span-1060"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1061" style="margin-right: 0.05em;">ω</span><span class="MJXp-mn MJXp-script" id="MJXp-Span-1062" style="vertical-align: 0.5em;">2</span></span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1063">b</span><span class="MJXp-mspace" id="MJXp-Span-1064" style="width: 0.167em; height: 0em;"></span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1065">u</span><span class="MJXp-mo" id="MJXp-Span-1066" style="margin-left: 0.267em; margin-right: 0.267em;">+</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1067">i</span><span class="MJXp-mspace" id="MJXp-Span-1068" style="width: 0.167em; height: 0em;"></span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1069">ω</span><span class="MJXp-mspace" id="MJXp-Span-1070" style="width: 0.167em; height: 0em;"></span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1071">c</span><span class="MJXp-mspace" id="MJXp-Span-1072" style="width: 0.167em; height: 0em;"></span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1073">u</span><span class="MJXp-mo" id="MJXp-Span-1074" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mn" id="MJXp-Span-1075">0</span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processing"><span class="MathJax_SVG" id="MathJax-Element-105-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span></div><script type="math/tex; mode=display" id="MathJax-Element-105">-\nabla\cdot\left(a \nabla u\right) - \omega^2 b\,u + i\,\omega\,c\,u = 0</script></p>
</li>
<li>
<p>A vector <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-1076"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1077">H</span><span class="MJXp-mo" id="MJXp-Span-1078" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1079">C</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1080">u</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1081">r</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1082">l</span><span class="MJXp-mo" id="MJXp-Span-1083" style="margin-left: 0em; margin-right: 0em;">)</span></span></span><span class="MathJax_SVG MathJax_SVG_Processing" id="MathJax-Element-106-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span><script type="math/tex" id="MathJax-Element-106">H(Curl)</script> field:
  <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-1084"><span class="MJXp-mi" id="MJXp-Span-1085">∇</span><span class="MJXp-mo" id="MJXp-Span-1086" style="margin-left: 0.267em; margin-right: 0.267em;">×</span><span class="MJXp-mrow" id="MJXp-Span-1087"><span class="MJXp-mo" id="MJXp-Span-1088" style="margin-left: 0em; margin-right: 0em; vertical-align: -0.129em;"><span class="MJXp-right MJXp-scale9" style="font-size: 1.516em; margin-left: 0.03em;">(</span></span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1089">a</span><span class="MJXp-mi" id="MJXp-Span-1090">∇</span><span class="MJXp-mo" id="MJXp-Span-1091" style="margin-left: 0.267em; margin-right: 0.267em;">×</span><span class="MJXp-mrow" id="MJXp-Span-1092"><span class="MJXp-munderover" id="MJXp-Span-1093"><span><span class="MJXp-over"><span class="" style="margin-bottom: -0.68em;"><span class="MJXp-mo" id="MJXp-Span-1095" style="margin-left: 0px; margin-right: 0px; font-size: 60%;">→</span></span><span class=""><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1094">u</span></span></span></span></span></span><span class="MJXp-mo" id="MJXp-Span-1096" style="margin-left: 0em; margin-right: 0em; vertical-align: -0.129em;"><span class="MJXp-right MJXp-scale9" style="font-size: 1.516em; margin-left: 0.03em;">)</span></span></span><span class="MJXp-mo" id="MJXp-Span-1097" style="margin-left: 0.267em; margin-right: 0.267em;"></span><span class="MJXp-msubsup" id="MJXp-Span-1098"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1099" style="margin-right: 0.05em;">ω</span><span class="MJXp-mn MJXp-script" id="MJXp-Span-1100" style="vertical-align: 0.5em;">2</span></span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1101">b</span><span class="MJXp-mspace" id="MJXp-Span-1102" style="width: 0.167em; height: 0em;"></span><span class="MJXp-mrow" id="MJXp-Span-1103"><span class="MJXp-munderover" id="MJXp-Span-1104"><span><span class="MJXp-over"><span class="" style="margin-bottom: -0.68em;"><span class="MJXp-mo" id="MJXp-Span-1106" style="margin-left: 0px; margin-right: 0px; font-size: 60%;">→</span></span><span class=""><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1105">u</span></span></span></span></span></span><span class="MJXp-mo" id="MJXp-Span-1107" style="margin-left: 0.267em; margin-right: 0.267em;">+</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1108">i</span><span class="MJXp-mspace" id="MJXp-Span-1109" style="width: 0.167em; height: 0em;"></span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1110">ω</span><span class="MJXp-mspace" id="MJXp-Span-1111" style="width: 0.167em; height: 0em;"></span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1112">c</span><span class="MJXp-mspace" id="MJXp-Span-1113" style="width: 0.167em; height: 0em;"></span><span class="MJXp-mrow" id="MJXp-Span-1114"><span class="MJXp-munderover" id="MJXp-Span-1115"><span><span class="MJXp-over"><span class="" style="margin-bottom: -0.68em;"><span class="MJXp-mo" id="MJXp-Span-1117" style="margin-left: 0px; margin-right: 0px; font-size: 60%;">→</span></span><span class=""><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1116">u</span></span></span></span></span></span><span class="MJXp-mo" id="MJXp-Span-1118" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mn" id="MJXp-Span-1119">0</span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processing"><span class="MathJax_SVG" id="MathJax-Element-107-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span></div><script type="math/tex; mode=display" id="MathJax-Element-107">\nabla\times\left(a\nabla\times\vec{u}\right) - \omega^2 b\,\vec{u} + i\,\omega\,c\,\vec{u} = 0</script></p>
</li>
<li>
<p>A vector <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-1120"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1121">H</span><span class="MJXp-mo" id="MJXp-Span-1122" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1123">D</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1124">i</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1125">v</span><span class="MJXp-mo" id="MJXp-Span-1126" style="margin-left: 0em; margin-right: 0em;">)</span></span></span><span class="MathJax_SVG MathJax_SVG_Processing" id="MathJax-Element-108-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span><script type="math/tex" id="MathJax-Element-108">H(Div)</script> field:
  <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-1127"><span class="MJXp-mo" id="MJXp-Span-1128" style="margin-left: 0em; margin-right: 0.111em;"></span><span class="MJXp-mi" id="MJXp-Span-1129">∇</span><span class="MJXp-mrow" id="MJXp-Span-1130"><span class="MJXp-mo" id="MJXp-Span-1131" style="margin-left: 0em; margin-right: 0em; vertical-align: -0.129em;"><span class="MJXp-right MJXp-scale9" style="font-size: 1.516em; margin-left: 0.03em;">(</span></span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1132">a</span><span class="MJXp-mi" id="MJXp-Span-1133">∇</span><span class="MJXp-mo" id="MJXp-Span-1134" style="margin-left: 0.267em; margin-right: 0.267em;">⋅</span><span class="MJXp-mrow" id="MJXp-Span-1135"><span class="MJXp-munderover" id="MJXp-Span-1136"><span><span class="MJXp-over"><span class="" style="margin-bottom: -0.68em;"><span class="MJXp-mo" id="MJXp-Span-1138" style="margin-left: 0px; margin-right: 0px; font-size: 60%;">→</span></span><span class=""><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1137">u</span></span></span></span></span></span><span class="MJXp-mo" id="MJXp-Span-1139" style="margin-left: 0em; margin-right: 0em; vertical-align: -0.129em;"><span class="MJXp-right MJXp-scale9" style="font-size: 1.516em; margin-left: 0.03em;">)</span></span></span><span class="MJXp-mo" id="MJXp-Span-1140" style="margin-left: 0.267em; margin-right: 0.267em;"></span><span class="MJXp-msubsup" id="MJXp-Span-1141"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1142" style="margin-right: 0.05em;">ω</span><span class="MJXp-mn MJXp-script" id="MJXp-Span-1143" style="vertical-align: 0.5em;">2</span></span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1144">b</span><span class="MJXp-mspace" id="MJXp-Span-1145" style="width: 0.167em; height: 0em;"></span><span class="MJXp-mrow" id="MJXp-Span-1146"><span class="MJXp-munderover" id="MJXp-Span-1147"><span><span class="MJXp-over"><span class="" style="margin-bottom: -0.68em;"><span class="MJXp-mo" id="MJXp-Span-1149" style="margin-left: 0px; margin-right: 0px; font-size: 60%;">→</span></span><span class=""><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1148">u</span></span></span></span></span></span><span class="MJXp-mo" id="MJXp-Span-1150" style="margin-left: 0.267em; margin-right: 0.267em;">+</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1151">i</span><span class="MJXp-mspace" id="MJXp-Span-1152" style="width: 0.167em; height: 0em;"></span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1153">ω</span><span class="MJXp-mspace" id="MJXp-Span-1154" style="width: 0.167em; height: 0em;"></span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1155">c</span><span class="MJXp-mspace" id="MJXp-Span-1156" style="width: 0.167em; height: 0em;"></span><span class="MJXp-mrow" id="MJXp-Span-1157"><span class="MJXp-munderover" id="MJXp-Span-1158"><span><span class="MJXp-over"><span class="" style="margin-bottom: -0.68em;"><span class="MJXp-mo" id="MJXp-Span-1160" style="margin-left: 0px; margin-right: 0px; font-size: 60%;">→</span></span><span class=""><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1159">u</span></span></span></span></span></span><span class="MJXp-mo" id="MJXp-Span-1161" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mn" id="MJXp-Span-1162">0</span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processing"><span class="MathJax_SVG" id="MathJax-Element-109-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span></div><script type="math/tex; mode=display" id="MathJax-Element-109">-\nabla\left(a \nabla\cdot\vec{u}\right) - \omega^2 b\,\vec{u} + i\,\omega\,c\,\vec{u} = 0</script></p>
</li>
</ul>
<p>In each case the field is driven by a forced oscillation, with
angular frequency <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-1163"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1164">ω</span></span></span><span class="MathJax_SVG MathJax_SVG_Processing" id="MathJax-Element-110-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span><script type="math/tex" id="MathJax-Element-110">\omega</script>, imposed at the boundary or a portion
of the boundary.</p>
<p>The example also demonstrates how to display a time-varying solution as
a sequence of fields sent to a single GLVis socket.</p>
<p><em>The example has a serial (<a href="https://github.com/mfem/mfem/blob/master/examples/ex22.cpp">ex22.cpp</a>)
and a parallel (<a href="https://github.com/mfem/mfem/blob/master/examples/ex22p.cpp">ex22p.cpp</a>) version.
We recommend viewing examples 1, 3, and 4 before viewing this example.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="ex23" style="display: block;">
<h2 id="example-23-wave-problem">Example 23: Wave Problem</h2>
<p><img class="floatright" src="../doc/web/examples/ex23.png"></p>
<p>This example code solves a simple 2D/3D  wave
equation with a second order time derivative:
<span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-1165"><span class="MJXp-mfrac" id="MJXp-Span-1166" style="vertical-align: 0.25em;"><span class="MJXp-box"><span class="MJXp-msubsup" id="MJXp-Span-1167"><span class="MJXp-mi" id="MJXp-Span-1168" style="margin-right: 0.05em;">∂</span><span class="MJXp-mn MJXp-script" id="MJXp-Span-1169" style="vertical-align: 0.5em;">2</span></span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1170">u</span></span><span class="MJXp-box" style="margin-top: -0.9em;"><span class="MJXp-denom"><span><span class="MJXp-rule" style="height: 1em; border-top-style: none; border-bottom-width: 1px; border-bottom-style: solid; margin: 0.1em 0px;"></span></span><span><span class="MJXp-box"><span class="MJXp-mi" id="MJXp-Span-1171">∂</span><span class="MJXp-msubsup" id="MJXp-Span-1172"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1173" style="margin-right: 0.05em;">t</span><span class="MJXp-mn MJXp-script" id="MJXp-Span-1174" style="vertical-align: 0.5em;">2</span></span></span></span></span></span></span><span class="MJXp-mo" id="MJXp-Span-1175" style="margin-left: 0.267em; margin-right: 0.267em;"></span><span class="MJXp-msubsup" id="MJXp-Span-1176"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1177" style="margin-right: 0.05em;">c</span><span class="MJXp-mn MJXp-script" id="MJXp-Span-1178" style="vertical-align: 0.5em;">2</span></span><span class="MJXp-mi" id="MJXp-Span-1179">Δ</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1180">u</span><span class="MJXp-mo" id="MJXp-Span-1181" style="margin-left: 0.333em; margin-right: 0.333em;">=</span><span class="MJXp-mn" id="MJXp-Span-1182">0</span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processing"><span class="MathJax_SVG" id="MathJax-Element-111-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span></div><script type="math/tex; mode=display" id="MathJax-Element-111">\frac{\partial^2 u}{\partial t^2} - c^2\Delta u = 0</script>
The boundary conditions are either Dirichlet or Neumann.</p>
<p>The example demonstrates the use of time dependent operators,
implicit solvers and second order time integration.</p>
<p><em>The example has only a serial (<a href="https://github.com/mfem/mfem/blob/master/examples/ex23.cpp">ex23.cpp</a>) version.
We recommend viewing examples 9 and 10 before viewing this example.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="ex24" style="display: block;">
<h2 id="example-24-mixed-finite-element-spaces">Example 24: Mixed finite element spaces</h2>
<p><img class="floatright" src="../doc/web/examples/ex24.png"></p>
<p>This example code illustrates usage of mixed finite element
spaces. Using two different approaches, we project a gradient
of a function in <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-1183"><span class="MJXp-msubsup" id="MJXp-Span-1184"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1185" style="margin-right: 0.05em;">H</span><span class="MJXp-mn MJXp-script" id="MJXp-Span-1186" style="vertical-align: 0.5em;">1</span></span></span></span><span class="MathJax_SVG MathJax_SVG_Processing" id="MathJax-Element-112-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span><script type="math/tex" id="MathJax-Element-112">H^1</script> to <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-1187"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1188">H</span><span class="MJXp-mo" id="MJXp-Span-1189" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1190">c</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1191">u</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1192">r</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1193">l</span><span class="MJXp-mo" id="MJXp-Span-1194" style="margin-left: 0em; margin-right: 0em;">)</span></span></span><span class="MathJax_SVG MathJax_SVG_Processing" id="MathJax-Element-113-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span><script type="math/tex" id="MathJax-Element-113">H(curl)</script>. Other spaces and example
computations are to be added in the future.</p>
<p>We also illustrate usage of a DiscreteLinearOperator and a
DiscreteInterpolator to interpolate a gradient in an <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-1195"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1196">H</span><span class="MJXp-mo" id="MJXp-Span-1197" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1198">c</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1199">u</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1200">r</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1201">l</span><span class="MJXp-mo" id="MJXp-Span-1202" style="margin-left: 0em; margin-right: 0em;">)</span></span></span><span class="MathJax_SVG MathJax_SVG_Processing" id="MathJax-Element-114-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span><script type="math/tex" id="MathJax-Element-114">H(curl)</script>
finite element space.</p>
<p><em>The example has a serial (<a href="https://github.com/mfem/mfem/blob/master/examples/ex24.cpp">ex24.cpp</a>)
and a parallel (<a href="https://github.com/mfem/mfem/blob/master/examples/ex24p.cpp">ex24p.cpp</a>) version.
Partial assembly and GPU devices are supported.
We recommend viewing examples 1 and 3 before viewing this example.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="volta" style="display: block;">
<h2 id="volta-miniapp-electrostatics">Volta Miniapp: Electrostatics</h2>
<p><img class="floatright" src="../doc/web/examples/volta.png"></p>
<p>This miniapp demonstrates the use of MFEM to solve realistic problems
in the field of linear electrostatics.  Its features include:</p>
<ul>
<li>dielectric materials</li>
<li>charge densities</li>
<li>surface charge densities</li>
<li>prescribed voltages</li>
<li>applied polarizations</li>
<li>high order meshes</li>
<li>high order basis functions</li>
<li>adaptive mesh refinement</li>
<li>advanced visualization</li>
</ul>
<p>For more details, please see the <a href="http://mfem.org/electromagnetics/">documentation</a> in the
<code>miniapps/electromagnetics</code> directory.</p>
<p><em>The miniapp has only a parallel
(<a href="https://github.com/mfem/mfem/blob/master/miniapps/electromagnetics/volta.cpp">volta.cpp</a>) version.
<strong>We recommend that new users start with the example codes before
moving to the miniapps.</strong></em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="tesla" style="display: block;">
<h2 id="tesla-miniapp-magnetostatics">Tesla Miniapp: Magnetostatics</h2>
<p><img class="floatright" src="../doc/web/examples/tesla.png"></p>
<p>This miniapp showcases many of MFEM's features while solving a variety
of realistic magnetostatics problems.  Its features include:</p>
<ul>
<li>diamagnetic and/or paramagnetic materials</li>
<li>ferromagnetic materials</li>
<li>volumetric current densities</li>
<li>surface current densities</li>
<li>external fields</li>
<li>high order meshes</li>
<li>high order basis functions</li>
<li>adaptive mesh refinement</li>
<li>advanced visualization</li>
</ul>
<p>For more details, please see the <a href="http://mfem.org/electromagnetics/">documentation</a> in the
<code>miniapps/electromagnetics</code> directory.</p>
<p><em>The miniapp has only a parallel
(<a href="https://github.com/mfem/mfem/blob/master/miniapps/electromagnetics/tesla.cpp">tesla.cpp</a>) version.
<strong>We recommend that new users start with the example codes before
moving to the miniapps.</strong></em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="maxwell" style="display: block;">
<h2 id="maxwell-miniapp-transient-full-wave-electromagnetics">Maxwell Miniapp: Transient Full-Wave Electromagnetics</h2>
<p><img class="floatright" src="../doc/web/examples/maxwell.png"></p>
<p>This miniapp solves the equations of transient full-wave electromagnetics.</p>
<p>Its features include:</p>
<ul>
<li>mixed formulation of the coupled first-order Maxwell equations</li>
<li><span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-1203"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1204">H</span><span class="MJXp-mo" id="MJXp-Span-1205" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mrow" id="MJXp-Span-1206"><span class="MJXp-mi" id="MJXp-Span-1207">c</span><span class="MJXp-mi" id="MJXp-Span-1208">u</span><span class="MJXp-mi" id="MJXp-Span-1209">r</span><span class="MJXp-mi" id="MJXp-Span-1210">l</span></span><span class="MJXp-mo" id="MJXp-Span-1211" style="margin-left: 0em; margin-right: 0em;">)</span></span></span><span class="MathJax_SVG MathJax_SVG_Processing" id="MathJax-Element-115-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span><script type="math/tex" id="MathJax-Element-115">H(\mathrm{curl})</script> discretization of the electric field</li>
<li><span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-1212"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1213">H</span><span class="MJXp-mo" id="MJXp-Span-1214" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mrow" id="MJXp-Span-1215"><span class="MJXp-mi" id="MJXp-Span-1216">d</span><span class="MJXp-mi" id="MJXp-Span-1217">i</span><span class="MJXp-mi" id="MJXp-Span-1218">v</span></span><span class="MJXp-mo" id="MJXp-Span-1219" style="margin-left: 0em; margin-right: 0em;">)</span></span></span><span class="MathJax_SVG MathJax_SVG_Processing" id="MathJax-Element-116-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span><script type="math/tex" id="MathJax-Element-116">H(\mathrm{div})</script> discretization of the magnetic flux</li>
<li>energy conserving, variable order, implicit time integration</li>
<li>dielectric materials</li>
<li>diamagnetic and/or paramagnetic materials</li>
<li>conductive materials</li>
<li>volumetric current densities</li>
<li>Sommerfeld absorbing boundary conditions</li>
<li>high order meshes</li>
<li>high order basis functions</li>
<li>advanced visualization</li>
</ul>
<p>For more details, please see the <a href="http://mfem.org/electromagnetics/">documentation</a> in the
<code>miniapps/electromagnetics</code> directory.</p>
<p><em>The miniapp has only a parallel
(<a href="https://github.com/mfem/mfem/blob/master/miniapps/electromagnetics/maxwell.cpp">maxwell.cpp</a>) version.
<strong>We recommend that new users start with the example codes before
moving to the miniapps.</strong></em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="joule" style="display: block;">
<h2 id="joule-miniapp-transient-magnetics-and-joule-heating">Joule Miniapp: Transient Magnetics and Joule Heating</h2>
<p><img class="floatright" src="../doc/web/examples/joule.png"></p>
<p>This miniapp solves the equations of transient low-frequency (a.k.a. eddy current)
electromagnetics, and simultaneously computes transient heat transfer with the heat source given
by the electromagnetic Joule heating.</p>
<p>Its features include:</p>
<ul>
<li><span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-1220"><span class="MJXp-msubsup" id="MJXp-Span-1221"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1222" style="margin-right: 0.05em;">H</span><span class="MJXp-mn MJXp-script" id="MJXp-Span-1223" style="vertical-align: 0.5em;">1</span></span></span></span><span class="MathJax_SVG MathJax_SVG_Processing" id="MathJax-Element-117-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span><script type="math/tex" id="MathJax-Element-117">H^1</script> discretization of the electrostatic potential</li>
<li><span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-1224"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1225">H</span><span class="MJXp-mo" id="MJXp-Span-1226" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mrow" id="MJXp-Span-1227"><span class="MJXp-mi" id="MJXp-Span-1228">c</span><span class="MJXp-mi" id="MJXp-Span-1229">u</span><span class="MJXp-mi" id="MJXp-Span-1230">r</span><span class="MJXp-mi" id="MJXp-Span-1231">l</span></span><span class="MJXp-mo" id="MJXp-Span-1232" style="margin-left: 0em; margin-right: 0em;">)</span></span></span><span class="MathJax_SVG MathJax_SVG_Processing" id="MathJax-Element-118-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span><script type="math/tex" id="MathJax-Element-118">H(\mathrm{curl})</script> discretization of the electric field</li>
<li><span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-1233"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1234">H</span><span class="MJXp-mo" id="MJXp-Span-1235" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mrow" id="MJXp-Span-1236"><span class="MJXp-mi" id="MJXp-Span-1237">d</span><span class="MJXp-mi" id="MJXp-Span-1238">i</span><span class="MJXp-mi" id="MJXp-Span-1239">v</span></span><span class="MJXp-mo" id="MJXp-Span-1240" style="margin-left: 0em; margin-right: 0em;">)</span></span></span><span class="MathJax_SVG MathJax_SVG_Processing" id="MathJax-Element-119-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span><script type="math/tex" id="MathJax-Element-119">H(\mathrm{div})</script> discretization of the magnetic field</li>
<li><span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-1241"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1242">H</span><span class="MJXp-mo" id="MJXp-Span-1243" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mrow" id="MJXp-Span-1244"><span class="MJXp-mi" id="MJXp-Span-1245">d</span><span class="MJXp-mi" id="MJXp-Span-1246">i</span><span class="MJXp-mi" id="MJXp-Span-1247">v</span></span><span class="MJXp-mo" id="MJXp-Span-1248" style="margin-left: 0em; margin-right: 0em;">)</span></span></span><span class="MathJax_SVG MathJax_SVG_Processing" id="MathJax-Element-120-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span><script type="math/tex" id="MathJax-Element-120">H(\mathrm{div})</script> discretization of the heat flux</li>
<li><span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-1249"><span class="MJXp-msubsup" id="MJXp-Span-1250"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1251" style="margin-right: 0.05em;">L</span><span class="MJXp-mn MJXp-script" id="MJXp-Span-1252" style="vertical-align: 0.5em;">2</span></span></span></span><span class="MathJax_SVG MathJax_SVG_Processing" id="MathJax-Element-121-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span><script type="math/tex" id="MathJax-Element-121">L^2</script> discretization of the temperature</li>
<li>implicit transient time integration</li>
<li>high order meshes</li>
<li>high order basis functions</li>
<li>adaptive mesh refinement</li>
<li>advanced visualization</li>
</ul>
<p>For more details, please see the <a href="http://mfem.org/electromagnetics/">documentation</a> in the
<code>miniapps/electromagnetics</code> directory.</p>
<p><em>The miniapp has only a parallel
(<a href="https://github.com/mfem/mfem/blob/master/miniapps/electromagnetics/joule.cpp">joule.cpp</a>) version.
<strong>We recommend that new users start with the example codes before
moving to the miniapps.</strong></em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="mobius-strip" style="display: block;">
<h2 id="mobius-strip-miniapp">Mobius Strip Miniapp</h2>
<p><img class="floatright" src="../doc/web/examples/mobius-strip.png"></p>
<p>This miniapp generates various Mobius strip-like surface meshes. It is a good
way to generate complex surface meshes.</p>
<p>Manipulating the mesh topology and performing mesh transformation are demonstrated.</p>
<p>The <code>mobius-strip</code> mesh in the <code>data</code> directory was generated with this miniapp.</p>
<p>For more details, please see the <a href="http://mfem.org/meshing/">documentation</a> in the
<code>miniapps/meshing</code> directory.</p>
<p><em>The miniapp has only a serial
(<a href="https://github.com/mfem/mfem/blob/master/miniapps/meshing/mobius-strip.cpp">mobius-strip.cpp</a>) version.
<strong>We recommend that new users start with the example codes before
moving to the miniapps.</strong></em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="klein-bottle" style="display: block;">
<h2 id="klein-bottle-miniapp">Klein Bottle Miniapp</h2>
<p><img class="floatright" src="../doc/web/examples/klein-bottle.png"></p>
<p>This miniapp generates three types of Klein bottle surfaces. It is similar to
the mobius-strip miniapp.</p>
<p>Manipulating the mesh topology and performing mesh transformation are demonstrated.</p>
<p>The <code>klein-bottle</code> and <code>klein-donut</code> meshes in the <code>data</code> directory were generated with this miniapp.</p>
<p>For more details, please see the <a href="http://mfem.org/meshing/">documentation</a> in the
<code>miniapps/meshing</code> directory.</p>
<p><em>The miniapp has only a serial
(<a href="https://github.com/mfem/mfem/blob/master/miniapps/meshing/klein-bottle.cpp">klein-bottle.cpp</a>) version.
<strong>We recommend that new users start with the example codes before
moving to the miniapps.</strong></em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="toroid" style="display: block;">
<h2 id="toroid-miniapp">Toroid Miniapp</h2>
<p><img class="floatright" src="../doc/web/examples/toroid-wedge.png"></p>
<p>This miniapp generates two types of toroidal volume meshes; one with
triangular cross sections and one with square cross sections.  It
works by defining a stack of individual elements and bending them so
that the bottom and top of the stack can be joined to form a torus. It
supports various options including:</p>
<ul>
<li>The element type: 0 - Wedge, 1 - Hexahedron</li>
<li>The geometric order of the elements</li>
<li>The major and minor radii</li>
<li>The number of elements in the azimuthal direction</li>
<li>The number of nodes to offset by before rejoining the stack</li>
<li>The initial angle of the cross sectional shape</li>
<li>The number of uniform refinement steps to apply</li>
</ul>
<p>Along with producing some visually interesting meshes, this miniapp
demonstrates how simple 3D meshes can be constructed and transformed
in MFEM.  It also produces a family of meshes with simple but
non-trivial topology for testing various features in MFEM.</p>
<p><em>This miniapp has only a serial
(<a href="https://github.com/mfem/mfem/blob/master/miniapps/meshing/toroid.cpp">toroid.cpp</a>) version.
<strong>We recommend that new users start with the example codes before
moving to the miniapps.</strong></em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="extruder" style="display: block;">
<h2 id="extruder-miniapp">Extruder Miniapp</h2>
<p><img class="floatright" src="../doc/web/examples/extruded-star.png"></p>
<p>This miniapp creates higher dimensional meshes from lower dimensional meshes
by extrusion.  Simple coordinate transformations can also be applied if desired.</p>
<ul>
<li>The initial mesh can be 1D or 2D</li>
<li>1D meshes can be extruded in both the y and z directions</li>
<li>2D meshes can be triangular, quadrilateral, or contain both element types</li>
<li>Meshes with high order geometry are supported</li>
<li>User can specify the number of elements and the distance to extrude</li>
<li>Geometric order of the transformed mesh can be user selected or automatic</li>
</ul>
<p>This miniapp provides another demonstration of how simple meshes can be
constructed and transformed in MFEM.</p>
<p><em>This miniapp has only a serial
(<a href="https://github.com/mfem/mfem/blob/master/miniapps/meshing/extruder.cpp">extruder.cpp</a>) version.
<strong>We recommend that new users start with the example codes before
moving to the miniapps.</strong></em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="shaper" style="display: block;">
<h2 id="shaper-miniapp">Shaper Miniapp</h2>
<p><img class="floatright" src="../doc/web/examples/shaper.png"></p>
<p>This miniapp performs multiple levels of adaptive mesh refinement to resolve the
interfaces between different "materials" in the mesh, as specified by a given
material function.</p>
<p>It can be used as a simple initial mesh generator, for example in the case when
the interface is too complex to describe without local refinement. Both
conforming and non-conforming refinements are supported.</p>
<p>For more details, please see the <a href="http://mfem.org/meshing/">documentation</a> in the
<code>miniapps/meshing</code> directory.</p>
<p><em>The miniapp has only a serial
(<a href="https://github.com/mfem/mfem/blob/master/miniapps/meshing/shaper.cpp">shaper.cpp</a>) version.
<strong>We recommend that new users start with the example codes before
moving to the miniapps.</strong></em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="mesh-explorer" style="display: block;">
<h2 id="mesh-explorer-miniapp">Mesh Explorer Miniapp</h2>
<p><img class="floatright" src="../doc/web/examples/mesh-explorer.png"></p>
<p>This miniapp is a handy tool to examine, visualize and manipulate a given
mesh. Some of its features are:</p>
<ul>
<li>visualizing of mesh materials and individual mesh elements</li>
<li>mesh scaling, randomization, and general transformation</li>
<li>manipulation of the mesh curvature</li>
<li>the ability to simulate parallel partitioning</li>
<li>quantitative and visual reports of mesh quality</li>
</ul>
<p>For more details, please see the <a href="http://mfem.org/meshing/">documentation</a> in the
<code>miniapps/meshing</code> directory.</p>
<p><em>The miniapp has only a serial
(<a href="https://github.com/mfem/mfem/blob/master/miniapps/meshing/mesh-explorer.cpp">mesh-explorer.cpp</a>) version.
<strong>We recommend that new users start with the example codes before moving to the miniapps.</strong></em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="mesh-optimizer" style="display: block;">
<h2 id="mesh-optimizer-miniapp">Mesh Optimizer Miniapp</h2>
<p><img class="floatright" src="../doc/web/examples/mesh-optimizer.png"></p>
<p>This miniapp performs mesh optimization using the Target-Matrix Optimization
Paradigm (TMOP) by P.Knupp et al., and a global variational minimization
approach. It minimizes the quantity</p>
<p><span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math MJXp-display" id="MJXp-Span-1253"><span class="MJXp-munderover" id="MJXp-Span-1254"><span class=""><span class="MJXp-mo" id="MJXp-Span-1255" style="margin-left: 0.111em; margin-right: 0.167em;"><span class="MJXp-largeop">∑</span></span></span><span class=" MJXp-script"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1256" style="margin-left: 0px;">T</span></span></span><span class="MJXp-msubsup" id="MJXp-Span-1257"><span class="MJXp-mo" id="MJXp-Span-1258" style="margin-left: 0em; margin-right: 0.05em;"><span class="MJXp-largeop MJXp-int">∫</span></span><span class="MJXp-mi MJXp-italic MJXp-script" id="MJXp-Span-1259" style="vertical-align: -0.46em;">T</span></span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1260">μ</span><span class="MJXp-mo" id="MJXp-Span-1261" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1262">J</span><span class="MJXp-mo" id="MJXp-Span-1263" style="margin-left: 0em; margin-right: 0em;">(</span><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1264">x</span><span class="MJXp-mo" id="MJXp-Span-1265" style="margin-left: 0em; margin-right: 0em;">)</span><span class="MJXp-mo" id="MJXp-Span-1266" style="margin-left: 0em; margin-right: 0em;">)</span><span class="MJXp-mo" id="MJXp-Span-1267" style="margin-left: 0em; margin-right: 0.222em;">,</span></span></span><div class="MathJax_SVG_Display MathJax_SVG_Processing"><span class="MathJax_SVG" id="MathJax-Element-122-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span></div><script type="math/tex; mode=display" id="MathJax-Element-122">\sum_T \int_T \mu(J(x)),</script></p>
<p>where <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-1268"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1269">T</span></span></span><span class="MathJax_SVG MathJax_SVG_Processing" id="MathJax-Element-123-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span><script type="math/tex" id="MathJax-Element-123">T</script> are the target (ideal) elements, <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-1270"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1271">J</span></span></span><span class="MathJax_SVG MathJax_SVG_Processing" id="MathJax-Element-124-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span><script type="math/tex" id="MathJax-Element-124">J</script> is the Jacobian of the
transformation from the target to the physical element, and <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-1272"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1273">μ</span></span></span><span class="MathJax_SVG MathJax_SVG_Processing" id="MathJax-Element-125-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span><script type="math/tex" id="MathJax-Element-125">\mu</script> is the mesh
quality metric.</p>
<p>This metric can measure shape, size or alignment of the region around each
quadrature point. The combination of targets and quality metrics is used to
optimize the physical node positions, i.e., they must be as close as possible to
the shape / size / alignment of their targets.</p>
<p>This code also demonstrates a possible use of nonlinear operators, as well as
their coupling to Newton methods for solving minimization problems. Note that
the utilized Newton methods are oriented towards avoiding invalid meshes with
negative Jacobian determinants. Each Newton step requires the inversion of a
Jacobian matrix, which is done through an inner linear solver.</p>
<p>For more details, please see the <a href="http://mfem.org/meshing/">documentation</a> in the
<code>miniapps/meshing</code> directory.</p>
<p><em>The miniapp has a serial
(<a href="https://github.com/mfem/mfem/blob/master/miniapps/meshing/mesh-optimizer.cpp">mesh-optimizer.cpp</a>) and a
parallel (<a href="https://github.com/mfem/mfem/blob/master/miniapps/meshing/pmesh-optimizer.cpp">pmesh-optimizer.cpp</a>)
version.
<strong>We recommend that new users start with the example codes before moving to the miniapps.</strong></em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="lor-transfer" style="display: block;">
<h2 id="low-order-refined-transfer-miniapp">Low-Order Refined Transfer Miniapp</h2>
<p><img class="floatright" width="450" src="../doc/web/examples/lor-transfer.png"></p>
<p>The <code>lor-transfer</code> miniapp, found under <code>miniapps/tools</code> demonstrates the
capability to generate a <em>low-order refined</em> mesh from a high-order mesh, and to
transfer solutions between these meshes.</p>
<p>Grid functions can be transferred between the coarse, high-order mesh and the
low-order refined mesh using either <span class="MathJax_Preview" style="color: inherit;"><span class="MJXp-math" id="MJXp-Span-1274"><span class="MJXp-msubsup" id="MJXp-Span-1275"><span class="MJXp-mi MJXp-italic" id="MJXp-Span-1276" style="margin-right: 0.05em;">L</span><span class="MJXp-mn MJXp-script" id="MJXp-Span-1277" style="vertical-align: 0.5em;">2</span></span></span></span><span class="MathJax_SVG MathJax_SVG_Processing" id="MathJax-Element-126-Frame" tabindex="0" style="font-size: 100%; display: inline-block;"></span><script type="math/tex" id="MathJax-Element-126">L^2</script> projection or pointwise evaluation.
These transfer operators can be designed to discretely conserve mass and to
recover the original high-order solution when transferring a low-order grid
function that was obtained by restricting a high-order grid function to the
low-order refined space.</p>
<p><em>The miniapp has only a serial
(<a href="https://github.com/mfem/mfem/blob/master/miniapps/tools/lor-transfer.cpp">lor-transfer.cpp</a>) version.
<strong>We recommend that new users start with the example codes before moving to the miniapps.</strong></em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="gslib-interpolation" style="display: block;">
<h2 id="interpolation-miniapps">Interpolation Miniapps</h2>
<p><img class="floatright" width="450" src="../doc/web/examples/gslib.png"></p>
<p>The interpolation miniapp, found under <code>miniapps/gslib</code>, demonstrate the
capability to interpolate high-order finite element functions at given set of
points in physical space.</p>
<p>These miniapps utilize the <a href="https://github.com/gslib/gslib"><code>gslib</code></a> library's
high-order  interpolation utility for quad and hex meshes.
The <em>Find Points</em> miniapp has a serial
(<a href="https://github.com/mfem/mfem/blob/master/miniapps/gslib/findpts.cpp">findpts.cpp</a>)
and a parallel
(<a href="https://github.com/mfem/mfem/blob/master/miniapps/gslib/pfindpts.cpp">pfindpts.cpp</a>)
version that demonstrate the basic procedures for point search and evaluation
of grid functions.
The <em>Field Diff</em> miniapp
(<a href="https://github.com/mfem/mfem/blob/master/miniapps/gslib/field-diff.cpp">field-diff.cpp</a>)
demonstrates how grid functions on two different meshes can be compared with
each other.</p>
<p><em><strong>These miniapps require installation of the <a href="https://github.com/gslib/gslib"><code>gslib</code></a> library. We recommend that new users start with the example codes before moving to the miniapps.</strong></em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<div id="laghos" style="display: block;">
<h2 id="laghos-miniapp">Laghos Miniapp</h2>
<p><img class="floatright" src="../doc/web/examples/laghos.png"></p>
<p><strong>Laghos</strong> (LAGrangian High-Order Solver) is a miniapp that solves the
time-dependent Euler equations of compressible gas dynamics in a moving
Lagrangian frame using unstructured high-order finite element spatial
discretization and explicit high-order time-stepping.</p>
<p>The computational motives captured in Laghos include:</p>
<ul>
<li>Support for unstructured meshes, in 2D and 3D, with quadrilateral and
  hexahedral elements (triangular and tetrahedral elements can also be used, but
  with the less efficient full assembly option). Serial and parallel mesh
  refinement options can be set via a command-line flag.</li>
<li>Explicit time-stepping loop with a variety of time integrator options. Laghos
  supports Runge-Kutta ODE solvers of orders 1, 2, 3, 4 and 6.</li>
<li>Continuous and discontinuous high-order finite element discretization spaces
  of runtime-specified order.</li>
<li>Moving (high-order) meshes.</li>
<li>Separation between the assembly and the quadrature point-based computations.</li>
<li>Point-wise definition of mesh size, time-step estimate and artificial
  viscosity coefficient.</li>
<li>Constant-in-time velocity mass operator that is inverted iteratively on
  each time step. This is an example of an operator that is prepared once (fully
  or partially assembled), but is applied many times. The application cost is
  dominant for this operator.</li>
<li>Time-dependent force matrix that is prepared every time step (fully or
  partially assembled) and is applied just twice per "assembly". Both the
  preparation and the application costs are important for this operator.</li>
<li>Domain-decomposed MPI parallelism.</li>
<li>Optional in-situ visualization with <a href="http:/glvis.org">GLVis</a> and data output
  for visualization / data analysis with <a href="http://visit.llnl.gov">VisIt</a>.</li>
</ul>
<p>The Laghos miniapp is part of the <a href="http://ceed.exascaleproject.org/software">CEED software suite</a>,
a collection of software benchmarks, miniapps, libraries and APIs for
efficient exascale discretizations based on high-order finite element
and spectral element methods. See http://github.com/ceed for more
information and source code availability.</p>
<p><em>This is an external miniapp, available at <a href="https://github.com/CEED/Laghos">https://github.com/CEED/Laghos</a>.</em>
</p><div style="clear:both;"></div>
<br><p></p>
</div>
<!-- ------------------------------------------------------------------------- -->

<div id="nomatch" style="display: none;">
<br><br><br>
<center>
No examples or miniapps match your criteria.
</center>
<br><br><br>
<hr>
</div>

<div style="clear:both;"></div>

<script type="text/javascript"><!--
function isChecked(id)
{
    return document.getElementById(id).checked;
}

function setChecked(id, value)
{
    document.getElementById(id).checked = value;
}

function showElement(id, show)
{
    //document.getElementById(id).style.display = show ? "block" : "none";

    // workaround because Doxygen splits and duplicates the divs for some reason
    var divs = document.getElementsByTagName("div");
    for (i = 0; i < divs.length; i++)
        if (divs.item(i).id == id)
            divs.item(i).style.display = show ? "block" : "none";
}

function updateGroup(names, id)
{
   // make only one box checked in the group
   if (names.indexOf(id) != -1)
      for (i = 0; i < names.length; ++i)
         setChecked(names[i], id == names[i]);

   // generate boolean variables from the group names
   for (i = 0; i < names.length; ++i)
      this[names[i]] = isChecked(names[i]) || isChecked(names[0]);
}

function elementVisible(id)
{
   var elem = document.getElementById(id);
   return elem != null && elem.style.display != "none";
}

function exampleVisible(num)
{
   return elementVisible("ex"+num);// || elementVisible("ex"+num+"p");
}

function update(id)
{
   var group1 = ["all1", "laplace", "elasticity", "maxwell", "graddiv", "darcy", "advection", "conduction","wave", "hydro", "meshing", "hpc"];
   var group2 = ["all2", "l2", "h1", "hcurl", "hdiv", "h12"];
   var group3 = ["all3", "galerkin", "mixed", "dg", "dpg", "hybr", "staticcond", "nurbs", "amr" ];
   var group4 = ["all4", "jacobi", "gs", "pcg", "minres", "gmres", "amg", "ams", "ads", "superlu", "umfpack", "newton", "rk", "sdirk", "newmark", "symplectic", "lobpcg", "sundials", "petsc", "hiop"];

   updateGroup(group1, id);
   updateGroup(group2, id);
   updateGroup(group3, id);
   updateGroup(group4, id);

   // Example codes
   var numExamples = 24; // update when adding examples!
   showElement("ex1",  (laplace  || hpc) && h1 && (galerkin || nurbs || staticcond) && (gs || pcg || umfpack || amg || petsc));
   showElement("ex2",  elasticity && h1 && (galerkin || nurbs || staticcond) && (gs || pcg || umfpack || amg || petsc));
   showElement("ex3",  (maxwell || hpc) && hcurl && (galerkin || staticcond) && (gs || pcg || umfpack || ams || petsc));
   showElement("ex4",  graddiv && (hdiv || h12) && (galerkin || hybr || staticcond) && (gs || pcg || umfpack || amg || ads || ams || petsc));
   showElement("ex5",  darcy && (l2 || hdiv) && mixed && (gs || jacobi || minres || umfpack || amg  || petsc));
   showElement("ex6",  (laplace || hpc) && h1 && (galerkin || nurbs || amr) && (gs || pcg || umfpack || amg || petsc));
   showElement("ex7",  (laplace || meshing) && h1 && (galerkin || amr) && (gs || pcg || umfpack || amg));
   showElement("ex8",  laplace && (l2 || h1 || h12) && dpg && (gs || pcg || umfpack || amg || ads || ams));
   showElement("ex9",  (advection || hpc) && l2 && dg && (pcg || rk || sundials || petsc || hiop || gmres || sdirk));
   showElement("ex10", elasticity && (l2 || h1) && galerkin && (jacobi || pcg || minres || umfpack || newton || rk || sdirk || sundials || petsc));
   showElement("ex11", laplace && h1 && (galerkin || nurbs) && (lobpcg || amg || superlu));
   showElement("ex12", elasticity && h1 && (galerkin || nurbs) && (lobpcg || amg));
   showElement("ex13", maxwell && hcurl && galerkin && (lobpcg || ams));
   showElement("ex14", laplace && l2 && dg && (gs || pcg || gmres || umfpack || amg));
   showElement("ex15", laplace && h1 && (galerkin || nurbs || amr) && (gs || pcg || umfpack || amg));
   showElement("ex16", conduction && h1 && galerkin && (pcg || jacobi || rk || sdirk || sundials));
   showElement("ex17", elasticity && l2 && dg && (gs || pcg || gmres || umfpack || amg));
   showElement("ex18", hydro && l2 && dg && (rk));
   showElement("ex19", elasticity && h1 && mixed && (gs || gmres || newton || amg));
   showElement("ex20", (elasticity || maxwell || conduction || hydro) && symplectic);
   showElement("ex21", elasticity && h1 && (galerkin || amr) && (gs || pcg || umfpack || amg));
   showElement("ex22", (laplace || maxwell || graddiv) && (h1 || hcurl || hdiv) && galerkin && (gmres || amg || ams || ads));
   showElement("ex23", (laplace || wave) && h1 && (galerkin || nurbs) && newmark);
   showElement("ex24", (graddiv || hpc) && (h1 || hcurl) && galerkin && pcg);

   // Electromagnetic miniapps
   numExamples += 4; // update when adding miniapps!
   showElement("volta", maxwell && (l2 || hdiv) && (galerkin || amr) && (pcg || amg));
   showElement("tesla", maxwell && (hdiv || hcurl) && (galerkin || amr) && (pcg || amg || ams));
   showElement("maxwell", (maxwell || conduction) && (hdiv || hcurl) && (galerkin || staticcond || mixed) && (pcg || symplectic));
   showElement("joule", (maxwell || conduction) && (l2 || h1 || hdiv || hcurl) && (galerkin || amr || staticcond) && (pcg || amg || ams || ads || sdirk));

   // Meshing miniapps
   numExamples += 9; // update when adding miniapps!
   showElement("mobius-strip", meshing && all2 && all3 && all4);
   showElement("klein-bottle", meshing && all2 && all3 && all4);
   showElement("toroid", meshing && all2 && all3 && all4);
   showElement("extruder", meshing && all2 && all3 && all4);
   showElement("shaper", meshing && all2 && all3 && all4);
   showElement("mesh-explorer", meshing && all2 && all3 && all4);
   showElement("mesh-optimizer", meshing && all2 && all3 && all4);
   showElement("lor-transfer", meshing && (l2 || h1) && all3 && all4);
   showElement("gslib-interpolation", meshing && all2 && all3 && all4);

   // External miniapps
   numExamples += 1; // update when adding miniapps!
   showElement("laghos", (hydro || hpc) && all2 && all3 && all4);

   var allHidden = true;
   for (i = 1; i <= numExamples; i++) {  // FIXME this no longer works with the miniapps!
      if (exampleVisible(i)) {
         allHidden = false;
         break;
      }
   }
   showElement("nomatch", allHidden);
}

function initButtons()
{
   var query = location.search.substr(1);
   query.split("&").forEach(function(id)
   {
      setChecked(id, true);
      update(id);
   });
}

// make sure "no match" div is not visible after page is loaded
window.onload = update;

// force vertical scrollbar
document.getElementsByTagName("body")[0].style = "overflow-y: scroll"

// parse URL part after '?', e.g., http://.../index.html?elasticity&nurbs
initButtons();

//--></script></div>

            
        </div>

        <footer class="footer">
           <div class="container">
              <p class="text-muted alignright">LLNL-WEB-676715</p>
              <p class="text-muted alignleft">
                  Developed by the <a href="/about/">MFEM team</a> at
                  <a href="http://computation.llnl.gov/casc/">CASC</a>,
                  <a href="https://www.llnl.gov/">LLNL</a></p>
           </div>
        </footer>

        <script src="../doc/web/jquery-1.10.2.min.js"></script>
        <script src="../doc/web/bootstrap-3.0.3.min.js"></script>
        <script src="../doc/web/highlight.pack.js"></script>
        <script src="../doc/web/base.js"></script>
        <script src="../doc/web/retina.min.js"></script>
        <script src="../search/main.js"></script>
    

</body></html>