| bp1.cpp (dc00e230834c021cd7c5b556bbaba87dc4209676) | bp1.cpp (16c6c0544ec5338b4f169228ae7dfbd81a255855) |
|---|---|
| 1// libCEED + MFEM Example: BP1 2// 3// This example illustrates a simple usage of libCEED with the MFEM (mfem.org) 4// finite element library. 5// 6// The example reads a mesh from a file and solves a simple linear system with a 7// mass matrix (L2-projection of a given analytic function provided by 8// 'solution'). The mass matrix required for performing the projection is --- 26 unchanged lines hidden (view full) --- 35#include <mfem.hpp> 36#include "bp1.hpp" 37 38/// Continuous function to project on the discrete FE space 39double solution(const mfem::Vector &pt) { 40 return pt.Norml2(); // distance to the origin 41} 42 | 1// libCEED + MFEM Example: BP1 2// 3// This example illustrates a simple usage of libCEED with the MFEM (mfem.org) 4// finite element library. 5// 6// The example reads a mesh from a file and solves a simple linear system with a 7// mass matrix (L2-projection of a given analytic function provided by 8// 'solution'). The mass matrix required for performing the projection is --- 26 unchanged lines hidden (view full) --- 35#include <mfem.hpp> 36#include "bp1.hpp" 37 38/// Continuous function to project on the discrete FE space 39double solution(const mfem::Vector &pt) { 40 return pt.Norml2(); // distance to the origin 41} 42 |
| 43 | 43//TESTARGS -ceed {ceed_resource} -t -no-vis |
| 44int main(int argc, char *argv[]) { 45 // 1. Parse command-line options. 46 const char *ceed_spec = "/cpu/self"; 47#ifndef MFEM_DIR 48 const char *mesh_file = "../../../mfem/data/star.mesh"; 49#else 50 const char *mesh_file = MFEM_DIR "/data/star.mesh"; 51#endif --- 114 unchanged lines hidden --- | 44int main(int argc, char *argv[]) { 45 // 1. Parse command-line options. 46 const char *ceed_spec = "/cpu/self"; 47#ifndef MFEM_DIR 48 const char *mesh_file = "../../../mfem/data/star.mesh"; 49#else 50 const char *mesh_file = MFEM_DIR "/data/star.mesh"; 51#endif --- 114 unchanged lines hidden --- |