It does have the using namespace libMesh. I did find out that at least some
of my errors (including the parallel.h problem) were do to not using the
correct compiler flags. I used
echo  `libmesh-config --cxx` -o `libmesh-config --cxxflags --include
--ldflags --libs`

 and found out that I should use  the compiler command:
mpicxx -o HPeigenproblems_PZ_8_2_16_2 HPeigenproblems_PZ_8_2_16_2.C -lz
-Wl,-rpath,/usr/local/lib -L/usr/local/lib -lmesh_opt -I/usr/local/include
-pthread -I/usr/local/include -std=gnu++11 -O2 -felide-constructors
-funroll-loops -fstrict-aliasing -Wdisabled-optimization -fopenmp

I used that compiling command and commented out parallel.h and
parallel_algebra.h. This reduced the number of errors reported by the
compiler to a more manageable number so I am including them below:
/opt/libmesh-1.0.0-rc1/include/libmesh/mesh_generation.h:130:67: error:
‘libmesh_nullptr’ was not declared in this scope
                       QueryElemSubdomainIDBase * elem_subdomain =
libmesh_nullptr);
                                                                   ^
In file included from HPeigenproblems_PZ_8_2_16_2.C:7:0:
/opt/libmesh-1.0.0-rc1/include/libmesh/equation_systems.h:93:58: error:
‘libmesh_nullptr’ was not declared in this scope
   EquationSystems (MeshBase & mesh, MeshData * mesh_data=libmesh_nullptr);
                                                          ^
/opt/libmesh-1.0.0-rc1/include/libmesh/equation_systems.h:264:50: error:
‘libmesh_nullptr’ was not declared in this scope
                              const FEType * type=libmesh_nullptr,
                                                  ^
/opt/libmesh-1.0.0-rc1/include/libmesh/equation_systems.h:265:73: error:
‘libmesh_nullptr’ was not declared in this scope
                              const std::set<std::string> *
system_names=libmesh_nullptr) const;
                                                                         ^
/opt/libmesh-1.0.0-rc1/include/libmesh/equation_systems.h:285:74: error:
‘libmesh_nullptr’ was not declared in this scope
                               const std::set<std::string> *
system_names=libmesh_nullptr) const;
                                                                          ^
/opt/libmesh-1.0.0-rc1/include/libmesh/equation_systems.h:315:88: error:
‘libmesh_nullptr’ was not declared in this scope
                                             const std::set<std::string> *
system_names=libmesh_nullptr) const;

^
/opt/libmesh-1.0.0-rc1/include/libmesh/equation_systems.h: In member
function ‘bool libMesh::EquationSystems::has_mesh_data() const’:
/opt/libmesh-1.0.0-rc1/include/libmesh/equation_systems.h:560:23: error:
‘libmesh_nullptr’ was not declared in this scope
   return (_mesh_data!=libmesh_nullptr);
                       ^
/opt/libmesh-1.0.0-rc1/include/libmesh/equation_systems.h: In member
function ‘T_sys& libMesh::EquationSystems::add_system(const string&)’:
/opt/libmesh-1.0.0-rc1/include/libmesh/equation_systems.h:577:17: error:
‘libmesh_nullptr’ was not declared in this scope
   T_sys * ptr = libmesh_nullptr;
                 ^
In file included from HPeigenproblems_PZ_8_2_16_2.C:11:0:
/opt/libmesh-1.0.0-rc1/include/libmesh/sparse_matrix.h: At global scope:
/opt/libmesh-1.0.0-rc1/include/libmesh/sparse_matrix.h:99:10: error:
‘UniquePtr’ does not name a type
   static UniquePtr<SparseMatrix<T> >

If it helps I can provide the example code I'm using. I'm using libmesh
version 1.0.0.

Harry Pearce


On Wed, Aug 3, 2016 at 1:12 PM, John Peterson <[email protected]> wrote:

>
>
> On Wed, Aug 3, 2016 at 2:06 PM, Harry Pearce <[email protected]>
> wrote:
>
>> The example code I am trying to compile is HPeigenproblems_PZ_8_2_16_2.C.
>> This is where I added #include "parallel_algebra.h" and "parallel.h". The
>> errors all seem to have to do with things inside header files being "not
>> declared in scope" not naming a type,  etc.
>>
>>  For example:
>> In file included from HPeigenproblems_PZ_8_2_16_2.C:4:0:
>> /opt/libmesh-1.0.0-rc1/include/libmesh/mesh_generation.h:130:67: error:
>> ‘libmesh_nullptr’ was not declared in this scope
>>                        QueryElemSubdomainIDBase * elem_subdomain =
>> libmesh_nullptr);
>>
>
>
> Hmm... try putting a:
>
> using namespace libMesh;
>
> at the top of your app?  If it's been a while since you last updated
> libmesh, your code might not be properly namespaced...
>
> --
> John
>
------------------------------------------------------------------------------
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to