Hello!

I'm programming a Newmarksystem...

My question is, if it is possible to attach a "assemble function" which 
is a method of a class...

Example:

PoroNewmark
{
private:
// declaration of a function pointer
void (PoroNewmark::*funcP)( EquationSystems &es, const std::string& 
system_name );
public:
//...
//...
void MatrixAssembler( EquationSystems &es, const std::string& system_name );

};

PoroNewmark::PoroNewmark (...)
{
//...
//...
funcPtrAssembler = & PoroNewmark::MatrixAssembler

rNewmark_system.attach_assemble_function ( funcPtrAssembler);

//...
//...
}

This will giva a comilation error

$ make
creating dependencies for src/poro_newmark.C ...
make[1]: Entering directory `/../main'
compiling src/poro_newmark.C ...
src/poro_newmark.C: In constructor ‘PoroNewmark::PoroNewmark(const 
inp::Input*, Mesh*, MeshData*, Material*, Analysis*, MeshOptions*)’:
src/poro_newmark.C:78: error: no matching function for call to 
‘NewmarkSystem::attach_assemble_function(void 
(PoroNewmark::*&)(EquationSystems&, const std::string&))’
/opt/libMesh/libmeshOPT/include/solvers/system.h:450: note: candidates 
are: void System::attach_assemble_function(void (*)(EquationSystems&, 
const std::string&))
make[1]: *** [poro_newmark.o] Error 1

Any suggestions?

Thanks in advance
Mathias


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Libmesh-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to