On Wed, Aug 12, 2015 at 10:23 AM, David Knezevic <david.kneze...@akselos.com
> wrote:

> On Wed, Aug 12, 2015 at 10:08 AM, Roy Stogner <royst...@ices.utexas.edu>
> wrote:
>
>>
>> On Wed, 12 Aug 2015, David Knezevic wrote:
>>
>> /home/dknez/software/libmesh-src/src/base/dof_map_constraints.C:827:42:
>>> error: conversion from 'int' to non-scalar type 'OutputNumber {aka
>>> libMesh::VectorValue<std::complex<double> >}' requested
>>>                    OutputNumber fineval = 0;
>>>
>>> It wasn't obvious to me how to fix this.
>>>
>>
>> Try changing 0 to 0.0?  Then add // necessary for complex
>> or some other comment to prevent me from breaking it again in the
>> future?
>>
>
>
> hmm, I still get errors:
>
> /home/dknez/software/libmesh-src/src/base/dof_map_constraints.C: In
> instantiation of 'void
> {anonymous}::ConstrainDirichlet::apply_dirichlet_impl(const
> ConstElemRange&, unsigned int, const libMesh::Variable&, const
> libMesh::FEType&) const [with OutputType = libMesh::VectorValue<double>;
> libMesh::ConstElemRange =
> libMesh::StoredRange<libMesh::MeshBase::const_element_iterator, const
> libMesh::Elem*>]':
> /home/dknez/software/libmesh-src/src/base/dof_map_constraints.C:977:87:
> required from here
> /home/dknez/software/libmesh-src/src/base/dof_map_constraints.C:705:42:
> error: conversion from 'double' to non-scalar type 'OutputNumber {aka
> libMesh::VectorValue<std::complex<double> >}' requested
>                    OutputNumber fineval = 0.0; // 0.0 required for
> --enable-complex
>                                           ^
> /home/dknez/software/libmesh-src/src/base/dof_map_constraints.C:827:42:
> error: conversion from 'double' to non-scalar type 'OutputNumber {aka
> libMesh::VectorValue<std::complex<double> >}' requested
>                    OutputNumber fineval = 0.0; // 0.0 required for
> --enable-complex
>
>
> Also, there's an error on line 282:
>
>  libMesh::FEMContext*, unsigned int, const libMesh::Point&,
> libMesh::Real)':
> /home/dknez/software/libmesh-src/src/base/dof_map_constraints.C:282:55:
> error: could not convert 'std::numeric_limits<double>::quiet_NaN()' from
> 'double' to 'libMesh::Gradient {aka
> libMesh::VectorValue<std::complex<double> >}'
>            return std::numeric_limits<Real>::quiet_NaN();
>
> I can fix that one by changing Real to Number.
>
>
>
> Let me try a complex build and see what else might be failing.
>>
>
>

I tried 6bef5e97, but that still failed for me.

The patch below fixes the compilation errors for me.

Dave

------------------------------------------------

diff --git a/src/base/dof_map_constraints.C b/src/base/dof_map_constraints.C
index f7771b9..a02532b 100644
--- a/src/base/dof_map_constraints.C
+++ b/src/base/dof_map_constraints.C
@@ -279,7 +279,7 @@ private:
         if (c)
           return g_fem->component(*c, i, p, time);
         else
-          return std::numeric_limits<Real>::quiet_NaN();
+          return std::numeric_limits<Number>::quiet_NaN();
       }
     return g->component(i, p, time);
   }
@@ -702,7 +702,7 @@ private:
               for (unsigned int qp=0; qp<n_qp; qp++)
                 {
                   // solution at the quadrature point
-                  OutputNumber fineval = 0;
+                  OutputNumber fineval(0);
                   libMesh::RawAccessor<OutputNumber> f_accessor( fineval,
dim );

                   for( unsigned int c = 0; c < n_vec_dim; c++)
@@ -824,7 +824,7 @@ private:
               for (unsigned int qp=0; qp<n_qp; qp++)
                 {
                   // solution at the quadrature point
-                  OutputNumber fineval = 0;
+                  OutputNumber fineval(0);
                   libMesh::RawAccessor<OutputNumber> f_accessor( fineval,
dim );

                   for( unsigned int c = 0; c < n_vec_dim; c++)
diff --git a/src/error_estimation/exact_solution.C
b/src/error_estimation/exact_solution.C
index 96b31ae..e710084 100644
--- a/src/error_estimation/exact_solution.C
+++ b/src/error_estimation/exact_solution.C
@@ -714,13 +714,13 @@ void ExactSolution::_compute_error(const std::string&
sys_name,
           // Real u_h = 0.;
           // RealGradient grad_u_h;

-          typename FEGenericBase<OutputShape>::OutputNumber u_h = 0.;
+          typename FEGenericBase<OutputShape>::OutputNumber u_h(0.);

           typename FEGenericBase<OutputShape>::OutputNumberGradient
grad_u_h;
 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
           typename FEGenericBase<OutputShape>::OutputNumberTensor
grad2_u_h;
 #endif
-          typename FEGenericBase<OutputShape>::OutputNumber curl_u_h = 0.0;
+          typename FEGenericBase<OutputShape>::OutputNumber curl_u_h(0.0);
           typename FEGenericBase<OutputShape>::OutputNumberDivergence
div_u_h = 0.0;

           // Compute solution values at the current
@@ -743,7 +743,7 @@ void ExactSolution::_compute_error(const std::string&
sys_name,
             }

           // Compute the value of the error at this quadrature point
-          typename FEGenericBase<OutputShape>::OutputNumber exact_val = 0;
+          typename FEGenericBase<OutputShape>::OutputNumber exact_val(0);
           RawAccessor<typename FEGenericBase<OutputShape>::OutputNumber>
exact_val_accessor( exact_val, dim );
           if (_exact_values.size() > sys_num && _exact_values[sys_num])
             {
@@ -799,7 +799,7 @@ void ExactSolution::_compute_error(const std::string&
sys_name,
             {
               // Compute the value of the error in the curl at this
               // quadrature point
-              typename FEGenericBase<OutputShape>::OutputNumber exact_curl
= 0.0;
+              typename FEGenericBase<OutputShape>::OutputNumber
exact_curl(0.0);
               if (_exact_derivs.size() > sys_num && _exact_derivs[sys_num])
                 {
                   exact_curl = TensorTools::curl_from_grad( exact_grad );
------------------------------------------------------------------------------
_______________________________________________
Libmesh-devel mailing list
Libmesh-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to