Hi John, thanks for the support!
Maybe it is missing a resizing on the example:
https://github.com/libMesh/libmesh/blob/master/examples/fem_system/fem_system_ex1/naviersystem.C#L55

Regards,

On Tue, Jan 17, 2017 at 1:33 PM, John Peterson <[email protected]> wrote:

>
>
> On Tue, Jan 17, 2017 at 1:06 AM, Fabio Canesin <[email protected]>
> wrote:
>
>> Dear experts,
>>
>> I'm trying to define a analytic solution as BC using the DirichletBoundary
>> class, for that I'm using FEMSystem ex1, my problem is 2D and I want to
>> prescribe u and v. From my understanding the DenseVector<Number> & output
>> was the same size as variables input when constructing the bc object, but
>> I'm passing a vector with 2 variables and output has only one value, so
>> the
>> program crashes with the assert:
>>
>> Assertion `i < _val.size()' failed.
>>
>> i = 1
>>
>> _val.size() = 1
>>
>> Should I resize output or define once for each variable ?
>>
>
> Yes, inside operator() I believe you are meant to resize the output
> DenseVector reference to fit the number of values you are planning to
> compute.
>
> --
> John
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to