On 08/04/2017 05:41 AM, Maxi Miller wrote:
Is an alternative to check the components, and set the conditions accordingly?
I wrote it like
|
template<intdim>
doubleInitialValues<dim>::value(constPoint<dim>&p,constunsignedintcomponent)const
{
(void)p;
Assert(component
<this->n_components,ExcIndexRange(component,0,this->n_components));
if(component <dim)
returnequations.initial_carrier_density;
else
if(component <2*dim &&component >=dim)
returnequations.ambient_temperature;
else
returnequations.ambient_temperature;
}
|
That's how I typically do things.
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email: [email protected]
www: http://www.math.colostate.edu/~bangerth/
--
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.