/*! \page faq FAQ - Frequently asked questions Many points covered in this FAQ are illustrated via Python scripts. Remember that the Python API is almost 100% identical to the C++ one, with the \ref python-api "rules listed here". \section Questions \ref faq-general -# \ref f-newbie -# \ref f-mehsf -# \ref f-constel -# \ref f-visu -# \ref f-p0p1 -# \ref f-number \ref faq-python -# \ref f-hellow -# \ref f-pyimport -# \ref f-meshscratch -# \ref f-fieldscratch -# \ref f-io -# \ref f-coher -# \ref f-groups -# \ref f-unstruc \ref faq-interp -# \ref f-proj -# \ref f-proj-formula \ref faq-cpp -# \ref f-cpp-guide -# \ref f-cpp-segfault \section Answers \subsection faq-general General questions \subsubsection f-newbie "I am a complete newbie, where should I start?" Take a look at the \ref start "getting started" section and the \ref tutorial. \subsubsection f-mehsf "What is a mesh, what is a field?" Take a look at \ref terminology \subsubsection f-constel "What is a the difference between MED file, MEDCoupling and the SALOME MED module?" Take a look at \ref library \subsubsection f-visu "How can I visualize a mesh and/or a field?" Use the PARAVIS module of SALOME to visualize your MED file. The following dedicated fitlers have been written specifically for MED files: Extract group, Extract cell types, ELNO Mesh, ELNO Points, ELNO Surface. \subsubsection f-p0p1 "What does a P0- (or P1-) field mean?" Take a look at \ref terminology \subsubsection f-number "What does surjective/old-2-new/new-2-old format mean?" Take a look at \ref numbering \subsection faq-python MEDCoupling scripts in Python \subsubsection f-hellow "Can you show me a simple example to get me started" TODO \subsubsection f-pyimport "When trying to execute my Python script I have 'ImportError: No module named MEDCoupling'" Check that the environment variables PYTHONPATH and LD_LIBRARY_PATH (PATH under Windows) are correctly set. If you have a full SALOME installation, use the 'shell' command that will automatically set up everything as it should be: \code{.sh} cd salome shell \endcode With a custom installation you may want to set the variable manually: \code{.sh} export PYTHONPATH=/lib/python2.7/site-packages/salome export LD_LIBRARY_PATH=/lib/salome \endcode \subsubsection f-meshscratch "How to build a mesh from scratch" Take a look at this example: \ref medcouplingpyexamplesUmeshStdBuild1 \subsubsection f-fieldscratch "How to build a field from scratch" Take a look at this example: \ref medcouplingpyexamplesFieldDoubleBuild1 \subsubsection f-io "How to write/read a mesh to/from a file" For starter, take a look at the \ref MEDLoaderBasicAPIPage "basic MEDLoader API". \subsubsection f-coher "How to control the validity of my mesh" Use the methods \ref ParaMEDMEM::MEDCouplingUMesh::checkCoherency() "MEDCouplingUMesh::checkCoherency()" or \ref ParaMEDMEM::MEDCouplingUMesh::checkCoherency1() "MEDCouplingUMesh::checkCoherency1()" \subsubsection f-groups "How can I read/write groups on a mesh" Take a look at \ref AdvMEDLoaderAPIMeshReading and \ref AdvMEDLoaderAPIMeshWriting. \subsubsection f-unstruc "How can I transform a structured mesh into an unstructured one" Use the method \ref ParaMEDMEM::MEDCouplingCMesh::buildUnstructured() "MEDCouplingCMesh::buildUnstructured()" \subsection faq-interp Projection, interpolation, remapping \subsubsection f-proj How to project a field from one mesh to the other This the job of the interpolation algorithms in the MED library. For starters, take a look at the \ref interpolation "general introduction on interpolation". Also \ref cpp_mcfield_remapper_highlevel "this simple example" gives a good first illustration. Finally, if you are intereseted in parallel projection (C++ only!), you should take a look at the \ref para-dec "DEC". \subsubsection f-proj-formula Which formula are used in the field projection algorithms The documentation for non \ref glossary "P0 field" (i.e. non \ref glossary "cell-based fields") is still an on-going work, but for the P0->P0 case, \ref InterpKerRemapGlobal "this page" gives a good overview. \subsection faq-cpp C++ specific questions \subsubsection f-cpp-guide Is there some coding guidelines that I should follow Yes. Please: - document your code (this is true for Python too!) - write some tests (this is true for Python too!) - and finally, take a look at the page \ref cpp \subsubsection f-cpp-segfault My C++ program produces a SIGSEGV, what should I do Re-compile in debug mode (with \c CMAKE_BUILD_TYPE=Debug), and use either valgrind or gdb to spot the place where the segfault happens. The most common source of mistake is some memory mis-allocation and/or deallocation. With this respect using the auto pointer class \ref ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr "MEDCouplingAutoRefCountObjectPtr" can be of great help. \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n */