Hi all, Perhaps I can pick your brains. My setup is that I have two parallel distributed meshes, tria2 is a refined-and-coarsened version of tria1 in some way. Crucially, it may be a coarsening in at least some cells.
I want to project a solution1 calculated on tria1 into the FE space on tria2. Both FE spaces are DG. If I were just doing refinement then I could just interpolate, but because I'm coarsening I need to do things properly and create the load vector for the projection from solution1, then solve against the mass matrix on tria2, to get the projection onto tria2. I don't see any way to do this other than using Functions::FEFieldFunction. If there are other ways, please let me know! With FEFieldFunction, I have an implementation that works, but building the load vector is incredibly slow so I'm looking to improve it by generating the load vector in a WorkStream. I can't work out a way to pass the FEFieldFunction into the local_assembly function. The below are my steps and assumptions, so please feel free to correct any incorrect assumptions I've made. 1. FEFieldFunction doesn't have a reinit function, so I can't make it a member variable of my main class: I have to build it as and when I need it. So I can't have access inside the local_assembly function without explicitly passing it in in some way. 2. FEFieldFunction doesn't seem to have a copy constructor either, so I'm not sure how to pass it into the scratch object. My implementation 1 is my attempt at this. I've tried various combinations of passing in references, pointers, the object itself, and none work. 3. Instead, implementation 2 tries passing the FEFieldFunction in as an argument to local_assembly. Both implementations give the same error, which is also attached, but I don't know anything near enough about threading to know what it really means, or what the underlying problem is that they don't really point to. Implementation1 and Implementation2 contain a MWE that demonstrates what I need. This doesn't include the parallel::distributed::triangulation part, nor the DG, but is hopefully sufficient. Any ideas on how to get this to work, or how I might go about this in a better way, are much appreciated! Running El Capitan, Xcode 7.3.1, deal.II 8.4.0 from .dmg. Sam -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
implementation1
Description: Binary data
implementation2
Description: Binary data
In file included from /Users/sam/Desktop/Old temperature projection
MWE/old_temperature_projection_MWE.cc:2:
In file included from
/Applications/deal.II.app/Contents/Resources/include/deal.II/base/logstream.h:23:
In file included from
/Applications/deal.II.app/Contents/Resources/include/deal.II/base/thread_local_storage.h:23:
/Applications/deal.II.app/Contents/Resources/include/deal.II/bundled/tbb/enumerable_thread_specific.h:604:55:
error: type
'dealii::Threads::ThreadLocalStorage<dealii::TriaActiveIterator<dealii::DoFCellAccessor<dealii::DoFHandler<2,
2>, false> > >' does not provide a call operator
void construct(void* where) {new(where) T(f());}
^
/Applications/deal.II.app/Contents/Resources/include/deal.II/bundled/tbb/enumerable_thread_specific.h:639:30:
note: in instantiation of member function
'tbb::interface6::internal::construct_by_finit<dealii::TriaActiveIterator<dealii::DoFCellAccessor<dealii::DoFHandler<2,
2>, false> >,
dealii::Threads::ThreadLocalStorage<dealii::TriaActiveIterator<dealii::DoFCellAccessor<dealii::DoFHandler<2,
2>, false> > > >::construct' requested here
Constructor::construct(where);
^
/Applications/deal.II.app/Contents/Resources/include/deal.II/bundled/tbb/enumerable_thread_specific.h:624:34:
note: in instantiation of member function
'tbb::interface6::internal::callback_leaf<dealii::TriaActiveIterator<dealii::DoFCellAccessor<dealii::DoFHandler<2,
2>, false> >,
tbb::interface6::internal::construct_by_finit<dealii::TriaActiveIterator<dealii::DoFCellAccessor<dealii::DoFHandler<2,
2>, false> >,
dealii::Threads::ThreadLocalStorage<dealii::TriaActiveIterator<dealii::DoFCellAccessor<dealii::DoFHandler<2,
2>, false> > > > >::construct' requested here
template<typename X> callback_leaf( const X& x ) : Constructor(x) {}
^
/Applications/deal.II.app/Contents/Resources/include/deal.II/bundled/tbb/enumerable_thread_specific.h:645:35:
note: in instantiation of function template specialization
'tbb::interface6::internal::callback_leaf<dealii::TriaActiveIterator<dealii::DoFCellAccessor<dealii::DoFHandler<2,
2>, false> >,
tbb::interface6::internal::construct_by_finit<dealii::TriaActiveIterator<dealii::DoFCellAccessor<dealii::DoFHandler<2,
2>, false> >,
dealii::Threads::ThreadLocalStorage<dealii::TriaActiveIterator<dealii::DoFCellAccessor<dealii::DoFHandler<2,
2>, false> > > >
>::callback_leaf<dealii::Threads::ThreadLocalStorage<dealii::TriaActiveIterator<dealii::DoFCellAccessor<dealii::DoFHandler<2,
2>, false> > > >' requested here
return new(where) callback_leaf(x);
^
/Applications/deal.II.app/Contents/Resources/include/deal.II/bundled/tbb/enumerable_thread_specific.h:774:103:
note: in instantiation of function template specialization
'tbb::interface6::internal::callback_leaf<dealii::TriaActiveIterator<dealii::DoFCellAccessor<dealii::DoFHandler<2,
2>, false> >,
tbb::interface6::internal::construct_by_finit<dealii::TriaActiveIterator<dealii::DoFCellAccessor<dealii::DoFHandler<2,
2>, false> >,
dealii::Threads::ThreadLocalStorage<dealii::TriaActiveIterator<dealii::DoFCellAccessor<dealii::DoFHandler<2,
2>, false> > > >
>::make<dealii::Threads::ThreadLocalStorage<dealii::TriaActiveIterator<dealii::DoFCellAccessor<dealii::DoFHandler<2,
2>, false> > > >' requested here
my_construct_callback(
internal::callback_leaf<T,internal::construct_by_finit<T,Finit> >::make( finit
) )
^
In file included from /Users/sam/Desktop/Old temperature projection
MWE/old_temperature_projection_MWE.cc:2:
In file included from
/Applications/deal.II.app/Contents/Resources/include/deal.II/base/logstream.h:23:
/Applications/deal.II.app/Contents/Resources/include/deal.II/base/thread_local_storage.h:200:5:
note: in instantiation of function template specialization
'tbb::interface6::enumerable_thread_specific<dealii::TriaActiveIterator<dealii::DoFCellAccessor<dealii::DoFHandler<2,
2>, false> >,
tbb::cache_aligned_allocator<dealii::TriaActiveIterator<dealii::DoFCellAccessor<dealii::DoFHandler<2,
2>, false> > >,
tbb::ets_key_usage_type::ets_no_key>::enumerable_thread_specific<dealii::Threads::ThreadLocalStorage<dealii::TriaActiveIterator<dealii::DoFCellAccessor<dealii::DoFHandler<2,
2>, false> > > >' requested here
data (t)
^
In file included from /Users/sam/Desktop/Old temperature projection
MWE/old_temperature_projection_MWE.cc:33:
/Applications/deal.II.app/Contents/Resources/include/deal.II/numerics/fe_field_function.h:165:9:
note: in instantiation of member function
'dealii::Threads::ThreadLocalStorage<dealii::TriaActiveIterator<dealii::DoFCellAccessor<dealii::DoFHandler<2,
2>, false> > >::ThreadLocalStorage' requested here
class FEFieldFunction : public Function<dim>
^
/Users/sam/Desktop/Old temperature projection
MWE/old_temperature_projection_MWE.cc:376:22: note: in instantiation of member
function 'MWE::OldTemperatureProjectionMWE<2>::run' requested here
flow_problem.run ();
^
1 error generated.
