[Trilinos-Users] [EXTERNAL] Re: Epetra_VbrMatrix and Nox

Pawlowski, Roger P rppawlo at sandia.gov
Mon Feb 13 09:20:52 EST 2017


Hi Matt,

The NOX::FiniteDifference class is used to allocate and evaluate an explicit Jacobian matrix by brute force finite differencing. It is meant for debugging and is very inefficient (nox also has colored versions that are more efficient). It is hard coded to CrsMatrix and, as Mike said, will not work with BlockMap with block sizes larger than 1. I would recommend building the matrix yourself if you want performance. The finite difference and the colored finite difference objects can do this but you will need to drop the blocked objects, i.e. build an Epetra_Map instead of Epetra_BlockMap where you explicitly size the map for all dofs at each point.

A number of examples can be found in:

Trilinos/packages/nox/test/epetra

The best examples of various use cases are in:

Trilinos/packages/nox/test/epetra/1Dfem
Trilinos/packages/nox/test/epetra/FiniteDifferenceColoring
Trilinos/packages/nox/test/epetra/Thyra

Roger

On 2/11/17, 11:34 AM, "Trilinos-Users on behalf of Heroux, Mike" <trilinos-users-bounces at trilinos.org on behalf of MHeroux at CSBSJU.EDU> wrote:

    Matt,
    
    Epetra_VbrMatrix is a concrete matrix class, so I assume you are building a matrix from pieces.  This is certainly possible.  
    
    Epetra_BlockMap is a base class for Epetra_Map.  Epetra_Map “isa” Epetra_BlockMap with a blocksize of 1, so it is a specialization of Epetra_BlockMap.
    
    I don’t know what your FiniteDifference class is, but if it is building an Epetra_CrsMatrix, it will work with an Epetra_BlockMap whose blocksize is 1, but it will not work with larger block sizes.  This might be the issue.
    
    I hope this helps.
    
    Mike
    
    On 2/10/17, 12:39 PM, "Trilinos-Users on behalf of Matt McGurn" <trilinos-users-bounces at trilinos.org on behalf of mcgurn at reaction-eng.com> wrote:
    
        Hi,
        
        I was wondering if anybody has tried to use Epetra_VbrMatrix with the matrix free methods and finite differencing methods?
        
        I start by creating a Epetra_BlockMap with my specified number of unknowns at each element.  When I set this to one everything appears to work.  However when increased I get a segmentation fault within the FiniteDifference::createGraphAndJacobian.  It looks like the FiniteDifference class is trying to create a Epetra_CrsMatrix with a BlockMap.  Should I be avoiding the FintieDifference.  Should I be pulling my Epetra_BlockMap from the wrapper class Epetra_VbrRowMatrix instead of the blockMap I created?  Or am I better off just avoiding the VBR matrix and doing the matrix myself.  Is there a good example of this anywhere?  Thanks for the help!
        
        Thanks,
        Matt
        
        
        _______________________________________________
        Trilinos-Users mailing list
        Trilinos-Users at trilinos.org
        https://trilinos.org/mailman/listinfo/trilinos-users
        
    
    _______________________________________________
    Trilinos-Users mailing list
    Trilinos-Users at trilinos.org
    https://trilinos.org/mailman/listinfo/trilinos-users
    



More information about the Trilinos-Users mailing list